1 /*****************************************************************************/
5 /* Apple ][ system specific definitions */
9 /* (C) 2000 Kevin Ruland, <kevin@rodin.wustl.edu> */
10 /* (C) 2003 Ullrich von Bassewitz, <uz@cc65.org> */
13 /* This software is provided 'as-is', without any expressed or implied */
14 /* warranty. In no event will the authors be held liable for any damages */
15 /* arising from the use of this software. */
17 /* Permission is granted to anyone to use this software for any purpose, */
18 /* including commercial applications, and to alter it and redistribute it */
19 /* freely, subject to the following restrictions: */
21 /* 1. The origin of this software must not be misrepresented; you must not */
22 /* claim that you wrote the original software. If you use this software */
23 /* in a product, an acknowledgment in the product documentation would be */
24 /* appreciated but is not required. */
25 /* 2. Altered source versions must be plainly marked as such, and must not */
26 /* be misrepresented as being the original software. */
27 /* 3. This notice may not be removed or altered from any source */
30 /*****************************************************************************/
39 /* Check for errors */
40 #if !defined(__APPLE2__) && !defined(__APPLE2ENH__)
41 # error This module may only be used when compiling for the Apple ][!
46 /*****************************************************************************/
48 /*****************************************************************************/
53 #define COLOR_BLACK 0x00
54 #define COLOR_GREEN 0x01
55 #define COLOR_VIOLET 0x02
56 #define COLOR_WHITE 0x03
57 #define COLOR_BLACK2 0x04
58 #define COLOR_ORANGE 0x05
59 #define COLOR_BLUE 0x06
60 #define COLOR_WHITE2 0x07
62 #define LORES_BLACK 0x00
63 #define LORES_MAGENTA 0x01
64 #define LORES_DARKBLUE 0x02
65 #define LORES_VIOLET 0x03
66 #define LORES_DARKGREEN 0x04
67 #define LORES_GRAY 0x05
68 #define LORES_BLUE 0x06
69 #define LORES_CYAN 0x07
70 #define LORES_BROWN 0x08
71 #define LORES_ORANGE 0x09
72 #define LORES_GRAY2 0x0A
73 #define LORES_PINK 0x0B
74 #define LORES_GREEN 0x0C
75 #define LORES_YELLOW 0x0D
76 #define LORES_AQUA 0x0E
77 #define LORES_WHITE 0x0F
79 /* Characters codes */
82 #define CH_CURS_LEFT 0x08
83 #define CH_CURS_RIGHT 0x15
85 #define CH_ULCORNER '+'
86 #define CH_URCORNER '+'
87 #define CH_LLCORNER '+'
88 #define CH_LRCORNER '+'
95 /* Return codes for get_ostype */
96 #define APPLE_UNKNOWN 0x00
97 #define APPLE_II 0x10 /* Apple ][ */
98 #define APPLE_IIPLUS 0x11 /* Apple ][+ */
99 #define APPLE_IIIEM 0x20 /* Apple /// (emulation) */
100 #define APPLE_IIE 0x30 /* Apple //e */
101 #define APPLE_IIEENH 0x31 /* Apple //e (enhanced) */
102 #define APPLE_IIECARD 0x40 /* Apple //e Option Card */
103 #define APPLE_IIC 0x50 /* Apple //c */
104 #define APPLE_IIC35 0x51 /* Apple //c (3.5 ROM) */
105 #define APPLE_IICEXP 0x53 /* Apple //c (Mem. Exp.) */
106 #define APPLE_IICREV 0x54 /* Apple //c (Rev. Mem. Exp.) */
107 #define APPLE_IICPLUS 0x55 /* Apple //c Plus */
108 #define APPLE_IIGS 0x80 /* Apple IIgs */
109 #define APPLE_IIGS1 0x81 /* Apple IIgs (ROM 1) */
110 #define APPLE_IIGS3 0x83 /* Apple IIgs (ROM 3) */
112 extern unsigned char _dos_type;
113 /* Valid _dos_type values:
115 * AppleDOS 3.3 - 0x00
116 * ProDOS 8 1.0.1 - 0x10
117 * ProDOS 8 1.0.2 - 0x10
118 * ProDOS 8 1.1.1 - 0x11
119 * ProDOS 8 1.2 - 0x12
120 * ProDOS 8 1.3 - 0x13
121 * ProDOS 8 1.4 - 0x14
122 * ProDOS 8 1.5 - 0x15
123 * ProDOS 8 1.6 - 0x16
124 * ProDOS 8 1.7 - 0x17
125 * ProDOS 8 1.8 - 0x18
126 * ProDOS 8 1.9 - 0x18 (!)
127 * ProDOS 8 2.0.1 - 0x21
128 * ProDOS 8 2.0.2 - 0x22
129 * ProDOS 8 2.0.3 - 0x23
134 /*****************************************************************************/
136 /*****************************************************************************/
140 unsigned char get_ostype (void);
141 /* Get the machine type. Returns one of the APPLE_xxx codes. */
143 void rebootafterexit (void);
144 /* Reboot machine after program termination has completed. */
146 #define tgi_apple2_mix(onoff) tgi_ioctl (0, (void *) (onoff))
147 /* If onoff is 1, graphics/text mixed mode is enabled.
148 * If onoff is 0, graphics/text mixed mode is disabled.
151 /* The following #defines will cause the matching functions calls in conio.h
152 * to be overlaid by macros with the same names, saving the function call
155 #define _textcolor(color) COLOR_WHITE
156 #define _bgcolor(color) COLOR_BLACK
157 #define _bordercolor(color) COLOR_BLACK
161 /* End of apple2.h */