git.y1.nz

SameBoy

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

commit eefaac3d0464d8e4d67232a903dbad6b91bfa169
parent 3c6d0947635ddc2da9809bf6e657a8302aca4894
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Tue, 31 Aug 2021 23:28:05 +0300

NR32 was treated as the wrong value on APU reset

Diffstat:
MCore/apu.c1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/Core/apu.c b/Core/apu.c @@ -735,6 +735,7 @@ void GB_apu_init(GB_gameboy_t *gb) gb->apu.wave_channel.wave_form[(reg - GB_IO_WAV_START) * 2 + 1] = gb->io_registers[reg] & 0xF; } gb->apu.lf_div = 1; + gb->apu.wave_channel.shift = 4; /* APU glitch: When turning the APU on while DIV's bit 4 (or 5 in double speed mode) is on, the first DIV/APU event is skipped. */ if (gb->div_counter & (gb->cgb_double_speed? 0x2000 : 0x1000)) {

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