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

Function _cpuTestTarget

pcsx2/Counters.cpp:681–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

679}
680
681static __fi void _cpuTestTarget(int i)
682{
683 if (counters[i].count < counters[i].target)
684 return;
685
686 if (counters[i].mode.TargetInterrupt)
687 {
688 EECNT_LOG("EE Counter[%d] TARGET reached - mode=%x, count=%x, target=%x", i, counters[i].mode, counters[i].count, counters[i].target);
689 if (!counters[i].mode.TargetReached)
690 {
691 counters[i].mode.TargetReached = 1;
692 hwIntcIrq(counters[i].interrupt);
693 }
694 }
695
696 if (counters[i].mode.ZeroReturn)
697 counters[i].count -= counters[i].target; // Reset on target
698 else
699 counters[i].target |= EECNT_FUTURE_TARGET; // OR with future target to prevent a retrigger
700}
701
702static __fi void _cpuTestOverflow(int i)
703{

Callers 2

rcntUpdateFunction · 0.85
rcntStartGateFunction · 0.85

Calls 1

hwIntcIrqFunction · 0.85

Tested by

no test coverage detected