Skip to content
Shane DeSeranno edited this page Nov 4, 2015 · 1 revision

Go Home

Part 08 - Timer

The timer is a hardware device in the Gameboy that essentially keeps track of time. It has two separate registers that increment at different frequencies. One register (0xFF04) is the divider register and it increments at a rate of 16384Hz, or 256 clock cycles. If the game wants to reset this timer to zero, it can write any value to this address. When the register overflows, it resets to 0x00.

The second register (0xFF05) is more flexible and can run at 4 different frequencies (4096Hz [1024 cycles], 16384Hz [256 cycles], 65536Hz [64 cycles], and 262144Hz [16 cycles]). This rate is controlled by 0xFF07. This timer can be stopped and started with the same address. When it overflows, it resets to the value of 0xFF06. Whenever this timer overflows it will fire the 0x50 interrupt if it has been enabled.

Clone this wiki locally