diff --git a/CHANGES b/CHANGES index 6f0f13670..e644ba15e 100644 --- a/CHANGES +++ b/CHANGES @@ -23,6 +23,7 @@ Emulation fixes: - GB Audio: Properly apply per-model audio differences - GB Audio: Revamp channel rendering - GB Audio: Fix APU re-enable timing glitch + - GB I/O: Fix writing to WAVE RAM behavior (fixes mgba.io/i/1334) - GB Memory: Add cursory cartridge open bus emulation (fixes mgba.io/i/2032) - GB Serialize: Fix loading MBC1 states that affect bank 0 (fixes mgba.io/i/2402) - GB Video: Draw SGB border pieces that overlap GB graphics (fixes mgba.io/i/1339) diff --git a/cinema/gb/blargg/cgb_sound/12-wave/baseline_0000.png b/cinema/gb/blargg/cgb_sound/12-wave/baseline_0000.png new file mode 100644 index 000000000..960eda9ce Binary files /dev/null and b/cinema/gb/blargg/cgb_sound/12-wave/baseline_0000.png differ diff --git a/cinema/gb/blargg/cgb_sound/12-wave/config.ini b/cinema/gb/blargg/cgb_sound/12-wave/config.ini deleted file mode 100644 index 7ddee425b..000000000 --- a/cinema/gb/blargg/cgb_sound/12-wave/config.ini +++ /dev/null @@ -1,2 +0,0 @@ -[testinfo] -fail=1 diff --git a/cinema/gb/blargg/cgb_sound/12-wave/xbaseline_0000.png b/cinema/gb/blargg/cgb_sound/12-wave/xbaseline_0000.png deleted file mode 100644 index f0af8856d..000000000 Binary files a/cinema/gb/blargg/cgb_sound/12-wave/xbaseline_0000.png and /dev/null differ diff --git a/src/gb/io.c b/src/gb/io.c index b427f8729..25ca02602 100644 --- a/src/gb/io.c +++ b/src/gb/io.c @@ -404,9 +404,9 @@ void GBIOWrite(struct GB* gb, unsigned address, uint8_t value) { case GB_REG_WAVE_E: case GB_REG_WAVE_F: GBAudioRun(&gb->audio, mTimingCurrentTime(gb->audio.timing), 0x4); - if (!gb->audio.playingCh3 || gb->audio.style != GB_AUDIO_DMG) { + if (!gb->audio.playingCh3) { gb->audio.ch3.wavedata8[address - GB_REG_WAVE_0] = value; - } else if(gb->audio.ch3.readable) { + } else if (gb->audio.ch3.readable || gb->audio.style == GB_AUDIO_CGB) { gb->audio.ch3.wavedata8[gb->audio.ch3.window >> 1] = value; } break;