mirror of https://github.com/PCSX2/pcsx2.git
Bugfixed bad behavior when using BiosSkip and doing interface-ish things while the stub was running.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2353 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
f34f3ac0c4
commit
820c9c10ee
|
@ -391,10 +391,17 @@ static void intExecute()
|
||||||
static void intExecuteBiosStub()
|
static void intExecuteBiosStub()
|
||||||
{
|
{
|
||||||
g_EEFreezeRegs = false;
|
g_EEFreezeRegs = false;
|
||||||
Console.WriteLn( Color_StrongGreen, "(R5900-Interp) Executing Bios Stub..." );
|
|
||||||
while( (cpuRegs.pc != 0x00200008) && (cpuRegs.pc != 0x00100008) ) {
|
// We need to be weary of events that could occur during vsyncs, which means
|
||||||
execI();
|
// making sure to exit this function for ExitCpuExecute. The calling function
|
||||||
}
|
// will update UI status, and then re-enter if the bios stub execution criteria
|
||||||
|
// wasn't met yet.
|
||||||
|
|
||||||
|
try {
|
||||||
|
while( (cpuRegs.pc != 0x00200008) && (cpuRegs.pc != 0x00100008) ) {
|
||||||
|
execI();
|
||||||
|
}
|
||||||
|
} catch( Exception::ExitCpuExecute& ) { }
|
||||||
|
|
||||||
// ... some maual bios injection hack from a century ago, me thinks. Leaving the
|
// ... some maual bios injection hack from a century ago, me thinks. Leaving the
|
||||||
// code intact for posterity. --air
|
// code intact for posterity. --air
|
||||||
|
@ -409,8 +416,6 @@ static void intExecuteBiosStub()
|
||||||
// fwrite(PS2MEM_PSX, 0x80000, 1, f);
|
// fwrite(PS2MEM_PSX, 0x80000, 1, f);
|
||||||
// fclose(f);
|
// fclose(f);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
Console.WriteLn( Color_StrongGreen, "(R5900-Interp) Execute Bios Stub Complete");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void intCheckExecutionState()
|
static void intCheckExecutionState()
|
||||||
|
|
|
@ -249,7 +249,7 @@ void SysCoreThread::_reset_stuff_as_needed()
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_resetVsyncTimers )
|
if( m_resetVsyncTimers )
|
||||||
{
|
{
|
||||||
UpdateVSyncRate();
|
UpdateVSyncRate();
|
||||||
frameLimitReset();
|
frameLimitReset();
|
||||||
m_resetVsyncTimers = false;
|
m_resetVsyncTimers = false;
|
||||||
|
@ -313,7 +313,19 @@ void SysCoreThread::CpuInitializeMess()
|
||||||
// effects).
|
// effects).
|
||||||
|
|
||||||
SetCPUState( EmuConfig.Cpu.sseMXCSR, EmuConfig.Cpu.sseVUMXCSR );
|
SetCPUState( EmuConfig.Cpu.sseMXCSR, EmuConfig.Cpu.sseVUMXCSR );
|
||||||
Cpu->ExecuteBiosStub();
|
|
||||||
|
Console.WriteLn( Color_StrongGreen, "(PCSX2 Core) Executing Bios Stub..." );
|
||||||
|
|
||||||
|
do {
|
||||||
|
// Even the BiosStub invokes vsyncs, so we need to be weary of state
|
||||||
|
// changes and premature loop exits, and re-enter the stub executer until
|
||||||
|
// the critera is met.
|
||||||
|
|
||||||
|
StateCheckInThread();
|
||||||
|
Cpu->ExecuteBiosStub();
|
||||||
|
} while( cpuRegs.pc != 0x00200008 && cpuRegs.pc != 0x00100008 );
|
||||||
|
|
||||||
|
Console.WriteLn( Color_StrongGreen, "(PCSX2 Core) Execute Bios Stub Complete");
|
||||||
loadElfFile( elf_file );
|
loadElfFile( elf_file );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -735,16 +735,9 @@ static void recExecute()
|
||||||
|
|
||||||
static void recExecuteBiosStub()
|
static void recExecuteBiosStub()
|
||||||
{
|
{
|
||||||
Console.WriteLn( Color_StrongGreen, "(R5900-32) Executing Bios Stub..." );
|
|
||||||
g_ExecBiosHack = true;
|
g_ExecBiosHack = true;
|
||||||
|
|
||||||
recExecute();
|
recExecute();
|
||||||
pxAssertDev( cpuRegs.pc == 0x00200008 || cpuRegs.pc == 0x00100008,
|
|
||||||
"Bios stub execution terminated on an abnormal address."
|
|
||||||
);
|
|
||||||
|
|
||||||
g_ExecBiosHack = false;
|
g_ExecBiosHack = false;
|
||||||
Console.WriteLn( Color_StrongGreen, "(R5900-32) Execute Bios Stub Complete");
|
|
||||||
|
|
||||||
// Reset the EErecs here, because the bios generates "slow" blocks that have
|
// Reset the EErecs here, because the bios generates "slow" blocks that have
|
||||||
// g_ExecBiosHack checks in them. This deletes them so that the recs replace them
|
// g_ExecBiosHack checks in them. This deletes them so that the recs replace them
|
||||||
|
|
Loading…
Reference in New Issue