]> git.sur5r.net Git - cc65/blob - include/pet.h
Fixed _textcolor definition.
[cc65] / include / pet.h
1 /*****************************************************************************/
2 /*                                                                           */
3 /*                                   pet.h                                   */
4 /*                                                                           */
5 /*                      PET system specific definitions                      */
6 /*                                                                           */
7 /*                                                                           */
8 /*                                                                           */
9 /* (C) 1998-2005 Ullrich von Bassewitz                                       */
10 /*               Roemerstrasse 52                                            */
11 /*               D-70794 Filderstadt                                         */
12 /* EMail:        uz@cc65.org                                                 */
13 /*                                                                           */
14 /*                                                                           */
15 /* This software is provided 'as-is', without any expressed or implied       */
16 /* warranty.  In no event will the authors be held liable for any damages    */
17 /* arising from the use of this software.                                    */
18 /*                                                                           */
19 /* Permission is granted to anyone to use this software for any purpose,     */
20 /* including commercial applications, and to alter it and redistribute it    */
21 /* freely, subject to the following restrictions:                            */
22 /*                                                                           */
23 /* 1. The origin of this software must not be misrepresented; you must not   */
24 /*    claim that you wrote the original software. If you use this software   */
25 /*    in a product, an acknowledgment in the product documentation would be  */
26 /*    appreciated but is not required.                                       */
27 /* 2. Altered source versions must be plainly marked as such, and must not   */
28 /*    be misrepresented as being the original software.                      */
29 /* 3. This notice may not be removed or altered from any source              */
30 /*    distribution.                                                          */
31 /*                                                                           */
32 /*****************************************************************************/
33
34
35
36 #ifndef _PET_H
37 #define _PET_H
38
39
40
41 /* Check for errors */
42 #if !defined(__PET__)
43 #  error This module may only be used when compiling for the CBM PET!
44 #endif
45
46
47
48 /*****************************************************************************/
49 /*                                   Data                                    */
50 /*****************************************************************************/
51
52
53
54 /* Color defines */
55 #define COLOR_BLACK             0x00
56 #define COLOR_WHITE             0x01
57
58 /* Masks for joy_read */
59 #define JOY_UP_MASK             0x01
60 #define JOY_DOWN_MASK           0x02
61 #define JOY_LEFT_MASK           0x04
62 #define JOY_RIGHT_MASK          0x08
63 #define JOY_BTN_1_MASK          0x10
64
65 /* Define hardware */
66 #include <_pia.h>
67 #define PIA1    (*(struct __pia*)0xE810)
68 #define PIA2    (*(struct __pia*)0xE820)
69
70 #include <_6522.h>
71 #define VIA     (*(struct __6522*)0xE840)
72
73 /* All models from 40xx and above */
74 #include <_6545.h>
75 #define CRTC    (*(struct __6545)0xE880)
76
77 /* SuperPET only */
78 #include <_6551.h>
79 #define ACIA    (*(struct __6551*)0xEFF0)
80
81
82
83 /*****************************************************************************/
84 /*                                 Variables                                 */
85 /*****************************************************************************/
86
87
88
89 /* The addresses of the static drivers */
90 extern void pet_ptvjoy_joy[];
91 extern void pet_stdjoy_joy[];       /* Referred to by joy_static_stddrv[] */
92
93
94
95 /*****************************************************************************/
96 /*                                   Code                                    */
97 /*****************************************************************************/
98
99
100
101 /* The following #defines will cause the matching functions calls in conio.h
102 ** to be overlaid by macros with the same names, saving the function call
103 ** overhead.
104 */
105 #define _textcolor(color)       COLOR_WHITE
106 #define _bgcolor(color)         COLOR_BLACK
107 #define _bordercolor(color)     COLOR_BLACK
108 #define _cpeekcolor(color)      COLOR_WHITE
109
110
111
112 /* End of pet.h */
113 #endif