mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 23:52:26 +00:00
Attempted to get to 'proper' timing for LD (IX+d),n, albeit that proper is a guess.
This commit is contained in:
parent
b0375bb037
commit
184b371649
@ -156,6 +156,20 @@ class Z80MachineCycleTests: XCTestCase {
|
||||
)
|
||||
}
|
||||
|
||||
// LD (IX+d), n
|
||||
func testLDIXdn() {
|
||||
test(
|
||||
program: [0xdd, 0x36, 0x10, 0x80],
|
||||
busCycles: [
|
||||
MachineCycle(operation: .readOpcode, length: 4),
|
||||
MachineCycle(operation: .readOpcode, length: 4),
|
||||
MachineCycle(operation: .read, length: 3),
|
||||
MachineCycle(operation: .internalOperation, length: 5),
|
||||
MachineCycle(operation: .read, length: 3),
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
// LD A, (DE)
|
||||
func testLDADE() {
|
||||
test(
|
||||
|
@ -585,7 +585,7 @@ template <class T> class Processor {
|
||||
/* 0x33 INC SP */ Instr(4, {MicroOp::Increment16, &sp_.full}),
|
||||
/* 0x34 INC (HL) */ StdInstr(INDEX(), Read4(INDEX_ADDR(), temp8_), {MicroOp::Increment8, &temp8_}, Write3(INDEX_ADDR(), temp8_)),
|
||||
/* 0x35 DEC (HL) */ StdInstr(INDEX(), Read4(INDEX_ADDR(), temp8_), {MicroOp::Decrement8, &temp8_}, Write3(INDEX_ADDR(), temp8_)),
|
||||
/* 0x36 LD (HL), n */ StdInstr({MicroOp::IndexedPlaceHolder}, ReadInc(pc_, temp8_), {MicroOp::CalculateIndexAddress, &index}, ReadInc(pc_, temp8_), Write3(INDEX_ADDR(), temp8_)),
|
||||
/* 0x36 LD (HL), n */ StdInstr(INDEX(), ReadInc(pc_, temp8_), Write3(INDEX_ADDR(), temp8_)),
|
||||
/* 0x37 SCF */ StdInstr({MicroOp::SCF}),
|
||||
/* 0x38 JR C */ JR(TestC),
|
||||
/* 0x39 ADD HL, SP */ ADD16(index, sp_),
|
||||
|
Loading…
Reference in New Issue
Block a user