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!
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?
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.
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.
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.
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.