[mupen64plus-core] 67/310: Add support for n64 internal clock
Sven Eckelmann
ecsv-guest at moszumanska.debian.org
Thu Nov 26 05:57:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-core.
commit 034608c86890668b76d68eb98ffcb68858feeee7
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 5bc05f4..9b2146e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+mupen64plus-core (1.99.4-2) UNRELEASED; urgency=low
+
+ * debian/patches:
+ - Add rtc.patch, Add support for n64 internal clock
+
+ -- Sven Eckelmann <sven at narfation.org> Mon, 07 Mar 2011 21:46:08 +0100
+
mupen64plus-core (1.99.4-1) experimental; urgency=low
* New Upstream Version
diff --git a/debian/patches/rtc.patch b/debian/patches/rtc.patch
new file mode 100644
index 0000000..a081064
--- /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/src/memory/pif.c b/src/memory/pif.c
+index 49f90195ce732b22c26f39a9443649fa41968acd..30ec320d17139f195ebd61c6ec50a252a91cf3cb 100644
+--- a/src/memory/pif.c
++++ b/src/memory/pif.c
+@@ -22,6 +22,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <time.h>
+
+ #include "memory.h"
+ #include "pif.h"
+@@ -53,9 +54,17 @@ void print_pif(void)
+ }
+ #endif
+
++static inline unsigned char byte2bcd(int n)
++{
++ n %= 100;
++ return ((n / 10) << 4) | (n % 10);
++}
++
+ static void EepromCommand(unsigned char *Command)
+ {
+ static int EepromFileWarningSent = 0;
++ time_t curtime_time;
++ struct tm curtime;
+
+ switch (Command[2])
+ {
+@@ -140,6 +149,42 @@ static void EepromCommand(unsigned char *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:
+ DebugMessage(M64MSG_ERROR, "unknown command in EepromCommand(): %x", Command[2]);
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 97a8ece..328afa0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ default-optimisations.patch
dejavu-font.patch
printf_fixup.patch
api_header.patch
+rtc.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-core.git
More information about the Pkg-games-commits
mailing list