Platform:Game Boy Advance
| Vendor | Nintendo |
|---|---|
| Endianness | little |
| On this wiki | Facts · Code · Notes · Topics |
Nintendo's 32-bit handheld (2001). An ARM7TDMI CPU (ARMv4T, 16.78 MHz, ARM and Thumb instruction sets, little endian) with 32 KiB of fast IWRAM, 256 KiB of EWRAM, and cartridge ROM mapped at 0x08000000; games are raw ROM images with a 192-byte header.
Memory map
| Address | Size | Region |
|---|---|---|
| 0x00000000 | 16 KiB | BIOS (not readable from cartridge code) |
| 0x02000000 | 256 KiB | EWRAM (slow external work RAM) |
| 0x03000000 | 32 KiB | IWRAM (fast); IRQ and system stacks sit at its top, see the crt0 of pokeemerald (sp_sys = IWRAM_END - 0x1c0, sp_irq = IWRAM_END - 0x60)
|
| 0x04000000 | I/O registers (REG_BASE) | |
| 0x05000000 | 1 KiB | palette RAM |
| 0x06000000 | 96 KiB | VRAM |
| 0x07000000 | 1 KiB | OAM |
| 0x08000000 | up to 32 MiB | cartridge ROM (wait state 0; mirrors at 0x0A000000 and 0x0C000000) |
| 0x0E000000 | cartridge save memory (SRAM/Flash) |
The CPU begins at 0x08000000 in ARM state: the first word of the ROM is a branch over the header (Format:Game Boy Advance ROM image).
Matching decompilations
The pret projects (pokeemerald, pokefirered, pokeruby...) and zeldaret/tmc rebuild commercial ROMs byte for byte. Their toolchain is the Nintendo/AGB agbcc (a GCC 2.95-derived compiler that outputs Thumb-interwork code, -mthumb-interwork -O2) plus devkitARM's as/ld (-mcpu=arm7tdmi) and gbafix to complete the header. A newer build with a modern GCC (-mthumb -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t) also exists but does not match. Each project publishes a .sha1 of the ROM it matches.
- Software:Pokémon Emerald
- The Legend of Zelda: The Minish Cap (zeldaret/tmc) builds five ROMs (USA, EU, JP, USA demo, JP demo); the SHA-1 of each is in
INSTALL.mdandtmc*.sha1of that repository.
See Technique:Matching decompilation.
Topics
- BIOS calls — The GBA BIOS software interrupts SWI 0x00-0x2A with their names as mGBA lists them, how the number is encoded in ARM and Thumb code, and which calls an HLE…
- Save types — The GBA cartridge save chips (SRAM, Flash 64/128 KiB, EEPROM 512 B/8 KiB), the library version strings in the ROM that name them, and how mGBA and VBA-M…
Code & repositories
- https://github.com/pret/pokeemerald @
731ad5bfd6e6f265508d0efcca0ba42f9dcf5881· license: none
Matching decompilation of Pokemon Emerald (BPEE) for the Game Boy Advance. Useful without building: Makefile (header values, agbcc flags), rom.sha1, ld_script.ld (link order), src/crt0.s, tools/gbafix/gbafix.c (header layout and complement check).
Tested on: source read, not run: Read at commit 731ad5b: Makefile, README, crt0.s, gbafix.c; not built · checked 2026-10-18; last activity 2026-10-01; no license: not reusable - https://github.com/zeldaret/tmc @
6fb6dfb4a7efbe24d0fd1dda5097af6131faacde· license: none (declared by the contributor; GitHub's detector did not recognize a license file)
Work-in-progress matching decompilation of The Legend of Zelda: The Minish Cap for the GBA (USA, EU, JP, USA demo, JP demo). The tmc*.sha1 files in the root give the SHA-1 of each ROM; INSTALL.md describes the build; Makefile, GBA.mk, Toolchain.mk and linker.ld give flags and link order.
Tested on: source read, not run: source read, not run: README, file list and tmc.sha1 read at the pinned commit; not built · checked 2026-10-18; last activity 2026-09-27 - https://github.com/mgba-emu/mgba @
9660a668f2093cb4aba5983f52bebf8878dc5b8b· license: MPL-2.0
GBA/GB emulator (MPL-2.0). Read for SWI names (include/mgba/internal/gba/bios.h), HLE BIOS and decompressors (src/gba/bios.c), save chips (src/gba/savedata.c, memory.c) and ROM/multiboot detection (src/gba/gba.c).
Tested on: source read, not run · checked 2026-10-19; last activity 2026-10-17; Note: the latest release ships binaries; the wiki links only the source, never the binaries