From 7bddd294c94f97e5159d929531f438074836e5e1 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 30 May 2017 21:03:02 -0400 Subject: [PATCH] Resolved an unpredictable conditional and temporarily disabled the Zexalltest as part of the default suite, since it takes so long to run. --- .../xcshareddata/xcschemes/Clock Signal.xcscheme | 5 +++++ Processors/Z80/Z80.hpp | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/OSBindings/Mac/Clock Signal.xcodeproj/xcshareddata/xcschemes/Clock Signal.xcscheme b/OSBindings/Mac/Clock Signal.xcodeproj/xcshareddata/xcschemes/Clock Signal.xcscheme index 3363fbe65..2cfe830df 100644 --- a/OSBindings/Mac/Clock Signal.xcodeproj/xcshareddata/xcschemes/Clock Signal.xcscheme +++ b/OSBindings/Mac/Clock Signal.xcodeproj/xcshareddata/xcschemes/Clock Signal.xcscheme @@ -38,6 +38,11 @@ BlueprintName = "Clock SignalTests" ReferencedContainer = "container:Clock Signal.xcodeproj"> + + + + diff --git a/Processors/Z80/Z80.hpp b/Processors/Z80/Z80.hpp index 2fd034896..959c38b8e 100644 --- a/Processors/Z80/Z80.hpp +++ b/Processors/Z80/Z80.hpp @@ -190,9 +190,9 @@ template class Processor: public MicroOpScheduler { std::vector instructions; std::vector all_operations; std::vector fetch_decode_execute; - bool increments_r; + uint8_t r_step_; - InstructionPage() : increments_r(true) {} + InstructionPage() : r_step_(1) {} }; InstructionPage *current_instruction_page_; @@ -648,8 +648,8 @@ template class Processor: public MicroOpScheduler { assemble_base_page(fd_page_, iy_, true, fdcb_page_); assemble_ed_page(ed_page_); - fdcb_page_.increments_r = false; - ddcb_page_.increments_r = false; + fdcb_page_.r_step_ = 0; + ddcb_page_.r_step_ = 0; assemble_fetch_decode_execute(base_page_, 4); assemble_fetch_decode_execute(dd_page_, 4); @@ -702,7 +702,7 @@ template class Processor: public MicroOpScheduler { checkSchedule(); break; case MicroOp::DecodeOperation: - if(current_instruction_page_->increments_r) r_ = (r_ & 0x80) | ((r_ + 1) & 0x7f); + r_ = (r_ & 0x80) | ((r_ + current_instruction_page_->r_step_) & 0x7f); pc_.full++; decode_operation(is_halted_ ? 0x00 : operation_); break;