flyinghead / flycast

Flycast is a multiplatform Sega Dreamcast, Naomi, Naomi 2 and Atomiswave emulator
GNU General Public License v2.0
1.3k stars 163 forks source link

Abysmal frame pacing #1459

Closed Zeromus24 closed 2 months ago

Zeromus24 commented 4 months ago

Platform / OS / Hardware: Windows 11, Intel i5-11300H, RTX 3050

Github hash: https://github.com/flyinghead/flycast/commit/c1f0a5a15f07ba82ccb974e5c7dc82206324b0a3

Issue description Frame pacing is absolutely abysmal on every game that I have tested. Instead of hitting a stable 33.3ms or 16.6, it just throws a frame whenever it wants. As a result, gameplay is never smooth.

Debugging Steps Tested

Screenshots

image 60FPS game, Crazy Taxi

image 30FPS game, Skies of Archadia

As reference, this is how the frame times look on another emulator running the same game: image

flyinghead commented 4 months ago

Use another emulator

Zeromus24 commented 4 months ago

Use another emulator

That was just for a point of reference on how the histogram should look like, I mean no offense! I simply noticed an issue, and I reported it.

flyinghead commented 2 months ago

I'd be interested in knowing which other Dreamcast emulator has a vulkan renderer.

Zeromus24 commented 2 months ago

It was actually Dolphin, not a Dreamcast emulator. Perhaps I shouldn't have mentioned an emulator there. It wasn't a direct comparison, I just wanted to show what a frame time graph should look like.

Zeromus24 commented 2 months ago

Also it's not ideal, but a workaround to this problem is to enable both frame duplication and VRR. G-Sync smoothes out the judders pretty well. But this still isn't ideal as VRR displays aren't very commonplace.

blueminder commented 2 months ago

FWIW, I added Fixed Frequency frame pacing as the default in Flycast Dojo. It's CPU-heavy though, so I plan on optimizing it further.

https://github.com/blueminder/flycast-dojo/

Zeromus24 commented 2 months ago

Yeah, frame pacing seems to work correctly on your fork. image