fix(apu): abstract wave RAM behind BusIO trait
This commit is contained in:
@@ -242,7 +242,7 @@ impl BusIo for Bus {
|
||||
0x24 => self.apu.ctrl.channel(),
|
||||
0x25 => self.apu.ctrl.output(),
|
||||
0x26 => self.apu.ctrl.status(&self.apu),
|
||||
0x30..=0x3F => self.apu.ch3.wave_ram[addr as usize - 0xFF30],
|
||||
0x30..=0x3F => self.apu.ch3.read_byte(addr),
|
||||
0x40 => self.ppu.ctrl.into(),
|
||||
0x41 => self.ppu.stat.into(),
|
||||
0x42 => self.ppu.pos.scroll_y,
|
||||
@@ -363,7 +363,7 @@ impl BusIo for Bus {
|
||||
0x24 => self.apu.ctrl.set_channel(byte),
|
||||
0x25 => self.apu.ctrl.set_output(byte),
|
||||
0x26 => self.apu.set_status(byte),
|
||||
0x30..=0x3F => self.apu.ch3.wave_ram[addr as usize - 0xFF30] = byte,
|
||||
0x30..=0x3F => self.apu.ch3.write_byte(addr, byte),
|
||||
0x40 => self.ppu.ctrl = byte.into(),
|
||||
0x41 => self.ppu.stat.update(byte),
|
||||
0x42 => self.ppu.pos.scroll_y = byte,
|
||||
|
Reference in New Issue
Block a user