1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-26 10:29:31 +00:00

Corrected timestamp return, and its testing by the 6502 timing tests.

This commit is contained in:
Thomas Harte 2017-07-27 21:19:16 -04:00
parent 8848ebbd4f
commit 761afad118
2 changed files with 3 additions and 2 deletions

View File

@ -34,6 +34,7 @@ class MOS6502TimingTests: XCTestCase, CSTestMachineTrapHandler {
0xbd, 0x00, 0x00, // [4] LDA $0000, x (no wrap)
0xbd, 0x02, 0x00, // [5] LDA $0002, x (wrap)
0xb9, 0x00, 0x00, // [4] LDA $0000, y (no wrap)
0xb9, 0x10, 0x00, // [5] LDA $0010, y (wrap)
0xa1, 0x44, // [6] LDA ($44, x)
0xb1, 0x00, // [5] LDA ($00), y (no wrap)
@ -222,7 +223,7 @@ class MOS6502TimingTests: XCTestCase, CSTestMachineTrapHandler {
func testMachine(_ testMachine: CSTestMachine, didTrapAtAddress address: UInt16) {
if self.endTime == 0 {
self.endTime = machine.timestamp - 1
self.endTime = (machine.timestamp / 2) - 1
}
}
}

View File

@ -78,7 +78,7 @@ static CPU::MOS6502::Register registerForRegister(CSTestMachine6502Register reg)
}
- (uint32_t)timestamp {
return _processor->get_timestamp();
return _processor->get_timestamp().as_int();
}
- (void)setIrqLine:(BOOL)irqLine {