ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/Frodo4/Src/Display.cpp
Revision: 1.6
Committed: 2005-06-27T19:55:48Z (19 years, 4 months ago) by cebix
Branch: MAIN
CVS Tags: VERSION_4_2
Changes since 1.5: +1 -1 lines
Log Message:
updated copyright dates

File Contents

# Content
1 /*
2 * Display.cpp - C64 graphics display, emulator window handling
3 *
4 * Frodo (C) 1994-1997,2002-2005 Christian Bauer
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21 #include "sysdeps.h"
22
23 #include "Display.h"
24 #include "main.h"
25 #include "Prefs.h"
26
27
28 // LED states
29 enum {
30 LED_OFF, // LED off
31 LED_ON, // LED on (green)
32 LED_ERROR_ON, // LED blinking (red), currently on
33 LED_ERROR_OFF // LED blinking, currently off
34 };
35
36
37 #define USE_PEPTO_COLORS 1
38
39 #ifdef USE_PEPTO_COLORS
40
41 // C64 color palette
42 // Values based on measurements by Philip "Pepto" Timmermann <pepto@pepto.de>
43 // (see http://www.pepto.de/projects/colorvic/)
44 const uint8 palette_red[16] = {
45 0x00, 0xff, 0x86, 0x4c, 0x88, 0x35, 0x20, 0xcf, 0x88, 0x40, 0xcb, 0x34, 0x68, 0x8b, 0x68, 0xa1
46 };
47
48 const uint8 palette_green[16] = {
49 0x00, 0xff, 0x19, 0xc1, 0x17, 0xac, 0x07, 0xf2, 0x3e, 0x2a, 0x55, 0x34, 0x68, 0xff, 0x4a, 0xa1
50 };
51
52 const uint8 palette_blue[16] = {
53 0x00, 0xff, 0x01, 0xe3, 0xbd, 0x0a, 0xc0, 0x2d, 0x00, 0x00, 0x37, 0x34, 0x68, 0x59, 0xff, 0xa1
54 };
55
56 #else
57
58 // C64 color palette (traditional Frodo colors)
59 const uint8 palette_red[16] = {
60 0x00, 0xff, 0x99, 0x00, 0xcc, 0x44, 0x11, 0xff, 0xaa, 0x66, 0xff, 0x40, 0x80, 0x66, 0x77, 0xc0
61 };
62
63 const uint8 palette_green[16] = {
64 0x00, 0xff, 0x00, 0xff, 0x00, 0xcc, 0x00, 0xdd, 0x55, 0x33, 0x66, 0x40, 0x80, 0xff, 0x77, 0xc0
65 };
66
67 const uint8 palette_blue[16] = {
68 0x00, 0xff, 0x00, 0xcc, 0xcc, 0x44, 0x99, 0x00, 0x00, 0x00, 0x66, 0x40, 0x80, 0x66, 0xff, 0xc0
69 };
70
71 #endif
72
73
74 /*
75 * Update drive LED display (deferred until Update())
76 */
77
78 void C64Display::UpdateLEDs(int l0, int l1, int l2, int l3)
79 {
80 led_state[0] = l0;
81 led_state[1] = l1;
82 led_state[2] = l2;
83 led_state[3] = l3;
84 }
85
86
87 #if defined(__BEOS__)
88 #include "Display_Be.h"
89 #elif defined(AMIGA)
90 #include "Display_Amiga.h"
91 #elif defined(HAVE_SDL)
92 #include "Display_SDL.h"
93 #elif defined(__unix)
94 # ifdef __svgalib__
95 # include "Display_svga.h"
96 # else
97 # include "Display_x.h"
98 # endif
99 #elif defined(__mac__)
100 #include "Display_mac.h"
101 #elif defined(WIN32)
102 #include "Display_WIN32.h"
103 #elif defined(__riscos__)
104 #include "Display_Acorn.h"
105 #endif