Game Boy Programming Manual
CHAPTER 8: GAME BOY MEMORY CONTROLLERS (MBC)
1. MBC1
1.1 Overview
MBC1 is a memory controller that enables the use of 512 Kbits (64 Kbytes) or more of ROM and 256
Kbits (32 Kbytes) of RAM. It can be used as follows.
! To control up to 4 Mbits of ROM
When used to control up to 4 Mbits (512 Kbytes) of ROM, MBC1 can control up to 256 Kbits (32
Kbytes) of RAM.
! To control 8 Mbits or more of ROM
When MBC1 is used to control up to 8 MBits (1 MB) or 16 MBits (2 MB) of ROM, the following
conditions apply
•
When used to control 8 MBits of ROM
MCB cannot use ROM addresses 080000h-083FFFh (Bank 20h)
•
When used to control 16 MBits of ROM
MBC1 cannot use ROM Addresses
RAM use by MBC1 is restricted to 64 Kbits (8 Kbytes).
1.2 Description of Registers
! Register 0:
! Register 1:
! Register 2:
RAMCS gate data (serves as write-protection for RAM)
Write addresses: 0000h-1FFFh Write data: 0Ah
Writing 0Ah to 0h-1FFFh causes the CS to be output, allowing access to RAM.
ROM bank code
Write addresses: 2000h-3FFFh Write data: 01h-1Fh
The ROM bank can be selected.
Upper ROM bank code when using 8 Mbits or more of ROM (and register 3
is 0)
Write addresses: 4000h-5FFFh Write data: 0-3
The upper ROM banks can be selected in 512-Kbyte increments.
Write value of 0 selects banks 01h-1Fh
Write value of 1 selects banks 21h-3Fh
Write value of 2 selects banks 41h-5Fh
Write value of 3 selects banks 61h-7Fh
: RAM bank code when using 256 Kbits of RAM (and register 3 is 1)
Write addresses: 4000h-5FFFh Write data: 0-3
The RAM bank can be selected in 8-Kbyte increments.
8000h-083FFFh (Bank 20h)
100000h-103FFFh (Bank 40h)
180000h-183FFFh (Bank 60h)
216