diff --git a/Processors/65816/Implementation/65816Implementation.hpp b/Processors/65816/Implementation/65816Implementation.hpp index 7ac380c08..ea07667fd 100644 --- a/Processors/65816/Implementation/65816Implementation.hpp +++ b/Processors/65816/Implementation/65816Implementation.hpp @@ -103,6 +103,10 @@ template void Processor &target) { - target(CycleFetchPCThrowaway); // IO. - target(CycleFetchPCThrowaway); // IO. + target(CycleFetchPCThrowaway); // IO. + target(CycleFetchPCThrowaway); // IO. - target(CyclePull); // PCL. - target(CyclePull); // PCH. - target(CycleAccessStack); // IO. + target(CyclePull); // PCL. + target(CyclePull); // PCH. + target(CycleFetchPreviousThrowaway); // IO. - target(OperationPerform); // [RTS] + target(OperationPerform); // [RTS] } // 22i. Stack; s, RTL. diff --git a/Processors/65816/Implementation/65816Storage.hpp b/Processors/65816/Implementation/65816Storage.hpp index d2ead050f..bac7fda8b 100644 --- a/Processors/65816/Implementation/65816Storage.hpp +++ b/Processors/65816/Implementation/65816Storage.hpp @@ -15,6 +15,8 @@ enum MicroOp: uint8_t { CycleFetchPCThrowaway, /// Fetches a byte from (PC - 1), and throws it away; useful for IO cycles that immediately follow incremented PCs. CycleFetchPreviousPCThrowaway, + /// Fetches from whichever address was used in the last bus cycle, and throws away the result. + CycleFetchPreviousThrowaway, /// The same as CycleFetchIncrementPC but indicates valid program address rather than valid data address. CycleFetchOpcode, @@ -274,7 +276,7 @@ struct ProcessorStorage { // Registers. RegisterPair16 a; RegisterPair16 x, y; - RegisterPair16 s; + RegisterPair16 s; uint16_t pc; // Flags aplenty.