2 #define INTVEC_HBLANK_TIMER 7
3 #define INTVEC_VBLANK_START 6
4 #define INTVEC_VBLANK_TIMER 5
5 #define INTVEC_DRAWING_LINE 4
6 #define INTVEC_SERIAL_RECEIVE 3
7 #define INTVEC_RTC_ALARM 2
8 #define INTVEC_KEY_PRESS 1
9 #define INTVEC_SERIAL_SEND 0
12 #define IO_TIMER_CTRL 0xA2
13 #define HBLANK_TIMER_ON 0x01
14 #define HBLANK_TIMER_OFF 0x00
15 #define HBLANK_TIMER_MODE_ONESHOT 0x00
16 #define HBLANK_TIMER_MODE_AUTOPRESET 0x02
17 #define VBLANK_TIMER_ON 0x04
18 #define VBLANK_TIMER_OFF 0x00
19 #define VBLANK_TIMER_MODE_ONESHOT 0x00
20 #define VBLANK_TIMER_MODE_AUTOPRESET 0x08
22 #define IOw_HBLANK_FREQ 0xA4
23 #define IOw_VBLANK_FREQ 0xA6
24 #define IO_HBLANK_CNT1 0xA8 /* Hblank Counter - 1/12000s */
25 #define IO_HBLANK_CNT2 0xA9 /*; Hblank Counter - 1/(12000>>8)s */
26 #define IO_VBLANK_CNT1 0xAA /* Vblank Counter - 1/75s */
27 #define IO_VBLANK_CNT2 0xAB /* Vblank Counter - 1/(75>>8)s */
29 #define IO_INT_BASE 0xB0
32 #define IO_INT_ENABLE 0xB2
33 #define INT_HBLANK_TIMER 0x80
34 #define INT_VBLANK_START 0x40
35 #define INT_VBLANK_TIMER 0x20
36 #define INT_DRAWING_LINE 0x10
37 #define INT_SERIAL_RECEIVE 0x08
38 #define INT_RTC_ALARM 0x04
39 #define INT_KEY_PRESS 0x02
40 #define INT_SERIAL_SEND 0x01
42 #define IO_INT_ACK 0xB6 /* See IO_INT_ENABLE */