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

Function _cpuTestOverflow

pcsx2/Counters.cpp:702–720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

700}
701
702static __fi void _cpuTestOverflow(int i)
703{
704 if (counters[i].count <= 0xffff)
705 return;
706
707 if (counters[i].mode.OverflowInterrupt)
708 {
709 EECNT_LOG("EE Counter[%d] OVERFLOW - mode=%x, count=%x", i, counters[i].mode, counters[i].count);
710 if (!counters[i].mode.OverflowReached)
711 {
712 counters[i].mode.OverflowReached = 1;
713 hwIntcIrq(counters[i].interrupt);
714 }
715 }
716
717 // wrap counter back around zero, and enable the future target:
718 counters[i].count -= 0x10000;
719 counters[i].target &= 0xffff;
720}
721
722
723__fi bool rcntCanCount(int i)

Callers 2

rcntUpdateFunction · 0.85
rcntStartGateFunction · 0.85

Calls 1

hwIntcIrqFunction · 0.85

Tested by

no test coverage detected