Pseudo-halt timing fix

This commit is contained in:
2024-10-23 21:16:35 -05:00
parent 0c914fce1a
commit bcd80d291b
3 changed files with 20 additions and 8 deletions
+3 -1
View File
@@ -121,11 +121,12 @@ static int phMatches(VB *sim, uint32_t address, int type, int32_t value) {
return
sim->ph.adtre == sim->cpu.adtre &&
sim->ph.chcw == cpuGetSystemRegister(sim, VB_CHCW) &&
sim->ph.ecr == cpuGetSystemRegister(sim, VB_ECR) &&
sim->ph.eipc == sim->cpu.eipc &&
sim->ph.eipsw == sim->cpu.eipsw &&
sim->ph.fepc == sim->cpu.fepc &&
sim->ph.fepsw == sim->cpu.fepsw &&
sim->ph.psw == cpuGetSystemRegister(sim, VB_PSW)
sim->ph.psw == cpuGetSystemRegister(sim, VB_PSW )
;
}
@@ -229,6 +230,7 @@ static int phAssess(VB *sim, uint32_t address, int type, int32_t value) {
sim->ph.program[x - 1] = sim->cpu.program[x];
sim->ph.adtre = sim->cpu.adtre;
sim->ph.chcw = cpuGetSystemRegister(sim, VB_CHCW);
sim->ph.ecr = cpuGetSystemRegister(sim, VB_ECR);
sim->ph.eipc = sim->cpu.eipc;
sim->ph.eipsw = sim->cpu.eipsw;
sim->ph.fepc = sim->cpu.fepc;