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

Function rcntInit

pcsx2/Counters.cpp:168–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166static vSyncTimingInfo vSyncInfo;
167
168void rcntInit()
169{
170 int i;
171
172 g_FrameCount = 0;
173
174 std::memset(counters, 0, sizeof(counters));
175
176 for (i = 0; i < 4; i++)
177 {
178 counters[i].rate = 2;
179 counters[i].target = 0xffff;
180 }
181 counters[0].interrupt = 9;
182 counters[1].interrupt = 10;
183 counters[2].interrupt = 11;
184 counters[3].interrupt = 12;
185
186 std::memset(&vSyncInfo, 0, sizeof(vSyncInfo));
187
188 gsVideoMode = GS_VideoMode::Uninitialized;
189 gsIsInterlaced = VMManager::Internal::IsFastBootInProgress();
190
191 hsyncCounter.Mode = MODE_HRENDER;
192 hsyncCounter.startCycle = cpuRegs.cycle;
193 hsyncCounter.deltaCycles = vSyncInfo.hRender;
194 vsyncCounter.Mode = MODE_VRENDER;
195 vsyncCounter.deltaCycles = vSyncInfo.Render;
196 vsyncCounter.startCycle = cpuRegs.cycle;
197
198 for (i = 0; i < 4; i++)
199 rcntReset(i);
200 cpuRcntSet();
201}
202
203static void vSyncInfoCalc(vSyncTimingInfo* info, double framesPerSecond, u32 scansPerFrame)
204{

Callers 1

hwResetFunction · 0.85

Calls 2

rcntResetFunction · 0.85
cpuRcntSetFunction · 0.85

Tested by

no test coverage detected