SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 21af55dcc045107e389b8e7978f8ad22e8a69b5a parent 74cfa8c42424080e5df1c12ad709cb0c950a9e4b Author: Lior Halphon <LIJI32@gmail.com> Date: Fri, 3 Oct 2025 21:10:23 +0300 Fix a bug that made reading PCMxx non-deterministic in rare edge cases on CGB-0 to CGB-C Diffstat:
| M | Core/apu.c | 2 | ++ |
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/Core/apu.c b/Core/apu.c @@ -633,6 +633,8 @@ static void trigger_sweep_calculation(GB_gameboy_t *gb) void GB_apu_div_event(GB_gameboy_t *gb) { GB_apu_run(gb, true); + gb->apu.pcm_mask[0] = gb->apu.pcm_mask[1] = 0xFF; + if (!gb->apu.global_enable) return; if (gb->apu.skip_div_event == GB_SKIP_DIV_EVENT_SKIP) { gb->apu.skip_div_event = GB_SKIP_DIV_EVENT_SKIPPED;
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.