Got my Arduboy and have been playing with it, cool little device!
I hacked together a thing that lets me use my comfortable Visual C++ 2005 IDE for running/debugging Arduboy stuff, presenting it here in case anybody wanted to try it or see the code.
It’s not an emulator, it just fakes the Arduboy 1.1 and 1.2 API well enough to compile and run Arduboy source code. It lacks audio (well, it can do a half hearted attempt at tone(), that’s about it) & eeprom support (actually that was added later), and probably a lot more stuff.
I got some errors when compiling this, but I think it’s because I have a lot of plug-ins and what-not in my Visual Studio. I’ll have more time to tinker with it tomorrow morning. I’ll leave an update with how it went, too.
Thanks for making this awesome simulator! I find it really useful and I’m sure a lot of other people do too . I don’t have an Arduboy so I’m using this for development and it works great on Visual C++ Express 2008.
June 2nd 2016: Now plays simple tones (to use, Switch build to “SDL Debug GL”, you’ll need SDL 2 libs), display more accurately simulated, supports HTML5 web version, just run /html5/build_release.bat to make it
June 7th 2016: Can now compile both arduboylib 1.1 and 1.2 code, 1.1 is now default and ardubreakout code was changed to the 1.1 version. Should define RT_ARDU_DEV_BRANCH for 1.2 code, will fix timing to match 1.2
June 8th 2016: Landscape mode support: ArduboySim’s App.cpp adjusted, uncomment #define RT_ARDU_LANDSCAPE and you can play sideways
Not dumb at all This can not run hex files - it just fakes the API well enough to run identical code with Visual C++ IDE. More of a simulator than emulator, so it requires the source code, and would take some work to run anything other than apps that use the normal Arduboy 1.1/1.2 classes at that.
So really, the only reason for this setup is you can debug and test your app’s code without using a real device (I find that much faster for me as I am used to the Visual C++ IDE and instantly running changes is nice) and a bonus is it’s possible to send someone an .exe or html5 version.
I have tested this simulator today. It woks well on my VS2015 on Windows7 PC.
What a great tool
Now I have one request and two questions.
In landscape mode, it is preferable that the mapping between buttons and cursor keys
follows the display rotation. The UP key should represent LEFT button, for example.
The html5 export stops with “SDL2/SDL_mixer.h file not found” error. I found the file in
’shared/win/include’ directory. Should’nt it go ‘shared/’ directory ?
I moved ‘shared/win/include/SDL2’ folder into ‘shared/’ directory and tried to build html5 again, no error occured, .html and .js files successfully generated.
But this html / js stops with a message
"Audio driver 0: Emscripten Audio
Compiling without ’-DRT_USE_SDL_AUDIO’ directive produces good html/js which works correctly with no sound. So I think there may be a problem around SDL audio…
Hey boochow, sorry about that, I’ve fixed the html5 build on svn. Your fix would have worked but I had added a SDL_AudioInit to my crossplatform SDL code to fix something on the Windows side, but emscripten doesn’t support it and it kills it. I’ve wrapped it with a #ifndef PLATFORM_HTML5 and now it’s ok. Anyway, nice to see someone using it!