The GameBoy has physical memory space from $0000 to $FFFF:
Memory Read | Address Space | Memory Write |
Interrupt Enable Register | FFFF | Interrupt Enable Register |
High RAM | FFFE | High RAM |
FF80 | ||
I/O Registers | FF7F | I/O Registers |
FF00 | ||
. | FEFF | . |
FEA0 | ||
Object Attribute Memory | FE9F | Object Attribute Memory |
FE00 | ||
. | FDFF | . |
E000 | ||
Low RAM | DFFF | Low RAM |
C000 | ||
Cart RAM (Optional) | BFFF | Cart RAM (Optional) |
A000 | ||
Video RAM | 9FFF | Video RAM |
8000 | ||
ROM Bank 1-XXX | 7FFF | RAM/ROM Select (MBC1 Only) |
6000 | ||
5FFF | RAM Bank Select | |
4000 | ||
ROM Bank 0 | 3FFF | ROM Bank Select MS Byte (MBC5 Only) |
3000 | ||
2FFF | ROM Bank Select LS Byte | |
2000 | ||
1FFF | RAM Bank Enable | |
0000 |
Here is the layout of the Video RAM:
Memory Read/Write | Address Space |
Tile Map 2 | 9FFF |
9C00 | |
Tile Map 1 | 9BFF |
9800 | |
Tiles $00-$7F (FF40:Bit4=0) | 97FF |
9000 | |
Tiles $80-$FF | 8FFF |
8800 | |
Tiles $00-$7F (FF40:Bit4=1) | 87FF |
8000 |
The lower part of ROM bank 0 Read is setup like the following:
Memory Read | Address Space |
Cart Header Info Area | 014F |
0100 | |
Hi-to-Lo Interrupt Vector | 0060 |
Serial Transfer Complete Interrupt Vector | 0058 |
Timer Overflow Interrupt Vector | 0050 |
LCDC Interrupt Vector | 0048 |
Vertical Blank Interrupt Vector | 0040 |
Restart Vector $38 | 0038 |
Restart Vector $30 | 0030 |
Restart Vector $28 | 0028 |
Restart Vector $20 | 0020 |
Restart Vector $18 | 0018 |
Restart Vector $10 | 0010 |
Restart Vector $08 | 0008 |
Restart Vector $00 | 0000 |
Memory Read | Address Space | Format | |
Checksum L | 014F | ||
Checksum H | 014E | ||
Complement Check | 014D | ||
Mask ROM Version | 014C | ||
Old Maker Code | 014B | $33 | |
Destination Code | 014A | 0 = Jap, 1 = non-Jap | |
Cart RAM Size | 0149 | ||
ROM Size | 0148 | ||
Cartridge Type | 0147 | ||
Game Unit Code | 0146 | $03=SGB Features | |
Maker Code L (ascii hex) | 0145 | ||
Maker Code H (ascii hex) | 0144 | ||
Color Compatibility | 0143 | $80=GBC Support | |
Game Title (uppercase ascii) | 0142 | ||
0134 | |||
Nintendo Graphic | 0133 | ||
0104 | |||
JP $XXXX | 0103 | ||
0101 | |||
NOP ($00) | 0100 |
00 | None | |
01 | 2K Bytes | 1 Bank |
02 | 8K Bytes | 1 Bank |
03 | 32K Bytes | 4 Banks |
05 | 128K Bytes | 16 Banks |
Bits | Bytes | |
00 | 256K | 32K |
01 | 512K | 64K |
02 | 1M | 128K |
03 | 2M | 256K |
04 | 4M | 512K |
05 | 8M | 1M |
06 | 16M | 2M |
52 | 9M | 1.1M |
53 | 10M | 1.2M |
54 | 12M | 1.5M |
00 | ROM Only |
01 | ROM+MBC1 |
02 | ROM+MBC1+RAM |
03 | ROM+MBC1+RAM+Batt |
05 | ROM+MBC |
06 | ROM+MBC2+Batt |
08 | ROM+RAM |
09 | ROM+RAM+Batt |
0B | ROM+MMM01 |
0C | ROM+MMM01+RAM |
0D | ROM+MMM01+RAM+Batt |
0F | ROM+MBC3+Timer+Batt |
10 | ROM+MBC3+Timer+RAM+Batt |
11 | ROM+MBC3 |
12 | ROM+MBC3+RAM |
13 | ROM+MBC3+RAM+Batt |
19 | ROM+MBC5 |
1A | ROM+MBC5+RAM |
1B | ROM+MBC5+RAM+Batt |
1C | ROM+MBC5+Rumble |
1D | ROM+MBC5+Rumble+RAM |
1E | ROM+MBC5+Rumble+RAM+Batt |
1F | Pocket Camera |
FD | Bandai TAMA5 |
FE | Hudson HuC-3 |
FF | Hudson HuC-1 |