diff options
Diffstat (limited to 'src/devices.rs')
-rw-r--r-- | src/devices.rs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/devices.rs b/src/devices.rs index a17514e..5b274c9 100644 --- a/src/devices.rs +++ b/src/devices.rs @@ -109,12 +109,12 @@ impl DeviceBus for StandardDevices { 0x27 => no_read!(), 0x28 => { self.math.multiply(); read_h!(self.math.product_high) }, 0x29 => { self.math.multiply(); read_l!(self.math.product_high) }, - 0x2A => { self.math.multiply(); read_h!(self.math.product_low) }, - 0x2B => { self.math.multiply(); read_l!(self.math.product_low) }, - 0x2C => { self.math.divide(); read_h!(self.math.quotient) }, - 0x2D => { self.math.divide(); read_l!(self.math.quotient) }, - 0x2E => { self.math.modulo(); read_h!(self.math.remainder) }, - 0x2F => { self.math.modulo(); read_l!(self.math.remainder) }, + 0x2A => { self.math.multiply(); read_h!(self.math.product_low) }, + 0x2B => { self.math.multiply(); read_l!(self.math.product_low) }, + 0x2C => { self.math.divide(); read_h!(self.math.quotient) }, + 0x2D => { self.math.divide(); read_l!(self.math.quotient) }, + 0x2E => { self.math.modulo(); read_h!(self.math.remainder) }, + 0x2F => { self.math.modulo(); read_l!(self.math.remainder) }, // Clock 0x30 => self.clock.year(), 0x31 => self.clock.month(), @@ -122,15 +122,15 @@ impl DeviceBus for StandardDevices { 0x33 => self.clock.hour(), 0x34 => self.clock.minute(), 0x35 => self.clock.second(), - 0x38 => { self.clock.update_timer_1(); read_h!(self.clock.timer_1) } 0x36 => read_h!(self.clock.update_cumulative_timer()), 0x37 => read_l!(self.clock.cumulative_timer), + 0x38 => read_h!(self.clock.update_timer_1()), 0x39 => read_l!(self.clock.timer_1), - 0x3A => { self.clock.update_timer_2(); read_h!(self.clock.timer_2) } + 0x3A => read_h!(self.clock.update_timer_2()), 0x3B => read_l!(self.clock.timer_2), - 0x3C => { self.clock.update_timer_3(); read_h!(self.clock.timer_3) } + 0x3C => read_h!(self.clock.update_timer_3()), 0x3D => read_l!(self.clock.timer_3), - 0x3E => { self.clock.update_timer_4(); read_h!(self.clock.timer_4) } + 0x3E => read_h!(self.clock.update_timer_4()), 0x3F => read_l!(self.clock.timer_4), // Input 0x40 => read_h!(self.input.mouse_position.x), @@ -180,6 +180,7 @@ impl DeviceBus for StandardDevices { 0x8E => read_lh!(self.scratch.max_capacity), 0x8F => read_ll!(self.scratch.max_capacity), // Stream + // File 0xA0 => read_b!(self.file.file.is_some()), 0xA1 => read_b!(self.file.operation_state), |