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
---
This commit is contained in:
Michael Forney 2021-02-08 04:58:02 +01:00
parent 827bf1b7da
commit 655170c873

View file

@ -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}};