GameBoy

compendium based on Game Boy CPU Manual by DP

Hardware

Memory

   
Interrupt Enable Regs 0xffff
Internal RAM 0xff80
empty 0xff4c
I/O 0xff00
empty 0xfea0
OAM oxfe00
echo 0xe000
8kB Internal RAM 0xc000
8kB switchable RAM bank 0xa000
8kB VRAM 0x8000
16kB switchable ROM bank 0x4000
16 kB ROM bank #0 0x0000// todo: find out about the upper bound of interrupt enable regs

echo

A copy of the 8kB internal (? check this) RAM
// todo: find out why this exists

reserved memory

0000 Restart, called by RST

0040 vertical blank interrupt start addr

0050 timer overflow interrupt start addr

0058 serial transfer completion interrupt start addr

01000103 entry point (?) of cart

01040133 scrolling Nintendo graphic, needs to be as is, otherwise program will not start

01340142 Title

0143 … if 80, it’s a GBColor, otherwise without colour support

0144 and 0145 license code

0146 03 signals SGB support

0147 Cartridge type

0148 ROM size

0149 RAM size

014a 0 for Japanese, 1 for non Japanese

014b license code

014d complement check !!!

014e014f checksum, ignored by gameboy ???

Cartridge Types

// todo

Special Modes

Power Up

0255 are being executed

Stop Mode

Halts the CPU and displays a white screen (GB) until a button is pressed

Low-Power Mode

HALT instruction stopping the system clock and suspending the CPU, until interrupt. In disabled interrupts (DI) mode the instruction after the HALT is skipped on GB, not though on the GBC in GB mode (0x0143 = 0x00), so better follow up with a NOP.
// todo: more detail

Video

Tiles

// todo: add more detail on draing, background, scrolling, window timings etc

Sprites

// todo: add more detail on priority, coordinates etc

// todo: especially consider the SPRITE RAM BUG

Sound

// todo: more detail

Timer

With the Timer Counter interrupts can be achieved after defined time windows

// todo: understand the code and exact functionality

Serial I/O

// todo

Interrupts

Interupt:

// todo: detail

Some Interrupts

Special Registers