Profile photo
Alex Spaeth

ARM7 Nostalgia Trip

22 Sep 2024
No educational value, just a quick storytime about my GameBoy Advance.

Last weekend I was looking for something in the files on my old hard drives, but I completely forgot what it was because instead I found the first Gameboy Advance game I wrote.

I don’t do much of it anymore, but the reason I got into programming in the first place was games. I was 10 or 11, which means I felt really grown-up when my parents got me a book called “3D Game Programming for Teens.” I played around with a Windows program called Blitz Basic for a while, but my favorite games at the time were on the GBA, so by the time I was 15, I found some homebrew GBA dev tools and an emulator, and wrote a bunch of little games.

It was a really formative time for me as a programmer. Obviously I had to start writing C and assembly instead of Basic, but more importantly, it meant learning about how computers work, not just how to run code inside an IDE. I really recommend this for anyone serious about getting into software engineering![1]

The Game

It’s a Tetris clone. It’s called WALLRIS, you know, because it is like Tetris and you build a wall. Get it? It’s a very clever name, and 15-year-old me hopes you appreciate that.

A screenshot of the game running in an emulator.
The game running in an emulator.

If you’re interested, I’ve embedded it right here using EmulatorJS. The controls are listed in the table below. Gamepads are probably supported but may take some configuration. If you have an emulator you like, you can also download the ROM directly.

Action GBA JS
Move Block D-pad Arrow Keys
Rotate right A z
Rotate left B x
Rotate 180° L q
Swap held block R e

The Game IRL

Way back when I was making this, I didn’t even have a flash cartridge for playing the game on real hardware. Actually, I thought they were illegal! But they aren’t, and now I’m 29 and I can buy anything I want subject to boring adult budgetary constraints, and the things are like $20, so of course I bought one. And somehow it actually works!

The game running on a Gameboy Advance SP in a dark room.
The game running on my GBA SP in real life.

Next Steps?

At the time, I got so into low-level programming that I stopped working on games. I only got like 80% of the way into Space Invaders before I went full OS developer and wrote a preemptive scheduler.[2] And then I was annoyed that the GBA didn’t have a memory management unit, meaning I couldn’t protect the memory of one process from another, so I went down that rabbit hole too and started designing a whole computer. I never finished, but come to think of it, maybe that one is the project I should credit with teaching me all this stuff. 😅

But now I kind of want to get back into it. I’m lucky because the toolchain I was using at the time, devkitARM, is still maintained, and it was zero trouble getting their test programs compiling and running on emulators and hardware.

It was a different adventure getting my own source to compile again, because 15-year-old me didn’t know git and apparently quit halfway through some kind of refactor, but I got it working and put it on GitHub for archival. I’m not going to make it public, though. It’s embarrassing code, but cleaning it up would completely defeat the purpose.

I’m probably going to make another GBA game soon though. These days there are toolchains in Rust and Zig…


  1. That is, once you already basically know how to code. The GBA isn’t a super easy platform, but the best tutorial around is Tonc, by Jasper Vijn. Supplemented with a ton of googling for all the background information he thinks everyone already knows, or at least that’s how it was for me. ↩︎

  2. That’s a component of an operating system, which allows multiple processes to share a single CPU by periodically saving the state of one and restoring the state left by another. ↩︎