Mbc3; Overview; Description Of Registers - Nintendo GAME BOY Programming Manual

Hide thumbs Also See for GAME BOY:
Table of Contents

Advertisement

Game Boy Programming Manual

3. MBC3

3.1 Overview

MBC3 is the memory bank controller that allows use of between 512 Kbits (64 Kbytes) and 16 Mbits
(2 MB) of ROM and 256 Kbits (32 Kbytes) of RAM.
Built into the controller are clock counters that operate by means of an external crystal oscillator
(32.768 KHz). The clock counters are accessed by RAM bank switching.
RAM and clock counter data can be backed up by an external lithium battery.

3.2 Description of Registers

Settings for control registers 0-3 are specified by writing data to the ROM area.
! Register 0:
! Register 1:
! Register 2:
Data
Register
08h
RTC_S
09h
RTC_M
0Ah
RTC_H
0Bh
RTC_DL
0Ch
RTC_DH
* The days counter consists of a 9-bit counter + a carry bit. Thus, it can count from 0 to 511
(000h-1FFh).
* Once the carry bit is set to 1, it remains 1 until 0 is written.
* The counters operate when HALT is 0 and stop when HALT is 1.
* Values outside the given counter ranges will not be correctly written.
! Register 3:
Write protects RAM and the clock counters (default: 0)
Write addresses: 0000h-1FFFh Write data: 0Ah
Allows access to RAM and the clock counter registers.
ROM bank code (default: 0, selects ROM bank 1)
Write addresses: 2000h-3FFFh Write data: 01h-7Fh
Allows the ROM bank to be selected in 16-Kbyte increments.
RAM bank code (default: 0, selects RAM bank 0)
Write addresses: 4000h-5FFFh Write data: 0-3
Allows the RAM bank to be selected in 8-Kbyte increments.
Write addresses: 4000h-5FFFh Write data: 08h-0Ch
Allows a clock counter to be selected.
Range of Values
0-59 (0-3Bh)
0-59 (0-3Bh)
0-23 (0-17h)
0-255 (0-FFh)
bit7
0
0
Bit 0: Most significant bit of days counter
Bit 6: HALT
Bit 7: Carry bit of days counter
Latches the data for all clock counters (default: 0)
bit0
0
0
0
220
Function
Seconds counter (6 bits)
Minutes counter (6 bits)
Hours counter (5 bits)
Lower-order 8 bits of days
counter
Higher-order bit and carry
bit of days counter.
HALT starts and stops the
clock counters.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents