From 655170c873633c75694c9014be0dae22ab08b8a9 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Mon, 8 Feb 2021 04:58:02 +0100 Subject: 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. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [0] https://gbdev.io/pandocs/#ff07-tac-timer-control-r-w Tested with zelda: oracle of seasons, and dr. mario --- --- sys/src/games/gb/ev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}}; -- cgit v1.2.3