The basic Game-Boy design foresees only 32
KByte of user program area. This is divided into two 16 KByte pages,
a fixed home page and a home page. To allow the use of program ROMs
larger than the physical address space a controller is used which
"maps" each additional 16 KByte page into the home
address space as shown in Figure
3. This process is called 'memory mapping'. It is similar to
the method used under DOS when accessing expanded memory. The
Z80
has only 16 address bits whereas the ROM has up to 7 more, depending
on its capacity. To access a page the page
number is loaded into the control register of the MBC. The MBC will
then blend the selected page into the home-area
by providing the required address mapping. The memory bank
controllers used in GameBoyTM
cartridges also support
RAM mapping to the external
work RAM location. As shown in Figure
3 up to 4 RAM pages can be mapped to this location.
There
are 2 different types of GameBoyTM
cartridges, the
MBC1, MBC2 and the MBC3. These three types vary in their RAM/ROM
addressability and may be classified into several categories. The
information on the cartridge type will be found (or must be placed)
at address 0147h, ROM and RAM size at 0148h and 0149h. Table
1 lists the various possibilities.
Cartridge type |
Value@0147h |
Cartridge type |
|
00h |
ROM ONLY |
05h |
|
01h |
ROM+MBC1 |
06h |
|
02h |
ROM+MBC1+RAM |
08h |
|
03h |
ROM+MBC1+RAM+BATTERY |
09h |
|
FFh |
|
Table 1: Different possible cartridge configurations
(For further information see gbspec.txt: "Cartridge type" or follow this external link to a document written by Pascal Felber)
Figure 5 shows the inside of a cartridge. It seems to be a type FFh-cartridge with ROM on the lower left, MBC2 on the lower right, a battery above that and RAM on the upper (or mid) left. Move the mouse around on the picture and watch the 'links' (do not click!) appearing for information on the parts.
Figure 5: Inside a cartridge
This document was created with StarOffice 4.0 by Marc Rawer