From ed7060a105b378f32a4247d26dc2957a29f57f0f Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 22 Mar 2019 21:43:51 -0400 Subject: [PATCH] Made an initial stab at completing MOVEA.w. I think I'm probably peeking into the prefetch queue incorrectly. --- .../Implementation/68000Implementation.hpp | 22 +++++++++++++------ .../68000/Implementation/68000Storage.cpp | 22 ++++++++++++++++--- .../68000/Implementation/68000Storage.hpp | 11 ++++++---- 3 files changed, 41 insertions(+), 14 deletions(-) diff --git a/Processors/68000/Implementation/68000Implementation.hpp b/Processors/68000/Implementation/68000Implementation.hpp index 786f47cf5..f5228b34d 100644 --- a/Processors/68000/Implementation/68000Implementation.hpp +++ b/Processors/68000/Implementation/68000Implementation.hpp @@ -199,11 +199,11 @@ template void Processor: break; case int(MicroOp::Action::CalcD16An) | MicroOp::SourceMask: - effective_address_[0] = int16_t(prefetch_queue_.halves.high.full) + active_program_->source->full; + effective_address_[0] = int16_t(prefetch_queue_.halves.low.full) + active_program_->source->full; break; case int(MicroOp::Action::CalcD16An) | MicroOp::DestinationMask: - effective_address_[1] = int16_t(prefetch_queue_.halves.high.full) + active_program_->destination->full; + effective_address_[1] = int16_t(prefetch_queue_.halves.low.full) + active_program_->destination->full; break; case int(MicroOp::Action::CalcD16An) | MicroOp::SourceMask | MicroOp::DestinationMask: @@ -224,11 +224,11 @@ template void Processor: } \ } case int(MicroOp::Action::CalcD8AnXn) | MicroOp::SourceMask: { - CalculateD8AnXn(prefetch_queue_.halves.high, active_program_->source, effective_address_[0]); + CalculateD8AnXn(prefetch_queue_.halves.low, active_program_->source, effective_address_[0]); } break; case int(MicroOp::Action::CalcD8AnXn) | MicroOp::DestinationMask: { - CalculateD8AnXn(prefetch_queue_.halves.high, active_program_->destination, effective_address_[1]); + CalculateD8AnXn(prefetch_queue_.halves.low, active_program_->destination, effective_address_[1]); } break; case int(MicroOp::Action::CalcD8AnXn) | MicroOp::SourceMask | MicroOp::DestinationMask: { @@ -239,11 +239,19 @@ template void Processor: #undef CalculateD8AnXn case int(MicroOp::Action::AssembleWordFromPrefetch) | MicroOp::SourceMask: - bus_data_[0] = prefetch_queue_.full; + effective_address_[0] = prefetch_queue_.halves.high.full; break; case int(MicroOp::Action::AssembleWordFromPrefetch) | MicroOp::DestinationMask: - bus_data_[1] = prefetch_queue_.full; + effective_address_[1] = prefetch_queue_.halves.high.full; + break; + + case int(MicroOp::Action::AssembleLongWordFromPrefetch) | MicroOp::SourceMask: + effective_address_[0] = prefetch_queue_.full; + break; + + case int(MicroOp::Action::AssembleLongWordFromPrefetch) | MicroOp::DestinationMask: + effective_address_[1] = prefetch_queue_.full; break; } @@ -321,7 +329,7 @@ template ProcessorState Processor