| 166 | static vSyncTimingInfo vSyncInfo; |
| 167 | |
| 168 | void 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 | |
| 203 | static void vSyncInfoCalc(vSyncTimingInfo* info, double framesPerSecond, u32 scansPerFrame) |
| 204 | { |
no test coverage detected