Finalizing breakpoint architecture, correcting CPU conditions, tweaking top-level emulation logic
This commit is contained in:
+4
-3
@@ -436,7 +436,7 @@ static int8_t cpuTestCondition(Vue *vue, int32_t condition) {
|
||||
case 3: return vue->cpu.psw_cy | vue->cpu.psw_z;
|
||||
case 4: return vue->cpu.psw_s;
|
||||
case 5: return 1;
|
||||
case 6: return vue->cpu.psw_ov | vue->cpu.psw_s;
|
||||
case 6: return vue->cpu.psw_ov ^ vue->cpu.psw_s;
|
||||
case 7: return (vue->cpu.psw_ov ^ vue->cpu.psw_s) | vue->cpu.psw_z;
|
||||
}
|
||||
return cpuTestCondition(vue, condition & 7) ^ 1;
|
||||
@@ -1174,8 +1174,8 @@ static vbool cpuException(Vue *vue) {
|
||||
/* Process the simulation */
|
||||
static void cpuEmulate(Vue *vue, int32_t cycles) {
|
||||
|
||||
/* The CPU is in permanent halt */
|
||||
if (vue->cpu.stage == CPU_FATAL)
|
||||
/* The CPU is halting */
|
||||
if (vue->cpu.stage == CPU_FATAL || vue->cpu.stage == CPU_HALT)
|
||||
return;
|
||||
|
||||
vue->cpu.cycles = 0; /* DEBUG: Stop processing after execute */
|
||||
@@ -1190,6 +1190,7 @@ vue->cpu.cycles = 0; /* DEBUG: Stop processing after execute */
|
||||
}
|
||||
|
||||
/* Processing by stage */
|
||||
vue->cpu.cycles = 0;
|
||||
switch (vue->cpu.stage) {
|
||||
case CPU_EXCEPTION: if (cpuException (vue)) return; break;
|
||||
case CPU_EXECUTE : if (cpuExecute (vue)) return; break;
|
||||
|
||||
Reference in New Issue
Block a user