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

Function rcntWcount

pcsx2/Counters.cpp:911–927  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

909}
910
911static __fi void rcntWcount(int index, u32 value)
912{
913 EECNT_LOG("EE Counter[%d] writeCount = %x, oldcount=%x, target=%x", index, value, counters[index].count, counters[index].target);
914
915 // re-calculate the start cycle of the counter based on elapsed time since the last counter update:
916 rcntSyncCounter(index);
917
918 counters[index].count = value & 0xffff;
919
920 // reset the target, and make sure we don't get a premature target.
921 counters[index].target &= 0xffff;
922
923 if (counters[index].count >= counters[index].target)
924 counters[index].target |= EECNT_FUTURE_TARGET;
925
926 _rcntSet(index);
927}
928
929static __fi void rcntWtarget(int index, u32 value)
930{

Callers 1

rcntWrite32Function · 0.85

Calls 2

rcntSyncCounterFunction · 0.85
_rcntSetFunction · 0.70

Tested by

no test coverage detected