From cd2310f0a749499130cd148cafa2386c32491832 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Fri, 20 Nov 2020 19:39:54 +0200 Subject: [PATCH] Wave RAM reads 0xFF while active on AGBs --- Core/apu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Core/apu.c b/Core/apu.c index 7e7ab31..2b5dc3b 100644 --- a/Core/apu.c +++ b/Core/apu.c @@ -596,6 +596,9 @@ uint8_t GB_apu_read(GB_gameboy_t *gb, uint8_t reg) if (!GB_is_cgb(gb) && !gb->apu.wave_channel.wave_form_just_read) { return 0xFF; } + if (gb->model == GB_MODEL_AGB) { + return 0xFF; + } reg = GB_IO_WAV_START + gb->apu.wave_channel.current_sample_index / 2; }