From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:Game Boy ROM image" |
|---|
| claim | "The cartridge header is 0x50 bytes at ROM offset 0x0100-0x014F (offsets below are relative to 0x0100). On cartridges made before the CGB, title runs over manufacturer and cgb_flag as one 16-byte field." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Game Boy ROM image" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "gb_cartridge_header" |
|---|
| size | "0x50" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 4 |
|---|
| type | "uint8_t[4]" |
|---|
| name | "entry" |
|---|
| notes | "usually 00 C3 50 01 (nop; jp 0x0150)" |
|---|
|
| offset | "0x4" |
|---|
| size | 48 |
|---|
| type | "uint8_t[48]" |
|---|
| name | "logo" |
|---|
| notes | "Nintendo logo, checked by the boot ROM" |
|---|
|
| offset | "0x34" |
|---|
| size | 11 |
|---|
| type | "char[11]" |
|---|
| name | "title" |
|---|
| notes | "upper-case ASCII, 0x00 padded; 15 or 16 bytes on older carts" |
|---|
|
| offset | "0x3F" |
|---|
| size | 4 |
|---|
| type | "char[4]" |
|---|
| name | "manufacturer" |
|---|
| notes | "newer carts only, otherwise title bytes" |
|---|
|
| offset | "0x43" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "cgb_flag" |
|---|
| notes | "0x80 CGB-enhanced, 0xC0 CGB-only, otherwise DMG" |
|---|
|
| offset | "0x44" |
|---|
| size | 2 |
|---|
| type | "char[2]" |
|---|
| name | "new_licensee" |
|---|
| notes | "only meaningful if old_licensee == 0x33" |
|---|
|
| offset | "0x46" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "sgb_flag" |
|---|
| notes | "0x03 = uses SGB functions" |
|---|
|
| offset | "0x47" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "cartridge_type" |
|---|
| notes | "mapper and extra hardware" |
|---|
|
| offset | "0x48" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "rom_size" |
|---|
| notes | "ROM bytes = 0x8000 << value" |
|---|
|
| offset | "0x49" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "ram_size" |
|---|
| notes | "0 none, 2 8 KiB, 3 32 KiB, 4 128 KiB, 5 64 KiB" |
|---|
|
| offset | "0x4A" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "destination" |
|---|
| notes | "0 Japan, 1 overseas" |
|---|
|
| offset | "0x4B" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "old_licensee" |
|---|
| notes | "0x33 = use new_licensee" |
|---|
|
| offset | "0x4C" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "version" |
|---|
| notes | "mask ROM version" |
|---|
|
| offset | "0x4D" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "header_checksum" |
|---|
| notes | "over 0x0134-0x014C, enforced by the boot ROM" |
|---|
|
| offset | "0x4E" |
|---|
| size | 2 |
|---|
| type | "uint8_t[2]" |
|---|
| name | "global_checksum" |
|---|
| notes | "big-endian 16-bit sum of all other ROM bytes, not checked by hardware" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "documentation" |
|---|
| detail | "Pan Docs, The Cartridge Header (gbdev/pandocs commit abeda62)" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "Parsed dmg-acid2 v1.0 and cgb-acid2 v1.1 with these offsets: titles DMG-ACID2 / CGB-ACID2, cgb_flag 0x00 / 0xC0, both checksums match" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Cartridge header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T03:24:15.167Z" |
|---|
| verifications | |
|---|