[mupen64plus] 219/262: Add support for n64 internal clock

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 05:59:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

ecsv-guest pushed a commit to branch master
in repository mupen64plus.

commit fc17e663c0189e2d4027cea951e4370f61fcbb1a
Author: Sven Eckelmann <sven at narfation.org>
Date:   Mon Mar 7 21:46:37 2011 +0100

    Add support for n64 internal clock
---
 debian/changelog         |  7 +++++
 debian/patches/rtc.patch | 78 ++++++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series    |  1 +
 3 files changed, 86 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index d1541af..52ed0ea 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+mupen64plus (1.5+dfsg1-16) UNRELEASED; urgency=low
+
+  * debian/patches:
+    - Add rtc.patch, Add support for n64 internal clock
+
+ -- Sven Eckelmann <sven at narfation.org>  Wed, 09 Mar 2011 10:38:22 +0100
+
 mupen64plus (1.5+dfsg1-15) unstable; urgency=low
 
   * Upload to unstable
diff --git a/debian/patches/rtc.patch b/debian/patches/rtc.patch
new file mode 100644
index 0000000..98deb9f
--- /dev/null
+++ b/debian/patches/rtc.patch
@@ -0,0 +1,78 @@
+Description: Add support for n64 internal clock
+Bug: http://code.google.com/p/mupen64plus/issues/detail?id=244
+Author: Jason Benaim <jrra at trashfolder.org>
+
+---
+diff --git a/memory/pif.c b/memory/pif.c
+index a4e6ef73a0999f463d3cce4c09265791273db0e8..ca3a4e682faf1f3d971077a61fe168f34b7dadb0 100644
+--- a/memory/pif.c
++++ b/memory/pif.c
+@@ -21,6 +21,7 @@
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <time.h>
+ 
+ #ifndef __WIN32__
+ #include "../main/winlnxdefs.h"
+@@ -56,8 +57,17 @@ void print_pif()
+ }
+ #endif
+ 
++static inline unsigned char byte2bcd(int n)
++{
++	n %= 100;
++	return ((n / 10) << 4) | (n % 10);
++}
++
+ void EepromCommand(BYTE *Command)
+ {
++   time_t curtime_time;
++   struct tm curtime;
++
+    switch (Command[2])
+      {
+       case 0: // check
+@@ -130,6 +140,42 @@ void EepromCommand(BYTE *Command)
+          free(filename);
+       }
+     break;
++      case 6:
++	      // RTCstatus query
++	      Command[3] = 0x00;
++	      Command[4] = 0x10;
++	      Command[5] = 0x00;
++	      break;
++      case 7:
++	      // read RTC block
++	      switch (Command[3]) {	// block number
++		      case 0:
++			      Command[4] = 0x00;
++			      Command[5] = 0x02;
++			      Command[12] = 0x00;
++			      break;
++		      case 1:
++			      DebugMessage(M64MSG_ERROR, "RTC command in EepromCommand(): read block %d", Command[2]);
++			      break;
++		      case 2:
++			      time(&curtime_time);
++			      localtime_r(&curtime_time, &curtime);
++			      Command[4] = byte2bcd(curtime.tm_sec);
++			      Command[5] = byte2bcd(curtime.tm_min);
++			      Command[6] = 0x80 + byte2bcd(curtime.tm_hour);
++			      Command[7] = byte2bcd(curtime.tm_mday);
++			      Command[8] = byte2bcd(curtime.tm_wday);
++			      Command[9] = byte2bcd(curtime.tm_mon + 1);
++			      Command[10] = byte2bcd(curtime.tm_year);
++			      Command[11] = byte2bcd(curtime.tm_year / 100);
++			      Command[12] = 0x00;	// status
++			      break;
++	      }
++	      break;
++      case 8:
++	      // write RTC block
++	      DebugMessage(M64MSG_ERROR, "RTC write in EepromCommand(): %d not yet implemented", Command[2]);
++    break;
+       default:
+     printf("unknown command in EepromCommand : %x\n", Command[2]);
+      }
diff --git a/debian/patches/series b/debian/patches/series
index a39beb1..7a067b5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -48,3 +48,4 @@ glide64_hurd.patch
 correct_security_printf.patch
 pie_support.patch
 inline_header.patch
+rtc.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus.git



More information about the Pkg-games-commits mailing list