mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-13 07:30:21 +00:00
Fixed 6502 timing tests.
This commit is contained in:
parent
3c254360ba
commit
37ccb9d3b6
@ -82,7 +82,8 @@ class MOS6502TimingTests: XCTestCase, CSTestMachineTrapHandler {
|
|||||||
0x20, 0x04, 0x02, // [6] JSR $0204
|
0x20, 0x04, 0x02, // [6] JSR $0204
|
||||||
0x00,
|
0x00,
|
||||||
0x60, // [6] RTS
|
0x60, // [6] RTS
|
||||||
]
|
]
|
||||||
|
machine.addTrapAddress(0x0203)
|
||||||
self.runTest(code, expectedRunLength: 12)
|
self.runTest(code, expectedRunLength: 12)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,6 +172,7 @@ class MOS6502TimingTests: XCTestCase, CSTestMachineTrapHandler {
|
|||||||
0x87, 0x09, // [3] SAX $09
|
0x87, 0x09, // [3] SAX $09
|
||||||
0x60, // [6] RTS
|
0x60, // [6] RTS
|
||||||
]
|
]
|
||||||
|
machine.addTrapAddress(0x0203)
|
||||||
self.runTest(code, expectedRunLength: 66)
|
self.runTest(code, expectedRunLength: 66)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,7 +222,7 @@ class MOS6502TimingTests: XCTestCase, CSTestMachineTrapHandler {
|
|||||||
|
|
||||||
func testMachine(_ testMachine: CSTestMachine, didTrapAtAddress address: UInt16) {
|
func testMachine(_ testMachine: CSTestMachine, didTrapAtAddress address: UInt16) {
|
||||||
if self.endTime == 0 {
|
if self.endTime == 0 {
|
||||||
self.endTime = machine.timestamp - 9
|
self.endTime = machine.timestamp - 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user