1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-21 17:16:44 +00:00

Removes clock for NCR 5380.

It doesn't have one in real life, and now can live off the time counting that occurs on the SCSI bus.
This commit is contained in:
Thomas Harte
2019-09-18 20:17:47 -04:00
parent 3002ac8a4a
commit 962275c22a
5 changed files with 35 additions and 61 deletions
+8 -3
View File
@@ -76,6 +76,13 @@ ClockingHint::Preference Bus::preferred_clocking() {
return (dispatch_index_ < dispatch_times_.size()) ? ClockingHint::Preference::RealTime : ClockingHint::Preference::None;
}
void Bus::update_observers() {
const auto time_elapsed = double(time_in_state_.as_int()) * cycles_to_time_;
for(auto &observer: observers_) {
observer->scsi_bus_did_change(this, state_, time_elapsed);
}
}
void Bus::run_for(HalfCycles time) {
if(dispatch_index_ < dispatch_times_.size()) {
time_in_state_ += time;
@@ -87,9 +94,7 @@ void Bus::run_for(HalfCycles time) {
}
if(dispatch_index_ != old_index) {
for(auto &observer: observers_) {
observer->scsi_bus_did_change(this, state_, double(time_as_int) * cycles_to_time_);
}
update_observers();
}
if(preferred_clocking() == ClockingHint::Preference::None) {