GB I/O: Windowed WAVE RAM reading only works on CGB, not CGB-on-AGB

This commit is contained in:
Vicki Pfau 2022-06-07 00:21:16 -07:00
parent f9e03e7182
commit 5ba82aaed0
1 changed files with 1 additions and 1 deletions

View File

@ -609,7 +609,7 @@ uint8_t GBIORead(struct GB* gb, unsigned address) {
case GB_REG_WAVE_F:
if (gb->audio.playingCh3) {
GBAudioRun(&gb->audio, mTimingCurrentTime(gb->audio.timing), 0x4);
if (gb->audio.ch3.readable || gb->audio.style != GB_AUDIO_DMG) {
if (gb->audio.ch3.readable || gb->audio.style == GB_AUDIO_CGB) {
return gb->audio.ch3.wavedata8[gb->audio.ch3.window >> 1];
} else {
return 0xFF;