Previous Thread
Next Thread
Print Thread
Difficulty keeping bgfx framerate at 100% #115115
04/20/19 02:55 AM
04/20/19 02:55 AM
Joined: Jan 2009
Posts: 51
Maryland, USA
P
Procyon Offline OP
Member
Procyon  Offline OP
Member
P
Joined: Jan 2009
Posts: 51
Maryland, USA
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
04/20/19 07:52 AM
Joined: Aug 2002
Posts: 353
Melbourne, Australia
H
Heihachi_73 Online content
Senior Member
Heihachi_73  Online Content
Senior Member
H
Joined: Aug 2002
Posts: 353
Melbourne, Australia
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
04/20/19 11:18 AM
Joined: Jun 2013
Posts: 29
K
Kaede Offline
Member
Kaede  Offline
Member
K
Joined: Jun 2013
Posts: 29
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
04/20/19 01:08 PM
Joined: Jan 2009
Posts: 51
Maryland, USA
P
Procyon Offline OP
Member
Procyon  Offline OP
Member
P
Joined: Jan 2009
Posts: 51
Maryland, USA
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
04/20/19 02:39 PM
Joined: Mar 2001
Posts: 16,206
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,206
USA
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
1 registered members (Dam0), 35 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,654
Posts113,414
Members4,846
Most Online324
Dec 20th, 2018
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.030s Queries: 15 (0.010s) Memory: 5.6165 MB (Peak: 5.7959 MB) Zlib enabled. Server Time: 2019-05-26 07:04:59 UTC