summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authoraiju <aiju@phicode.de>2012-04-14 20:53:42 +0200
committeraiju <aiju@phicode.de>2012-04-14 20:53:42 +0200
commit83e3b1ce1a3b5e89cdd76893ed24668543aeb688 (patch)
treeaef778f128302a7f5cc52849f74c1199712d1eef /sys
parent3b9b7a6ab8b6e8c5eb37937b849d1e9f6106a386 (diff)
games/gb: crash and audio fix
Diffstat (limited to 'sys')
-rw-r--r--sys/src/games/gb/audio.c1
-rw-r--r--sys/src/games/gb/state.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/games/gb/audio.c b/sys/src/games/gb/audio.c
index 92356b045..09806cbed 100644
--- a/sys/src/games/gb/audio.c
+++ b/sys/src/games/gb/audio.c
@@ -170,6 +170,7 @@ dosample(short *smp)
ch4sr |= k;
ch4c = 0;
}
+ ch4c++;
if(ch4sr & 1)
ch4s = -1;
else
diff --git a/sys/src/games/gb/state.c b/sys/src/games/gb/state.c
index 2b2f57391..fcf22a509 100644
--- a/sys/src/games/gb/state.c
+++ b/sys/src/games/gb/state.c
@@ -81,6 +81,7 @@ loadstate(char *file)
clock = get32();
ppuclock = get32();
divclock = get32();
+ timerclock = get32();
timerfreq = get32();
timer = get32();
rombank = get32();