diff --git a/Processors/65816/Implementation/65816Implementation.hpp b/Processors/65816/Implementation/65816Implementation.hpp index 742eb0796..c2f28ef4b 100644 --- a/Processors/65816/Implementation/65816Implementation.hpp +++ b/Processors/65816/Implementation/65816Implementation.hpp @@ -171,6 +171,10 @@ template void Processor::run_for(const Cycles data_buffer_ = instruction_buffer_; continue; + case OperationCopyDataToInstruction: + instruction_buffer_ = data_buffer_; + continue; + case OperationCopyAToData: if(m_flag()) { data_buffer_.size = 1; diff --git a/Processors/65816/Implementation/65816Storage.cpp b/Processors/65816/Implementation/65816Storage.cpp index 0fe70c498..e451ee3ad 100644 --- a/Processors/65816/Implementation/65816Storage.cpp +++ b/Processors/65816/Implementation/65816Storage.cpp @@ -428,6 +428,7 @@ struct CPU::WDC65816::ProcessorStorageConstructor { target(CycleFetchIncrementData); // AAL. target(CycleFetchData); // AAH. + target(OperationCopyDataToInstruction); target(OperationConstructAbsoluteYRead); target(CycleFetchIncorrectDataAddress); // IO. diff --git a/Processors/65816/Implementation/65816Storage.hpp b/Processors/65816/Implementation/65816Storage.hpp index be4079fc6..ff9206653 100644 --- a/Processors/65816/Implementation/65816Storage.hpp +++ b/Processors/65816/Implementation/65816Storage.hpp @@ -112,8 +112,9 @@ enum MicroOp: uint8_t { /// Copies the current program counter to the data buffer. OperationCopyPCToData, - OperationCopyInstructionToData, OperationCopyDataToPC, + OperationCopyInstructionToData, + OperationCopyDataToInstruction, /// Copies the current PBR to the data buffer. OperationCopyPBRToData,