Proton Arduboy Simulator (for Windows Visual C++ 2005)


Got my Arduboy and have been playing with it, cool little device!

I hacked together a thing that let’s 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, and probably a lot more stuff.

A vine movie of it in action can be seen here.

Supports html5 compiles, try in your browser here.

Why do I still use MSVC++ 2005? Because I’m old and like the IDE better than the 2015 version, despite also using that for some of my other stuff.

More details and info on downloading and getting it to work here

Silly question - can i develop and test without flashing the arduboy each time? (osx)
Online Developing
The Bounce - A ball physics platformer
Wip game 'Cactusman loves diamonds'
Picovaders - a space invaders-like shooting game
Welcome New Developers! A Listing of Development Links and Articles
Welcome New Developers! A Listing of Development Links and Articles
Ardu-man: ("inspired" by Pac-Man)
Emulator for teaching
arduboy.justPressed() question
Are there Arduboy Emulators? [Yes]
(Holmes) #2

This is freaking amazing! Can’t wait to download and run this. Besides what you’ve mentioned, have you found any other major draw backs?


Hey crait. I’m using it to develop a sort of pacman “inspired” game right now and it’s working great so far


Committed some updates, added html5 export and some very basic incorrect sound playing for tone() commands. Here is the Arduboy Breakout example, playable in your browser!

(Holmes) #5

Holy cow!! That’s amazing! Great work, man!!

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 :slight_smile:. I don’t have an Arduboy so I’m using this for development and it works great on Visual C++ Express 2008.



Some recent improvements are now committed:

  • 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

(hisadg) #8

1.1 support is very nice!
I’ll check latest version later :smile:

(hisadg) #9

I could run the simulator in Visual Studio 2015 (community edition). After solution and project file conversion, I added the following changes to the source code in work directory.

I’m not familiar with VS2015 and modern C++ specification, so I may be wrong. :sweat_smile:


To use hash_map in VS2015, I add the definition of _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS into shared/Manager/VariantDB.h

#ifdef _MSC_VER >= 1700


Build error log said that “uint32_t is already declared”. In VS2015, uint32_t seems to be declared in stdint.h. So I added the following changes to shared/Arduboy/Arduino.h


#ifndef _SDL_stdinc_h
typedef uint32 uint32_t;


#ifndef _SDL_stdinc_h
#ifndef _STDINT;
typedef uint32 uint32_t;

(Holmes) #10

That’s all you had to do to get it to work?? :smiley:

(hisadg) #11

Yes, after changing two files (VariantDB.h and Arduino.h), I could play ArduBreakout by the simulator! :slight_smile:

Here is my environment:

  • Windows 10 Pro (Japanese language)
  • Visual Studio Community 2015 (Version 14.0.25123.00 Update2)
  • Visual C++ 2015 is installed as VS2015 component
  • Subversion revision number is r1412.


Thanks hisadg123, I’ve committed your changes


I can make games (sort of), but not emulators, so my question might be dumb as hell:

Would be ever possible, to use a hex file (a compiled version of the game) in the emulator you’re working on?


Not dumb at all :slight_smile: 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.


Thanks for the new update, the changes look great!


I have tested this simulator today. It woks well on my VS2015 on Windows7 PC.
What a great tool :smile:
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!


Now it works ! Thanks !!

(Holmes) #19

It would be great if someone could make a tutorial for setting this up in the #arduboy:guides section!