1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-08-07 08:26:28 +00:00

Merge pull request #1154 from TomHarte/65816StackAgain

Clarify SH=1 upon TCS.
This commit is contained in:
Thomas Harte
2023-08-19 15:56:30 -04:00
committed by GitHub

View File

@@ -622,7 +622,7 @@ template <typename BusHandler, bool uses_ready_line> void Processor<BusHandler,
// (and make reasonable guesses as to the N flag).
case TXS:
registers_.s = registers_.x.full;
registers_.s = registers_.x;
break;
case TSX:
@@ -671,10 +671,8 @@ template <typename BusHandler, bool uses_ready_line> void Processor<BusHandler,
break;
case TCS:
registers_.s.full = registers_.a.full;
// No need to worry about byte masking here;
// for the stack it's handled as the emulation runs.
// Cf. the stack_address() macro.
registers_.s = registers_.a;
registers_.s.full = stack_address();
break;
case TSC: