go to 1.2 go to 2.0 1.3 Memory Mapping

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.


1.4 Cartridge types

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.


Value@0147h

Cartridge type

Value@0147h

Cartridge type

00h

ROM ONLY

05h

ROM+MBC2

01h

ROM+MBC1

06h

ROM+MBC2+BATTERY

02h

ROM+MBC1+RAM

08h

ROM+RAM

03h

ROM+MBC1+RAM+BATTERY

09h

ROM+RAM+BATTERY

FFh

ROM+MBC1+RAM+BATTERY

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.

The pinout of the game connector can be found under 3.1 How to connect an Eprom.

Pin32 (Gnd)GEC (to GB)Pin1 (Vcc)RAM?serial Flash?MBC1ROMbattery

Figure 5: Inside a cartridge

go to 1.2 go to 2.0 This document was created with StarOffice 4.0 by Marc Rawer