Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

Display.cpp

Go to the documentation of this file.
00001 /*
00002  *  Display.cpp - C64 graphics display, emulator window handling
00003  *
00004  *  Frodo (C) 1994-1997 Christian Bauer
00005  */
00006 
00007 #include "sysdeps.h"
00008 
00009 #include "Display.h"
00010 #include "main.h"
00011 #include "Prefs.h"
00012 
00013 // AEH
00014 #ifdef __SYMBIAN32__
00015 #include "e32frodo.h"
00016 #include "eikinfo.h"
00017 #endif
00018   
00019 // LED states
00020 enum {
00021         LED_OFF,                // LED off
00022         LED_ON,                 // LED on (green)
00023         LED_ERROR_ON,   // LED blinking (red), currently on
00024         LED_ERROR_OFF   // LED blinking, currently off
00025 };
00026 
00027 
00028 #undef USE_THEORETICAL_COLORS
00029 
00030 #ifdef USE_THEORETICAL_COLORS
00031 
00032 // C64 color palette (theoretical values)
00033 const uint8 palette_red[16] = {
00034         0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0x80, 0xff, 0x40, 0x80, 0x80, 0x80, 0xc0
00035 };
00036 
00037 const uint8 palette_green[16] = {
00038         0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x80, 0x40, 0x80, 0x40, 0x80, 0xff, 0x80, 0xc0
00039 };
00040 
00041 const uint8 palette_blue[16] = {
00042         0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x80, 0x40, 0x80, 0x80, 0xff, 0xc0
00043 };
00044 
00045 #else
00046 
00047 // C64 color palette (more realistic looking colors)
00048 const uint8 palette_red[16] = {
00049         0x00, 0xff, 0x99, 0x00, 0xcc, 0x44, 0x11, 0xff, 0xaa, 0x66, 0xff, 0x40, 0x80, 0x66, 0x77, 0xc0
00050 };
00051 
00052 const uint8 palette_green[16] = {
00053         0x00, 0xff, 0x00, 0xff, 0x00, 0xcc, 0x00, 0xff, 0x55, 0x33, 0x66, 0x40, 0x80, 0xff, 0x77, 0xc0
00054 };
00055 
00056 const uint8 palette_blue[16] = {
00057         0x00, 0xff, 0x00, 0xcc, 0xcc, 0x44, 0x99, 0x00, 0x00, 0x00, 0x66, 0x40, 0x80, 0x66, 0xff, 0xc0
00058 };
00059 
00060 #endif
00061 
00062 
00063 /*
00064  *  Update drive LED display (deferred until Update())
00065  */
00066 
00067 void C64Display::UpdateLEDs(int l0, int l1, int l2, int l3)
00068 {
00069         led_state[0] = l0;
00070         led_state[1] = l1;
00071         led_state[2] = l2;
00072         led_state[3] = l3;
00073 }
00074 
00075 
00076 #ifdef __BEOS__
00077 #include "Display_Be.i"
00078 #endif
00079 
00080 #ifdef AMIGA
00081 #include "Display_Amiga.i"
00082 #endif
00083 
00084 #ifdef __unix
00085 #ifdef __svgalib__
00086 #include "Display_svga.i"
00087 #else
00088 #include "Display_x.i"
00089 #endif
00090 #endif
00091 
00092 #ifdef __mac__
00093 #include "Display_mac.i"
00094 #endif
00095 
00096 #ifdef WIN32
00097 #include "Display_WIN32.i"
00098 #endif
00099 
00100 #ifdef __riscos__
00101 #include "Display_Acorn.i"
00102 #endif
00103 
00104 #ifdef __SYMBIAN32__
00105 #include "display_epoc32.i"
00106 #endif

Generated on Tue Feb 8 04:07:45 2005 for E32frodo by doxygen 1.3.3