4 * Contributing authors:
13 /* Characters codes */
17 #define CH_CURS_DOWN 29
18 #define CH_CURS_LEFT 30
19 #define CH_CURS_RIGHT 31
21 #define CH_TAB 0x7F /* tabulator */
22 #define CH_EOL 0x0B /* end-of-line marker */
23 #define CH_CLR 0x7D /* clear screen */
24 #define CH_BEL 0xFD /* bell */
25 #define CH_RUBOUT 0x7E /* back space (rubout) */
26 #define CH_DELLINE 0x9C /* delete line */
27 #define CH_INSLINE 0x9D /* insert line */
29 /* These are defined to be Atari + NumberKey */
41 #define CH_ULCORNER 0x11
42 #define CH_URCORNER 0x05
43 #define CH_LLCORNER 0x1A
44 #define CH_LRCORNER 0x03
55 /* make GTIA color value */
56 #define _gtia_mkcolor(hue,lum) (((hue) << 4) | ((lum) << 1))
58 /* luminance values go from 0 (black) to 7 (white) */
63 #define HUE_GOLDORANGE 2
64 #define HUE_REDORANGE 3
71 #define HUE_BLUEGREEN 10
72 #define HUE_BLUEGREEN2 11
74 #define HUE_YELLOWGREEN 13
76 #define HUE_YELLOWRED 15
78 /* Color defines, similar to c64 colors (untested) */
79 #define COLOR_BLACK _gtia_mkcolor(HUE_GREY,0)
80 #define COLOR_WHITE _gtia_mkcolor(HUE_GREY,7)
81 #define COLOR_RED _gtia_mkcolor(HUE_REDORANGE,1)
82 #define COLOR_CYAN _gtia_mkcolor(HUE_CYAN,3)
83 #define COLOR_VIOLET _gtia_mkcolor(HUE_PURPLE,4)
84 #define COLOR_GREEN _gtia_mkcolor(HUE_GREEN,2)
85 #define COLOR_BLUE _gtia_mkcolor(HUE_BLUE,2)
86 #define COLOR_YELLOW _gtia_mkcolor(HUE_YELLOW,7)
87 #define COLOR_ORANGE _gtia_mkcolor(HUE_ORANGE,5)
88 #define COLOR_BROWN _gtia_mkcolor(HUE_YELLOW,2)
89 #define COLOR_LIGHTRED _gtia_mkcolor(HUE_REDORANGE,6)
90 #define COLOR_GRAY1 _gtia_mkcolor(HUE_GREY,2)
91 #define COLOR_GRAY2 _gtia_mkcolor(HUE_GREY,3)
92 #define COLOR_LIGHTGREEN _gtia_mkcolor(HUE_GREEN,6)
93 #define COLOR_LIGHTBLUE _gtia_mkcolor(HUE_BLUE,6)
94 #define COLOR_GRAY3 _gtia_mkcolor(HUE_GREY,5)
96 /* color register functions */
97 extern void __fastcall__ setcolor (unsigned char color_reg, unsigned char hue, unsigned char luminace);
98 extern void __fastcall__ setcolor_low (unsigned char color_reg, unsigned char color_value);
99 extern unsigned char __fastcall__ getcolor (unsigned char color_reg);
101 /* other screen functions */
102 extern void __fastcall__ scroll (signed char numlines);
103 /* numlines > 0 scrolls up */
104 /* numlines < 0 scrolls down */
106 /* misc. functions */
107 extern void save_vecs(void); /* save system vectors */
108 extern void rest_vecs(void); /* restore system vectors */
109 extern unsigned int get_ostype(void); /* get ROM version */
111 /* get_ostype return value defines (for explanation, see ostype.s) */
113 #define AT_OS_TYPE_MAIN 7
114 #define AT_OS_PALNTSC (3 << 3)
115 #define AT_OS_TYPE_MINOR (7 << 5)
116 /* AT_OS_TYPE_MAIN values */
117 #define AT_OS_UNKNOWN 0
118 #define AT_OS_400800 1
119 #define AT_OS_1200XL 2
121 /* AT_OS_PALNTSC values */
124 /* AS_OS_TYPE_MINOR values */
125 #define AT_OS_400800_A 1
126 #define AT_OS_400800_B 2
127 #define AT_OS_1200_10 1
128 #define AT_OS_1200_11 2
129 #define AT_OS_XLXE_1 1
130 #define AT_OS_XLXE_2 2
131 #define AT_OS_XLXE_3 3
132 #define AT_OS_XLXE_4 4
134 /* Define hardware */
136 #define GTIA (*(struct __gtia_write*)0xD000)
137 #define GTIA (*(struct __gtia_read*)0xD000)
142 #define POKEY (*(struct __pokey_write*)0xD200)
143 #define POKEY (*(struct __pokey_read*)0xD200)
146 #define PIA (*(struct __pia*)0xD300)
149 #define ANTIC (*(struct __antic*)0xD400)