From a42ee6a4fee25099b6f95ba35b14e2b8d7182ce8 Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Fri, 22 Mar 2024 23:47:29 +0000 Subject: [PATCH] hotfix: memory panic Former-commit-id: d118b8f1849e65ff9a460eacebde865b5ba2197e Former-commit-id: bac1ce2932a632934b52a33b381efc887a6163ce --- core/src/iodev.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/iodev.rs b/core/src/iodev.rs index 282a434..bb51870 100644 --- a/core/src/iodev.rs +++ b/core/src/iodev.rs @@ -304,9 +304,9 @@ impl BusIO for IoDevices { fn write_8(&mut self, addr: Addr, value: u8) { match addr + IO_BASE { /* 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 */ - 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 = if addr & 1 != 0 {