]> git.sur5r.net Git - cc65/blob - include/pet.h
Changed multi-line C comments into another style.
[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 /* Define hardware */
59 #include <_pia.h>
60 #define PIA1    (*(struct __pia*)0xE810)
61 #define PIA2    (*(struct __pia*)0xE820)
62
63 #include <_6522.h>
64 #define VIA     (*(struct __6522*)0xE840)
65
66 /* All models from 40xx and above */
67 #include <_6545.h>
68 #define CRTC    (*(struct __6545)0xE880)
69
70 /* SuperPET only */
71 #include <_6551.h>
72 #define ACIA    (*(struct __6551*)0xEFF0)
73
74
75
76 /*****************************************************************************/
77 /*                                 Variables                                 */
78 /*****************************************************************************/
79
80
81
82 /* The addresses of the static drivers */
83 extern void pet_ptvjoy_joy[];
84 extern void pet_stdjoy_joy[];       /* Referred to by joy_static_stddrv[] */
85
86
87
88 /*****************************************************************************/
89 /*                                   Code                                    */
90 /*****************************************************************************/
91
92
93
94 /* The following #defines will cause the matching functions calls in conio.h
95 ** to be overlaid by macros with the same names, saving the function call
96 ** overhead.
97 */
98 #define _textcolor(color)       COLOR_WHITE
99 #define _bgcolor(color)         COLOR_BLACK
100 #define _bordercolor(color)     COLOR_BLACK
101
102
103
104 /* End of pet.h */
105 #endif