diff --git a/OSBindings/Mac/Clock SignalTests/68000Tests.mm b/OSBindings/Mac/Clock SignalTests/68000Tests.mm index 06e0233f6..0216ae864 100644 --- a/OSBindings/Mac/Clock SignalTests/68000Tests.mm +++ b/OSBindings/Mac/Clock SignalTests/68000Tests.mm @@ -75,7 +75,7 @@ class RAM68000: public CPU::MC68000::BusHandler { HalfCycles perform_bus_operation(const CPU::MC68000::Microcycle &cycle, int is_supervisor) { const uint32_t word_address = cycle.word_address(); - duration_ += cycle.length; + if(instructions_remaining_) duration_ += cycle.length; using Microcycle = CPU::MC68000::Microcycle; if(cycle.data_select_active()) { diff --git a/Processors/68000/Implementation/68000Storage.cpp b/Processors/68000/Implementation/68000Storage.cpp index 6cb741145..f7556c828 100644 --- a/Processors/68000/Implementation/68000Storage.cpp +++ b/Processors/68000/Implementation/68000Storage.cpp @@ -204,7 +204,12 @@ struct ProcessorStorageConstructor { } // Do nothing, but with a length that definitely won't map it to the other do-nothings. - if(token == "r"){ + if(token == "r") { +#ifndef NDEBUG + // If this is a debug build, not where the resizeable microcycle is + // (and double check that there's only the one). + step.microcycle.is_resizeable = true; +#endif step.microcycle.length = HalfCycles(0); steps.push_back(step); continue; @@ -807,7 +812,7 @@ struct ProcessorStorageConstructor { // Temporary storage for the Program fields. ProcessorBase::Program program; -// if(instruction == 0xe378) { +// if(instruction == 0xe569) { // printf(""); // } @@ -3051,14 +3056,6 @@ struct ProcessorStorageConstructor { storage_.interrupt_micro_ops_ = &storage_.all_micro_ops_[interrupt_pointer]; link_operations(storage_.interrupt_micro_ops_, &arbitrary_base); - // If this is a debug build, not where the resizeable microcycle is - // (and double check that there's only the one). -#ifndef NDEBUG - for(auto &bus_step: storage_.all_bus_steps_) { - bus_step.microcycle.is_resizeable = bus_step.microcycle.length == HalfCycles(0); - } -#endif - std::cout << storage_.all_bus_steps_.size() << " total steps" << std::endl; }