diff --git a/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp b/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp index 38f0372ac..58c2eee4f 100644 --- a/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp +++ b/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp @@ -163,6 +163,7 @@ enum ExecutionState: int { DIVU_DIVS, MULU_MULS, + LEA, }; // MARK: - The state machine. @@ -701,6 +702,12 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor StdCASE(MULU, perform_state_ = MULU_MULS); StdCASE(MULS, perform_state_ = MULU_MULS); + StdCASE(LEA, { + post_ea_state_ = LEA; + next_operand_ = 0; + MoveToStateSpecific(CalcEffectiveAddress); + }); + default: assert(false); } @@ -1875,6 +1882,14 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor MoveToStateSpecific(Decode); + // + // LEA + // + BeginState(LEA): + registers_[8 + instruction_.reg(1)].l = effective_address_[0]; + Prefetch(); + MoveToStateSpecific(Decode); + // // Various states TODO. //