mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-01-31 01:15:24 +01:00
R3000A/R5900: Refactor interpreter/recompiler exits
Now, IOP breakpoints work nice and reliably in both interpreter and recompiler, exiting as soon as possible, without leaving the event state indeterminate.
This commit is contained in:
committed by
refractionpcsx2
parent
25e15a16b1
commit
3801825793
@@ -270,24 +270,29 @@ static void intReset() {
|
||||
intAlloc();
|
||||
}
|
||||
|
||||
static void intExecute() {
|
||||
for (;;) execI();
|
||||
}
|
||||
|
||||
static s32 intExecuteBlock( s32 eeCycles )
|
||||
{
|
||||
iopBreak = 0;
|
||||
iopCycleEE = eeCycles;
|
||||
|
||||
while (iopCycleEE > 0){
|
||||
if ((psxHu32(HW_ICFG) & 8) && ((psxRegs.pc & 0x1fffffffU) == 0xa0 || (psxRegs.pc & 0x1fffffffU) == 0xb0 || (psxRegs.pc & 0x1fffffffU) == 0xc0))
|
||||
psxBiosCall();
|
||||
try
|
||||
{
|
||||
while (iopCycleEE > 0) {
|
||||
if ((psxHu32(HW_ICFG) & 8) && ((psxRegs.pc & 0x1fffffffU) == 0xa0 || (psxRegs.pc & 0x1fffffffU) == 0xb0 || (psxRegs.pc & 0x1fffffffU) == 0xc0))
|
||||
psxBiosCall();
|
||||
|
||||
branch2 = 0;
|
||||
while (!branch2) {
|
||||
execI();
|
||||
}
|
||||
branch2 = 0;
|
||||
while (!branch2) {
|
||||
execI();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception::ExitCpuExecute&)
|
||||
{
|
||||
// Get out of the EE too, regardless of whether it's int or rec.
|
||||
Cpu->ExitExecution();
|
||||
}
|
||||
|
||||
return iopBreak + iopCycleEE;
|
||||
}
|
||||
|
||||
@@ -309,7 +314,6 @@ static uint intGetCacheReserve()
|
||||
R3000Acpu psxInt = {
|
||||
intReserve,
|
||||
intReset,
|
||||
intExecute,
|
||||
intExecuteBlock,
|
||||
intClear,
|
||||
intShutdown,
|
||||
|
||||
Reference in New Issue
Block a user