fix(apu): implement WAVE RAM blocking
This commit is contained in:
parent
a549b9feef
commit
832e1b7633
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue