diff -Nur xtrs-4.9c-orig/ChangeLog xtrs-4.9c/ChangeLog --- xtrs-4.9c-orig/ChangeLog 2006-05-15 02:55:28.000000000 +0200 +++ xtrs-4.9c/ChangeLog 2007-04-25 11:34:05.000000000 +0200 @@ -1,3 +1,17 @@ +4.9c-Gentoo -- Sat Apr 21 14:37:00 MDT 2007 Joe Peterson + +* Patched for Gentoo ebuild + - Change "int i" in the z80 delay loop to "volatile int" + (allows near-actual speed emulation with optimization) + - Fixed keyboard wait issue that caused CPU spinning (i.e. max + CPU usage) after using F10 (reset), F7, F8, or F9. + +4.9-Gentoo -- Wed May 22 15:33:01 ECT 2002 Phill Lemon + +* Patched for gentoo linux 1.1a ebuild distribution. Changed default +romtype to Model P4 int,5 (main.c). OSS Freeware ROM Image to avoid +potential copyright infringement. + 4.9c -- Sun May 14 17:54:25 PDT 2006 -- Tim Mann * Fixed the new -e flag on import/cmd and export/cmd to actually diff -Nur xtrs-4.9c-orig/Makefile.local xtrs-4.9c/Makefile.local --- xtrs-4.9c-orig/Makefile.local 2006-05-13 23:10:36.000000000 +0200 +++ xtrs-4.9c/Makefile.local 2007-04-25 09:34:58.000000000 +0200 @@ -25,25 +25,25 @@ # is included in this package. This ROM cannot boot a Model III mode # operating system. -# for -model I -BUILT_IN_ROM = fakerom.hex -# for -model III and -model 4 -BUILT_IN_ROM3 = fakerom.hex -# for -model 4P -BUILT_IN_ROM4P = xtrsrom4p.hex +## for -model I +#BUILT_IN_ROM = fakerom.hex +## for -model III and -model 4 +#BUILT_IN_ROM3 = fakerom.hex +## for -model 4P +#BUILT_IN_ROM4P = xtrsrom4p.hex # If you would like the application to load a default ROM file at startup # time, use these lines (with the appropriate file names). The default file # name is ignored and can be omitted if the ROM for that model is built in. -DEFAULT_ROM = -DDEFAULT_ROM='"/usr/local/lib/xtrs/level2rom.hex"' \ - -DDEFAULT_ROM3='"/usr/local/lib/xtrs/romimage.m3"' \ - -DDEFAULT_ROM4P='"/usr/local/lib/xtrs/romimage.m4p"' +DEFAULT_ROM = -DDEFAULT_ROM='"/usr/share/xtrs/fakerom.hex"' \ + -DDEFAULT_ROM3='"/usr/share/xtrs/fakerom.hex"' \ + -DDEFAULT_ROM4P='"/usr/share/xtrs/xtrsrom4p.hex"' # If you would like to change where xtrs looks for disk?-? files, edit # this line. "." of course means the current working directory. -DISKDIR = -DDISKDIR='"."' +DISKDIR = -DDISKDIR='"/usr/share/xtrs/"' # If you have the GNU readline package (the README file tells you where to # get it) and would like to use it with the built-in Z-80 debugger, use diff -Nur xtrs-4.9c-orig/main.c xtrs-4.9c/main.c --- xtrs-4.9c-orig/main.c 2002-04-14 09:03:43.000000000 +0200 +++ xtrs-4.9c/main.c 2007-04-25 09:34:58.000000000 +0200 @@ -26,7 +26,7 @@ #include "trs_disk.h" #include "load_cmd.h" -int trs_model = 1; +int trs_model = 5; int trs_paused = 1; int trs_autodelay = 0; char *program_name; diff -Nur xtrs-4.9c-orig/trs.h xtrs-4.9c/trs.h --- xtrs-4.9c-orig/trs.h 2006-05-13 23:05:59.000000000 +0200 +++ xtrs-4.9c/trs.h 2007-04-25 09:34:58.000000000 +0200 @@ -67,6 +67,7 @@ extern void queue_key(int key); extern int dequeue_key(void); extern void clear_key_queue(void); +extern void trs_start_kbwait(void); extern void trs_end_kbwait(void); extern int stretch_amount; diff -Nur xtrs-4.9c-orig/trs_keyboard.c xtrs-4.9c/trs_keyboard.c --- xtrs-4.9c-orig/trs_keyboard.c 2006-05-13 22:50:17.000000000 +0200 +++ xtrs-4.9c/trs_keyboard.c 2007-04-25 09:34:58.000000000 +0200 @@ -983,6 +983,12 @@ } void +trs_start_kbwait() +{ + key_immediate = 0; +} + +void trs_end_kbwait() { key_immediate = 1; @@ -1003,7 +1009,6 @@ } trs_paused = 1; pause(); /* Wait for SIGALRM or SIGIO */ - key_immediate = 0; trs_get_event(0); } return rval; diff -Nur xtrs-4.9c-orig/trs_xinterface.c xtrs-4.9c/trs_xinterface.c --- xtrs-4.9c-orig/trs_xinterface.c 2006-05-13 23:33:51.000000000 +0200 +++ xtrs-4.9c/trs_xinterface.c 2007-04-25 09:34:58.000000000 +0200 @@ -920,6 +920,7 @@ (void)trs_uart_check_avail(); } + trs_start_kbwait(); do { if (wait) { XNextEvent(display, &event); diff -Nur xtrs-4.9c-orig/z80.c xtrs-4.9c/z80.c --- xtrs-4.9c-orig/z80.c 2005-05-22 08:57:01.000000000 +0200 +++ xtrs-4.9c/z80.c 2007-04-25 09:34:58.000000000 +0200 @@ -2999,7 +2999,7 @@ Uchar instruction; Ushort address; /* generic temps */ int ret = 0; - int i; + volatile int i; trs_continuous = continuous; /* loop to do a z80 instruction */