Implement writes
This commit is contained in:
parent
fb2c4774eb
commit
6ea80dd3d2
1 changed files with 1 additions and 8 deletions
|
@ -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(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue