From 226272501066a3cf385af38609a1d301268d89ff Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 31 Jul 2023 17:08:02 -0400 Subject: [PATCH] Reveal 16-bit stack pointer when asked, regardless of mode. --- Processors/65816/Implementation/65816Base.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Processors/65816/Implementation/65816Base.cpp b/Processors/65816/Implementation/65816Base.cpp index 83bb01701..3eaf614cd 100644 --- a/Processors/65816/Implementation/65816Base.cpp +++ b/Processors/65816/Implementation/65816Base.cpp @@ -14,10 +14,7 @@ uint16_t ProcessorBase::value_of(Register r) const { switch (r) { case Register::ProgramCounter: return registers_.pc; case Register::LastOperationAddress: return last_operation_pc_; - case Register::StackPointer: - return - (registers_.s.full & (registers_.emulation_flag ? 0xff : 0xffff)) | - (registers_.emulation_flag ? 0x100 : 0x000); + case Register::StackPointer: return registers_.s.full; case Register::Flags: return get_flags(); case Register::A: return registers_.a.full; case Register::X: return registers_.x.full;