git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit 4ce643d5eb2be9e122d0901898e043f934c7705a
parent 01f80a3f3e84edd6bd3b4fde9b2bd4617d0350fb
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Sun, 10 Oct 2021 16:53:07 +0300

Fix timer bug; fixes #409

Diffstat:
MCore/timing.c2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Core/timing.c b/Core/timing.c @@ -434,7 +434,7 @@ void GB_emulate_timer_glitch(GB_gameboy_t *gb, uint8_t old_tac, uint8_t new_tac) /* The bit used for overflow testing must have been 1 */ if (gb->div_counter & old_clocks) { /* And now either the timer must be disabled, or the new bit used for overflow testing be 0. */ - if (!(new_tac & 4) || gb->div_counter & new_clocks) { + if (!(new_tac & 4) || !(gb->div_counter & new_clocks)) { increase_tima(gb); } }

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.