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

Function _rcntTestTarget

pcsx2/IopCounters.cpp:239–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239static void _rcntTestTarget(int i)
240{
241 if (psxCounters[i].count < psxCounters[i].target)
242 return;
243
244 PSXCNT_LOG("IOP Counter[%d] target 0x%I64x >= 0x%I64x (mode: %x)",
245 i, psxCounters[i].count, psxCounters[i].target, psxCounters[i].mode.modeval);
246
247 if (psxCounters[i].mode.targetIntr)
248 {
249 // Target interrupt
250 _rcntFireInterrupt(i, false);
251 }
252
253 psxCounters[i].mode.targetFlag = true;
254
255 if (psxCounters[i].mode.zeroReturn)
256 {
257 // Reset on target
258 psxCounters[i].count -= psxCounters[i].target;
259 }
260 else
261 psxCounters[i].target |= IOPCNT_FUTURE_TARGET;
262}
263
264
265static __fi void _rcntTestOverflow(int i)

Callers 2

psxHBlankStartFunction · 0.85
psxRcntUpdateFunction · 0.85

Calls 1

_rcntFireInterruptFunction · 0.85

Tested by

no test coverage detected