1 /*****************************************************************************/
5 /* Plus/4 system specific definitions */
9 /* (C) 1998-2001 Ullrich von Bassewitz */
11 /* D-70597 Stuttgart */
12 /* EMail: uz@musoftware.de */
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__)
43 # error This module may only be used when compiling for the Plus/4!
48 /* Additional key defines */
60 /* Color attributes */
61 #define CATTR_LUMA0 0x00
62 #define CATTR_LUMA1 0x10
63 #define CATTR_LUMA2 0x20
64 #define CATTR_LUMA3 0x30
65 #define CATTR_LUMA4 0x40
66 #define CATTR_LUMA5 0x50
67 #define CATTR_LUMA6 0x60
68 #define CATTR_LUMA7 0x70
69 #define CATTR_BLINK 0x80
72 #define BCOLOR_BLACK 0x00
73 #define BCOLOR_WHITE 0x01
74 #define BCOLOR_RED 0x02
75 #define BCOLOR_CYAN 0x03
76 #define BCOLOR_VIOLET 0x04
77 #define BCOLOR_GREEN 0x05
78 #define BCOLOR_BLUE 0x06
79 #define BCOLOR_YELLOW 0x07
80 #define BCOLOR_ORANGE 0x08
81 #define BCOLOR_BROWN 0x09
82 #define BCOLOR_LEMON 0x0A /* What's that color? */
83 #define BCOLOR_LIGHTVIOLET 0x0B
84 #define BCOLOR_BLUEGREEN 0x0C
85 #define BCOLOR_LIGHTBLUE 0x0D
86 #define BCOLOR_DARKBLUE 0x0E
87 #define BCOLOR_LIGHTGREEN 0x0F
91 /* Now try to mix up a C64/C128 compatible palette */
92 #define COLOR_BLACK (BCOLOR_BLACK)
93 #define COLOR_WHITE (BCOLOR_WHITE | CATTR_LUMA7)
94 #define COLOR_RED (BCOLOR_RED | CATTR_LUMA4)
95 #define COLOR_CYAN (BCOLOR_CYAN | CATTR_LUMA7)
96 #define COLOR_VIOLET (BCOLOR_VIOLET | CATTR_LUMA7)
97 #define COLOR_GREEN (BCOLOR_GREEN | CATTR_LUMA7)
98 #define COLOR_BLUE (BCOLOR_BLUE | CATTR_LUMA7)
99 #define COLOR_YELLOW (BCOLOR_YELLOW | CATTR_LUMA7)
100 #define COLOR_ORANGE (BCOLOR_ORANGE | CATTR_LUMA7)
101 #define COLOR_BROWN (BCOLOR_BROWN | CATTR_LUMA7)
102 #define COLOR_LIGHTRED (BCOLOR_RED | CATTR_LUMA7)
103 #define COLOR_GRAY1 (BCOLOR_WHITE | CATTR_LUMA1)
104 #define COLOR_GRAY2 (BCOLOR_WHITE | CATTR_LUMA3)
105 #define COLOR_LIGHTGREEN (BCOLOR_LIGHTGREEN | CATTR_LUMA7)
106 #define COLOR_LIGHTBLUE (BCOLOR_LIGHTBLUE | CATTR_LUMA7)
107 #define COLOR_GRAY3 (BCOLOR_WHITE | CATTR_LUMA5)