mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Take another run at IO addresses.
This commit is contained in:
parent
76767110b7
commit
944e5ebbfa
@ -387,7 +387,7 @@ struct CPU::WDC65816::ProcessorStorageConstructor {
|
||||
|
||||
// 8. Accumulator; A.
|
||||
static void accumulator(AccessType, bool, const std::function<void(MicroOp)> &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<void(MicroOp)> &target) {
|
||||
target(CycleFetchPreviousPCThrowaway); // IO.
|
||||
target(CycleFetchPCThrowaway); // IO.
|
||||
target(OperationPerform);
|
||||
}
|
||||
|
||||
// 19b. Implied; i; XBA.
|
||||
static void implied_xba(AccessType, bool, const std::function<void(MicroOp)> &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<void(MicroOp)> &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<void(MicroOp)> &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<void(MicroOp)> &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<void(MicroOp)> &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<void(MicroOp)> &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<void(MicroOp)> &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<void(MicroOp)> &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<void(MicroOp)> &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<void(MicroOp)> &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<void(MicroOp)> &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);
|
||||
|
Loading…
Reference in New Issue
Block a user