Logo

NEWS
+ Current News

GAMEBOY
+ Emulators
+ Tutorials
+ Cribsheet
   - Opcodes and Timings
   - Memory Map
   - Cartridge Header
   - Hardware Registers
+ Downloads
+ Links

PC
+ Source Code
   - C++
   - ASM
+ Links

CONTACT
+ Adrian@enliten.force9.co.uk
+ ICQ 8715274

You are visitor

Since 21st May 2000

Copyright (c) 1999, 2000 Adrian Brown
If you have any complaints about this website or its contents, please email me and I will remove or update the offending section.

Gameboy Memory Map

The Gameboy has 64k of memory that is accessable at any one time, this is split up into sections such as ROM, RAM and hardware ports. Follows is a breakdown of the different sections of memory.

MEMORY ADDRESS (in Hex) CONTENTS
FFFF - FFFF Interrupt Enable Flag (see below)
FF80 - FFFE Zero Page (127 bytes)
FF00 - FF7F Hardware Registers (see Hardware section)
FEA0 - FEFF Unusable Memory
FE00 - FE9F Object Attribute Memory (OAM)
E000 - FDFF Echo RAM (Reserved - Not Usable)
D000 - DFFF Internal RAM - Banks 1 - 7 (CGB is switchable as it has 32k Internal RAM)
C000 - CFFF Internal RAM - Bank 0 (fixed)
A000 - BFFF Switchable 8k Game Cartridge RAM
9C00 - 9FFF Background Display Data 2, Tile Indices/Attributes (bank switched)
9800 - 9BFF Background Display Data 1, Tile Indices/Attributes (bank switched)
8000 - 97FF Bank 0 and 1 Character Data (bank switched)
4000 - 7FFF User Program Area - Bank 1 to n (switchable)
0150 - 3FFF User Program Area - Bank 0 (fixed)
0100 - 014F Cartridge Header (see Cart. Header section)
0000 - 00FF Interrupt vectors and RST # vectors

The different sections of memory have different attributes. Some of the areas can only be written to while others can only be read from. The following table shows which areas have which attributes.

  DESCRIPTION ATTRIBUTES MEMORY
VRAM Memory Map Tile Map 2 Read / Write 9C00 - 9FFF
Tile Map 1 Read / Write 9800 - 9BFF
Tiles 00 - 7F (FF40, bit 4 = 0) Read / Write 9000 - 97FF
Tiles 80 - FF Read / Write 8800 - 8FFF
Tiles 00 - 7F (FF40, bit 4 = 1) Read / Write 8000 - 87FF
Memory Map
(Read / Write)
Interrupt Enable Read / Write FFFF - FFFF
High RAM Read / Write FF80 - FFFE
I/O Registers Read / Write FF00 - FF7F
OAM RAM Read / Write FE00 - FE9F
Low RAM Read / Write C000 - DFFF
Cartridge RAM Read / Write A000 - BFFF
Video RAM Read / Write 8000 - 9FFF
Memory Map
(Read Only)
ROM Bank #1 to n Read Only 4000 - 7FFF
ROM Bank #0 Read Only 0000 - 3FFF
VRAM Memory Map
(Write Only)
RAM/ROM Select (MBC1) Write Only 6000 - 7FFF
RAM Bank Select Write Only 4000 - 5FFF
ROM Bank Select MSB (MBC5) Write Only 3000 - 3FFF
ROM Bank Select LSB Write Only 2000 - 2FFF
RAM Bank Enable Write Only 0000 - 1FFF