diff options
author | Ben Bridle <bridle.benjamin@gmail.com> | 2024-01-28 14:20:59 +1300 |
---|---|---|
committer | Ben Bridle <bridle.benjamin@gmail.com> | 2024-01-31 07:37:54 +1300 |
commit | a4d06fd54ab22bbdd6b0dc9d5af199fc8be13591 (patch) | |
tree | 69a939728030f3feeb682bcd1765d9624f6b9a1a /src/devices.rs | |
parent | b10c26cf6b10eab4bd4847c27c7b4d65001d51b7 (diff) | |
download | bedrock-pc-a4d06fd54ab22bbdd6b0dc9d5af199fc8be13591.zip |
Change clock cumulative timer to use 256th ticks instead of seconds
The "Cumulative seconds" port of the CLOCK device has been changed
to be called "Cumulative timer", with the units changing from seconds
to 1/256 second ticks.
Diffstat (limited to 'src/devices.rs')
-rw-r--r-- | src/devices.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices.rs b/src/devices.rs index 562b664..a17514e 100644 --- a/src/devices.rs +++ b/src/devices.rs @@ -122,9 +122,9 @@ impl DeviceBus for StandardDevices { 0x33 => self.clock.hour(), 0x34 => self.clock.minute(), 0x35 => self.clock.second(), - 0x36 => { self.clock.update_cumulative_seconds(); read_h!(self.clock.cumulative_seconds) }, - 0x37 => read_l!(self.clock.cumulative_seconds), 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), 0x39 => read_l!(self.clock.timer_1), 0x3A => { self.clock.update_timer_2(); read_h!(self.clock.timer_2) } 0x3B => read_l!(self.clock.timer_2), |