SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit f65aff64d98927dcf4116964093d8d54476d3fcd parent d1a7f863d4575b8aff58e29a9374a13af7d4f18a Author: Lior Halphon <LIJI32@gmail.com> Date: Sun, 1 Feb 2026 21:04:51 +0200 Refinements and bugfixes Diffstat:
| M | Core/apu.c | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Core/apu.c b/Core/apu.c @@ -1312,7 +1312,7 @@ static void prepare_noise_start(GB_gameboy_t *gb) } /* TODO: This is weird, is the clock going out of sync? */ - if (!divisor && gb->model <= GB_MODEL_CGB_C && was_background_counting && !gb->apu.is_active[GB_NOISE]) { + if (!divisor && gb->model <= GB_MODEL_CGB_C && was_background_counting && !gb->apu.is_active[GB_NOISE] && gb->cgb_double_speed) { gb->apu.noise_channel.counter_countdown--; } if (div_1_glitch) { @@ -1361,7 +1361,7 @@ static void nr43_write(GB_gameboy_t *gb, uint8_t new) if ((old & 0xF0) == (new & 0xF0)) return; uint16_t effective_counter = gb->apu.noise_channel.counter; - if (gb->model <= GB_MODEL_CGB_C) { + if (gb->model <= GB_MODEL_CGB_C && gb->apu.noise_channel.countdown_reloaded) { effective_counter |= (effective_counter - 1) & 0x3FFF; } bool old_bit = (effective_counter >> (old >> 4)) & 1;
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.