summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-11-06 07:08:18 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-11-06 07:08:18 +0000
commitcfad1bef056109099d4bc69a1dd357aadc447c62 (patch)
tree1455280be7fc33e7023f30cdc89ca47279cf6e07
parent2e8af3ea7ea8ef7867c10bfbfdedb65109b565b3 (diff)
Re-added suspend/resume synchronization to fix a few games.
-rw-r--r--src/emu/cpuexec.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/emu/cpuexec.c b/src/emu/cpuexec.c
index 1cb4e63678f..dbef58ac73e 100644
--- a/src/emu/cpuexec.c
+++ b/src/emu/cpuexec.c
@@ -319,6 +319,10 @@ void cpuexec_timeslice(running_machine *machine)
cpudata->localtime = attotime_add_attoseconds(cpudata->localtime, cycles_running * attoseconds_per_cycle[cpunum]);
LOG((" %d skipped, %d total, time = %s\n", cycles_running, (INT32)cpudata->totalcycles, attotime_string(cpudata->localtime, 9)));
}
+
+ /* update the suspend state (breaks steeltal if we don't) */
+ cpudata->suspend = cpudata->nextsuspend;
+ cpudata->eatcycles = cpudata->nexteatcycles;
}
/* update the global time */
@@ -377,6 +381,8 @@ void cpunum_suspend(int cpunum, int reason, int eatcycles)
LOG(("cpunum_suspend (CPU=%d, r=%X, eat=%d)\n", cpunum, reason, eatcycles));
cpu[cpunum].nextsuspend |= reason;
cpu[cpunum].nexteatcycles = eatcycles;
+ if (cpu_getexecutingcpu() >= 0)
+ activecpu_abort_timeslice();
}
@@ -390,6 +396,8 @@ void cpunum_resume(int cpunum, int reason)
VERIFY_CPUNUM(cpunum_resume);
LOG(("cpunum_resume (CPU=%d, r=%X)\n", cpunum, reason));
cpu[cpunum].nextsuspend &= ~reason;
+ if (cpu_getexecutingcpu() >= 0)
+ activecpu_abort_timeslice();
}