| 243 | } |
| 244 | |
| 245 | static __fi void TESTINT( u8 n, void (*callback)() ) |
| 246 | { |
| 247 | if( !(cpuRegs.interrupt & (1 << n)) ) return; |
| 248 | |
| 249 | if(CHECK_INSTANTDMAHACK || cpuTestCycle( cpuRegs.sCycle[n], cpuRegs.eCycle[n] ) ) |
| 250 | { |
| 251 | cpuClearInt( n ); |
| 252 | callback(); |
| 253 | } |
| 254 | else |
| 255 | cpuSetNextEvent( cpuRegs.sCycle[n], cpuRegs.eCycle[n] ); |
| 256 | } |
| 257 | |
| 258 | // [TODO] move this function to Dmac.cpp, and remove most of the DMAC-related headers from |
| 259 | // being included into R5900.cpp. |
no test coverage detected