diff --git a/Processors/Z80/Z80.hpp b/Processors/Z80/Z80.hpp index 53cff7f37..5f0467140 100644 --- a/Processors/Z80/Z80.hpp +++ b/Processors/Z80/Z80.hpp @@ -776,7 +776,7 @@ template class Processor { static MachineCycle bus_acknowledge_cycle = {BusOperation::BusAcknowledge, 1}; number_of_cycles_ -= static_cast(this)->perform_machine_cycle(bus_acknowledge_cycle) + 1; if(!number_of_cycles_) { - flush(); + static_cast(this)->flush(); return; } } @@ -793,7 +793,11 @@ template class Processor { switch(operation->type) { case MicroOp::BusOperation: - if(number_of_cycles_ < operation->machine_cycle.length) { scheduled_program_counter_--; flush(); return; } + if(number_of_cycles_ < operation->machine_cycle.length) { + scheduled_program_counter_--; + static_cast(this)->flush(); + return; + } number_of_cycles_ -= operation->machine_cycle.length; last_request_status_ = request_status_; number_of_cycles_ -= static_cast(this)->perform_machine_cycle(operation->machine_cycle);