From cf6fa984332fe5a659445723cf8bf7934e5d9eab Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 16 Mar 2019 22:50:26 -0400 Subject: [PATCH] Corrects detection of terminal micro-ops. --- Processors/68000/Implementation/68000Implementation.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Processors/68000/Implementation/68000Implementation.hpp b/Processors/68000/Implementation/68000Implementation.hpp index cb40a181e..61ad19098 100644 --- a/Processors/68000/Implementation/68000Implementation.hpp +++ b/Processors/68000/Implementation/68000Implementation.hpp @@ -23,6 +23,8 @@ template void Processor: // TODO: synchronous bus. + // TODO: check for bus error. + // Perform the microcycle. bus_handler_.perform_bus_operation(active_step_->microcycle, is_supervisor_); @@ -32,9 +34,11 @@ template void Processor: // Consider advancing a micro-operation. if(active_step_->is_terminal()) { // If there are any more micro-operations available, just move onwards. - if(active_micro_op_ && !active_micro_op_->is_terminal()) { + if(active_micro_op_) { ++active_micro_op_; - } else { + } + + if(!active_micro_op_ || active_micro_op_->is_terminal()) { // Either the micro-operations for this instruction have been exhausted, or // no instruction was ongoing. Either way, do a standard instruction operation. @@ -135,7 +139,6 @@ template void Processor: active_program_->destination->full -= 4; break; } - } else { switch(active_step_->action) { default: