Arduboy: SlimBoy. My DIY

Hey everyone. I’ve been looking for a ‘console’ to put some of my energy into. I dabbled with Pico8, Pyxel and Basic8. I enjoyed the games and such, but I wanted hardware. I’m more of a hardware person than software. But I want to do both!

I am late to the party, but I might see that as good. Now there are tons of documents, libraries, etc for me to explore. I’m hoping to get my hands on an FX soon, but in my country the prices aren’t great right now. I made my own based on the Atmega32p port with I2c Display; Slimboy(?),

I used some cheap perf-board and made it quick. It has an RGB led, and a ‘buzzer’ for sound. It’s very quiet, as it’s not meant for more than a 5V buzz. Under the OLED is a couple of caps to stablise the power. I can power it either via a DC jack or the USB-C on the Nano. The Nano is socketed, which is nice to quickly switch games. No FX Chip mod here!

End goal here is to use this as a ‘dev-kit’ for testing when building a game or app. This will let me test building on another device besides the ‘official’ Arduboy. Pics below. Thanks everyone, I’m having a blast reading and catching up on topics! :grin:

1 Like

You should add one in Version 2.0 … it might be easy to flash games now but people are starting to develop games that require the FX chip.

I assume the use of a Atmega32p chip would not preclude using an FX chip. I understand its very similar to the 32u4 in the Arduboy except it cannot emulate a USB device. Maybe I am over simplifying it?

I’d have to dig deeper into the library to see what exactly is going on. The chips are so close it’s crazy, haha. I wouldn’t mind adding FX to this design!

If your board is an Arduino Nano or equivalent clone it will have an ATmega328p, not an ATmega32p. Here’s a similar project:

Holy moly! Is that white thing the buzzer? +1 for liberal use of hot glue

1 Like

I probably should have been more clear, my fault. I am using the harbaum mod/library.

Also, yes! Kevin that is the buzzer I got a TON of new old stock from the now defunct Radio Shack Canada. Buzzers were some.:smiley:

Ps, I also have a surplus of hot glue :stuck_out_tongue:

1 Like

What is that? I googled it and came up with some libraries for using fishertechnic with the Arduino but that doesn’t relevant.

Right here. GitHub - harbaum/Arduboy2: Arduino Nano port of the Arduboy miniature game system a port of Arduboy2 to the Atmega32p and the. SSD1306 I²C display. A few other libraries mentioned in there have been ported as well.

500 bytes less! I would be surprised if any of my games work.

1 Like

I’ve run into a few games so far that won’t fit. Very close too. I hadn’t noticed if they were yours or not. I also have run into a few libraries that haven’t been ported to the nano and I²C.

Don’t forget that being able to ‘fit’ isn’t necessarily enough either, you need room for the call stack. How much is needed varies per game, but the compiler won’t tell you, and sometimes it actually can’t know in advance how much is needed.

In other words, you might find that a game ‘fits’, but crashes later on because it ran out of memory at runtime.

1 Like

I never even thought of that! I’m so used to high-level stuff like Python, where all that is just hidden.

So in the case of the Arduboy is the memory taken up by the same example given in your link? The program has to ‘remember’ where it came from to return after a sub-routine?

More or less any language higher than assembly hides the details of function calling. Even with something as low-level as C++ or C it’s hidden (though not quite as hidden since you can inspect memory arbitrarily, in practice if not by ‘law’).

The compiler automatically handles function calls for good reason: it’s tedious and doing it by hand would be error-prone.

Not exactly the same, there are many different architectures and calling conventions that have slightly different behaviours.

I suspect the example used on Wikipedia is based on x86, which is what the majority of modern desktops and laptops use.

I believe the Arduboy would use the arrangement outlined here, though I’m not certain.

That much at least it definitely has to do. More or less all calling conventions save a return address.

(That wasn’t always the case throughout history, there was a time when a different arrangement was used that made recursion impossible, but these days more or less all systems push a return address onto a stack to allow for proper recursion.)

If the link to the GCC documentation that I posted above is correct, an AVR stack frame would also include saved registers, function arguments and potentially local variables, but it depends on the number of arguments, the size of the arguments, which registers are needed by the function and the caller, the size of the return value et cetera.

Great reads, thank you @Pharap. I have a lot to learn. I’ve been using Arduino and clones for years. I still have my old Duemilanove here on my desk. But most of my projects have been simple things, nothing like a game/app on the Arduboy. I’m just not sure where to start!

You don’t have to know all this stuff to write software, but the more you understand about how computers work (in terms of RAM, registers and CPU instructions), the easier it becomes.

Just make a simple game.

Pong. Breakout. Space Invaders. Noughts & Crosses. A sliding puzzle.

(I was going to say a maze, but that’s actually harder than you might expect, unless it’s the same maze every time.)

Anyway, if the goal is just to practice programming and/or improve your skills, it doesn’t matter if it’s a game that other people have already made, just as long as it’s something simple enough to finish but complex enough to teach you a new skill.

There are some good beginner lessons here >

Start with @crait’s ‘Make you own Arduboy game’ series before attempting my ‘Make your own sideways scroller’.

I must confess though, I a m a little puzzled as to why you would build a clone using a Arduino Nano. The Arduino Micro is readily available and the same price as the Nano and has the same process as the Arduboy (ATMega32u4) … just makes life so much easier.

Was more about the parts on hand than what is official. I already have a ton of Nanos from other projects and same for the i²c display. Just spare parts.

I’d order an FX but after exchange and shipping it’s over $100. So for now, this is ok.

I’ll check out these series. Thanks!

Ah … I see. Fair enough.


The first Arduboy was 328p and so was the Micro Card

Yes … I remember the MicroCard was a 328P.

I had to strip the scenery out of 1943 to get it to fit when I ported it to the MicroCard to get it to fit.