Logo

NEWS
+ Current News

GAMEBOY
+ Emulators
+ Tutorials
+ Cribsheet
   - Opcodes and Timings
   - Memory Map
   - Cartridge Header
   - Hardware Registers
+ Downloads
+ Links

PC
+ Source Code
   - C++
   - ASM
+ Links

CONTACT
+ Adrian@enliten.force9.co.uk
+ ICQ 8715274

You are visitor

Since 21st May 2000

Copyright (c) 1999, 2000 Adrian Brown
If you have any complaints about this website or its contents, please email me and I will remove or update the offending section.

Gameboy Hardware Registers

The memory between addresses FF00h and FF70 are the Input / Output ports of the Gameboy.  Each byte in this memory range has a specific purpose.  The follow table shows a list of these including information about them.

REGISTER PURPOSE COMMENT ACCESS BIT ADDRESS
P1




Read Joypad Info




P1F_5
P1F_4
P1F_3
P1F_2
P1F_1
P1F_0
W
W
R
R
R
R
5
4
3
2
1
0
FF00




SB Serial Transfer Data   R/W   FF01
SC Serial I/O Control   R/W   FF02
DIV Timer Divider       FF04
TIMA Timer Counter       FF05
TMA Timer Modulo       FF06
TAC
Timer Control
Timer Start/Stop
Timer Speed
R/W
R/W
2
0 - 1
FF07
IF Interrupt Flag   R/W   FF0F
NR10

Audio Sweep

Sweep time
Sweep increase/decrease
Sweep shift
R/W
R/W
R/W
4 - 6
3
0 - 2
FF10

NR11
Audio Channel #1
Wave pattern duty
Sound length data
R/W
R/W
6 - 7
0 - 5
FF11
NR12

Envelope Channel #1

Initial value of envelope
Envelope Up/Down
Number of envelope sweep
R/W
R/W
R/W
4 - 7
3
0 - 2
FF12

NR13 Sound Frequency #1 Frequency LSB W   FF13
NR14

Sound Frequency #1

Initialise
Counter/Consecutive selection
Frequency significant 3 bits
W
W
W
7
6
0 - 2
FF14

NR21
Audio Channel #2
Wave pattern duty
Sound length data
R/W
R/W
6 - 7
0 - 5
FF16
NR22

Envelope Channel #2

Initial value of envelope
Envelope Up/Down
Number of envelope sweep
R/W
R/W
R/W
4 - 7
3
0 - 2
FF17

NR23 Sound Frequency #2 Frequency LSB W   FF18
NR24

Sound Frequency #2

Initialise
Counter/Consecutive selection
Frequency significant 3 bits
W
W
W
7
6
0 - 2
FF19

NR30 Audio Channel #3 Sound On/Off R/W 7 FF1A
NR31 Sound Length #3 Sound Length R/W   FF1B
NR32 Volume #3 Select output level R/W 5 - 6 FF1C
NR33 Sound Frequency #3 Frequency LSB W   FF1D
NR34

Sound Frequency #3

Initialise
Counter/Consecutive selection
Frequency significant 3 bits
W
W
W
7
6
0 - 2
FF1E

NR41 Sound Length #4 Sound Length R/W 0 - 5 FF20
NR42

Envelope Channel #4

Initial value of envelope
Envelope Up/Down
Number of envelope sweep
R/W
R/W
R/W
4 - 7
3
0 - 2
FF21

NR43

Audio Counter

Frequency of polynomial counter
Polynomial counter's step
Dividing ratio of  frequency
R/W
R/W
R/W
4 - 7
3
0 - 2
FF22

NR44
Audio Counter
Initialise audio
Counter/Consecutive selection
R/W
R/W
7
6
FF23
NR50


Channel Control


Vin SO2 On/Off
SO2 output volume
Vin SO1 On/Off
SO1 output volume
R/W
R/W
R/W
R/W
7
4 - 6
3
0 - 2
FF24


NR51






Sound Output






Output sound 4 to SO2
Output sound 3 to SO2
Output sound 2 to SO2
Output sound 1 to SO2
Output sound 4 to SO1
Output sound 3 to SO1
Output sound 2 to SO1
Output sound 1 to SO1
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
7
6
5
4
3
2
1
0
FF25






NR52



Sound On/Off



All Channels On/Off
Channel #4 On/Off
Channel #3 On/Off
Channel #2 On/Off
Channel #1 On/Off
R/W
R/W
R/W
R/W
R/W
7
3
2
1
0
FF26



AUD3WAVERAM Wave Data Sound sample RAM (16 bytes) R/W   FF30 - FF3F
LCDC





LCD Control





LCD On/Off
Window Address
Window On/Off
Background Address
Object Size
Object On/Off
Background On/Off
R/W
R/W
R/W
R/W
R/W
R/W
R/W
7
6
5
3 - 4
2
1
0
FF40





STAT




LCD Status




LYCEQULY   Coincidence
Mode 10
Mode 01 (V-Blank)
Mode 00 (H-Blank)
Coincidence Flag
OAM/VRAM Lock
R/W
R/W
R/W
R/W
R/W
R/W
6
5
4
3
2
1 - 0
FF41




SCY Scroll Screen Y Vertical Scroll R/W   FF42
SCX Scroll Screen X Horizontal Scroll R/W   FF43
LY LCDC Y-Coord   R/W   FF44
LYC LY Compare   R/W   FF45
DMA DMA Transfer   R/W   FF46
BGP BG Palette Data   R/W   FF47
OBP0 Object Palette 0 Data   R/W   FF48
OBP1 Object Palette 1 Data   R/W   FF49
WY Window Y Position   R/W   FF4A
WX Window X Position   R/W   FF4B
KEY1 CPU Speed Select GBC only R/W   FF4D
VBK VRAM Bank Select GBC only R/W   FF4F
HDMA1 HBL General DMA GBC only R/W   FF51
HDMA2 HBL General DMA GBC only R/W   FF52
HDMA3 HBL General DMA GBC only R/W   FF53
HDMA4 HBL General DMA GBC only R/W   FF54
HDMA5 HBL General DMA GBC only R/W   FF55
RP Infrared Comms GBC only R/W   FF56
BCPS BG Colour Index GBC only R/W   FF68
BCPD BG Colour Data GBC only R/W   FF69
OCPS Object Colour Index GBC only R/W   FF6A
OCPD Object Colour Data GBC only R/W   FF6B
SVBK RAM Bank Select GBC only R/W   FF70
IE



Interrupt Enable



HILO Transition
Serial I/O Transfer Done
Timer Overflow
LCDC
VBL
R/W
R/W
R/W
R/W
R/W
4
3
2
1
0
FFFF