hotfix: memory panic
Former-commit-id: d118b8f1849e65ff9a460eacebde865b5ba2197e Former-commit-id: bac1ce2932a632934b52a33b381efc887a6163ce
This commit is contained in:
parent
226da3bfc2
commit
a42ee6a4fe
|
@ -304,9 +304,9 @@ impl BusIO for IoDevices {
|
||||||
fn write_8(&mut self, addr: Addr, value: u8) {
|
fn write_8(&mut self, addr: Addr, value: u8) {
|
||||||
match addr + IO_BASE {
|
match addr + IO_BASE {
|
||||||
/* FIFO_A */
|
/* FIFO_A */
|
||||||
0x0400_00A0..=0x0400_00A3 => self.sound.write_fifo(0, value as i8),
|
0x0400_00A0 | 0x0400_00A1 | 0x0400_00A2 | 0x0400_00A3 => { self.sound.write_fifo(0, value as i8) }
|
||||||
/* FIFO_B */
|
/* FIFO_B */
|
||||||
0x0400_00A4..=0x0400_00A7 => self.sound.write_fifo(1, value as i8),
|
0x0400_00A4 | 0x0400_00A5 | 0x0400_00A6 | 0x0400_00A7 => { self.sound.write_fifo(1, value as i8) }
|
||||||
_ => {
|
_ => {
|
||||||
let t = self.read_16(addr & !1);
|
let t = self.read_16(addr & !1);
|
||||||
let t = if addr & 1 != 0 {
|
let t = if addr & 1 != 0 {
|
||||||
|
|
Reference in a new issue