This is my page about Gameboy Advance development under Linux.
All GBA C sources are written for this toolchain (local copy) and for this crt0/lnkscript by Jeff Frohwein. Nevertheless it is very easy to adapt the sources for the http://www.devkitpro.org's toolchain.
g++ -o bin2o bin2o.cpp on Linux.printf, puts, etc, because the screen is the file handle 1 (as in Unix). Be careful: there is no extended ASCII support (only the ASCII codes from 32 to 127 are visibles, plus the '\n' character that is used for new line).lseek over file handle 2 to positioning into SRAM.romfs support. We can open, close, lseek, read and fstat files located at a romfs image merged with the main program ROM: cat my_program.gba image.romfs > my_final_program.gba.
int AgbMain() {
console_init();
romfs_init();
...
printf("opening 'index.html'...\n");
fd = open("index.html", O_RDONLY);
printf("handle = %d\n", fd);
printf("=== BEGIN\n");
while (1) {
int readed = read(fd, &data, 1);
if (readed == 0)
break;
putchar(data);
}
close(fd);
printf("=== EOF\n");
...
}
example of romfs file access
-DREENTRANT_SYSCALLS_PROVIDED to the CFLAGS_FOR_TARGET variable at Makefile after configure. Here we can read a very interesting article about how to port the newlib for embedded systems.
int AgbMain() {
console_init();
romfs_init();
...
printf("writing SRAM...");
write(2, "Hello, SRAM :-)", 16);
printf("ok\n");
lseek(2, 0, SEEK_SET);
read(2, sram_example_data, 20);
printf("SRAM content = '%s'\n", sram_example_data);
...
}
example of SRAM access
tiled-0.6.1/plugins. Now you can build the entire project and the output plugin will be included in the distribution. Thanks to Jaymin Kessler to mail me about the problem: the previous 0.1 version of the plugin is not compatible with the newer version of Tiled.

![]() | ![]() |
note on message when keypad A is pressed and a note off message when keypad B is pressed. For further info, see the source code comments or e-mail me.
![]() | ![]() |
![]() | ![]() |
(cable) | (GBA) |
SI (pin 3) and SC (pin 5) connector pins are adyacent in the same side of the male plug, so we can use a simple bakelite board in such a way that two copper tracks fits in that pins. In this photo you can see this hack.

This work is licensed under a Creative Commons License.