Timers


Timers operate on 4 2 byte aligned 16bit values.

Offset Description
+0 Control
+2 Frequency, timer overflows at this value
+4 Duty / Event
+6 Count


Control Bits
Bit Function
0 Enable (Counting active-low)
1 Reset (Clear timer to 0)
2 Enable Audio
3 Unknown
4 Unknown
5 Unknown
6 Unknown
7 Enable Audio
8 ?
9 ?
10 Unknown
11 ?
12 Unknown
13 Unknown
14 Unknown
15 Unknown


Not all of the control bits are used for all the timers, or even stored. Only timer 1+2 have the audio bits, timer 0 has 2 bits that the other two do not have.

When used for an audio channel, this is when the audio output transitions.... so, if your frequency = 0x2000, and the duty = 0x1000, you will get a 4000000/0x2000 hz frequency with 50% pulse duty. When it is used on a general purpose timer, the 'duty' is actually an event point. This is when the IRQ occurs. This is unconfirmed, but I can not see any other purpose for it.

Return to Pokemon Mini specifications.