MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / PSX_INT

Function PSX_INT

pcsx2/R3000A.cpp:127–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127__fi void PSX_INT( IopEventId n, s32 ecycle )
128{
129 // 19 is CDVD read int, it's supposed to be high.
130 //if (ecycle > 8192 && n != 19)
131 // DevCon.Warning( "IOP cycles high: %d, n %d", ecycle, n );
132
133 psxRegs.interrupt |= 1 << n;
134
135 psxRegs.sCycle[n] = psxRegs.cycle;
136 psxRegs.eCycle[n] = ecycle;
137
138 psxSetNextBranchDelta(ecycle);
139 const float mutiplier = static_cast<float>(PS2CLK) / static_cast<float>(PSXCLK);
140 const s32 iopDelta = (psxRegs.iopNextEventCycle - psxRegs.cycle) * mutiplier;
141
142 if (psxRegs.iopCycleEE < iopDelta)
143 {
144 // The EE called this int, so inform it to branch as needed:
145
146 cpuSetNextEventDelta(iopDelta - psxRegs.iopCycleEE);
147 }
148}
149
150static __fi void IopTestEvent( IopEventId n, void (*callback)() )
151{

Callers 12

psxDma11Function · 0.85
psxDma12Function · 0.85
dev9IrqFunction · 0.85
usbIrqFunction · 0.85
EndIOPFunction · 0.85
EndIOPFunction · 0.85
EndIOPFunction · 0.85
InterruptMethod · 0.85
CDVDSECTORREADY_INTFunction · 0.85
CDVDREAD_INTFunction · 0.85
CDVD_INTFunction · 0.85
psxDma3Function · 0.85

Calls 2

psxSetNextBranchDeltaFunction · 0.85
cpuSetNextEventDeltaFunction · 0.85

Tested by

no test coverage detected