ProjectABE (ArduBoy Emulator) released!


That is what I am thinking.
But anyway, it was very cool to have the emulator (especially when I just found out about the full screen mode yesterday)
Some stuff I noticed, however:

  • If you wrote if(arduboy.pressed(A_BUTTON | B_BUTTON)) /*do somme stuff*/, pressing button “A” annd button “B” on the keyboard does not work as intended. Maybe a bug or something.
  • The sound is not working properly, and will give off one-toned, extremely distorted, brief periods of sound.
  • The game’s speed is not working correctly, although it might have to do with CPU speed (yes, my i7@1.7GHz was significantly slower than my i5@2.3GHz), but still…
  • The … erm… yeah, the sketch problems.
    – The sketch you wrote in it is NOT saved (or it is VERY confusing on saving stuff)
    – The thing can’t compile the code (even though I gave it the Arduino directory)
  • The program’s inner name was still “nwjs”, although it don’t really matter
  • The program had a very odd icon (and trying to alter it with VisualStudio didn’t really work)

Those are the problems I saw, with the most important ones on the top.
You certainly did a amazing job putting it together (together with the nwjs community, as you said in the program description or somewhere), it was just these little problems you might not even need to fix–you just needed to import your new code for your latest version of ProjectABE.
I think the desktop was version … 1.3.5?

(Erwin) #447

There will be a newer Windows release? I am having some issues with the current one when recording a gif, sometimes the file is not generated :confused:

(Felipe Manga) #448

There will be, though I’m stuck with some other projects to finish first (I admit I’ve been having way too much fun with my Pokitto lately :stuck_out_tongue: ).

ProjectABE started as an experiment to see how an emulator core based on RegExps would run. At the time (has it been a year, already?!) it was alright, but I’d really like it to perform better. Also, I was new to microcontrollers in general, so it served as a first project to learn how they worked and I’d do some things differently now. As a prototype, it achieved 90% of what I wanted. To reach 100% I need to write the real thing. That’s why I never bumped the version number to 1.0.0.

Now there are other options (variations based on WebAssembly) that have the potential to be much better and I’ve been evaluating them. I wrote a classic interpreter and a JIT-based emulator for the Pokitto. Both cores, especially with multi-threading, perform better than the pure-javascript one in ProjectABE. The only issue is that multi-threading in webassembly still has some limitations, but they should be going away pretty soon.

The other advantage to using webassembly is that the “offline builds” can be simple, tiny, native-speed C++ applications instead of a webpage packaged with its own browser. That also means I’ll get to avoid weird issues like the unexplained processes spawning in the background.


And in fact, is not a easy thing to find on this web.

I like that. But first, I need to learn how to write a simple, tiny C++ application…
More motivation toward coding … :slight_smile:

If you can pack the whole thing up so it acts as a html file, that sounds great, too.
like the … ???
The bitmap encoder. That’s the one.
! It’s almost 450 posts. We are hitting the post limit!

(Simon) #450

Actually, its 500 posts.

(Erwin) #451

Well, I understand that it will be never 1.0 but it is quite good as is. I was just wondering why the gif are not always generated in the Windows version. Is it just because is an older version?

(Matt) #452

ProjectABE is an essential tool. Making games without it would be quite arduous. So thanks @FManga for building it!

(Felipe Manga) #453

I don’t think I’ve seen this behavior. The offline builds tend to be behind the online one, as that is easier to test and release.
Does it always happen with a certain game, or if it has been running for a certain amount of time? :thinking:

Glad to hear it has been of use. :smiley:

(Erwin) #454

Well, it is a fresh launch every time. When I drag a game, once a while I get the dialog asking if I want to transfer OR just the emulation (I think is related with the time I wait before dropping the .hex file)

Then I press record and when stopping the record after 20 secs the GIF button sometimes does not appear. Like once every 5 times.


Are you supposed to have that thing??!!

I don’t even know what is that …

And attempts to record a gif never worked…


Is that the issue where the gifs are just black? I mentioned that I think in the last gamejam thread and then it got fixed. I haven’t recorded anything since then though.

(Stephane Hockenhull) #457

@FManga I’m sorry, I broke it.

Not sure if it’s something wrong I do with the OLED or that particular memory layout isn’t emulated.

I use

A0h, X[0]=0b: column address 0 is mapped to SEG0 (RESET) 
A[1:0] = 01b, Vertical Addressing Mode
A[4]=1b(RESET), Alternative COM pin configuration 
A[5]=0b(RESET), Disable COM Left/Right remap

static const uint8_t init_cmds[] PROGMEM = {
	0xA8, 64-1,
	0xD3, 0x00,
	0x8D, 0x14,
	0xDA, 0x12,
	0x81, 0xFF,
	0xd9, 0x22,
	0xDB, 0x00,
	0x20, 0x01,

And I use both sound pins as if they were two channels, on a 16Khz timer.

(Felipe Manga) #458

I think that layout wasn’t implemented. I’ll have a look as soon as I have some time free.
Is the full source available somewhere? It’s easier to debug with source.

(Stephane Hockenhull) #459

Mapping is like this:


Starting at the top left (Looking at it sideways, as a 64x128 screen, so it’s actually the top-right on Arduboy), going right (down on Arduboy), with the lsb on the leftmost pixel (0x01 = leftmost, 0x80 = rightmost (8th pixel down on Arduboy) ).

And I’m using
Timer 3 for 16KHz audio
Timer 1 for 61Hz “vsync” interrupt (game is doing stuff so that one works fine)

(Scott R) #460

I’ve been using ProjectABE with the screen rotated 90° using Adafruit_GFX and setRotation(1)

Not 100% sure but I think that just switches x,y though

(Felipe Manga) #461

I implemented the missing SSD1306 commands and it doesn’t look garbled any more.
There is something wrong with the CPU emulation, I think. The game crashes and resets randomly.
I don’t have the time right now to pinpoint the cause.

@rv6502: It should be working now.



Can you explain how am I going to record .gif with that thing?
I think I press “G” on the keyboard for that, but I am not sure how …

(Scott R) #463

Press R to start / stop recording.
Once stopped click on GIF to download.