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 */
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 /* Define hardware */
103 #define GTIA (*(struct __gtia_write*)0xD000)
104 #define GTIA (*(struct __gtia_read*)0xD000)
109 #define POKEY (*(struct __pokey_write*)0xD200)
110 #define POKEY (*(struct __pokey_read*)0xD200)
113 #define PIA (*(struct __pia*)0xD300)
116 #define ANTIC (*(struct __antic*)0xD400)