GBA Development in Other Languages

This documentation collects resources for coding in languages other than Assembly/C/C++ on Gameboy Advance.

Perface

First and foremost, GBA games can be programmed in any language. There is nothing special.

Languages are for human beings. Machine doesn’t understand those languages. It only accepts binary (hex bytes). There is no essential difference between development in different languages. At last, they look exactly the same to a machine.

Let’s review the assembly hacking tutorial first: Chapter 74 in Ultimate Tutorial.

Two files should be outputted once it’s done: a .dmp file and .symbols file of the same name. The .symbols file is, as far as I know, useless. I don’t know what it does because I didn’t learn the programming language properly but I never needed it and I got pretty far. The .dmp file is super important though. It contains the raw hex/binary (remember, it just depends on whether you look at it through a hex, binary, or even text editor—utlimately, the file is still the same). To insert this ASM hack into your ROM, find some free space, copy all the data from the .dmp file, and paste it there. Note the offset.

You see. Whatever language you write it in, the last step is the same: insert binary into the game.

Programming Language

It needs a proper compiler to compile your source file in text format to binary. The hex bytes are excuted by CPU directly.

Pascal

It is older than C language. Free Pascal is a Pascal compiler supporting many platforms including Nintendo GBA.

Rust

Rust supports embedded programming.

Notice that they also use binutils so linker script can also be used there.

Scripting Language

It needs a proper interpreter running on the target platform. The scripts are excuted by the interpreter. To some degree, animation script and event script can also be considered as a custom script language.

Lua

The interpreter of Lua is written in C so it can be compiled to GBA platform. The text format source files ars added into the game directly.

2 Likes