Emulator Lag Information Questions

The place for all discussion on gaming hardware
Post Reply
User avatar
evil_ash_xero
Posts: 6251
Joined: Thu Jul 12, 2007 6:33 am
Location: Where the fish lives

Emulator Lag Information Questions

Post by evil_ash_xero »

OK, I know some of you guys are really into this kind of stuff, so maybe you can let me in on a few things.
'
I'm just curious about a few certain emulators that I use.

Kega Fusion- Now, I use this Windowed with V Sync Off. Obviously, VSync adds lag. Otherwise, it feels really good. How close is it to the real thing?

ZSNES- Also, no V Sync. I do have to use Triple Buffering though. What's ZSNES's lag time, normally, and what is it with these other things turned on(V Sync or Triple Buffering). TB doesn't really seem to change it much.

Visual Boy Advance M- Windowed, no V Sync OR Triple Buffering. What's the lag on this emulator?

I try a lot of ways to reduce lag. Sometimes playing it in a window, I can avoid using V Sync, or other things. Sometimes Triple Buffering will stabilize the image, and will be enough.

What's the specifics on these emulators, in terms of lag?

OH, and also, I have asked this before, but do the emulators on Wii Homebrew have less lag than the games on VC? I've wondered this for a while.
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: Emulator Lag Information Questions

Post by trap15 »

I don't mean to offend, but you should kill yourself.
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
User avatar
shmuppyLove
Posts: 3708
Joined: Thu Apr 07, 2011 1:44 pm
Location: Toronto

Re: Emulator Lag Information Questions

Post by shmuppyLove »

SquidMan wrote:I don't mean to offend, but you should kill yourself.
Sig'd
User avatar
evil_ash_xero
Posts: 6251
Joined: Thu Jul 12, 2007 6:33 am
Location: Where the fish lives

Re: Emulator Lag Information Questions

Post by evil_ash_xero »

I would be offended, but....ha ha...

Suicide has always been a possibility, in my life.

Didn't think my obsession with emulation would drive me over the edge though.

But...at the same time, I should probably be a little pissed. So...um....eat me, and fuck off. :D

Also, strange response from the "obsessed with scanlines" forum.
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: Emulator Lag Information Questions

Post by trap15 »

Basically, everything you said -- with myself being a developer of low-level software and emulations -- made me cringe.

First off, VSync has nothing to do with lag. Turning it off will probably hinder your game more than help it.
Secondly, double buffering adds 1 frame of lag. Triple buffering makes that 2 frames.
Third, why the shit are you using ZSNES, the most hacked up SNES emulator ever, if you're looking for accuracy?
Fourth, windowing does absolutely nothing for you; if anything it'll add more lag for the OS (or video card) to have to render the additional objects on screen.
Fifth, the input lag caused by PCs is very different from that on consoles.
Sixth, If you're playing games on your Wii, expect a fairly large input delay due to Bluetooth. If you want minimal delay, use a GC pad.

So yes, basically, go kill yourself.
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
fagin
Posts: 1654
Joined: Fri Mar 19, 2010 2:29 pm
Location: UK

Re: Emulator Lag Information Questions

Post by fagin »

Hold on... The guys asking for feedback or advice. Your advice is sound, but what's with the attitude.
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: Emulator Lag Information Questions

Post by trap15 »

I get the feeling that it's something that happens to you when you become an emulator author :P

Anyways, I'm just saying how I felt reading his post, since that's how I really felt.
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
User avatar
evil_ash_xero
Posts: 6251
Joined: Thu Jul 12, 2007 6:33 am
Location: Where the fish lives

Re: Emulator Lag Information Questions

Post by evil_ash_xero »

fagin wrote:Hold on... The guys asking for feedback or advice. Your advice is sound, but what's with the attitude.
He's just a typical internet dick. You know how it goes.
Zapf
Posts: 366
Joined: Sat Aug 08, 2009 5:21 pm

Re: Emulator Lag Information Questions

Post by Zapf »

SquidMan wrote: Sixth, If you're playing games on your Wii, expect a fairly large input delay due to Bluetooth. If you want minimal delay, use a GC pad..
Are there any hard numbers on wii's bt latency? There were some tests done with xbox 360's and ps3's wireless controllers (ps3 is bluetooth right?) on SRK and they were pretty much indistinguishable from the wired connection with regards to latency.

http://shoryuken.com/forum/index.php?th ... st-2402510
Ex-Cyber
Posts: 1401
Joined: Thu Oct 25, 2007 12:43 am

Re: Emulator Lag Information Questions

Post by Ex-Cyber »

I wouldn't be surprised if the games (or libraries/drivers underneath) are lagging all input to hide the wireless latency.
Zapf
Posts: 366
Joined: Sat Aug 08, 2009 5:21 pm

Re: Emulator Lag Information Questions

Post by Zapf »

That sounds pretty ridiculous and would have probably been noticed already by someone in the fg community if that were actually the case.
User avatar
BuckoA51
Posts: 3392
Joined: Sat Oct 02, 2010 10:08 am
Location: Ireland
Contact:

Re: Emulator Lag Information Questions

Post by BuckoA51 »

First off, VSync has nothing to do with lag. Turning it off will probably hinder your game more than help it.
Without suggesting I take my own life, can you explain this to me? I thought if you waited on a vsync there was lag between the buffer being filled and the refresh of the monitor? Are you suggesting that because modern monitors refresh more often than the emulated systems it is never a problem or are the articles I have read that say vsync does introduce some input lag all lying?
OSSC Forums - http://www.videogameperfection.com/forums
Please check the Wiki before posting about Morph, OSSC, XRGB Mini or XRGB3 - http://junkerhq.net/xrgb/index.php/Main_Page
User avatar
evil_ash_xero
Posts: 6251
Joined: Thu Jul 12, 2007 6:33 am
Location: Where the fish lives

Re: Emulator Lag Information Questions

Post by evil_ash_xero »

VSync always makes my games lag more, so I don't know what he's talking about on that one.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: Emulator Lag Information Questions

Post by BPzeBanshee »

SquidMan's anal response probably seems unfounded, but that's only because most of these questions were asked and answered when all that crap about Shmupmame being non-legit happened. Still no excuse, but regardless he's still right.

As for your lag with games on vsync evil_ash_xero, I'm not sure why that's happening for you. My legacy machine doesn't seem to run any differently running MAME games with vsync switched on, and that's like 14 years old.

In regards to Wii Homebrew VS VC, definitely run the homebrew emulators instead regardless. I've never noticed any lag with my GameCube controller (I must confess I haven't checked VC in some time but when I last did there wasn't much GCN controller support at all), but the Virtual Console has some minor emulation issues with some games which the emulators generally work better with. Regardless of input lag you're better off with the homebrew-based emulators especially in the case of the Megadrive/Master System emulator Genesis Plus GX.

Here's hoping that might have helped answer your questions without seeming bad. :wink:
gray117
Posts: 1235
Joined: Fri Jul 25, 2008 10:19 pm
Location: Leeds

Re: Emulator Lag Information Questions

Post by gray117 »

I've no idea how some of the specific emulators in question work.

But not all vsyncs are created equal :)

Typical Mame vsync could sometimes be said to introduce extremely minimal lag. You'd probably have to be super human to pick it up. Typically it would be sub frame - literally time to sync - but it could depend upon the interaction with emulation technique being used and any throttling techniques being used.

Similarly some application and hardware/driver differences can produce different results in window/full screen mode. In my limited experience some opengl applications seemed to 'suffer' greater disparity in execution on recent graphics cards (than with directx) - but your experiences may vary per app/per card/per driver version.

Also some people may recommend window play to keep scaling to a strict factor (eg. x2, x4) and relating that 1:1 to you're monitor's native res.

Similarly some may propose that such limited scaling helps reduce the risk of any errors, fps fluctation and possible lag that could occur. However, in most cases this would be so tiny a risk, or issue, with decent hardware [like 10 years ago decent] that I wouldn't even bother thinking about it - unless you observe issues [and would most likely be fixable with an emulator with a nice range of options].
User avatar
evil_ash_xero
Posts: 6251
Joined: Thu Jul 12, 2007 6:33 am
Location: Where the fish lives

Re: Emulator Lag Information Questions

Post by evil_ash_xero »

BPzeBanshee wrote:SquidMan's anal response probably seems unfounded, but that's only because most of these questions were asked and answered when all that crap about Shmupmame being non-legit happened. Still no excuse, but regardless he's still right.

As for your lag with games on vsync evil_ash_xero, I'm not sure why that's happening for you. My legacy machine doesn't seem to run any differently running MAME games with vsync switched on, and that's like 14 years old.

In regards to Wii Homebrew VS VC, definitely run the homebrew emulators instead regardless. I've never noticed any lag with my GameCube controller (I must confess I haven't checked VC in some time but when I last did there wasn't much GCN controller support at all), but the Virtual Console has some minor emulation issues with some games which the emulators generally work better with. Regardless of input lag you're better off with the homebrew-based emulators especially in the case of the Megadrive/Master System emulator Genesis Plus GX.

Here's hoping that might have helped answer your questions without seeming bad. :wink:
Yeah, despite him being a..umm...anyway.., it did motivate me to buy a SNES to Gamecube/Wii converter, so I can have more responsive controls on my Wii emulators.
kingadjon
Posts: 1
Joined: Sat Jul 21, 2012 11:35 pm

Re: Emulator Lag Information Questions

Post by kingadjon »

Basically, everything you said -- with myself being a developer of low-level software and emulations -- made me cringe.

First off, VSync has nothing to do with lag. Turning it off will probably hinder your game more than help it.
Secondly, double buffering adds 1 frame of lag. Triple buffering makes that 2 frames.
Third, why the shit are you using ZSNES, the most hacked up SNES emulator ever, if you're looking for accuracy?
Fourth, windowing does absolutely nothing for you; if anything it'll add more lag for the OS (or video card) to have to render the additional objects on screen.
Fifth, the input lag caused by PCs is very different from that on consoles.
Sixth, If you're playing games on your Wii, expect a fairly large input delay due to Bluetooth. If you want minimal delay, use a GC pad.

So yes, basically, go kill yourself.

------------

Whomever wrote this has absolutely no idea what they are talking about, please ignore all of it.

Thanks
User avatar
matrigs
Posts: 682
Joined: Mon Jan 18, 2010 7:27 pm
Location: Poland

Re: Emulator Lag Information Questions

Post by matrigs »

actually this kind off interests me. from another topic :
Calamity wrote:
Hi,

I'm the person who's currently in charge of GroovyMAME. I have been reading about the input lag related topics in this forum since log, though I have never posted before.

I find input lag to be a highly elusive issue, probably the users of this forum are the best to judge this stuff.

Ed Oscuro wrote:
GroovyMAME is optimized for output to arcade monitors, yes? Is it merely selecting the right display timing for the monitor?


GroovyMAME *generates* the right display timings automatically provided you use an ATI card. But enabling the proper timings is just half of the problem. The v-sync implementation and the throttling mechanism in MAME need to be slightly modified in order to ensure absolutely smooth scrolling and sound synchronization.

On the other hand, we have the input lag issue. Since long I have read that any sort of v-sync causes input lag to some extent. Because of this, it is widely recommended to disable v-sync or triplebuffering as a way to reduce input lag. However, once you get used to properly v-synced video, you simply can't go back and live with the artifacts, it just kills the illusion of emulation altogether.

So I tried to understand why v-sync shoud introduce input lag at all. And specially, why should it add more lag than using -throttle alone ???. After all, they're basically just two different implementations of a wait loop to keep the frame rate in place. Most articles I've read assume the modern 3D-game scenario, where frame rates are not constant. In emulation, the frame rate is a known value.

To keep short, I found what could be the possible cause of input lag related to v-sync in MAME. Basically, MAME is locked to input messages from the OS for the period of time which takes a new frame to be drawn to the screen. This is because the draw operation is called from the message loop where the input messages are supposed to be processed too. Obviously, if v-sync is enabled, the draw operation won't return until the vblank happens, consuming most of the time in the frame and keeping the message loop locked.

The multithreading implementation in MAME makes things even worse as it can actually keep the emulation thread unaware of input data during several frames, if the video card's refresh is lower than the game's refresh.

What I made for GroovyMAME is to create a third thread of execution to deal with video updates (draw + wait for v-sync), so the window thread is always free to process input messages as soon as they come. This *seems* to keep input lag as low as what you get with -throttle alone.

Of course you can't expect a reduction of the inherent frames of lag due to sprite buffering and stuff, but at least it seems to improve things on the specific lag caused by v-sync.
so how bad actually is it ?
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: Emulator Lag Information Questions

Post by Ed Oscuro »

evil_ash_xero wrote:OK, I know some of you guys are really into this kind of stuff, so maybe you can let me in on a few things.
'
I'm just curious about a few certain emulators that I use.
I am going to take a stab at it and say that VSync implementations should be the same across platforms. I'm getting sleepy and can't really write anything at the moment but this current Anandtech article looks swell. Google first brought up this but it looks less easily followed and not as concise. You could still look at it, though; double and triple buffering gets mentioned.
trap15 wrote:I don't mean to offend, but you should kill yourself.
There's no call for this. Nobody cares if your time is too precious to waste on the plebes, but if you're going to say something you might as well be a credit to the race and make it topical. It's not a help to the Forum to preen about how much of an expert you are while withholding the evidence you're anything but a petty little bastard. A bit surprising that somebody who has taken so strongly to the mandatory replay requirements would go out of his way to withhold information that would be helpful to the thread.

You spend half your posts whining about how garbage Shmups Forum is, and you spend the other half of the time instigating petty baloney for no fucking reason.

Even Elixir tries to stay topical in the depths of his self-absorption and topic derailments.
ZellSF
Posts: 2725
Joined: Mon Apr 09, 2012 11:12 pm

Re: Emulator Lag Information Questions

Post by ZellSF »

Fourth, windowing does absolutely nothing for you; if anything it'll add more lag for the OS (or video card) to have to render the additional objects on screen.
I've frequently heard people saying to run games windowed on ATI cards for less input lag. Yeah it makes no sense (especially since windowed most people would have Aero running and that causes input lag), but I'm guessing it's some obscure driver bug.

Trying to find input lag sources on a PC can give you a lot of headaches :/
Sixth, If you're playing games on your Wii, expect a fairly large input delay due to Bluetooth. If you want minimal delay, use a GC pad.
It's not that bad actually.
I am going to take a stab at it and say that VSync implementations should be the same across platforms. I'm getting sleepy and can't really write anything at the moment but this current Anandtech article looks swell. Google first brought up this but it looks less easily followed and not as concise. You could still look at it, though; double and triple buffering gets mentioned.
I think emulators and PC games are entirely different things, in that you have to sync the console's refresh rate to the PC...
Post Reply