mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-19 23:29:05 +00:00
Ensured initial program counter and stack pointer are correct for Zexall, fixed the Z80 to use a compile-time polymorphic call for bus access.
This commit is contained in:
parent
87a021ec2d
commit
1378ab7278
@ -18,6 +18,9 @@ class ZexallTests: XCTestCase {
|
|||||||
let machine = CSTestMachineZ80()
|
let machine = CSTestMachineZ80()
|
||||||
machine.setData(testData, atAddress: 0x0100)
|
machine.setData(testData, atAddress: 0x0100)
|
||||||
|
|
||||||
|
machine.setValue(0x0100, for: .programCounter)
|
||||||
|
machine.setValue(0xffff, for: .stackPointer)
|
||||||
|
|
||||||
machine.runForNumber(ofCycles: 20)
|
machine.runForNumber(ofCycles: 20)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ template <class T> class Processor: public MicroOpScheduler<MicroOp> {
|
|||||||
if(number_of_cycles_ < operation->machine_cycle.cycle_length()) {
|
if(number_of_cycles_ < operation->machine_cycle.cycle_length()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
perform_machine_cycle(&operation->machine_cycle);
|
static_cast<T *>(this)->perform_machine_cycle(&operation->machine_cycle);
|
||||||
break;
|
break;
|
||||||
case MicroOp::MoveToNextProgram:
|
case MicroOp::MoveToNextProgram:
|
||||||
move_to_next_program();
|
move_to_next_program();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user