+++ /dev/null
-diff -Nur Frodo.orig/Src/Display_x.i Frodo/Src/Display_x.i
---- Frodo.orig/Src/Display_x.i Wed Aug 6 20:56:26 1997
-+++ Frodo/Src/Display_x.i Fri Jun 15 13:48:00 2001
-@@ -4,6 +4,8 @@
- *
- * Frodo (C) 1994-1997 Christian Bauer
- * X11 stuff by Bernd Schmidt/Lutz Vieweg
-+ * Support for visuals >8 bits by Michael Krause
-+ * Support for visuals >16 bits by qboosh@pld.org.pl
- */
-
- #include "CmdPipe.h"
-@@ -35,7 +37,8 @@
- static Visual *vis;
- static XVisualInfo visualInfo;
- static int bitdepth;
--static char *bufmem;
-+static char *bufmem, *bufmem8;
-+static uint32 trans[1<<12];
- static int hsize;
-
- // For LED error blinking
-@@ -382,13 +385,10 @@
-
- screen = XDefaultScreen(display);
- rootwin = XRootWindow(display, screen);
--#if 0
- if (XMatchVisualInfo(display, screen, 16, TrueColor, &visualInfo)) {
-+ } else if (XMatchVisualInfo(display, screen, 32, TrueColor, &visualInfo)) {
- } else if (XMatchVisualInfo(display, screen, 24, TrueColor, &visualInfo)) {
-- } else
--#endif
-- if (XMatchVisualInfo(display, screen, 8, PseudoColor, &visualInfo)) {
-- /* for our HP boxes */
-+ } else if (XMatchVisualInfo(display, screen, 8, PseudoColor, &visualInfo)) {
- } else if (XMatchVisualInfo(display, screen, 8, GrayScale, &visualInfo)) {
- } else {
- fprintf(stderr, "Can't obtain appropriate X visual\n");
-@@ -397,8 +397,8 @@
-
- vis = visualInfo.visual;
- bitdepth = visualInfo.depth;
- pixbytes = (bitdepth == 24 || bitdepth == 32 ? 4 : bitdepth == 12 || bitdepth == 16 ? 2 : 1);
-- fprintf(stderr, "Using %d bit visual\n", bitdepth);
-+ fprintf(stderr, "Using %d bit visual%s", bitdepth, bitdepth>8 ? " - please use 8 bits for highest performance!\n" : "\n");
-
- hsize = (DISPLAY_X + 3) & ~3;
-
-@@ -419,6 +419,10 @@
- img = XCreateImage(display, vis, bitdepth, ZPixmap, 0, bufmem, hsize, DISPLAY_Y, 32, 0);
- #endif
-
-+ if(bitdepth > 8) {
-+ bufmem8 = (char*)malloc(hsize * DISPLAY_Y);
-+ }
-+
- cmap = XCreateColormap(display, rootwin, vis, AllocNone);
-
- XParseColor(display, cmap, "#000000", &black);
-@@ -484,6 +488,32 @@
- {
- // Update C64 display
- XSync(display, 0);
-+
-+ if(bitdepth == 16) {
-+ // Best thing would be to change
-+ // VIC.cpp so it could render directly into 16-bit or 32-bit
-+ // memory instead of into an 8-bit chunky buffer.
-+ uint16 *p = (uint16*)bufmem8, *x = p + hsize*DISPLAY_Y/2;
-+ uint32 *d = (uint32*)bufmem;
-+ while(p < x) {
-+ *d++ = trans[*p++ & 0x0fff];
-+ }
-+#if 0
-+ // Just a plain version. Might be necessary on non-i386
-+ // machines?
-+ uint8 *p = (uint8*)bufmem8, *x = p + hsize*DISPLAY_Y;
-+ uint16 *d = (uint16*)bufmem;
-+ while(p < x) {
-+ *d++ = eight2sixteen[*p++];
-+ }
-+#endif
-+ } else if(bitdepth >= 24) {
-+ uint8 *p = (uint8*)bufmem8, *x = p + hsize*DISPLAY_Y;
-+ uint32 *d = (uint32*)bufmem;
-+ while(p < x)
-+ *d++ = trans[*p++];
-+ }
-+
- #if defined(X_USE_SHM)
- XShmPutImage(display, mywin, black_gc, img, 0, 0, 0, 0, DISPLAY_X, DISPLAY_Y, 0);
- #else
-@@ -566,7 +605,7 @@
-
- uint8 *C64Display::BitmapBase(void)
- {
-- return (uint8 *)bufmem;
-+ return (uint8*)(bitdepth>8 ? bufmem8 : bufmem);
- }
-
-
-@@ -776,14 +815,36 @@
- int i;
- XColor col;
- char str[20];
-+ uint32 eight2sixteen[16];
-
- for (i=0; i< 256; i++) {
-+ if(bitdepth == 16) {
-+ colors[i] = i & 0x0f;
-+ if(i < 16) {
-+ eight2sixteen[i] = ((uint16(palette_red[i]) << 8) & 0xf800) | ((uint16(palette_green[i]) << 3) & 0x07e0) | (palette_blue[i] >> 3);
-+ }
-+ } else if(bitdepth >= 24) {
-+ colors[i] = i & 0x0f;
-+ if(i < 16)
-+ eight2sixteen[i] = (uint32(palette_red[i]) << 16) | (uint32(palette_green[i]) << 8) | palette_blue[i];
-+ } else {
- sprintf(str, "rgb:%x/%x/%x", palette_red[i & 0x0f], palette_green[i & 0x0f], palette_blue[i & 0x0f]);
- XParseColor(display, cmap, str, &col);
- if (XAllocColor(display, cmap, &col))
- colors[i] = col.pixel;
- else
- fprintf(stderr, "Couldn't get all colors\n");
-+ }
-+ }
-+
-+ if(bitdepth == 16) {
-+ // Table to translate two 8-bit src -> two 16-bit dest
-+ for(i=0; i<1<<12;i++) {
-+ trans[i] = eight2sixteen[i & 0x0f] | (eight2sixteen[i >> 8] << 16);
-+ }
-+ } else if(bitdepth >= 24) {
-+ for(i=0;i<16;i++)
-+ trans[i] = eight2sixteen[i];
- }
- }
-
+++ /dev/null
---- Frodo/Src/Display.h.orig Wed Aug 6 20:56:26 1997
-+++ Frodo/Src/Display.h Sat Oct 12 19:39:02 2002
-@@ -112,7 +112,7 @@
-
- #ifdef __unix
- void draw_led(int num, int state); // Draw one LED
-- static void pulse_handler(...); // LED error blinking
-+ static void pulse_handler(int dummy); // LED error blinking
- #endif
-
- #ifdef WIN32
---- Frodo/Src/Display_x.i.orig Sat Oct 12 19:33:54 2002
-+++ Frodo/Src/Display_x.i Sat Oct 12 19:37:13 2002
-@@ -555,7 +555,7 @@
- * LED error blink
- */
-
--void C64Display::pulse_handler(...)
-+void C64Display::pulse_handler(int dummy)
- {
- for (int i=0; i<4; i++)
- switch (c64_disp->led_state[i]) {
---- Frodo/Src/SAM.cpp.orig Wed Aug 6 20:56:30 1997
-+++ Frodo/Src/SAM.cpp Sat Oct 12 19:37:24 2002
-@@ -470,7 +470,7 @@
- struct sigaction my_sa;
- #endif
-
--static void handle_abort(...)
-+static void handle_abort(int dummy)
- {
- WasAborted = true;
- #if !defined(HAVE_SIGACTION) && defined(HAVE_SIGNAL)
---- Frodo/Src/CmdPipe.h.orig Wed Aug 6 20:56:26 1997
-+++ Frodo/Src/CmdPipe.h Sat Oct 12 19:40:17 2002
-@@ -82,4 +82,4 @@
-
- };
-
--#endif CmdPipe_h
-+#endif /* CmdPipe_h */
---- Frodo/Src/CmdPipe.cpp.orig Wed Aug 6 20:56:26 1997
-+++ Frodo/Src/CmdPipe.cpp Sat Oct 12 19:41:21 2002
-@@ -13,6 +13,7 @@
- #include <unistd.h>
- #include <sys/wait.h>
- #include <sys/types.h>
-+ #include <stdlib.h>
- #include <string.h>
- #include <signal.h>
-
---- Frodo.orig/Src/configure.in Wed Aug 6 20:56:31 1997
-+++ Frodo/Src/configure.in Tue Feb 27 00:16:23 2001
-@@ -8,11 +8,6 @@
+diff -urN Frodo-4.1b.org/Src/configure.in Frodo-4.1b/Src/configure.in
+--- Frodo-4.1b.org/Src/configure.in Sat Feb 22 15:26:14 2003
++++ Frodo-4.1b/Src/configure.in Sat Feb 22 15:27:46 2003
+@@ -10,11 +10,6 @@
AC_PROG_CPP
AC_PROG_MAKE_SET
--dnl Don't want the default "-O -g" that autoconf uses for gcc.
+-dnl Don't want the default "-O2 -g" that autoconf uses for gcc.
-if [[ x"$GXX" = "xyes" ]]; then
-- CFLAGS="-O3 -g -fomit-frame-pointer -Wall -Wno-unused -Wno-format -W -Wmissing-prototypes -Wstrict-prototypes"
+- CFLAGS="-O2 -g -fomit-frame-pointer -Wall -Wno-unused -Wno-format"
-fi
-
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-@@ -193,7 +188,7 @@
+@@ -153,7 +148,7 @@
if [[ "$HAVEGCC27" = "y" -a "$HAVEI386" = "y" ]]; then
# Don't want strength-reduce on the i386, makes the code slower usually.
- CFLAGS="$CFLAGS -fno-strength-reduce -DREGPARAM=\"__attribute__((regparm(3)))\""
+ CFLAGS="$CFLAGS -DREGPARAM=\"__attribute__((regparm(3)))\""
- else if [[ "$TARGET" = "amigaos" ]]; then
+ elif [[ "$TARGET" = "amigaos" ]]; then
CFLAGS="$CFLAGS -DREGPARAM=\"__attribute__((regargs(4)))\" "
else
-diff -Nur Frodo.orig/Src/C64_x.i Frodo/Src/C64_x.i
---- Frodo.orig/Src/C64_x.i Wed Aug 6 20:56:25 1997
-+++ Frodo/Src/C64_x.i Tue Feb 27 00:40:21 2001
+diff -urN Frodo-4.1b.org/Src/C64_x.i Frodo-4.1b/Src/C64_x.i
+--- Frodo-4.1b.org/Src/C64_x.i Sat Feb 22 15:26:13 2003
++++ Frodo-4.1b/Src/C64_x.i Sat Feb 22 15:28:37 2003
@@ -100,7 +100,7 @@
gui = 0;
#else
if (gui) {
if (gui->fail) {
delete gui; gui = 0;
-diff -Nur Frodo.orig/Src/Makefile.in Frodo/Src/Makefile.in
---- Frodo.orig/Src/Makefile.in Wed Aug 6 20:56:29 1997
-+++ Frodo/Src/Makefile.in Tue Feb 27 00:42:07 2001
-@@ -9,7 +9,7 @@
- CXX = @CXX@
- CPP = @CPP@
- LIBRARIES = @LIBRARIES@ @LIBS@
--CFLAGS = @CFLAGS@ @X_CFLAGS@ -I./ -DBROKEN_JOYSTICK_H=@BROKEN_JOYSTICK_H@ -DFRODO_HPUX_REV=@HPUX_REV@ -DKBD_LANG=@KBD_LANG@
-+CFLAGS = @CFLAGS@ @X_CFLAGS@ -I./ -DBROKEN_JOYSTICK_H=@BROKEN_JOYSTICK_H@ -DFRODO_HPUX_REV=@HPUX_REV@ -DKBD_LANG=@KBD_LANG@ -DFRODO_HOME=$(FRODOHOME)
+diff -urN Frodo-4.1b.org/Src/Makefile.in Frodo-4.1b/Src/Makefile.in
+--- Frodo-4.1b.org/Src/Makefile.in Sat Feb 22 15:26:14 2003
++++ Frodo-4.1b/Src/Makefile.in Sat Feb 22 15:29:04 2003
+@@ -8,7 +8,7 @@
+ @SET_MAKE@
+ CXX = @CXX@
+ LIBS = @LIBS@
+-CFLAGS = @CFLAGS@ -I./ -DFRODO_HPUX_REV=@HPUX_REV@ -DKBD_LANG=@KBD_LANG@
++CFLAGS = @CFLAGS@ -I./ -DFRODO_HPUX_REV=@HPUX_REV@ -DKBD_LANG=@KBD_LANG@ -DFRODO_HOME=$(FRODOHOME)
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
-diff -Nur Frodo.orig/Src/Prefs.cpp Frodo/Src/Prefs.cpp
---- Frodo.orig/Src/Prefs.cpp Wed Aug 6 20:56:29 1997
-+++ Frodo/Src/Prefs.cpp Tue Feb 27 00:40:21 2001
+diff -urN Frodo-4.1b.org/Src/Prefs.cpp Frodo-4.1b/Src/Prefs.cpp
+--- Frodo-4.1b.org/Src/Prefs.cpp Sat Feb 22 15:26:14 2003
++++ Frodo-4.1b/Src/Prefs.cpp Sat Feb 22 15:28:37 2003
@@ -39,7 +39,7 @@
for (int i=0; i<4; i++)
DriveType[i] = DRVTYPE_DIR;
strcpy(DrivePath[1], "");
strcpy(DrivePath[2], "");
strcpy(DrivePath[3], "");
-diff -Nur Frodo.orig/Src/main.cpp Frodo/Src/main.cpp
---- Frodo.orig/Src/main.cpp Wed Aug 6 20:56:31 1997
-+++ Frodo/Src/main.cpp Tue Feb 27 00:40:21 2001
+diff -urN Frodo-4.1b.org/Src/main.cpp Frodo-4.1b/Src/main.cpp
+--- Frodo-4.1b.org/Src/main.cpp Sat Feb 22 15:26:14 2003
++++ Frodo-4.1b/Src/main.cpp Sat Feb 22 15:28:37 2003
@@ -24,10 +24,10 @@
#define CHAR_ROM_FILE "FrodoRsrc:Char_ROM"
#define FLOPPY_ROM_FILE "FrodoRsrc:1541_ROM"