diff --git a/src/apu.rs b/src/apu.rs index 0de2fa7..5ebb305 100644 --- a/src/apu.rs +++ b/src/apu.rs @@ -664,7 +664,11 @@ pub(crate) struct Channel3 { impl BusIo for Channel3 { fn read_byte(&self, addr: u16) -> u8 { - self.wave_ram[(addr - Self::WAVE_RAM_START_ADDR) as usize] + if self.enabled { + self.wave_ram[self.offset as usize] + } else { + self.wave_ram[(addr - Self::WAVE_RAM_START_ADDR) as usize] + } } fn write_byte(&mut self, addr: u16, byte: u8) {