From 1ae2f6f449d387ecc8bcc0c6934984c703de5464 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 31 Oct 2020 09:22:35 -0400 Subject: [PATCH] PHD and PLD should always be 16-bit; PLP 8-bit. --- Processors/65816/Implementation/65816Storage.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Processors/65816/Implementation/65816Storage.cpp b/Processors/65816/Implementation/65816Storage.cpp index 8c0b4249f..4392b26b5 100644 --- a/Processors/65816/Implementation/65816Storage.cpp +++ b/Processors/65816/Implementation/65816Storage.cpp @@ -788,7 +788,7 @@ ProcessorStorage::ProcessorStorage() { /* 0x08 PHP s */ op(stack_push, PHP, AccessMode::Always8Bit); /* 0x09 ORA # */ op(immediate, ORA); /* 0x0a ASL A */ op(accumulator, ASL); - /* 0x0b PHD s */ op(stack_push, PHD, AccessMode::Always8Bit); + /* 0x0b PHD s */ op(stack_push, PHD, AccessMode::Always16Bit); /* 0x0c TSB a */ op(absolute_rmw, TSB); /* 0x0d ORA a */ op(absolute, ORA); /* 0x0e ASL a */ op(absolute_rmw, ASL); @@ -819,10 +819,10 @@ ProcessorStorage::ProcessorStorage() { /* 0x25 AND d */ op(direct, AND); /* 0x26 ROL d */ op(direct_rmw, ROL); /* 0x27 AND [d] */ op(direct_indirect_long, AND); - /* 0x28 PLP s */ op(stack_pull, PLP); + /* 0x28 PLP s */ op(stack_pull, PLP, AccessMode::Always8Bit); /* 0x29 AND # */ op(immediate, AND); /* 0x2a ROL A */ op(accumulator, ROL); - /* 0x2b PLD s */ op(stack_pull, PLD, AccessMode::Always8Bit); + /* 0x2b PLD s */ op(stack_pull, PLD, AccessMode::Always16Bit); /* 0x2c BIT a */ op(absolute, BIT); /* 0x2d AND a */ op(absolute, AND); /* 0x2e ROL a */ op(absolute_rmw, ROL);