Previous Thread
Next Thread
Print Thread
Difficulty keeping bgfx framerate at 100% #115115 04/20/19 02:55 AM
Joined: Jan 2009
Posts: 51
P
Procyon Offline OP
Member
OP Offline
Member
P
Joined: Jan 2009
Posts: 51
I got a brand new rig the other night, and I was testing various MAME configurations. I enabled bgfx with the crt-geom-deluxe shader, and I typically display cropped artwork. I started playing some Pac-Man, and I noticed that the sound would hitch every once in a while, so I hit F11 to see the framerate. Sure enough, it hovered consistently at 99%. The same was true for Donkey Kong. Q*Bert was worse, dipping between 97% and 98%. Oddly enough, games like Vs. Super Mario Bros., and many NeoGeo titles had no problem staying at 100%. I started to think it was a horizontal vs. vertical thing, but I tried Gradius II, and it too hovered around 99%.

I tried a bunch of combinations to combat this, including turning all artwork off, but nothing really fixed the problem. Switching to d3d or opengl causes the problem to go away completely. In these modes, I can overclock Pac-Man to over 6000%. I know bgfx requires more horsepower, but don't really understand why it struggles like this. CPU is a Core i7-9700K and I know the graphics card doesn't really matter, but I'm using an nVidia RTX 2070, outputting to a 1080p HDTV via an HDMI cable, so the resolution is just the native 1920 x 1080.

Can anyone shed any light on this? I've got VSync turned on, I needed it because the screen tearing was so bad on a few titles. But I doubt that's the issue here. Thanks.

Re: Difficulty keeping bgfx framerate at 100% [Re: Procyon] #115117 04/20/19 07:52 AM
Joined: Aug 2002
Posts: 354
H
Heihachi_73 Offline
Senior Member
Offline
Senior Member
H
Joined: Aug 2002
Posts: 354
Does it happen with vsync turned off? It sounds like the usual case of Pac-Man trying to run on a 60Hz display. Pac-Man runs at ~60.61fps and MAME (or the OS/video card) is trying to sync it to exactly 60Hz which pretty much means 99% speed. It happens with all games that run faster than 60fps regardless of the hardware (e.g. even the Aristocrat MK5 slots do that but will sit on 96% instead because they run at around 63fps).

Vs. Super Mario Bros is probably the same speed as the NES version e.g. 59.94fps (NTSC) so it doesn't show any issues. Heading in the other direction there is Mortal Kombat 1/2/3, IIRC they only ran at around 53Hz in the arcade, which is why the console versions always seemed faster.

This has always been one of my pet peeves with LCD/plasma etc. over the years, when they refuse to operate at anything besides 60Hz even though the display itself shouldn't care. My crappy old PC CRT from 2004 is quite happy running in 1600x1200 at 75Hz!

Re: Difficulty keeping bgfx framerate at 100% [Re: Heihachi_73] #115118 04/20/19 11:18 AM
Joined: Jun 2013
Posts: 32
K
Kaede Offline
Member
Offline
Member
K
Joined: Jun 2013
Posts: 32
Originally Posted by Heihachi_73
This has always been one of my pet peeves with LCD/plasma etc. over the years, when they refuse to operate at anything besides 60Hz even though the display itself shouldn't care. My crappy old PC CRT from 2004 is quite happy running in 1600x1200 at 75Hz!

Variable refresh rate (Freesync / G-sync) is now relatively common on LCD displays wink

Re: Difficulty keeping bgfx framerate at 100% [Re: Heihachi_73] #115119 04/20/19 01:08 PM
Joined: Jan 2009
Posts: 51
P
Procyon Offline OP
Member
OP Offline
Member
P
Joined: Jan 2009
Posts: 51
Originally Posted by Heihachi_73
Does it happen with vsync turned off?


Yes, I turned it off and gave it a shot, but the problem remains.

Originally Posted by Heihachi_73
It happens with all games that run faster than 60fps regardless of the hardware


I would buy that if it happened with every video mode, but opengl and d3d have no problem running at 100%. I only experience this problem with bgfx. Maybe it's truly the case that bgfx is, as you say, more susceptible to framerate differences, that just seems odd to me.

Re: Difficulty keeping bgfx framerate at 100% [Re: Procyon] #115121 04/20/19 02:39 PM
Joined: Mar 2001
Posts: 16,394
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,394
BGFX on Windows will generally use D3D11 by default, which may be part of the difference. (It's why BGFX works on a clean Win10 install when default MAME will just die).


Who's Online Now
2 registered members (robcfg, Stiletto), 168 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,722
Posts114,651
Members4,873
Most Online510
Aug 26th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3