From e5454a39b78eaf44c5a7c853a353040314fad0c1 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Sat, 4 Sep 2021 14:18:46 +0300 Subject: [PATCH] Block wave RAM writes on the AGB --- Core/apu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/apu.c b/Core/apu.c index 4b81dcb5..845b6cc4 100644 --- a/Core/apu.c +++ b/Core/apu.c @@ -923,7 +923,7 @@ void GB_apu_write(GB_gameboy_t *gb, uint8_t reg, uint8_t value) } if (reg >= GB_IO_WAV_START && reg <= GB_IO_WAV_END && gb->apu.is_active[GB_WAVE]) { - if (!GB_is_cgb(gb) && !gb->apu.wave_channel.wave_form_just_read) { + if ((!GB_is_cgb(gb) && !gb->apu.wave_channel.wave_form_just_read) || gb->model == GB_MODEL_AGB) { return; } reg = GB_IO_WAV_START + gb->apu.wave_channel.current_sample_index / 2;