| 179 | } |
| 180 | |
| 181 | static __fi void _psxTestInterrupts() |
| 182 | { |
| 183 | IopTestEvent(IopEvt_SIF0, sif0Interrupt); // SIF0 |
| 184 | IopTestEvent(IopEvt_SIF1, sif1Interrupt); // SIF1 |
| 185 | IopTestEvent(IopEvt_SIF2, sif2Interrupt); // SIF2 |
| 186 | Sio0TestEvent(IopEvt_SIO); |
| 187 | IopTestEvent(IopEvt_CdvdSectorReady, cdvdSectorReady); |
| 188 | IopTestEvent(IopEvt_CdvdRead, cdvdReadInterrupt); |
| 189 | |
| 190 | // Profile-guided Optimization (sorta) |
| 191 | // The following ints are rarely called. Encasing them in a conditional |
| 192 | // as follows helps speed up most games. |
| 193 | |
| 194 | if( psxRegs.interrupt & ((1 << IopEvt_Cdvd) | (1 << IopEvt_Dma11) | (1 << IopEvt_Dma12) |
| 195 | | (1 << IopEvt_Cdrom) | (1 << IopEvt_CdromRead) | (1 << IopEvt_DEV9) | (1 << IopEvt_USB))) |
| 196 | { |
| 197 | IopTestEvent(IopEvt_Cdvd, cdvdActionInterrupt); |
| 198 | IopTestEvent(IopEvt_Dma11, psxDMA11Interrupt); // SIO2 |
| 199 | IopTestEvent(IopEvt_Dma12, psxDMA12Interrupt); // SIO2 |
| 200 | IopTestEvent(IopEvt_Cdrom, cdrInterrupt); |
| 201 | IopTestEvent(IopEvt_CdromRead, cdrReadInterrupt); |
| 202 | IopTestEvent(IopEvt_DEV9, dev9Interrupt); |
| 203 | IopTestEvent(IopEvt_USB, usbInterrupt); |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | __ri void iopEventTest() |
| 208 | { |
no test coverage detected