Framework for development on the Game Boy Advance.
The goal of this project is to provide a modern, standard-compliant C library for developing games and other types of software for the Game Boy Advance series.
This project is still (relatively) early in development; Don't expect too much of it.
Current features include:
Application wrapping (of the 'main' function);
Memory manipulation functions (writting to and reading from arbitrary memory addresses without undefined behaviour);
Minimal memory manipulation routines (currently only slow copying);
Basic input detection from the main keys — A, B, +Control Pad, L, R, Start, Select;
Simple facilities for the bitmap graphics modes (three, four, and five), such as vertical synchronisation, video bank flipping, plotters/readers;
Whilst this project may not be as feature complete as others (such as TONC), I still hope for it to be up there in the future.
I understand that the market for Game Boy games is nowhere near what it was during it's height twenty years ago, but I still hope for this hobbyist piece of software to someday prove useful for developers wanting to appeal to the retro market (or just for hobbyist projects of their own).
Provided is a simple demo program that functions as a graphics editor – akin to that of Paintbrush.
A: Colour the selected pixel;
+CONTROL PAD (UP): Move one pixel up on the canvas;
+CONTROL PAD (RIGHT): Move one pixel to the right on the canvas;
+CONTROL PAD (DOWN): Move one pixel down on the canvas;
+CONTROL PAD (LEFT): Move one pixel to the left on the canvas;
R: Rotate the palette counterclockwise;
L: Rotate the palette clockwise;
START: Exit the demo;
SELECT: Exit the demo (by indicating error);
The project (including the demo) is written in Standard C (ISO/IEC 9899:2023, N3047). As the Game Boy Advance uses an ARM (ARM7TDMI) processor, AGBx requires an ARM cross-compiler.
For GCC, the appropriate package is arm-none-eabi-gcc on Arch Linux and gcc-arm-none-eabi on Debian. Clang supports supports cross-compilation by default, and this platform can be set via the --target=arm-none-eabi option.
The used cross-compiler can be configured in the makefiles, however, it must be GCC-compatible unless you're willing to make major adjustments.
The provided makefiles are for GNU Make (hence the filename of GNUmakefile) and depend on it's extensions.
The demo uses agbsum (pkgbuild) for patching the demo image header checksum so that it isn't rejected by the bootloader. This patch isn't always required, however, and the makefile (at demo/GNUmakefile) may be modified to skip it.
Copyright 2022 Gabriel Jensen.
All source files (with exceptions, see the individual files) – including the makefiles – are licensed under the Mozilla Public License 2.0.
The contents of this readme document are licensed under a Creative Commons Attribution 4.0 International License.