From 5725db923410cc3b887f4623d00f4b5875553024 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 25 Apr 2019 12:42:05 -0400 Subject: [PATCH] Corrects calculated-address TAS. --- Processors/68000/Implementation/68000Implementation.hpp | 8 +++++++- Processors/68000/Implementation/68000Storage.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Processors/68000/Implementation/68000Implementation.hpp b/Processors/68000/Implementation/68000Implementation.hpp index 042d7a1c1..99515e3ee 100644 --- a/Processors/68000/Implementation/68000Implementation.hpp +++ b/Processors/68000/Implementation/68000Implementation.hpp @@ -88,7 +88,7 @@ template void Proces auto bus_program = active_micro_op_->bus_program; switch(active_micro_op_->action) { default: - std::cerr << "Unhandled 68000 micro op action " << std::hex << active_micro_op_->action << std::endl; + std::cerr << "Unhandled 68000 micro op action " << std::hex << active_micro_op_->action << " within instruction " << decoded_instruction_ << std::endl; break; case int(MicroOp::Action::None): break; @@ -1059,6 +1059,12 @@ template void Proces #undef asr +#undef set_neg_zero_overflow +#define set_neg_zero_overflow(v, m) \ + zero_result_ = (v); \ + negative_flag_ = zero_result_ & (m); \ + overflow_flag_ = 0; + #undef set_flags #define set_flags(v, m, t) \ zero_result_ = v; \ diff --git a/Processors/68000/Implementation/68000Storage.cpp b/Processors/68000/Implementation/68000Storage.cpp index 5f6193efb..3fc755228 100644 --- a/Processors/68000/Implementation/68000Storage.cpp +++ b/Processors/68000/Implementation/68000Storage.cpp @@ -743,7 +743,7 @@ struct ProcessorStorageConstructor { case XXXw: // TAS (xxx).w case d16An: // TAS (d16, An) case d8AnXn: // TAS (d8, An, Xn) - op(address_action_for_mode(mode), seq("np nrd", { ea(1) }, false)); + op(address_action_for_mode(mode) | MicroOp::DestinationMask, seq("np nrd", { ea(1) }, false)); op(Action::PerformOperation, seq("tas np", { ea(1) }, false)); break; }