52 #define CH_DELCHR 0xFE
56 #define CH_CURS_DOWN 29
57 #define CH_CURS_LEFT 30
58 #define CH_CURS_RIGHT 31
65 #define CH_RUBOUT 0x7E
66 #define CH_DELLINE 0x9C
67 #define CH_INSLINE 0x9D
81 #define CH_ULCORNER 0x11
82 #define CH_URCORNER 0x05
83 #define CH_LLCORNER 0x1A
84 #define CH_LRCORNER 0x03
98 #define JOY_UP_MASK 0x01
99 #define JOY_DOWN_MASK 0x02
100 #define JOY_LEFT_MASK 0x04
101 #define JOY_RIGHT_MASK 0x08
102 #define JOY_BTN_1_MASK 0x10
104 #define JOY_FIRE_MASK JOY_BTN_1_MASK
105 #define JOY_FIRE(v) ((v) & JOY_FIRE_MASK)
112 #define KEY_NONE ((unsigned char) 0xFF)
114 #define KEY_0 ((unsigned char) 0x32)
115 #define KEY_1 ((unsigned char) 0x1F)
116 #define KEY_2 ((unsigned char) 0x1E)
117 #define KEY_3 ((unsigned char) 0x1A)
118 #define KEY_4 ((unsigned char) 0x18)
119 #define KEY_5 ((unsigned char) 0x1D)
120 #define KEY_6 ((unsigned char) 0x1B)
121 #define KEY_7 ((unsigned char) 0x33)
122 #define KEY_8 ((unsigned char) 0x35)
123 #define KEY_9 ((unsigned char) 0x30)
125 #define KEY_A ((unsigned char) 0x3F)
126 #define KEY_B ((unsigned char) 0x15)
127 #define KEY_C ((unsigned char) 0x12)
128 #define KEY_D ((unsigned char) 0x3A)
129 #define KEY_E ((unsigned char) 0x2A)
130 #define KEY_F ((unsigned char) 0x38)
131 #define KEY_G ((unsigned char) 0x3D)
132 #define KEY_H ((unsigned char) 0x39)
133 #define KEY_I ((unsigned char) 0x0D)
134 #define KEY_J ((unsigned char) 0x01)
135 #define KEY_K ((unsigned char) 0x05)
136 #define KEY_L ((unsigned char) 0x00)
137 #define KEY_M ((unsigned char) 0x25)
138 #define KEY_N ((unsigned char) 0x23)
139 #define KEY_O ((unsigned char) 0x08)
140 #define KEY_P ((unsigned char) 0x0A)
141 #define KEY_Q ((unsigned char) 0x2F)
142 #define KEY_R ((unsigned char) 0x28)
143 #define KEY_S ((unsigned char) 0x3E)
144 #define KEY_T ((unsigned char) 0x2D)
145 #define KEY_U ((unsigned char) 0x0B)
146 #define KEY_V ((unsigned char) 0x10)
147 #define KEY_W ((unsigned char) 0x2E)
148 #define KEY_X ((unsigned char) 0x16)
149 #define KEY_Y ((unsigned char) 0x2B)
150 #define KEY_Z ((unsigned char) 0x17)
152 #define KEY_COMMA ((unsigned char) 0x20)
153 #define KEY_PERIOD ((unsigned char) 0x22)
154 #define KEY_SLASH ((unsigned char) 0x26)
155 #define KEY_SEMICOLON ((unsigned char) 0x02)
156 #define KEY_PLUS ((unsigned char) 0x06)
157 #define KEY_ASTERISK ((unsigned char) 0x07)
158 #define KEY_DASH ((unsigned char) 0x0E)
159 #define KEY_EQUALS ((unsigned char) 0x0F)
160 #define KEY_LESSTHAN ((unsigned char) 0x36)
161 #define KEY_GREATERTHAN ((unsigned char) 0x37)
163 #define KEY_ESC ((unsigned char) 0x1C)
164 #define KEY_TAB ((unsigned char) 0x2C)
165 #define KEY_SPACE ((unsigned char) 0x21)
166 #define KEY_RETURN ((unsigned char) 0x0C)
167 #define KEY_DELETE ((unsigned char) 0x34)
168 #define KEY_CAPS ((unsigned char) 0x3C)
169 #define KEY_INVERSE ((unsigned char) 0x27)
170 #define KEY_HELP ((unsigned char) 0x11)
173 #define KEY_F1 ((unsigned char) 0x03)
174 #define KEY_F2 ((unsigned char) 0x04)
175 #define KEY_F3 ((unsigned char) 0x13)
176 #define KEY_F4 ((unsigned char) 0x14)
179 #define KEY_CTRL ((unsigned char) 0x80)
185 #define KEY_SHIFT ((unsigned char) 0x40)
193 #define KEY_EXCLAMATIONMARK (KEY_1 | KEY_SHIFT)
194 #define KEY_QUOTE (KEY_2 | KEY_SHIFT)
195 #define KEY_HASH (KEY_3 | KEY_SHIFT)
196 #define KEY_DOLLAR (KEY_4 | KEY_SHIFT)
197 #define KEY_PERCENT (KEY_5 | KEY_SHIFT)
198 #define KEY_AMPERSAND (KEY_6 | KEY_SHIFT)
199 #define KEY_APOSTROPHE (KEY_7 | KEY_SHIFT)
200 #define KEY_AT (KEY_8 | KEY_SHIFT)
201 #define KEY_OPENINGPARAN (KEY_9 | KEY_SHIFT)
202 #define KEY_CLOSINGPARAN (KEY_0 | KEY_SHIFT)
203 #define KEY_UNDERLINE (KEY_DASH | KEY_SHIFT)
204 #define KEY_BAR (KEY_EQUALS | KEY_SHIFT)
205 #define KEY_COLON (KEY_SEMICOLON | KEY_SHIFT)
206 #define KEY_BACKSLASH (KEY_PLUS | KEY_SHIFT)
207 #define KEY_CIRCUMFLEX (KEY_ASTERISK | KEY_SHIFT)
208 #define KEY_OPENINGBRACKET (KEY_COMMA | KEY_SHIFT)
209 #define KEY_CLOSINGBRACKET (KEY_PERIOD | KEY_SHIFT)
210 #define KEY_QUESTIONMARK (KEY_SLASH | KEY_SHIFT)
211 #define KEY_CLEAR (KEY_LESSTHAN | KEY_SHIFT)
212 #define KEY_INSERT (KEY_GREATERTHAN | KEY_SHIFT)
214 #define KEY_UP (KEY_DASH | KEY_CTRL)
215 #define KEY_DOWN (KEY_EQUALS | KEY_CTRL)
216 #define KEY_LEFT (KEY_PLUS | KEY_CTRL)
217 #define KEY_RIGHT (KEY_ASTERISK | KEY_CTRL)
226 extern void __fastcall__ _setcolor (
unsigned char color_reg,
unsigned char hue,
unsigned char luminance);
227 extern void __fastcall__ _setcolor_low (
unsigned char color_reg,
unsigned char color_value);
228 extern unsigned char __fastcall__ _getcolor (
unsigned char color_reg);
238 extern int __fastcall__ _graphics (
unsigned char mode);
239 extern void __fastcall__ _scroll (
signed char numlines);
251 extern unsigned char get_tv(
void);
252 extern void _save_vecs(
void);
253 extern void _rest_vecs(
void);
254 extern char *_getdefdev(
void);
255 extern unsigned char _is_cmdline_dos(
void);
262 #define AT_OS_TYPE_MAIN 7
263 #define AT_OS_TYPE_MINOR (7 << 3)
265 #define AT_OS_UNKNOWN 0
266 #define AT_OS_400800 1
267 #define AT_OS_1200XL 2
272 #define AT_OS_400800PAL_A 1
273 #define AT_OS_400800PAL_B 2
274 #define AT_OS_400800NTSC_A 1
275 #define AT_OS_400800NTSC_B 2
276 #define AT_OS_1200_10 1
277 #define AT_OS_1200_11 2
278 #define AT_OS_XLXE_1 1
279 #define AT_OS_XLXE_2 2
280 #define AT_OS_XLXE_3 3
281 #define AT_OS_XLXE_4 4
311 #define OS (*(volatile struct __os*)0x0000)
312 #define BASIC (*(volatile struct __basic*)0x0080)
315 #define GTIA_READ (*(volatile struct __gtia_read*)0xD000)
316 #define GTIA_WRITE (*(volatile struct __gtia_write*)0xD000)
321 #define POKEY_READ (*(volatile struct __pokey_read*)0xD200)
322 #define POKEY_WRITE (*(volatile struct __pokey_write*)0xD200)
325 #define PIA (*(volatile struct __pia*)0xD300)
328 #define ANTIC (*(volatile struct __antic*)0xD400)
340 #define COLOR_BLACK GTIA_COLOR_BLACK
341 #define COLOR_WHITE GTIA_COLOR_WHITE
342 #define COLOR_RED GTIA_COLOR_RED
343 #define COLOR_CYAN GTIA_COLOR_CYAN
344 #define COLOR_PURPLE GTIA_COLOR_VIOLET
345 #define COLOR_GREEN GTIA_COLOR_GREEN
346 #define COLOR_BLUE GTIA_COLOR_BLUE
347 #define COLOR_YELLOW GTIA_COLOR_YELLOW
348 #define COLOR_ORANGE GTIA_COLOR_ORANGE
349 #define COLOR_BROWN GTIA_COLOR_BROWN
350 #define COLOR_LIGHTRED GTIA_COLOR_LIGHTRED
351 #define COLOR_GRAY1 GTIA_COLOR_GRAY1
352 #define COLOR_GRAY2 GTIA_COLOR_GRAY2
353 #define COLOR_LIGHTGREEN GTIA_COLOR_LIGHTGREEN
354 #define COLOR_LIGHTBLUE GTIA_COLOR_LIGHTBLUE
355 #define COLOR_GRAY3 GTIA_COLOR_GRAY3
365 #define PORTA_PTRIG3 0x80
366 #define PORTA_PTRIG2 0x40
367 #define PORTA_PTRIG1 0x08
368 #define PORTA_PTRIG0 0x04
374 #define PORTB_PTRIG7 0x80
375 #define PORTB_PTRIG6 0x40
376 #define PORTB_PTRIG5 0x08
377 #define PORTB_PTRIG4 0x04
388 #define PORTB_OSROM 0x01
394 #define PORTB_BASICROM 0x02
399 #define PORTB_LED1 0x04
400 #define PORTB_LED2 0x08
408 #define PORTB_BANKSELECT1 0x00
409 #define PORTB_BANKSELECT2 0x04
410 #define PORTB_BANKSELECT3 0x08
411 #define PORTB_BANKSELECT4 0x0C
417 #define PORTB_BANKSWITCH_CPU 0x10
418 #define PORTB_BANKSWITCH_ANTIC 0x20
424 #define PORTB_SELFTEST 0x80
435 #define PxCTL_IRQ_ENABLE 0x01
446 #define PxCTL_ADDRESSING 0x04
453 #define PACTL_MOTOR_CONTROL 0x08
458 #define PBCTL_PERIPH_CMD_IDENT 0x08
469 #define PxCTL_IRQ_STATUS 0x80
476 #define _textcolor(color) COLOR_WHITE
unsigned char get_tv(void) __attribute__((leaf))
signed char get_ostype(void) __attribute__((leaf))
const void uint16_t uint8_t mode
Definition: memory.h:58