mirror of
https://github.com/TomHarte/CLK.git
synced 2024-07-11 04:28:58 +00:00
Updates to track Swift.
This commit is contained in:
parent
7f5c637aeb
commit
b0b2798f39
@ -24,6 +24,7 @@ class Z80MachineCycleTests: XCTestCase {
|
|||||||
case .portRead: opName = "i"
|
case .portRead: opName = "i"
|
||||||
case .portWrite: opName = "o"
|
case .portWrite: opName = "o"
|
||||||
case .internalOperation: opName = "iop"
|
case .internalOperation: opName = "iop"
|
||||||
|
default: opName = "?"
|
||||||
}
|
}
|
||||||
return "\(opName) \(length)"
|
return "\(opName) \(length)"
|
||||||
}
|
}
|
||||||
@ -35,7 +36,7 @@ class Z80MachineCycleTests: XCTestCase {
|
|||||||
// Create a machine and install the supplied program at address 0, setting the PC to run from there
|
// Create a machine and install the supplied program at address 0, setting the PC to run from there
|
||||||
let machine = CSTestMachineZ80()
|
let machine = CSTestMachineZ80()
|
||||||
machine.setValue(0x0000, for: .programCounter)
|
machine.setValue(0x0000, for: .programCounter)
|
||||||
machine.setData(Data(bytes: program), atAddress: 0x0000)
|
machine.setData(Data(_: program), atAddress: 0x0000)
|
||||||
|
|
||||||
// Figure out the total number of cycles implied by the bus cycles
|
// Figure out the total number of cycles implied by the bus cycles
|
||||||
var totalCycles: Int32 = 0
|
var totalCycles: Int32 = 0
|
||||||
|
@ -14,7 +14,7 @@ class Z80MemptrTests: XCTestCase {
|
|||||||
private func test(program : [UInt8], length : Int32, initialValue : UInt16) -> UInt16 {
|
private func test(program : [UInt8], length : Int32, initialValue : UInt16) -> UInt16 {
|
||||||
// Create a machine and install the supplied program at address 0, setting the PC to run from there
|
// Create a machine and install the supplied program at address 0, setting the PC to run from there
|
||||||
machine.setValue(0x0000, for: .programCounter)
|
machine.setValue(0x0000, for: .programCounter)
|
||||||
machine.setData(Data(bytes: program), atAddress: 0x0000)
|
machine.setData(Data(_: program), atAddress: 0x0000)
|
||||||
|
|
||||||
// Set the initial value of memptr, run for the requested number of cycles,
|
// Set the initial value of memptr, run for the requested number of cycles,
|
||||||
// return the new value
|
// return the new value
|
||||||
@ -316,7 +316,7 @@ class Z80MemptrTests: XCTestCase {
|
|||||||
let program: [UInt8] = [
|
let program: [UInt8] = [
|
||||||
0xed, 0xa1
|
0xed, 0xa1
|
||||||
]
|
]
|
||||||
machine.setData(Data(bytes: program), atAddress: 0x0000)
|
machine.setData(Data(_: program), atAddress: 0x0000)
|
||||||
machine.setValue(0, for: .memPtr)
|
machine.setValue(0, for: .memPtr)
|
||||||
|
|
||||||
for c in 1 ..< 65536 {
|
for c in 1 ..< 65536 {
|
||||||
@ -332,7 +332,7 @@ class Z80MemptrTests: XCTestCase {
|
|||||||
let program: [UInt8] = [
|
let program: [UInt8] = [
|
||||||
0xed, 0xa9
|
0xed, 0xa9
|
||||||
]
|
]
|
||||||
machine.setData(Data(bytes: program), atAddress: 0x0000)
|
machine.setData(Data(_: program), atAddress: 0x0000)
|
||||||
machine.setValue(0, for: .memPtr)
|
machine.setValue(0, for: .memPtr)
|
||||||
|
|
||||||
for c in 1 ..< 65536 {
|
for c in 1 ..< 65536 {
|
||||||
|
Loading…
Reference in New Issue
Block a user