"Windows Timer Resolution" changed behaviour in Windows 10 (2004)
#1
https://randomascii.wordpress.com/2020/1...le-change/

Unsure if this is something PCSX2 devs need to be aware of.
Computer specifications:
Windows 10 | Ryzen 3700X | ASUS Crosshair VIII Hero (WiFi) | MSI 1070Ti | 16GB 3600MHz RAM
Reply

Sponsored links

#2
Why, actually yes this is very helpful to know for an upcoming PR. Thank you for sharing.
Reply
#3
Ah yeah, this PR https://github.com/PCSX2/pcsx2/pull/3785

Will this improved frame pacing also affect things without the FPS limiter set? Is frame pacing already as good as it's going to be without a FPS limiter set?
Computer specifications:
Windows 10 | Ryzen 3700X | ASUS Crosshair VIII Hero (WiFi) | MSI 1070Ti | 16GB 3600MHz RAM
Reply
#4
The changes only apply to when the framelimiter is active. Disabling the framelimiter will still run as fast as physically possible with no regard for pace.
Reply
#5
Actually I never realized the FPS Limiter was active by default xD so the improvement would affect me, unless I turn it off and use Vsync instead with my 50/60Hz display.

Edit: And of course configure PCSX2 to run at 60FPS for NTSC instead of 59.4.
Computer specifications:
Windows 10 | Ryzen 3700X | ASUS Crosshair VIII Hero (WiFi) | MSI 1070Ti | 16GB 3600MHz RAM
Reply
#6
This is independent of vsync as well. That helps with synchronization to your monitor, but not within the emulator core itself.

Think of it this way. The emulation threads have to accomplish a number of tasks in order to prepare one frame of PS2 video. There is no guarantee how long it will take for any one series of tasks to complete, but in order to output 59.94 frames per second (standard, final output FPS of a PS2 to a TV in the US), this means no one frame may take more than 16.6 milliseconds, otherwise you will experience an emulation slowdown.

On a reasonably powerful PC, this is achievable with some time to spare. The emulator may accomplish this in say, 8 milliseconds, at which point the emulation threads say "ok, done, here's your frame, tell me when I can start the next". When the framelimiter is disabled, the emulator says "ok thanks for the frame, start your next one now". So you are starting a new frame less than halfway through the time it was supposed to take a normal PS2 to output it. The result? Your system is running twice as fast as it normally would.

When the framelimiter is enabled, it basically stalls in place. It will sit there and wait until all 16.6 milliseconds have passed, then finally tell the emulation threads "ok thanks, start your next one now". This is what keeps the emulator running at a normal speed.

Up until this point the code was a bit... odd. It allowed a lot of wiggle room when it tried to determine if all 16.6 milliseconds had passed. We've tightened those tolerances up and it seems to have worked wonders.
Reply
#7
Thank you for the layman insight, it's very interesting.

I reconfigure the vm.ini and change the NTSC FPS to 60 because at the default 59.94 I experience rhythmic bursts of stutter that occurs every couple seconds and lasts around 1 to 1.5 seconds each time. Presumably because 59.94 FPS is not suitable for a 60 Hz display. I'm fine with games running ever so marginally faster than intended.

It's very awesome that it's configurable, there's a bunch of cool emulators out there that seemingly don't make it easy to adjust their internal FPS while the system they emulate doesn't run at a FPS suitable for most PC monitors.
Computer specifications:
Windows 10 | Ryzen 3700X | ASUS Crosshair VIII Hero (WiFi) | MSI 1070Ti | 16GB 3600MHz RAM
Reply




Users browsing this thread: 1 Guest(s)