Block wave RAM writes on the AGB

This commit is contained in:
Lior Halphon 2021-09-04 14:18:46 +03:00
parent 0ca1ee6a35
commit e5454a39b7
1 changed files with 1 additions and 1 deletions

View File

@ -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;