I wanted to test some code in the emulator before I bought an arduboy to see what programming one was like but it doesnt run in the emulator.
What do you mean it doesnāt run in the emulator? Does programming, or opening a .hex/.arduboy not work?
I can drag a .hex of an arduboy game and run it just fine in Project ABE. It seems though that programming does not work however.
You could code in an external IDE/code editor, build it, then just upload the .hex to Project ABE. It is pretty tedious though.
I know that on my end, (a) games are unplayable because the framerate is locked to your screen refresh rate, and (b) thereās never any sound because āAudioContext not allowed to startā because it has to wait for a user gesture:
I canāt get sound to work on the standalone version of the emulator either, so perhaps thereās some timing issue? I donāt know, I just figured the emulator was āout of reachā unless your system is set up in a certain way. I canāt even play the embedded games on this website, and none of them have sound either (same error).
Currently the compiler in the emulator is broken, the server the build tool was hosted on is no more. I need to bring it all onto arduboy.com but Iām not a very good system admin so donāt know how to deploy it. Iāll get around too it soon as I submit Arduboy Mini to production.
Can you please give us some more info:
What platform you are running, Windows, MacOS or Linux.
What you did to deploy the emulator.
Did this error come up when you started the emulator or when you dragged a .hex file onto it.
Sure. The screen issue is a known error Iāve seen reported both here and in github, so I donāt think thatāll get fixed. I have a 165hz display and I assume the emulator uses requestAnimationFrame()
or something similar, so solutions are inconvenient and I understand that.
As for the sound issue, I assume that comes from timing issues of trying to set up the audio while the page is still considered a ābackground tabā, although I donāt really know. Anyway, when I say itās āunusableā what I mean is, because games play at 3x speed, they in no way reflect how they run on hardware (and also most of the games are ridiculously hard at 3x speed lol). The emulator āworksā in that I can drag hex files to it and they always run, so Iām sorry if I painted a false picture. I mean that it is unusable āto meā. I donāt have a second monitor that isnāt 165hz and the monitor canāt be safely clocked at 60hz, which is a known (and dumb) issue for higher refresh rate monitors that arenāt⦠expensive. Plus, with no sound, Iād have to upload it to hardware to test that part anyway, so I might as well just always upload to hardware (which I donāt have yet).
The same visual and audio issues occur in both the browser and the standalone. As for the browser, the issues occur whether it is the embedded emulator here in the forum, the github pages link, which I use to load old games from the sidebar, or if I drag the hex file into it. The browser is Chrome 110.0.5481 running in Windows 11. The version of the standalone is the latest windows release from the repo. As a relatively experienced web developer, Iād like to pre-empt the āI canāt recreate the issue on my side with the same setupā and say that I understand how difficult web development is and I donāt expect these things to be easily reproducible. Especially when it comes to generating sound, where the landscape within browsers is⦠egh.
The audio issue I linked above shows up on page load, not when the emulator runs with a game. Anytime it is trying to set up the audio context, it appears as though it may be doing it too early, or that the page isnāt visible and so it says āyou canāt do this because we donāt want audio playing in background tabsā, I donāt know, browsers are a pain. I can sometimes get audio to work and that error doesnāt show up if I specifically ensure the āemulatorā part is not what loads first, and instead the browsing page which lets you pick old games. But if that error EVER shows up, the sound is broken for the entire duration. Since the error suggests the audio context must be manually resumed/created after a user gesture, I assume the fix is to test whether audio context hasnāt been set up or if itās in an error state at the point of running the emulator (probably a good check to do every time), and reinitialize it if so.
Ah, I see I though it never worked.
Must be some monitor!
Yes, its disappointing that the sound doesnāt work in the emulator properly. When it does make noise its all wrong and, as you say, if it doesnāt start properly it is out for the rest of the session.
I find that my development is 97% game play development (coding) and 3% sounds so this is not a big issue to me. Actually, its more like ⦠48% code, 2% sounds and 50% debugging the mess I have made
I have never bothered looking at the errors that appear in the browser console. Now I am curious and will see if that happens for me. I am using FireFox on MacOS.
Sorry I can not give you any real info but maybe Felipe (@FManga) might chime in.
When I first started reporting speed issues related to running over 60hz people thought I was wizard. There are 540hz screens now I can only imagine what the emulator would look like there.
I asked @fmanga about it but he said that he used milliseconds before but that lead to instability due to browsers intentionally reporting false results to prevent malicious behavior.
I think a possible solution is to sample the millisecond so that you can establish what fps the user monitor is at, (it may actually be reported by the user agent) and then apply a divider to the output frame per second.
Best as I understood he encouraged me to take on this fix. Once I can get around to deploying it here thatās something Iād like to try.
Iāve got to give Firefox a try! Been looking for a new browser since Safari doesnāt copy images properly anymore; it always copies the image address. Seemingly everyone (with a few exceptions) here seems to use it.
I like FireFox because I donāt like giving Google any information if I can avoid it
Spies everywhere
I posted an interesting poll a while back to find out, and Firefox did come out top for desktop browser.
Itās not really scientific, but the response was pretty decent.
Iām using it right now, and itās much cleaner than I thought!
My only (small) gripe is that the app logo has a purple background!
I donāt think a background goes very well due to the circular shape, but I think every app must have a solid background on MacOS.
I meant the programming part but I guess I will do what you said with the external ide
Not true. I am looking at my machine and only Firefox has a solid background.
Seeing you are using Firefox and learning HTML / CSS / Javscript you should look at the tools you get by pressing F12! They are great. Of course Chrome has them as well ā¦
Oh, yeah thatās true. For me, the Unarchiver, Logi Options, and Unity/Unity Hub are not shaped like a ānormalā app, so I guess they must have transparent backgrounds or masks or something.
hehehe
Thatās how I found the Arduboy banner color
You can go to Sketch
> Export compiled binary
then use the .hex
that does not have the ābootloaderā bit in the name.
any update on this?
I tried the emulator a few days ago and it is still broken.
Seems some forum code is broken.
When including the emulator in an iframe, it still works:
@Bateske can we have the new sim / debugger by @brow1067 also have working in an iframe? (The iframe below doesnāt work)
Edit: Nevermind, you guys where talking about compiling code not the emulation part
The code development is broken because where the compiler is hosted ended. I have been meaning to work to rehost this to one of my domains but Iām on squarespace so I donāt actually have anywhere to deploy it directly at the moment. Iāve got to get SSL back up on the old host and give it a domain, thatās going a long with a rework of the website that will bring the emulator to the front page as well.
Is there any way to include the work by @brow1067 hosted on the web?
If there is a sysadmin who is good at this stuff can hold my hand over a web call would be grand, but I wonāt be ready for at least 2 or 3 more weeks when getting caught up on other design/production work.
If anyone is really eager and thinks they can deploy it themselves and wants a job let me know too.