1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-08-07 23:25:00 +00:00

Merge pull request #967 from TomHarte/EnterpriseTiming

Correct Enterprise timing error.
This commit is contained in:
Thomas Harte
2021-07-06 22:48:58 -04:00
committed by GitHub

View File

@@ -276,14 +276,14 @@ template <bool has_disk_controller> class ConcreteMachine:
}
break;
case PartialMachineCycle::ReadOpcodeStart:
if(!is_video_[address >> 14] && wait_mode_ != WaitMode::None) {
penalty = dave_delay_;
} else {
if(is_video_[address >> 14]) {
// Query Nick for the amount of delay that would occur with one cycle left
// in this read opcode.
const auto delay_time = nick_.time_since_flush(HalfCycles(2));
const auto delay = nick_.last_valid()->get_time_until_z80_slot(delay_time);
penalty = nick_.back_map(delay, delay_time);
} else if(wait_mode_ != WaitMode::None) {
penalty = dave_delay_;
}
break;