The Game Boy’s processor, the Sharp SM83, addresses 64 KiB. The cartridge answers in two
of the ranges: ROM at $0000–$7FFF and RAM at $A000–$BFFF. The
explorer labels the hardware registers in the disassembly.
Facts on this page are from Pan Docs (Memory Map,
Interrupt sources, Hardware registers).
Address space
| Range | Name | What is there |
|---|---|---|
$0000–$3FFF | ROM bank 00 | The first 16 KiB of the cartridge, always visible. It holds the vectors and the header. |
$4000–$7FFF | ROM bank 01–NN | A switchable 16 KiB bank, chosen by writes to the controller’s registers (see bank controllers). |
$8000–$9FFF | Video RAM | 8 KiB of tile data and tile maps. Two banks on the Game Boy Color, chosen by VBK ($FF4F). |
$A000–$BFFF | External RAM | RAM, a clock or sensor registers on the cartridge, switchable by the controller. |
$C000–$CFFF | Work RAM, bank 0 | 4 KiB of the console’s RAM. |
$D000–$DFFF | Work RAM, bank 1 | 4 KiB; on the Game Boy Color banks 1 to 7, chosen by SVBK ($FF70). |
$E000–$FDFF | Echo RAM | A mirror of $C000–$DDFF; Nintendo asks that it not be used. |
$FE00–$FE9F | OAM | Object attribute memory: 40 sprites of 4 bytes. |
$FEA0–$FEFF | Not usable | Prohibited by Nintendo; what a read gives depends on the hardware revision. |
$FF00–$FF7F | I/O registers | See below. |
$FF80–$FFFE | High RAM | 127 bytes. |
$FFFF | IE | Interrupt enable. |
Restart and interrupt vectors
The first 256 bytes of ROM bank 0 are the entry points the processor jumps to. A RST n instruction calls
$0000, $0008 … $0038 (eight bytes each). When an interrupt is requested and enabled the
processor calls the vector for its source, also eight bytes apart. The header begins at $0100, so the vectors
must fit before it.
| Address | What calls it | Name in the viewer |
|---|---|---|
$0000–$0038 | RST $00 … RST $38 | rst_00 … rst_38 |
$0040 | V-blank interrupt (IF bit 0) | int_vblank |
$0048 | LCD STAT interrupt (IF bit 1) | int_stat |
$0050 | Timer interrupt (IF bit 2) | int_timer |
$0058 | Serial interrupt (IF bit 3) | int_serial |
$0060 | Joypad interrupt (IF bit 4) | int_joypad |
The names are the viewer’s own labels, not Nintendo’s.
Hardware registers
The disassembly puts these names on the operands of LDH and of loads and stores to
$FF00–$FFFF. Registers marked (CGB) exist on the Game Boy Color only.
| Address | Name | Meaning |
|---|---|---|
$FF00 | P1 | Joypad: button and direction select, and the pressed lines |
$FF01, $FF02 | SB, SC | Serial transfer data and control |
$FF04 | DIV | Divider; any write clears it |
$FF05–$FF07 | TIMA, TMA, TAC | Timer counter, modulo and control |
$FF0F | IF | Interrupt flags (requests) |
$FF10–$FF14 | NR10–NR14 | Sound channel 1 |
$FF16–$FF19 | NR21–NR24 | Sound channel 2 |
$FF1A–$FF1E | NR30–NR34 | Sound channel 3 |
$FF20–$FF23 | NR41–NR44 | Sound channel 4 |
$FF24–$FF26 | NR50, NR51, NR52 | Master volume, panning, sound on/off |
$FF30–$FF3F | WAVE0–WAVEF | Wave pattern RAM |
$FF40 | LCDC | LCD control |
$FF41 | STAT | LCD status and interrupt selects |
$FF42, $FF43 | SCY, SCX | Background scroll |
$FF44, $FF45 | LY, LYC | Current line and the line to compare it with |
$FF46 | DMA | OAM DMA source and start |
$FF47–$FF49 | BGP, OBP0, OBP1 | Monochrome palettes |
$FF4A, $FF4B | WY, WX | Window position |
$FF4D | KEY1 | (CGB) Prepare speed switch |
$FF4F | VBK | (CGB) VRAM bank |
$FF50 | BOOT | A write unmaps the boot ROM |
$FF51–$FF55 | HDMA1–HDMA5 | (CGB) VRAM DMA source, destination, length and start |
$FF56 | RP | (CGB) Infrared port |
$FF68–$FF6B | BCPS, BCPD, OCPS, OCPD | (CGB) Colour palette index and data |
$FF6C | OPRI | (CGB) Object priority mode |
$FF70 | SVBK | (CGB) WRAM bank |
$FF76, $FF77 | PCM12, PCM34 | (CGB) Digital sound outputs |
$FFFF | IE | Interrupt enable |
Sources
- Memory Map – Pan Docs
- Interrupt sources – Pan Docs: the five vectors
- Hardware register list – Pan Docs
Not described
Bit layouts of the registers, the LCD and sound timing, and the behaviour of the “not usable” range on each hardware revision are in Pan Docs and are not repeated here. The register names are checked against the viewer’s table, not against hardware.