From 944e5ebbfa2b144027d63f56b9aabce702cadd9b Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 22 Jun 2022 15:28:11 -0400 Subject: [PATCH] Take another run at IO addresses. --- .../65816/Implementation/65816Storage.cpp | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/Processors/65816/Implementation/65816Storage.cpp b/Processors/65816/Implementation/65816Storage.cpp index 1ad7b3ec9..677fd496b 100644 --- a/Processors/65816/Implementation/65816Storage.cpp +++ b/Processors/65816/Implementation/65816Storage.cpp @@ -387,7 +387,7 @@ struct CPU::WDC65816::ProcessorStorageConstructor { // 8. Accumulator; A. static void accumulator(AccessType, bool, const std::function &target) { - target(CycleFetchPreviousPCThrowaway); // IO. + target(CycleFetchPCThrowaway); // IO. // TODO: seriously consider a-specific versions of all relevant operations; // the cost of interpreting three things here is kind of silly. @@ -430,7 +430,7 @@ struct CPU::WDC65816::ProcessorStorageConstructor { target(CycleFetchIncrementPC); // DO. target(OperationConstructDirect); - target(CycleFetchPreviousPCThrowaway); // IO. + target(CycleFetchPreviousPCThrowaway); // IO. read_modify_write(is8bit, target); } @@ -569,14 +569,14 @@ struct CPU::WDC65816::ProcessorStorageConstructor { // 19a. Implied; i. static void implied(AccessType, bool, const std::function &target) { - target(CycleFetchPreviousPCThrowaway); // IO. + target(CycleFetchPCThrowaway); // IO. target(OperationPerform); } // 19b. Implied; i; XBA. static void implied_xba(AccessType, bool, const std::function &target) { - target(CycleFetchPreviousPCThrowaway); // IO. - target(CycleFetchPreviousPCThrowaway); // IO. + target(CycleFetchPCThrowaway); // IO. + target(CycleFetchPCThrowaway); // IO. target(OperationPerform); } @@ -584,8 +584,8 @@ struct CPU::WDC65816::ProcessorStorageConstructor { // 19d. Wait for interrupt. static void stp_wai(AccessType, bool, const std::function &target) { target(OperationPerform); // Establishes the termination condition. - target(CycleFetchPreviousPCThrowaway); // IO. - target(CycleFetchPreviousPCThrowaway); // IO. + target(CycleFetchPCThrowaway); // IO. + target(CycleFetchPCThrowaway); // IO. target(CycleRepeatingNone); // This will first check whether the STP/WAI exit // condition has occurred; if not then it'll issue // either a BusOperation::None or ::Ready and then @@ -654,8 +654,8 @@ struct CPU::WDC65816::ProcessorStorageConstructor { // 22b. Stack; s, PLx. static void stack_pull(AccessType, bool is8bit, const std::function &target) { - target(CycleFetchPreviousPCThrowaway); // IO. - target(CycleFetchPreviousPCThrowaway); // IO. + target(CycleFetchPCThrowaway); // IO. + target(CycleFetchPCThrowaway); // IO. if(!is8bit) target(CyclePull); // REG low. target(CyclePull); // REG [high]. @@ -665,7 +665,7 @@ struct CPU::WDC65816::ProcessorStorageConstructor { // 22c. Stack; s, PHx. static void stack_push(AccessType, bool is8bit, const std::function &target) { - target(CycleFetchPreviousPCThrowaway); // IO. + target(CycleFetchPCThrowaway); // IO. target(OperationPerform); @@ -686,33 +686,33 @@ struct CPU::WDC65816::ProcessorStorageConstructor { // 22e. Stack; s, PEI. static void stack_pei(AccessType, bool, const std::function &target) { - target(CycleFetchIncrementPC); // DO. + target(CycleFetchIncrementPC); // DO. target(OperationConstructDirect); - target(CycleFetchPreviousPCThrowaway); // IO. + target(CycleFetchPreviousPCThrowaway); // IO. - target(CycleFetchIncrementData); // AAL. - target(CycleFetchData); // AAH. - target(CyclePush); // AAH. - target(CyclePush); // AAL. + target(CycleFetchIncrementData); // AAL. + target(CycleFetchData); // AAH. + target(CyclePush); // AAH. + target(CyclePush); // AAL. } // 22f. Stack; s, PER. static void stack_per(AccessType, bool, const std::function &target) { - target(CycleFetchIncrementPC); // Offset low. - target(CycleFetchIncrementPC); // Offset high. - target(CycleFetchPreviousPCThrowaway); // IO. + target(CycleFetchIncrementPC); // Offset low. + target(CycleFetchIncrementPC); // Offset high. + target(CycleFetchPreviousPCThrowaway); // IO. target(OperationConstructPER); - target(CyclePush); // AAH. - target(CyclePush); // AAL. + target(CyclePush); // AAH. + target(CyclePush); // AAL. } // 22g. Stack; s, RTI. static void stack_rti(AccessType, bool, const std::function &target) { - target(CycleFetchPreviousPCThrowaway); // IO. - target(CycleFetchPreviousPCThrowaway); // IO. + target(CycleFetchPCThrowaway); // IO. + target(CycleFetchPCThrowaway); // IO. target(CyclePull); // P. target(CyclePull); // New PCL. @@ -724,8 +724,8 @@ struct CPU::WDC65816::ProcessorStorageConstructor { // 22h. Stack; s, RTS. static void stack_rts(AccessType, bool, const std::function &target) { - target(CycleFetchPreviousPCThrowaway); // IO. - target(CycleFetchPreviousPCThrowaway); // IO. + target(CycleFetchPCThrowaway); // IO. + target(CycleFetchPCThrowaway); // IO. target(CyclePull); // PCL. target(CyclePull); // PCH. @@ -736,8 +736,8 @@ struct CPU::WDC65816::ProcessorStorageConstructor { // 22i. Stack; s, RTL. static void stack_rtl(AccessType, bool, const std::function &target) { - target(CycleFetchIncrementPC); // IO. - target(CycleFetchIncrementPC); // IO. + target(CycleFetchPCThrowaway); // IO. + target(CycleFetchPCThrowaway); // IO. target(CyclePull); // New PCL. target(CyclePull); // New PCH. @@ -771,7 +771,7 @@ struct CPU::WDC65816::ProcessorStorageConstructor { // 23. Stack Relative; d, s. static void stack_relative(AccessType type, bool is8bit, const std::function &target) { - target(CycleFetchIncrementPC); // SO. + target(CycleFetchIncrementPC); // SO. target(CycleFetchPreviousPCThrowaway); // IO. target(OperationConstructStackRelative); @@ -780,13 +780,13 @@ struct CPU::WDC65816::ProcessorStorageConstructor { // 24. Stack Relative Indirect Indexed (d, s), y. static void stack_relative_indexed_indirect(AccessType type, bool is8bit, const std::function &target) { - target(CycleFetchIncrementPC); // SO. - target(CycleFetchPreviousPCThrowaway); // IO. + target(CycleFetchIncrementPC); // SO. + target(CycleFetchPreviousPCThrowaway); // IO. target(OperationConstructStackRelative); - target(CycleFetchIncrementData); // AAL. - target(CycleFetchData); // AAH. - target(CycleFetchDataThrowaway); // IO. + target(CycleFetchIncrementData); // AAL. + target(CycleFetchData); // AAH. + target(CycleFetchDataThrowaway); // IO. target(OperationConstructStackRelativeIndexedIndirect); read_write(type, is8bit, target);