I’ve been thinking to make a game to Arduboy, but realized that complie&upload isn’t a very efficient a way of debugging. So I spent a weekends and made a proof-of-concept of an Arduboy emulator:
I just, basically, combined simavr with SFML. What it does, it literally runs machine code for atmega32u, and emulates SSD1306 for display with SPI. Buttons just toggle ports, and sound output goes to the SFML’s audio stream.
So I am wondering whether the community actually needs this. The forum says there’s a JS emulator already, and the one that just implements Arduino library so you actually compile the code for PC.
Actually, before making the post I didn’t even know the JS emulator existed. Yet, it took me two days to make a simple concept with simavr, yet simavr is in development for 7 years already, so I wonder if doing actual proper avr simulation (like in the JS emulator) yourself might be a tough pill to swallow.
So my question is, is there a place for alternative emulator here?
Possible features that this emulator might have:
- GDB debugging, as simavr supports this (literally, having breakpoints and evaluating variables, according to the arduboy memory map)
- Have some decent IDE instead of Arduino IDE (printf kind of debugging is just frustrating) configured, so when you hit play, you see emulator immediately and can have breakpoints hit.
- Save and load state
- Debug EEPROM
- Edit flash memory on the fly (like update sprites to see how they fit the game, while you’re in it)
- Save emulation to a video file
Probable issue here, that emulator will never cover the actual device. Timings might be different, and currently the bootloader is not used. Yet, I’ve run several games here, and they seem to work just fine.