Cart Header
The first 192 bytes at 0x08000000-0x080000BF in ROM are used as cartridge header.
0x00
4
ROM entry point
0x04
156
Nintendo logo
0xA0
12
Game title
0xAC
4
Game code
0xB0
2
Maker code
0xB2
1
0x96
0xB3
1
0x00
0xB4
1
Device type
0xB5
7
Reserved (zero)
0xBC
1
Software version
0xBD
1
Header checksum
0xBE
2
Reserved (zero)
ROM entry point (4 bytes)
Space for a single 32-bit ARM instruction that jumps over the header.
When the GBA boots, it will begin execution at 0x00000000, which is the GBA BIOS. The BIOS will show the Game Boy Advance logo, and play a chime, then jump to 0x08000000 in ARM mode.
The ROM must then jump over the header to the start location of the program, by storing a b <start> instruction at this location in the header.
Nintendo logo (156 bytes)
The Nintendo logo must be in the GBA header. It is checked by the BIOS before the game starts. If the data is missing or modified, then the BIOS won't jump to the ROM start.
There are two bytes in the logo that can contain different values:
0x9C Debugging Enabled
0x9C Debugging Enabled0x21
Normal behavior
0xA5
FIQ/Undefined Instruction handler forwards exceptions to 0x080000B4
0x9E Cart Key Number
0x9E Cart Key NumberTypically set to 0xF8, however bits 0-1 may be set to other values.
It is suspected that this was used to interface with different debug cartridges during development.
Game title (12 bytes)
Uppercase ASCII, max of 12 characters. If the title is less than 12 characters, the remaining bytes should be 0x00.
Game code (4 bytes)
Uppercase ASCII, broken down into three sections:
Unique code (1 byte)
'A'
Normal game, titles released mainly 2001-2003.
'B'
Normal game, titles released 2003+.
'C'
Normal game, newer titles
'F'
Classic NES series
'K'
Yoshi and Koro Koro Puzzle (acceleration sensor)
'P'
e-Reader
'R'
WarioWare Twisted (cartridge with rumble and z-axis gyro sensor)
'U'
Boktai 1 and 2 (cartridge with real-time clock and solar sensor)
'V'
Drill Dozer (cartridge with rumble)
Short title (2 bytes)
Game initials, for example, 'PM' for Pac-Man.
Language (1 byte)
'D'
German
'E'
USA/English
'F'
French
'I'
Italian
'J'
Japanese
'P'
European/elsewhere
'S'
Spanish
Maker code (2 bytes)
Identifies the commercial developer. For example, '01' is Nintendo.
Device type (1 byte)
0x00
Normal, or if using a hardware debugger, then default settings.
0x80
Alternative debugging settings.
Software version (1 byte)
Version number of the game, typically 0x00.
Header checksum (1 byte)
The checksum must be correct, or the game won't boot. It's calculated by subtracting all the values in the ROM from offset 0xA0 to 0xBC, then subtracting 0x19. I.e.,:
let crc = -0x19;
for (let i = 0xa0; i < 0xbd; i++) {
crc -= ROM[i];
}
crc = crc & 0xff;Last updated