diff --git a/Processors/65816/Implementation/65816Implementation.hpp b/Processors/65816/Implementation/65816Implementation.hpp index 3ffb34ed0..34b8dca01 100644 --- a/Processors/65816/Implementation/65816Implementation.hpp +++ b/Processors/65816/Implementation/65816Implementation.hpp @@ -491,6 +491,12 @@ template void Processor::run_for(const Cycles flags_.set_nz(a_.full, m_shift_); break; + case XBA: { + const uint8_t a_low = a_.halves.low; + a_.halves.low = a_.halves.high; + a_.halves.high = a_low; + flags_.set_nz(a_.halves.low); + } break; // // Jumps and returns. @@ -573,6 +579,12 @@ template void Processor::run_for(const Cycles set_flags(get_flags() | instruction_buffer_.value); break; + case XCE: { + const bool old_emulation_flag = emulation_flag_; + set_emulation_mode(flags_.carry); + flags_.carry = old_emulation_flag; + } break; + // // Increments and decrements. // @@ -779,7 +791,6 @@ template void Processor::run_for(const Cycles // TODO: // TRB, TSB, - // XCE, XBA, // STP, WAI, // RTL, // TCD, TCS, TDC, TSC