| 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 | |
| 150 | static __fi void IopTestEvent( IopEventId n, void (*callback)() ) |
| 151 | { |
no test coverage detected