Profile photo
Alex Spaeth

Game Programming Nostalgia Trip

September 22, 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 game programming anymore, but games were the reason I got into programming in the first place. I was maybe 12 years old, 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 without really accomplishing anything. But my favorite games were on the GameBoy Advance, so before too long, I found some homebrew GBA development tools and an emulator, and wrote a bunch of little games.

It was a really formative time for me as a programmer. What you would see from the outside is that I had to learn new programming languages—C and assembly instead of Basic—but that was just the surface level of something deeper. When you first start learning to program, it still feels like the development environment is just some piece of software that happens to take instructions in some weird English-math pidgin language. This was the first time I felt like I was interacting with the computer on its own terms, even if it was just an emulator.

This was an incredible experience that taught me a ton about how computers actually work from the bottom up. It sounds a lot harder than it is! Most of programming is just about understanding the platform,[1] and the GBA is a way smaller target than modern platforms like Windows, iOS, or the browser.

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. 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 decided that what I really needed to do was write an operating system. And then I was annoyed that the GBA didn’t have the hardware that a modern OS uses to 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. If you have a giant appetite for technical documents, Martin Korth’s GBAtek is one of the seven wonders of reverse engineering, but I mostly learned from Tonc, by Jasper Vijn. Supplemented with a ton of googling for all the background information he thinks everyone already knows. ↩︎