Sun Jul 16 14:10:58 2017 UTC ()
Fix dropped characters on landisk (sh4). Now the arrow keys work in the
installer.


(christos)
diff -r1.57 -r1.58 pkgsrc/emulators/gxemul/Makefile
diff -r1.47 -r1.48 pkgsrc/emulators/gxemul/distinfo
diff -r0 -r1.1 pkgsrc/emulators/gxemul/patches/patch-src_console_console.cc
diff -r0 -r1.1 pkgsrc/emulators/gxemul/patches/patch-src_devices_dev__sh4.cc

cvs diff -r1.57 -r1.58 pkgsrc/emulators/gxemul/Makefile (expand / switch to unified diff)

--- pkgsrc/emulators/gxemul/Makefile 2017/06/29 17:51:46 1.57
+++ pkgsrc/emulators/gxemul/Makefile 2017/07/16 14:10:58 1.58
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1# $NetBSD: Makefile,v 1.57 2017/06/29 17:51:46 christos Exp $ 1# $NetBSD: Makefile,v 1.58 2017/07/16 14:10:58 christos Exp $
2 2
3DISTNAME= gxemul-0.6.0.1 3DISTNAME= gxemul-0.6.0.1
4PKGREVISION= 4 4PKGREVISION= 5
5CATEGORIES= emulators 5CATEGORIES= emulators
6MASTER_SITES= http://gxemul.sourceforge.net/src/ 6MASTER_SITES= http://gxemul.sourceforge.net/src/
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= http://gxemul.sourceforge.net/ 9HOMEPAGE= http://gxemul.sourceforge.net/
10COMMENT= Framework for full-system computer architecture emulation 10COMMENT= Framework for full-system computer architecture emulation
11LICENSE= modified-bsd 11LICENSE= modified-bsd
12 12
13USE_TOOLS+= pax 13USE_TOOLS+= pax
14 14
15USE_LANGUAGES= c c++ 15USE_LANGUAGES= c c++
16HAS_CONFIGURE= yes 16HAS_CONFIGURE= yes
17BUILD_TARGET= build 17BUILD_TARGET= build

cvs diff -r1.47 -r1.48 pkgsrc/emulators/gxemul/distinfo (expand / switch to unified diff)

--- pkgsrc/emulators/gxemul/distinfo 2017/06/29 17:51:46 1.47
+++ pkgsrc/emulators/gxemul/distinfo 2017/07/16 14:10:58 1.48
@@ -1,21 +1,23 @@ @@ -1,21 +1,23 @@
1$NetBSD: distinfo,v 1.47 2017/06/29 17:51:46 christos Exp $ 1$NetBSD: distinfo,v 1.48 2017/07/16 14:10:58 christos Exp $
2 2
3SHA1 (gxemul-0.6.0.1.tar.gz) = 8a9b7a6c08628c2a59a6e7e9c7c449c3826b4744 3SHA1 (gxemul-0.6.0.1.tar.gz) = 8a9b7a6c08628c2a59a6e7e9c7c449c3826b4744
4RMD160 (gxemul-0.6.0.1.tar.gz) = 6943173d4149bfe40218715b8ed2c82b5b361e50 4RMD160 (gxemul-0.6.0.1.tar.gz) = 6943173d4149bfe40218715b8ed2c82b5b361e50
5SHA512 (gxemul-0.6.0.1.tar.gz) = 028764c751d67bf5da02ee2c34e6607660c2044e431b06c3d6799ba4e76f605b8c02afaa5f59c3059aff6253e35149831580bb13383121fb5ac0392c12d2aec2 5SHA512 (gxemul-0.6.0.1.tar.gz) = 028764c751d67bf5da02ee2c34e6607660c2044e431b06c3d6799ba4e76f605b8c02afaa5f59c3059aff6253e35149831580bb13383121fb5ac0392c12d2aec2
6Size (gxemul-0.6.0.1.tar.gz) = 5420978 bytes 6Size (gxemul-0.6.0.1.tar.gz) = 5420978 bytes
7SHA1 (patch-aa) = 6f2c0dc94606ba213bcc73527ea4bef997c89c45 7SHA1 (patch-aa) = 6f2c0dc94606ba213bcc73527ea4bef997c89c45
8SHA1 (patch-ad) = a8757e7397ec3cc301d02bdf93654f55d558d29f 8SHA1 (patch-ad) = a8757e7397ec3cc301d02bdf93654f55d558d29f
9SHA1 (patch-ae) = 19ef822c16f0f6dd50aea719e0bc797c39d1f9c0 9SHA1 (patch-ae) = 19ef822c16f0f6dd50aea719e0bc797c39d1f9c0
10SHA1 (patch-ag) = 00eb698213b86e84d72b9ae5ece789ec37aea1ab 10SHA1 (patch-ag) = 00eb698213b86e84d72b9ae5ece789ec37aea1ab
11SHA1 (patch-src_components_cpu_CPUDyntransComponent.cc) = 1a70375b3ed409ef43122ce7e6935c07b4ed386d 11SHA1 (patch-src_components_cpu_CPUDyntransComponent.cc) = 1a70375b3ed409ef43122ce7e6935c07b4ed386d
12SHA1 (patch-src_components_cpu_M88K__CPUComponent.cc) = 931cdc9a806e9ff48dccb2a63873c52491336b30 12SHA1 (patch-src_components_cpu_M88K__CPUComponent.cc) = 931cdc9a806e9ff48dccb2a63873c52491336b30
13SHA1 (patch-src_components_cpu_MIPS__CPUComponent.cc) = 75d8276092fcdc9f548f874e5807ae8e6a2b9eae 13SHA1 (patch-src_components_cpu_MIPS__CPUComponent.cc) = 75d8276092fcdc9f548f874e5807ae8e6a2b9eae
 14SHA1 (patch-src_console_console.cc) = e0deed737004ab1d64997c778227c0aa9e62fac0
14SHA1 (patch-src_cpus_cpu_mips.cc) = d239116e4ce5e040a1bdf39b803ca9a05500be53 15SHA1 (patch-src_cpus_cpu_mips.cc) = d239116e4ce5e040a1bdf39b803ca9a05500be53
15SHA1 (patch-src_cpus_cpu_mips_instr.cc) = be40f86a103d2366d13a884d957848d4f680dc61 16SHA1 (patch-src_cpus_cpu_mips_instr.cc) = be40f86a103d2366d13a884d957848d4f680dc61
16SHA1 (patch-src_devices_dev__footbridge.cc) = 2dc76e65fff7e6c846d9d06b74bed76075b0c79a 17SHA1 (patch-src_devices_dev__footbridge.cc) = 2dc76e65fff7e6c846d9d06b74bed76075b0c79a
 18SHA1 (patch-src_devices_dev__sh4.cc) = b3bf483fe803d19cb18db7fdf6f0abd64afc6048
17SHA1 (patch-src_include_components_CPUDyntransComponent.h) = 4fa3c327c4ce5ee9e39e7bc49ce6029b2a7da100 19SHA1 (patch-src_include_components_CPUDyntransComponent.h) = 4fa3c327c4ce5ee9e39e7bc49ce6029b2a7da100
18SHA1 (patch-src_include_components_M88K__CPUComponent.h) = afd07ae4df33d0c0a9d3d8c15dca4ef9ee7dd916 20SHA1 (patch-src_include_components_M88K__CPUComponent.h) = afd07ae4df33d0c0a9d3d8c15dca4ef9ee7dd916
19SHA1 (patch-src_include_components_MIPS__CPUComponent.h) = 4e49da9af0d220a1ea7c4520d8e7e53d8d84c155 21SHA1 (patch-src_include_components_MIPS__CPUComponent.h) = 4e49da9af0d220a1ea7c4520d8e7e53d8d84c155
20SHA1 (patch-src_include_refcount__ptr.h) = 8021524ff16d3a9de65bb6188fb8c07296c5c3b7 22SHA1 (patch-src_include_refcount__ptr.h) = 8021524ff16d3a9de65bb6188fb8c07296c5c3b7
21SHA1 (patch-src_machines_machine__pmax.cc) = 19b97031837f9fa911b02d624f824834ce8c0e89 23SHA1 (patch-src_machines_machine__pmax.cc) = 19b97031837f9fa911b02d624f824834ce8c0e89

File Added: pkgsrc/emulators/gxemul/patches/Attic/patch-src_console_console.cc
$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);
 }
 
 

File Added: pkgsrc/emulators/gxemul/patches/Attic/patch-src_devices_dev__sh4.cc
$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: