From 3933bf49cfdf5e6f20679773b86ad21e90889b6d Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 6 Oct 2020 21:28:54 -0400 Subject: [PATCH] Implements BRL. --- .../Implementation/65816Implementation.hpp | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Processors/65816/Implementation/65816Implementation.hpp b/Processors/65816/Implementation/65816Implementation.hpp index 63f52288f..5707812c9 100644 --- a/Processors/65816/Implementation/65816Implementation.hpp +++ b/Processors/65816/Implementation/65816Implementation.hpp @@ -306,12 +306,8 @@ template void Processor::run_for(const Cycles case OperationPerform: switch(active_instruction_->operation) { - - case NOP: - break; - // - // Loads, stores and transfers + // Loads, stores and transfers (and NOP). // case LDA: @@ -359,6 +355,13 @@ template void Processor::run_for(const Cycles data_buffer_.size = 2 - m_flag(); break; + case PHB: + data_buffer_.value = a_.halves.high; + data_buffer_.size = 1; + break; + + case NOP: break; + // // Jumps. // @@ -500,13 +503,16 @@ template void Processor::run_for(const Cycles #undef BRA + case BRL: + pc_ += int16_t(instruction_buffer_.value); + break; + // TODO: // ADC, BIT, CMP, CPX, CPY, SBC, // PLP, - // PHB, PHP, PHD, PHK, + // PHP, PHD, PHK, // ASL, LSR, ROL, ROR, TRB, TSB, // REP, SEP, - // BRL, // TAX, TAY, TCD, TCS, TDC, TSC, TSX, TXA, TXS, TXY, TYA, TYX, // XCE, XBA, // STP, WAI,