Implement writes

This commit is contained in:
Reid 'arrdem' McKenzie 2022-12-24 01:14:04 -07:00
parent fb2c4774eb
commit 6ea80dd3d2

View file

@ -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<u16, DeviceError> {
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(())
}
}