pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/emulators/gxemul



Module Name:    pkgsrc
Committed By:   christos
Date:           Sun Jul 16 14:10:58 UTC 2017

Modified Files:
        pkgsrc/emulators/gxemul: Makefile distinfo
Added Files:
        pkgsrc/emulators/gxemul/patches: patch-src_console_console.cc
            patch-src_devices_dev__sh4.cc

Log Message:
Fix dropped characters on landisk (sh4). Now the arrow keys work in the
installer.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 pkgsrc/emulators/gxemul/Makefile
cvs rdiff -u -r1.47 -r1.48 pkgsrc/emulators/gxemul/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/emulators/gxemul/patches/patch-src_console_console.cc \
    pkgsrc/emulators/gxemul/patches/patch-src_devices_dev__sh4.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/emulators/gxemul/Makefile
diff -u pkgsrc/emulators/gxemul/Makefile:1.57 pkgsrc/emulators/gxemul/Makefile:1.58
--- pkgsrc/emulators/gxemul/Makefile:1.57       Thu Jun 29 13:51:46 2017
+++ pkgsrc/emulators/gxemul/Makefile    Sun Jul 16 10:10:58 2017
@@ -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/
 

Index: pkgsrc/emulators/gxemul/distinfo
diff -u pkgsrc/emulators/gxemul/distinfo:1.47 pkgsrc/emulators/gxemul/distinfo:1.48
--- pkgsrc/emulators/gxemul/distinfo:1.47       Thu Jun 29 13:51:46 2017
+++ pkgsrc/emulators/gxemul/distinfo    Sun Jul 16 10:10:58 2017
@@ -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) = 00eb698213b86e84d72b9a
 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

Added files:

Index: pkgsrc/emulators/gxemul/patches/patch-src_console_console.cc
diff -u /dev/null pkgsrc/emulators/gxemul/patches/patch-src_console_console.cc:1.1
--- /dev/null   Sun Jul 16 10:10:58 2017
+++ pkgsrc/emulators/gxemul/patches/patch-src_console_console.cc        Sun Jul 16 10:10:58 2017
@@ -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);
+ }
+ 
+ 
Index: pkgsrc/emulators/gxemul/patches/patch-src_devices_dev__sh4.cc
diff -u /dev/null pkgsrc/emulators/gxemul/patches/patch-src_devices_dev__sh4.cc:1.1
--- /dev/null   Sun Jul 16 10:10:58 2017
+++ pkgsrc/emulators/gxemul/patches/patch-src_devices_dev__sh4.cc       Sun Jul 16 10:10:58 2017
@@ -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:



Home | Main Index | Thread Index | Old Index