Memory Configuration - Nintendo GAME BOY Programming Manual

Hide thumbs Also See for GAME BOY:
Table of Contents

Advertisement

Game Boy Programming Manual
1.3

Memory Configuration

In DMG and CGB, the 32 KB from 0h to 7FFFh is available as program area.
000h-0FFh: Allocated as the destination address for RST instructions and the starting address for
interrupts.
100h-14Fh: Allocated as the ROM area for storing data such as the name of the game.
150h:
Allocated as the starting address of the user program.
The 8 KB from 8000h to 9FFFh is used as RAM for the LCD display. In CGB, the amount of RAM
allocated for this purpose is 16 KB (8 KB x 2), twice the amount allocated for the LCD display in DMG,
and this RAM can be used in 8 KB units using bank switching. The 8 KB RAM areas are divided into
the following 2 areas.
1
An area for character data
2
An area for BG (background) display data (Character code and attribute)
The 8 KB from A000h to BFFFh is the area allocated for external expansion RAM.
The 8 KB from C000h to DFFFh is the work RAM area.
In DMG, the 8 KB of working RAM is implemented without change. In CGB, bank switching is used to
provide 32 KB of working RAM. This 32 KB area is divided into 8 areas of 4 KB each.
1
The 4 KB from C000h to CFFFh is fixed as Bank 0.
2
The 4 KB from D000h to DFFFh can be switched between banks 1 though 7.
Note:
Use of the area from E000h to FDFFh is prohibited.
FE00h to FFFFh is allocated for CPU internal RAM.
FE00h-FE9Fh: OAM-RAM (Holds display data for 40 objects)
FF00h-FF7Fh & FFFFh: Specified for purposes such as instruction registers and system
FF80h-FFFEh: Can be used as CPU work RAM and/or stack RAM.
controller flags.
14

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents