1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-29 16:55:59 +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:
Thomas Harte 2017-05-17 07:36:06 -04:00
parent 87a021ec2d
commit 1378ab7278
2 changed files with 4 additions and 1 deletions

View File

@ -18,6 +18,9 @@ class ZexallTests: XCTestCase {
let machine = CSTestMachineZ80()
machine.setData(testData, atAddress: 0x0100)
machine.setValue(0x0100, for: .programCounter)
machine.setValue(0xffff, for: .stackPointer)
machine.runForNumber(ofCycles: 20)
}
}

View File

@ -146,7 +146,7 @@ template <class T> class Processor: public MicroOpScheduler<MicroOp> {
if(number_of_cycles_ < operation->machine_cycle.cycle_length()) {
return;
}
perform_machine_cycle(&operation->machine_cycle);
static_cast<T *>(this)->perform_machine_cycle(&operation->machine_cycle);
break;
case MicroOp::MoveToNextProgram:
move_to_next_program();