mirror of https://github.com/snes9xgit/snes9x.git
CPU: Stop emulation if CPU is deadlocked.
This commit is contained in:
parent
986dd2a061
commit
fdcff015dc
|
@ -143,6 +143,14 @@ void S9xMainLoop (void)
|
||||||
Op = CPU.PCBase[Registers.PCw];
|
Op = CPU.PCBase[Registers.PCw];
|
||||||
CPU.Cycles += CPU.MemSpeed;
|
CPU.Cycles += CPU.MemSpeed;
|
||||||
Opcodes = ICPU.S9xOpcodes;
|
Opcodes = ICPU.S9xOpcodes;
|
||||||
|
|
||||||
|
if (CPU.Cycles > 1000000)
|
||||||
|
{
|
||||||
|
Settings.StopEmulation = true;
|
||||||
|
CPU.Flags |= HALTED_FLAG;
|
||||||
|
S9xMessage(S9X_FATAL_ERROR, 0, "CPU is deadlocked");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue