git.y1.nz

SameBoy

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

commit 544d39f19d3707af33c889afb02c9a59dbabdf8c
parent 4bbd27735fb6d12ba95deb10437214b2172aeec3
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Sat, 26 Dec 2020 00:19:48 +0200

Further improvements to STOP timing

Diffstat:
MCore/sm83_cpu.c3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Core/sm83_cpu.c b/Core/sm83_cpu.c @@ -346,9 +346,10 @@ static void leave_stop_mode(GB_gameboy_t *gb) gb->vram_ppu_blocked = false; gb->cgb_palettes_ppu_blocked = false; /* The CPU takes more time to wake up then the other components */ - for (unsigned i = 0x2000; i--;) { + for (unsigned i = 0x1FFF; i--;) { GB_advance_cycles(gb, 0x10); } + GB_advance_cycles(gb, gb->cgb_double_speed? 0x10 : 0xF); GB_write_memory(gb, 0xFF00 + GB_IO_DIV, 0); }

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