1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-04 18:29:40 +00:00

Completes absolute indexed indirect micro-ops.

For the record: this is just six out of forty-seven codes complete. Or about two-thirds of six pages. Plenty to do even before I start trying to interpret these things.
This commit is contained in:
Thomas Harte 2020-09-24 22:37:31 -04:00
parent d707c5ac95
commit 95af1815c8
2 changed files with 18 additions and 1 deletions

View File

@ -95,7 +95,21 @@ struct CPU::WDC65816::ProcessorStorageConstructor {
};
// 2b. Absolute Indexed Indirect (a, x), JSR.
static void absolute_indexed_indirect_jsr(AccessType, bool, const std::function<void(MicroOp)> &target) {
target(CycleFetchIncrementPC); // AAL.
target(OperationCopyPCToData); // Prepare to push.
target(CyclePush); // PCH
target(CyclePush); // PCL
target(CycleFetchPC); // AAH.
target(CycleFetchPC); // IO.
target(OperationConstructAbsoluteIndexedIndirect); // Calculate data address.
target(CycleFetchIncrementData); // New PCL
target(CycleFetchData); // New PCH.
target(OperationPerform); // [JSR]
}
};
AccessType ProcessorStorage::access_type_for_operation(Operation operation) {
@ -401,7 +415,7 @@ ProcessorStorage::ProcessorStorage() {
/* 0xf9 SBC a, y */
/* 0xfa PLX s */
/* 0xfb XCE i */
/* 0xfc JSR (a, x) */
/* 0xfc JSR (a, x) */ op(absolute_indexed_indirect_jsr, JSR);
/* 0xfd SBC a, x */
/* 0xfe INC a, x */
/* 0xff SBC al, x */

View File

@ -38,6 +38,9 @@ enum MicroOp: uint8_t {
/// Performs whatever operation goes with this program.
OperationPerform,
/// Copies the current program counter to the data buffer.
OperationCopyPCToData,
/// Complete this set of micr-ops.
OperationMoveToNextProgram
};