]> git.sur5r.net Git - cc65/blob - include/apple2.h
Amiga install files by Stefan Haubenthal.
[cc65] / include / apple2.h
1 /*****************************************************************************/
2 /*                                                                           */
3 /*                                 apple2.h                                  */
4 /*                                                                           */
5 /*                   Apple ][ system specific definitions                    */
6 /*                                                                           */
7 /*                                                                           */
8 /*                                                                           */
9 /* (C) 2000  Kevin Ruland, <kevin@rodin.wustl.edu>                           */
10 /* (C) 2003  Ullrich von Bassewitz, <uz@cc65.org>                            */
11 /*                                                                           */
12 /*                                                                           */
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.                                    */
16 /*                                                                           */
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:                            */
20 /*                                                                           */
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              */
28 /*    distribution.                                                          */
29 /*                                                                           */
30 /*****************************************************************************/
31
32
33
34 #ifndef _APPLE2_H
35 #define _APPLE2_H
36
37
38
39 /* Check for errors */
40 #if !defined(__APPLE2__) && !defined(__APPLE2ENH__)
41 #  error This module may only be used when compiling for the Apple ][!
42 #endif
43
44
45
46 /*****************************************************************************/
47 /*                                   Data                                    */
48 /*****************************************************************************/
49
50
51
52 /* Color Defines
53  * Since Apple2 does not support color text these defines are only
54  * used to get the library to compile correctly.  They should not be used
55  * in user code
56  */
57 #define COLOR_BLACK     0x00
58 #define COLOR_WHITE     0x01
59
60 /* Characters codes */
61 #define CH_ENTER        0x0D
62 #define CH_ESC          0x1B
63 #define CH_CURS_LEFT    0x08
64 #define CH_CURS_RIGHT   0x15
65
66 #define CH_ULCORNER     '+'
67 #define CH_URCORNER     '+'
68 #define CH_LLCORNER     '+'
69 #define CH_LRCORNER     '+'
70 #define CH_TTEE         '+'
71 #define CH_BTEE         '+'
72 #define CH_LTEE         '+'
73 #define CH_RTEE         '+'
74 #define CH_CROSS        '+'
75
76 /* Return codes for get_ostype */
77 #define APPLE_UNKNOWN 0x00
78 #define APPLE_II      0x10              /* Apple ][                     */
79 #define APPLE_IIPLUS  0x11              /* Apple ][+                    */
80 #define APPLE_IIIEM   0x20              /* Apple /// (emulation)        */
81 #define APPLE_IIE     0x30              /* Apple //e                    */
82 #define APPLE_IIEENH  0x31              /* Apple //e (enhanced)         */
83 #define APPLE_IIECARD 0x40              /* Apple //e Option Card        */
84 #define APPLE_IIC     0x50              /* Apple //c                    */
85 #define APPLE_IIC35   0x51              /* Apple //c (3.5 ROM)          */
86 #define APPLE_IICEXP  0x53              /* Apple //c (Mem. Exp.)        */
87 #define APPLE_IICREV  0x54              /* Apple //c (Rev. Mem. Exp.)   */
88 #define APPLE_IICPLUS 0x55              /* Apple //c Plus               */
89 #define APPLE_IIGS    0x80              /* Apple IIgs                   */
90 #define APPLE_IIGS1   0x81              /* Apple IIgs (ROM 1)           */
91 #define APPLE_IIGS3   0x83              /* Apple IIgs (ROM 3)           */
92
93 extern unsigned char _dos_type;
94 /* Valid _dos_type values:
95  *
96  * AppleDOS 3.3   - 0x00
97  * ProDOS 8 1.0.1 - 0x10
98  * ProDOS 8 1.0.2 - 0x10
99  * ProDOS 8 1.1.1 - 0x11
100  * ProDOS 8 1.2   - 0x12
101  * ProDOS 8 1.3   - 0x13
102  * ProDOS 8 1.4   - 0x14
103  * ProDOS 8 1.5   - 0x15
104  * ProDOS 8 1.6   - 0x16
105  * ProDOS 8 1.7   - 0x17
106  * ProDOS 8 1.8   - 0x18
107  * ProDOS 8 1.9   - 0x18
108  * ProDOS 8 2.0.1 - 0x21
109  * ProDOS 8 2.0.2 - 0x22
110  * ProDOS 8 2.0.3 - 0x23
111  */
112
113
114
115 /*****************************************************************************/
116 /*                                   Code                                    */
117 /*****************************************************************************/
118
119
120
121 unsigned char get_ostype (void);
122 /* Get the machine type. Returns one of the APPLE_xxx codes. */
123
124 /* The following #defines will cause the matching functions calls in conio.h
125  * to be overlaid by macros with the same names, saving the function call
126  * overhead.
127  */
128 #define _textcolor(color)       COLOR_WHITE
129 #define _bgcolor(color)         COLOR_BLACK
130 #define _bordercolor(color)     COLOR_BLACK
131
132
133
134 /* End of apple2.h */
135 #endif