MAMEWorld >> EmuChat
Index   Flat Mode Flat  

DaRayu
MAME Fan
Reged: 02/05/13
Posts: 162
Send PM
Re: Some doubts (nothing really important) about mame.ini and two setups
06/05/13 12:17 AM


> Anyway if I want to use Direct3D, which is the best option?

I noticed that the only option that produces real input lag with vsync enabled is sadly the one option that most people would probably want to use: Fullscreen with Direct3D.
If you use DirectDraw or if you use Direct3D in a window, vsync won't add any noticable input lag. (On an average, it's less than 0.5 frames of lag. So, if a button needs three frames to react without vsync, then with vsync it will mostly need three frames as well, and sometimes four.)
But fullscreen and Direct3D will have the same input lag as if you enabled triple buffering. We still haven't found a reliable way to circumvent this. It must be a DirectX issue, not a driver issue, since I had the same results with ATI and nVidia.


> I ran without noticeably input lag in Direct3D by enabling "force vsync" and
> disabling "triple buffering" in the Nvidia control panel and disabling waitvsync and
> triple buffering on MAME, that way I get a smooth scrolling with almost no input lag.

I guess you would get the same result if you just enabled vsync in MAME. No need to use the control panel.

But what do you mean with "noticeably" input lag? Did you ever notice input lag at all? Because if you didn't, how do you make a difference between laggy and not laggy?
I guess I'm pretty reliable in detecting input lag in "Super Mario Bros.", so all I have to do is play "Vs. Super Mario Bros." to see if the jump button reacts in time. But I checked all of this with the 60 fps camera, as I described in the other thread. So, it's not just a subjective feeling, but can be proven.


By the way, triple buffering lags by design:

DirectX renders one frame and puts it in memory.
Then it renders the second frame and puts it in memory.
Then it renders the third frame and puts it in memory.
Then it displays the first frame.
Then it renders the fourth frame and puts it in memory.
Then it displays the second frame.
Then it renders the fifth frame and puts it in memory.
Then it displays the third frame.
And so on.

So, as you see, the scene that you are seeing on the screen is always two frames behind the current status of the game. (If you press the jump button when seeing Mario on the last possible spot in front of an abyss where jumping is possible, he will fall because Mario's actual position is two frames ahead of the scene that you see on-screen.)
That's why never enable triple buffering.

About vsync: In general, it's the best option, but there is that stupid DirectX behavior where Direct3D in fullscreen will produce the lag. (Calamity can tell you more about the technical reasons for it.)







Entire thread
Subject Posted by Posted on
* Some doubts (nothing really important) about mame.ini and two setups Elapido 06/01/13 09:14 PM
. * Re: Some doubts (nothing really important) about mame.ini and two setups Marcelo_20XX  06/01/13 10:25 PM
. * Re: Some doubts (nothing really important) about mame.ini and two setups DaRayu  06/03/13 11:20 AM
. * Re: Some doubts (nothing really important) about mame.ini and two setups Marcelo_20XX  06/03/13 06:19 PM
. * Re: Some doubts (nothing really important) about mame.ini and two setups DaRayu  06/05/13 12:17 AM
. * Re: Some doubts (nothing really important) about mame.ini and two setups Elapido  06/04/13 12:34 AM
. * Re: Some doubts (nothing really important) about mame.ini and two setups DaRayu  06/05/13 12:19 AM
. * Re: Some doubts (nothing really important) about mame.ini and two setups Marcelo_20XX  06/05/13 08:07 AM
. * Re: Some doubts (nothing really important) about mame.ini and two setups DaRayu  06/05/13 09:41 AM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
1 registered and 276 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2832