mirror of https://github.com/PCSX2/pcsx2.git
EE/IOP Sync: Calculate IOP interrupt delta after running IOP
This commit is contained in:
parent
05b064d513
commit
443adcdd5b
|
@ -433,8 +433,6 @@ __fi void _cpuEventTest_Shared()
|
||||||
if (EEsCycle > 0)
|
if (EEsCycle > 0)
|
||||||
iopEventAction = true;
|
iopEventAction = true;
|
||||||
|
|
||||||
iopEventTest();
|
|
||||||
|
|
||||||
if (iopEventAction)
|
if (iopEventAction)
|
||||||
{
|
{
|
||||||
//if( EEsCycle < -450 )
|
//if( EEsCycle < -450 )
|
||||||
|
@ -445,6 +443,8 @@ __fi void _cpuEventTest_Shared()
|
||||||
iopEventAction = false;
|
iopEventAction = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iopEventTest();
|
||||||
|
|
||||||
// ---- VU Sync -------------
|
// ---- VU Sync -------------
|
||||||
// We're in a EventTest. All dynarec registers are flushed
|
// We're in a EventTest. All dynarec registers are flushed
|
||||||
// so there is no need to freeze registers here.
|
// so there is no need to freeze registers here.
|
||||||
|
@ -461,13 +461,12 @@ __fi void _cpuEventTest_Shared()
|
||||||
cpuSetNextEventDelta(48);
|
cpuSetNextEventDelta(48);
|
||||||
//Console.Warning( "EE ahead of the IOP -- Rapid Event! %d", EEsCycle );
|
//Console.Warning( "EE ahead of the IOP -- Rapid Event! %d", EEsCycle );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
// The IOP could be running ahead/behind of us, so adjust the iop's next branch by its
|
{
|
||||||
// relative position to the EE (via EEsCycle)
|
// The IOP could be running ahead/behind of us, so adjust the iop's next branch by its
|
||||||
cpuSetNextEventDelta(((psxRegs.iopNextEventCycle - psxRegs.cycle) * 8) - EEsCycle);
|
// relative position to the EE (via EEsCycle)
|
||||||
|
cpuSetNextEventDelta(((psxRegs.iopNextEventCycle - psxRegs.cycle) * 8) - EEsCycle);
|
||||||
// Apply the hsync counter's nextCycle
|
}
|
||||||
cpuSetNextEvent(hsyncCounter.sCycle, hsyncCounter.CycleT);
|
|
||||||
|
|
||||||
// Apply vsync and other counter nextCycles
|
// Apply vsync and other counter nextCycles
|
||||||
cpuSetNextEvent(nextsCounter, nextCounter);
|
cpuSetNextEvent(nextsCounter, nextCounter);
|
||||||
|
|
Loading…
Reference in New Issue