diff --git a/Processors/Z80/Z80.hpp b/Processors/Z80/Z80.hpp index d4c28c06a..ae162af93 100644 --- a/Processors/Z80/Z80.hpp +++ b/Processors/Z80/Z80.hpp @@ -538,7 +538,8 @@ template class Processor: public MicroOpScheduler { if(number_of_cycles_ < operation->machine_cycle.length) { return; } - static_cast(this)->perform_machine_cycle(&operation->machine_cycle); + number_of_cycles_ -= operation->machine_cycle.length; + number_of_cycles_ -= static_cast(this)->perform_machine_cycle(&operation->machine_cycle); break; case MicroOp::MoveToNextProgram: move_to_next_program();