1 /* video peripheral IO */
2 #define IO_DISPLAY_CTRL 0x00
4 #define IO_CUR_LINE 0x02
5 #define IO_LINE_COMP 0x03
6 #define IO_SPR_TABLE 0x04
7 #define IO_SPR_START 0x05
8 #define IO_SPR_STOP 0x06
9 #define IO_MAP_BASE 0x07
10 #define IO_FG_WIN_X0 0x08
11 #define IO_FG_WIN_Y0 0x09
12 #define IO_FG_WIN_X1 0x0A
13 #define IO_FG_WIN_Y1 0x0B
14 #define IO_SPR_WIN_X0 0x0C
15 #define IO_SPR_WIN_Y0 0x0D
16 #define IO_SPR_WIN_X1 0x0E
17 #define IO_SPR_WIN_Y1 0x0F
22 #define IO_LCD_CTRL 0x14
23 #define IO_LCD_ICONS 0x15
32 #define SPR_WIN_ON 0x08
33 #define SPR_WIN_OFF 0x00
34 #define FG_IN_OUT_WIN 0x00
35 #define FG_IN_WIN 0x10
36 #define FG_OUT_WIN 0x30
37 #define BG_COLOR(a) (a)
38 #define BG_PAL(a) (a << 4)
39 #define SPR_TABLE(a) (a >> 9) /* Sprite Table Address must be 512 bytes aligned */
40 #define FG_MAP(a) ((a >> 11) << 4) /* FG Map Address must be 2048 bytes aligned */
41 #define BG_MAP(a) (a >> 11) /* BG Map Address must be 2048 bytes aligned */
43 #define IO_VIDEO_MODE 0x60
44 #define VMODE_16C_CHK 0xE0 /* 16 colors per tile chunky mode */
45 #define VMODE_16C_PLN 0xC0 /* 16 colors per tile planar mode */
46 #define VMODE_4C 0x40 /* 4 colors per tile color */
47 #define VMODE_4C_MONO 0x00 /* 4 colors per tile mono */
48 #define VMODE_CLEANINIT 0x0C /*(?) from FF2 */
53 #define LCD_ICON_SLEEP 0x01
54 #define LCD_ICON_VERTI 0x02
55 #define LCD_ICON_HORIZ 0x04
56 #define LCD_ICON_DOT1 0x08
57 #define LCD_ICON_DOT2 0x10
58 #define LCD_ICON_DOT3 0x20
61 #define IO_PALSHADE_10 0x1C
62 #define IO_PALSHADE_32 0x1D
63 #define IO_PALSHADE_54 0x1E
64 #define IO_PALSHADE_76 0x1F
65 #define IO_WS_PAL_00 0x20
66 #define IO_WS_PAL_01 0x21
67 #define IO_WS_PAL_10 0x22
68 #define IO_WS_PAL_11 0x23
69 #define IO_WS_PAL_20 0x24
70 #define IO_WS_PAL_21 0x25
71 #define IO_WS_PAL_30 0x26
72 #define IO_WS_PAL_31 0x27
73 #define IO_WS_PAL_40 0x28
74 #define IO_WS_PAL_41 0x29
75 #define IO_WS_PAL_50 0x2A
76 #define IO_WS_PAL_51 0x2B
77 #define IO_WS_PAL_60 0x2C
78 #define IO_WS_PAL_61 0x2D
79 #define IO_WS_PAL_70 0x2E
80 #define IO_WS_PAL_71 0x2F
81 #define IO_WS_PAL_80 0x30
82 #define IO_WS_PAL_81 0x31
83 #define IO_WS_PAL_90 0x32
84 #define IO_WS_PAL_91 0x33
85 #define IO_WS_PAL_A0 0x34
86 #define IO_WS_PAL_A1 0x35
87 #define IO_WS_PAL_B0 0x36
88 #define IO_WS_PAL_B1 0x37
89 #define IO_WS_PAL_C0 0x38
90 #define IO_WS_PAL_C1 0x39
91 #define IO_WS_PAL_D0 0x3A
92 #define IO_WS_PAL_D1 0x3B
93 #define IO_WS_PAL_E0 0x3C
94 #define IO_WS_PAL_E1 0x3D
95 #define IO_WS_PAL_F0 0x3E
96 #define IO_WS_PAL_F1 0x3F