summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2021-02-08 04:58:02 +0100
committerMichael Forney <mforney@mforney.org>2021-02-08 04:58:02 +0100
commit655170c873633c75694c9014be0dae22ab08b8a9 (patch)
tree44e093e7e7b1300d5fa0a7534eecc5bc885eea61
parent827bf1b7da635b1018cbcc515f0ce2c074337629 (diff)
downloadplan9front-655170c873633c75694c9014be0dae22ab08b8a9.tar.xz
games/gb: fix timer divider for input clock 0
According to [0], input clock 0 should divide by 1024=2¹⁰, not 2¹². This caused audio to run at quarter-speed in one game I tried. [0] https://gbdev.io/pandocs/#ff07-tac-timer-control-r-w Tested with zelda: oracle of seasons, and dr. mario ---
-rw-r--r--sys/src/games/gb/ev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/games/gb/ev.c b/sys/src/games/gb/ev.c
index e907143e0..2fdafaf97 100644
--- a/sys/src/games/gb/ev.c
+++ b/sys/src/games/gb/ev.c
@@ -8,7 +8,7 @@ Event evhblank, evtimer, evenv;
extern Event evsamp, chev[4];
Event *events[NEVENT] = {&evhblank, &evtimer, &evenv, &evsamp, &chev[0], &chev[1], &chev[2], &chev[3]};
Event *elist;
-static int timshtab[4] = {12, 4, 6, 8}, timsh;
+static int timshtab[4] = {10, 4, 6, 8}, timsh;
ulong timclock;
Var evvars[] = {VAR(timsh), VAR(timclock), {nil, 0, 0}};