diff --git a/OSBindings/Mac/Clock SignalTests/FUSETests.swift b/OSBindings/Mac/Clock SignalTests/FUSETests.swift index c41450627..14c331634 100644 --- a/OSBindings/Mac/Clock SignalTests/FUSETests.swift +++ b/OSBindings/Mac/Clock SignalTests/FUSETests.swift @@ -28,6 +28,7 @@ fileprivate struct RegisterState { let i: UInt8, r: UInt8 let iff1: Bool, iff2: Bool, interruptMode: Int let isHalted: Bool + let memptr: UInt16 let tStates: Int func set(onMachine machine: CSTestMachineZ80) { @@ -48,6 +49,7 @@ fileprivate struct RegisterState { machine.setValue(iff1 ? 1 : 0, for: .IFF1) machine.setValue(iff2 ? 1 : 0, for: .IFF2) machine.setValue(UInt16(interruptMode), for: .IM) + machine.setValue(memptr, for: .memPtr) // TODO: isHalted } @@ -83,6 +85,7 @@ fileprivate struct RegisterState { interruptMode = (dictionary["im"] as! NSNumber).intValue isHalted = (dictionary["halted"] as! NSNumber).boolValue + memptr = UInt16(truncating: dictionary["memptr"] as! NSNumber) tStates = (dictionary["tStates"] as! NSNumber).intValue } @@ -115,6 +118,7 @@ fileprivate struct RegisterState { isHalted = machine.isHalted tStates = 0 // TODO (?) + memptr = machine.value(for: .memPtr) } } @@ -138,7 +142,8 @@ fileprivate func ==(lhs: RegisterState, rhs: RegisterState) -> Bool { lhs.iff1 == rhs.iff1 && lhs.iff2 == rhs.iff2 && lhs.interruptMode == rhs.interruptMode && - lhs.isHalted == rhs.isHalted + lhs.isHalted == rhs.isHalted && + lhs.memptr == rhs.memptr } class FUSETests: XCTestCase { @@ -167,7 +172,7 @@ class FUSETests: XCTestCase { let name = itemDictionary["name"] as! String -// if name != "02" { +// if name != "01" { // continue; // } // print("\(name)")