From 6ea80dd3d2f0ef3409076236c0c3c06fd342bc85 Mon Sep 17 00:00:00 2001 From: Reid 'arrdem' McKenzie Date: Sat, 24 Dec 2022 01:14:04 -0700 Subject: [PATCH] Implement writes --- src/device/buff.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/device/buff.rs b/src/device/buff.rs index 2233be2..2573b2b 100644 --- a/src/device/buff.rs +++ b/src/device/buff.rs @@ -21,16 +21,9 @@ impl Device for BuffDevice { let slot = (port & 0xF) as usize; Ok(self.buffer[slot]) } - fn dei2(&mut self, _vm: &mut Uxn, port: u8) -> Result { - let slot = (port & 0xF) as usize; - Ok(0) - } fn deo1(&mut self, _vm: &mut Uxn, port: u8, val: u8) -> Result<(), DeviceError> { let slot = (port & 0xF) as usize; - Ok(()) - } - fn deo2(&mut self, _vm: &mut Uxn, port: u8, val: u16) -> Result<(), DeviceError> { - let slot = (port & 0xF) as usize; + self.buffer[slot as usize] = val; Ok(()) } }