The ODroid GO is a handheld console that sells itself as a device that will run emulators of all your favourite 8bit systems. And it does that job rather well, I spent at least five minutes with mine playing Tetris, and it was a good emulation. Then I installed the Arduino libraries for it, plugged in a USB cable and started trying things out.
I quickly came to the realisation that the Arduino libraries were easy to use, but if you wanted to make a game, they were also very limited. The ESP32 has its own RAM, but can also have external RAM attached to its SPI bus. The ODroid GO comes with 4MB of external RAM. Unless you use the Arduino libraries, and then the external RAM doesn’t exist. Doing basic things like writing text and drawing coloured squares is easy. Sprites and actual gamey stuff requires much more effort, and the Arduino libraries hide a lot of the functionality from you.
My aim is to write Snake for it, to learn how the system works. I made Snake work on my Arduboy (a similar device, but based around an actual Arduino) before it died, so I have the logic sat in an Arduino sketch to look at. All I need to do first is
- Figure out how to draw on the screen
- Understand how to make use of the two CPU cores
- Work out user input
So far I can do the first two. There’s no documentation for any of this, beyond a rather helpful Github repository belonging to one of the people who wrote the emulators for it, and a forum that contains the odd useful snippet of information. I spent several hours going through the code tracing it out by hand to understand what was going on with it.
You follow that kind of logic for a few hours and things start to make enough sense to copy and paste code into your own file to test. After fixing the inevitable compiler errors this happens…
It also turns out that if you create a block of memory using 16bit pointers, and then pass it around in your code using 8bit pointers things get a little… screwy.