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

Function cpuRcntSet

pcsx2/Counters.cpp:127–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125
126
127static __fi void cpuRcntSet()
128{
129 int i;
130
131 // Default to next VBlank
132 nextStartCounter = cpuRegs.cycle;
133 nextDeltaCounter = vsyncCounter.deltaCycles - (cpuRegs.cycle - vsyncCounter.startCycle);
134
135 // Also check next HSync
136 s32 nextHsync = hsyncCounter.deltaCycles - (cpuRegs.cycle - hsyncCounter.startCycle);
137 if (nextHsync < nextDeltaCounter)
138 nextDeltaCounter = nextHsync;
139
140 for (i = 0; i < 4; i++)
141 _rcntSet(i);
142
143 // sanity check!
144 if (nextDeltaCounter < 0)
145 nextDeltaCounter = 0;
146
147 cpuSetNextEvent(nextStartCounter, nextDeltaCounter); // Need to update on counter resets/target changes
148}
149
150
151struct vSyncTimingInfo

Callers 4

rcntInitFunction · 0.85
UpdateVSyncRateFunction · 0.85
rcntUpdateFunction · 0.85
rcntFreezeMethod · 0.85

Calls 2

cpuSetNextEventFunction · 0.85
_rcntSetFunction · 0.70

Tested by

no test coverage detected