1 /*****************************************************************************/
5 /* System specific definitions for the C16, C116 and Plus/4 */
9 /* (C) 1998-2003 Ullrich von Bassewitz */
10 /* Römerstrasse 52 */
11 /* D-70794 Filderstadt */
12 /* EMail: uz@cc65.org */
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. */
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: */
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 */
32 /*****************************************************************************/
41 /* Check for errors */
42 #if !defined(__PLUS4__) && !defined(__C16__)
43 # error This module may only be used when compiling for the Plus/4 or C16!
48 /*****************************************************************************/
50 /*****************************************************************************/
54 /* Additional key defines */
66 /* Color attributes */
67 #define CATTR_LUMA0 0x00
68 #define CATTR_LUMA1 0x10
69 #define CATTR_LUMA2 0x20
70 #define CATTR_LUMA3 0x30
71 #define CATTR_LUMA4 0x40
72 #define CATTR_LUMA5 0x50
73 #define CATTR_LUMA6 0x60
74 #define CATTR_LUMA7 0x70
75 #define CATTR_BLINK 0x80
78 #define BCOLOR_BLACK 0x00
79 #define BCOLOR_WHITE 0x01
80 #define BCOLOR_RED 0x02
81 #define BCOLOR_CYAN 0x03
82 #define BCOLOR_VIOLET 0x04
83 #define BCOLOR_PURPLE BCOLOR_VIOLET
84 #define BCOLOR_GREEN 0x05
85 #define BCOLOR_BLUE 0x06
86 #define BCOLOR_YELLOW 0x07
87 #define BCOLOR_ORANGE 0x08
88 #define BCOLOR_BROWN 0x09
89 #define BCOLOR_LEMON 0x0A /* What's that color? */
90 #define BCOLOR_LIGHTVIOLET 0x0B
91 #define BCOLOR_BLUEGREEN 0x0C
92 #define BCOLOR_LIGHTBLUE 0x0D
93 #define BCOLOR_DARKBLUE 0x0E
94 #define BCOLOR_LIGHTGREEN 0x0F
96 /* Now try to mix up a C64/C128 compatible palette */
97 #define COLOR_BLACK (BCOLOR_BLACK)
98 #define COLOR_WHITE (BCOLOR_WHITE | CATTR_LUMA7)
99 #define COLOR_RED (BCOLOR_RED | CATTR_LUMA4)
100 #define COLOR_CYAN (BCOLOR_CYAN | CATTR_LUMA7)
101 #define COLOR_VIOLET (BCOLOR_VIOLET | CATTR_LUMA7)
102 #define COLOR_PURPLE COLOR_VIOLET
103 #define COLOR_GREEN (BCOLOR_GREEN | CATTR_LUMA7)
104 #define COLOR_BLUE (BCOLOR_BLUE | CATTR_LUMA7)
105 #define COLOR_YELLOW (BCOLOR_YELLOW | CATTR_LUMA7)
106 #define COLOR_ORANGE (BCOLOR_ORANGE | CATTR_LUMA7)
107 #define COLOR_BROWN (BCOLOR_BROWN | CATTR_LUMA7)
108 #define COLOR_LIGHTRED (BCOLOR_RED | CATTR_LUMA7)
109 #define COLOR_GRAY1 (BCOLOR_WHITE | CATTR_LUMA1)
110 #define COLOR_GRAY2 (BCOLOR_WHITE | CATTR_LUMA3)
111 #define COLOR_LIGHTGREEN (BCOLOR_LIGHTGREEN | CATTR_LUMA7)
112 #define COLOR_LIGHTBLUE (BCOLOR_LIGHTBLUE | CATTR_LUMA7)
113 #define COLOR_GRAY3 (BCOLOR_WHITE | CATTR_LUMA5)
115 /* Define hardware */
117 #define TED (*(struct __ted*)0xFF00)
119 /* Define special memory areas */
120 #define COLOR_RAM ((unsigned char*)0x0800)
124 /*****************************************************************************/
126 /*****************************************************************************/
130 /* End of cbm264.h */