diff options
author | christos <christos@pkgsrc.org> | 2017-07-16 14:10:58 +0000 |
---|---|---|
committer | christos <christos@pkgsrc.org> | 2017-07-16 14:10:58 +0000 |
commit | 20fc2cef27872fc9fe66f1da5cf64d16381bc3cb (patch) | |
tree | e4e6d9d3d3152714be79c39f0019dc662ec96861 /emulators/gxemul | |
parent | 07161b9e0aa7cf45817e3bb77653ac4525fe0ee0 (diff) | |
download | pkgsrc-20fc2cef27872fc9fe66f1da5cf64d16381bc3cb.tar.gz |
Fix dropped characters on landisk (sh4). Now the arrow keys work in the
installer.
Diffstat (limited to 'emulators/gxemul')
-rw-r--r-- | emulators/gxemul/Makefile | 4 | ||||
-rw-r--r-- | emulators/gxemul/distinfo | 4 | ||||
-rw-r--r-- | emulators/gxemul/patches/patch-src_console_console.cc | 52 | ||||
-rw-r--r-- | emulators/gxemul/patches/patch-src_devices_dev__sh4.cc | 17 |
4 files changed, 74 insertions, 3 deletions
diff --git a/emulators/gxemul/Makefile b/emulators/gxemul/Makefile index 8f95092e40e..191712d6cc9 100644 --- a/emulators/gxemul/Makefile +++ b/emulators/gxemul/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.57 2017/06/29 17:51:46 christos Exp $ +# $NetBSD: Makefile,v 1.58 2017/07/16 14:10:58 christos Exp $ DISTNAME= gxemul-0.6.0.1 -PKGREVISION= 4 +PKGREVISION= 5 CATEGORIES= emulators MASTER_SITES= http://gxemul.sourceforge.net/src/ diff --git a/emulators/gxemul/distinfo b/emulators/gxemul/distinfo index 61d7f51e738..72f12d7570f 100644 --- a/emulators/gxemul/distinfo +++ b/emulators/gxemul/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.47 2017/06/29 17:51:46 christos Exp $ +$NetBSD: distinfo,v 1.48 2017/07/16 14:10:58 christos Exp $ SHA1 (gxemul-0.6.0.1.tar.gz) = 8a9b7a6c08628c2a59a6e7e9c7c449c3826b4744 RMD160 (gxemul-0.6.0.1.tar.gz) = 6943173d4149bfe40218715b8ed2c82b5b361e50 @@ -11,9 +11,11 @@ SHA1 (patch-ag) = 00eb698213b86e84d72b9ae5ece789ec37aea1ab SHA1 (patch-src_components_cpu_CPUDyntransComponent.cc) = 1a70375b3ed409ef43122ce7e6935c07b4ed386d SHA1 (patch-src_components_cpu_M88K__CPUComponent.cc) = 931cdc9a806e9ff48dccb2a63873c52491336b30 SHA1 (patch-src_components_cpu_MIPS__CPUComponent.cc) = 75d8276092fcdc9f548f874e5807ae8e6a2b9eae +SHA1 (patch-src_console_console.cc) = e0deed737004ab1d64997c778227c0aa9e62fac0 SHA1 (patch-src_cpus_cpu_mips.cc) = d239116e4ce5e040a1bdf39b803ca9a05500be53 SHA1 (patch-src_cpus_cpu_mips_instr.cc) = be40f86a103d2366d13a884d957848d4f680dc61 SHA1 (patch-src_devices_dev__footbridge.cc) = 2dc76e65fff7e6c846d9d06b74bed76075b0c79a +SHA1 (patch-src_devices_dev__sh4.cc) = b3bf483fe803d19cb18db7fdf6f0abd64afc6048 SHA1 (patch-src_include_components_CPUDyntransComponent.h) = 4fa3c327c4ce5ee9e39e7bc49ce6029b2a7da100 SHA1 (patch-src_include_components_M88K__CPUComponent.h) = afd07ae4df33d0c0a9d3d8c15dca4ef9ee7dd916 SHA1 (patch-src_include_components_MIPS__CPUComponent.h) = 4e49da9af0d220a1ea7c4520d8e7e53d8d84c155 diff --git a/emulators/gxemul/patches/patch-src_console_console.cc b/emulators/gxemul/patches/patch-src_console_console.cc new file mode 100644 index 00000000000..97e05bea1f6 --- /dev/null +++ b/emulators/gxemul/patches/patch-src_console_console.cc @@ -0,0 +1,52 @@ +$NetBSD: patch-src_console_console.cc,v 1.1 2017/07/16 14:10:58 christos Exp $ + +Change console_charavail() to return the number of characters available +in the FIFO instead of 0/1. + +--- /usr/src/gxemul/gxemul-0.6.0.1/src/console/console.cc 2014-08-17 04:45:15.000000000 -0400 ++++ ./console.cc 2017-07-16 10:04:04.603287788 -0400 +@@ -328,10 +328,19 @@ + } + + ++static int console_room_left_in_fifo(int handle) ++{ ++ int roomLeftInFIFO = console_handles[handle].fifo_tail ++ - console_handles[handle].fifo_head; ++ if (roomLeftInFIFO <= 0) ++ roomLeftInFIFO += CONSOLE_FIFO_LEN; ++ return roomLeftInFIFO; ++} ++ + /* + * console_charavail(): + * +- * Returns 1 if a char is available in the fifo, 0 otherwise. ++ * Returns the number of chararacters available in the fifo. + */ + int console_charavail(int handle) + { +@@ -342,9 +351,7 @@ + + // If adding more would lead to a full FIFO, then let's + // wait. +- int roomLeftInFIFO = console_handles[handle].fifo_tail - console_handles[handle].fifo_head; +- if (roomLeftInFIFO <= 0) +- roomLeftInFIFO += CONSOLE_FIFO_LEN; ++ int roomLeftInFIFO = console_room_left_in_fifo(handle); + if (roomLeftInFIFO < (int)sizeof(ch) + 1) + break; + +@@ -369,11 +376,7 @@ + } + } + +- if (console_handles[handle].fifo_head == +- console_handles[handle].fifo_tail) +- return 0; +- +- return 1; ++ return CONSOLE_FIFO_LEN - console_room_left_in_fifo(handle); + } + + diff --git a/emulators/gxemul/patches/patch-src_devices_dev__sh4.cc b/emulators/gxemul/patches/patch-src_devices_dev__sh4.cc new file mode 100644 index 00000000000..3895391e511 --- /dev/null +++ b/emulators/gxemul/patches/patch-src_devices_dev__sh4.cc @@ -0,0 +1,17 @@ +$NetBSD: patch-src_devices_dev__sh4.cc,v 1.1 2017/07/16 14:10:58 christos Exp $ + +Put the actual number of characters waiting in the FIFO instead of 1 or 0 + +--- /usr/src/gxemul/gxemul-0.6.0.1/src/devices/dev_sh4.cc 2014-08-17 04:45:12.000000000 -0400 ++++ ./dev_sh4.cc 2017-07-16 09:58:19.288954403 -0400 +@@ -1703,8 +1703,8 @@ + + case SH4_SCIF_BASE + SCIF_FDR: + /* Nr of bytes in the TX and RX fifos, respectively: */ +- odata = (console_charavail(d->scif_console_handle)? 1 : 0) +- + (d->scif_tx_fifo_cursize << 8); ++ odata = console_charavail(d->scif_console_handle) | ++ (d->scif_tx_fifo_cursize << 8); + break; + + case SH4_SCIF_BASE + SCIF_SPTR: |