mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-07 23:25:00 +00:00
Attempted to get to 'proper' timing for LD (IX+d),n, albeit that proper is a guess.
This commit is contained in:
@@ -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)
|
// LD A, (DE)
|
||||||
func testLDADE() {
|
func testLDADE() {
|
||||||
test(
|
test(
|
||||||
|
@@ -585,7 +585,7 @@ template <class T> class Processor {
|
|||||||
/* 0x33 INC SP */ Instr(4, {MicroOp::Increment16, &sp_.full}),
|
/* 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_)),
|
/* 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_)),
|
/* 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}),
|
/* 0x37 SCF */ StdInstr({MicroOp::SCF}),
|
||||||
/* 0x38 JR C */ JR(TestC),
|
/* 0x38 JR C */ JR(TestC),
|
||||||
/* 0x39 ADD HL, SP */ ADD16(index, sp_),
|
/* 0x39 ADD HL, SP */ ADD16(index, sp_),
|
||||||
|
Reference in New Issue
Block a user