EmuState::update_fp now properly handles powered off state
This commit is contained in:
parent
46119048c2
commit
b5727da45b
11
src/state.rs
11
src/state.rs
@ -99,16 +99,19 @@ impl EmuState {
|
|||||||
self.update_fp();
|
self.update_fp();
|
||||||
} else {
|
} else {
|
||||||
self.audio_tx.send(AudioMessage::FanOff).unwrap();
|
self.audio_tx.send(AudioMessage::FanOff).unwrap();
|
||||||
self.running = false;
|
self.update_fp();
|
||||||
self.fp_state.set_status(Status::empty());
|
|
||||||
self.fp_state.set_addr(0);
|
|
||||||
self.fp_state.set_data(0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn update_fp(&mut self) {
|
pub fn update_fp(&mut self) {
|
||||||
|
if !self.fp_state.power() {
|
||||||
|
self.fp_state.set_addr(0);
|
||||||
|
self.fp_state.set_data(0);
|
||||||
|
self.fp_state.set_status(Status::empty());
|
||||||
|
return;
|
||||||
|
}
|
||||||
let cycle = self.cpu.get_mem_cycle();
|
let cycle = self.cpu.get_mem_cycle();
|
||||||
self.fp_state.set_status(cycle.get_status());
|
self.fp_state.set_status(cycle.get_status());
|
||||||
match cycle {
|
match cycle {
|
||||||
|
Loading…
Reference in New Issue
Block a user