]> git.sur5r.net Git - cc65/blob - include/apple2enh.h
Merge pull request #620 from blackystardust/master
[cc65] / include / apple2enh.h
1 /*****************************************************************************/
2 /*                                                                           */
3 /*                                apple2enh.h                                */
4 /*                                                                           */
5 /*               enhanced Apple //e system specific definitions              */
6 /*                                                                           */
7 /*                                                                           */
8 /*                                                                           */
9 /* (C) 2004  Oliver Schmidt, <ol.sc@web.de>                                  */
10 /*                                                                           */
11 /*                                                                           */
12 /* This software is provided 'as-is', without any expressed or implied       */
13 /* warranty.  In no event will the authors be held liable for any damages    */
14 /* arising from the use of this software.                                    */
15 /*                                                                           */
16 /* Permission is granted to anyone to use this software for any purpose,     */
17 /* including commercial applications, and to alter it and redistribute it    */
18 /* freely, subject to the following restrictions:                            */
19 /*                                                                           */
20 /* 1. The origin of this software must not be misrepresented; you must not   */
21 /*    claim that you wrote the original software. If you use this software   */
22 /*    in a product, an acknowledgment in the product documentation would be  */
23 /*    appreciated but is not required.                                       */
24 /* 2. Altered source versions must be plainly marked as such, and must not   */
25 /*    be misrepresented as being the original software.                      */
26 /* 3. This notice may not be removed or altered from any source              */
27 /*    distribution.                                                          */
28 /*                                                                           */
29 /*****************************************************************************/
30
31
32
33 #ifndef _APPLE2ENH_H
34 #define _APPLE2ENH_H
35
36
37
38 /* Check for errors */
39 #if !defined(__APPLE2ENH__)
40 #  error This module may only be used when compiling for the enhanced Apple //e!
41 #endif
42
43
44
45 #include <apple2.h>
46
47
48
49 /*****************************************************************************/
50 /*                                   Data                                    */
51 /*****************************************************************************/
52
53
54
55 /* Characters codes */
56 #define CH_DEL        0x7F
57 #define CH_CURS_UP    0x0B
58 #define CH_CURS_DOWN  0x0A
59
60 /* These are defined to be OpenApple + NumberKey */
61 #define CH_F1   0xB1
62 #define CH_F2   0xB2
63 #define CH_F3   0xB3
64 #define CH_F4   0xB4
65 #define CH_F5   0xB5
66 #define CH_F6   0xB6
67 #define CH_F7   0xB7
68 #define CH_F8   0xB8
69 #define CH_F9   0xB9
70 #define CH_F10  0xB0
71
72 /* Styles for textframe */
73 #define TEXTFRAME_WIDE  0x00
74 #define TEXTFRAME_TALL  0x04
75
76 /* Video modes */
77 #define VIDEOMODE_40x24  0x0011
78 #define VIDEOMODE_80x24  0x0012
79 #define VIDEOMODE_40COL  VIDEOMODE_40x24
80 #define VIDEOMODE_80COL  VIDEOMODE_80x24
81
82
83
84 /*****************************************************************************/
85 /*                                 Variables                                 */
86 /*****************************************************************************/
87
88
89
90 /* The addresses of the static drivers */
91 extern void a2e_auxmem_emd[];
92 extern void a2e_stdjoy_joy[];     /* Referred to by joy_static_stddrv[]   */
93 extern void a2e_stdmou_mou[];     /* Referred to by mouse_static_stddrv[] */
94 extern void a2e_ssc_ser[];
95 extern void a2e_hi_tgi[];         /* Referred to by tgi_static_stddrv[]   */
96 extern void a2e_lo_tgi[];
97
98
99
100 /*****************************************************************************/
101 /*                                   Code                                    */
102 /*****************************************************************************/
103
104
105
106 void __fastcall__ textframe (unsigned char width, unsigned char height,
107                              unsigned char style);
108 /* Output a frame on the text screen with the given width and height
109 ** starting at the current cursor position and using the given style.
110 */
111
112 void __fastcall__ textframexy (unsigned char x, unsigned char y,
113                                unsigned char width, unsigned char height,
114                                unsigned char style);
115 /* Same as "gotoxy (x, y); textframe (width, height, style);" */
116
117 unsigned __fastcall__ videomode (unsigned mode);
118 /* Set the video mode, return the old mode. Call with one of the VIDEOMODE_xx
119 ** constants.
120 */
121
122
123
124 /* End of apple2enh.h */
125 #endif