Input Lag

General discussion on MAME, MARP, or whatever else that doesn't belong in any of the other forums

Moderators: mahlemiut, seymour, QRS

Post Reply
User avatar
LordGaz
MARP Knight
MARP Knight
Posts: 220
Joined: Sat Mar 09, 2002 5:07 pm
Location: London, UK

Input Lag

Post by LordGaz »

Anyone else noticing some extra keyboard input lag in the more recent versions of MAME?

Not all games but most games are responding to keys 2 or 3 frames too late which makes new high score attempts a bit tricky.

Marble Madness has once again become a bit silly too, the inertia of the trackball simulation seems to have been increased or perhaps it's just a consequence of the input lag.

Cheers all, Gaz.
User avatar
Chad
Tournament Coordinator
Posts: 4463
Joined: Tue Mar 05, 2002 3:15 pm
Location: calif

Post by Chad »

which versions, which controlers? mame122 seems fine to me, i screw up where i always screw up (not due to input lag but due to bad reflexes :)
-skito
User avatar
LordGaz
MARP Knight
MARP Knight
Posts: 220
Joined: Sat Mar 09, 2002 5:07 pm
Location: London, UK

Post by LordGaz »

It's keyboard lag.

I've noticed it in every MAME since the K6 tourney including 122 and not just on my machine. Could just be that I'm sensitive to it, even 1 frame of lag is noticeable.
User avatar
mahlemiut
Editor
Posts: 4191
Joined: Mon Feb 04, 2002 10:05 pm
Location: New Zealand
Contact:

Post by mahlemiut »

I can tell you that the input data is readable by the game at the right time. I tested this using the MAME debugger, and testing SSF2T (CPS-2). Opening the memory window and going to 0x804000, which is the input port for most of the standard JAMMA controls, reads 0xFFFF. The ports are active low, so this correct when nothing is pressed. Exiting the debugger, and going to the game's input test, shows there is about a 2 frame lag between the key being pressed, and the relevant input being displayed on-screen as active (use shift-P to advance a frame).

Now, doing the same, but activating the debugger after the first frame advance, and looking at location 0x804000 again, will show that this input change is indeed visible to the game. For example, if you hold 1P button 2, location 0x804000 will read 0xFFDF. Bit 5 is active (ie: 0). This suggests that it is not input lag, but possibly video lag.

Of course, that makes no sense if different drivers produce different lag... :?

I've tested D3D, DDraw and GDI, and they all produce the same lag for the same game.
- Barry Rodewald
MARP Assistant Web Maintainer
Image
Alessandro.S
MARP Serf
MARP Serf
Posts: 160
Joined: Sat Oct 27, 2007 4:12 pm
Location: Italy

Post by Alessandro.S »

I wouldn't be able to tell. Moving from Fedora7 / xwolfmame 104 to Fedora8 / SDLmame 118 and later due to the fact that PulseAudio conflicts with the xwolf104 build (sound begins to play, then it crackles, then it goes off) I basically play with very different MAMEs.

I have though AUDIO lag in Fedora8 - playing frogger is much more difficult since I hear the jump sounds probably close to 1/10 of a second later than the jump itself; to the point that it's better to reboot in Fedora7 and play with xwolf104 :cry:
That's anyway an issue with my setup.

Though, while I'm still improving my Galaxian scores, at times I don't know if it's me pressing the fire button at the wrong time or if it's the fire button that isn't very responsive. It's probably me - but after reading Lord Gaz's post, hmm...
User avatar
mahlemiut
Editor
Posts: 4191
Joined: Mon Feb 04, 2002 10:05 pm
Location: New Zealand
Contact:

Post by mahlemiut »

KDE often causes annoying audio lag in a number of applications when it has sound enabled. :x
- Barry Rodewald
MARP Assistant Web Maintainer
Image
User avatar
BBH
Editor
Posts: 1585
Joined: Wed Feb 06, 2002 7:06 am
Location: Portland, Oregon
Contact:

Post by BBH »

I've been meaning to post about input lag for a while but I keep forgetting...

Basically, pretty much all versions of MAME have some form of input lag. The weird thing is that it depends a lot on the driver, so there are different results from game to game.

But the other thing is that a lot of games ended up having extra frames of lag after 0.100.

For instance, if you run Super Street Fighter II Turbo on wolf99, go into the input test and pause to advance frame-by-frame when you press a button, there's 1 extra frame of input lag before the button lights up. If you try it in 0.100 or any version after, there's 2 frames of lag.

For Psikyo SH2 games like Strikers 1945 II, there's 2 frames of lag in 0.99 already. In newer versions, it's 3 frames.

Most people can't tell when there's 1 or 2 frames of input lag, and it probably doesn't have that major of an effect on things. But, it could make a difference on an intense game where reflexes are key. It's for this reason that in the future I'm sticking with wolf99 for any game that's emulated correctly by it.

I also honestly believe that K7 and any other future tournaments should give players the choice to use wolf99 if they want to use a version with less input lag.
User avatar
The TJT
MARPaholic
MARPaholic
Posts: 2479
Joined: Wed Mar 06, 2002 10:56 am
Location: 20 Grand Palace

Post by The TJT »

1 or 2 frames of input lag shouldn't make much difference. It's only around 1,7-3,3 hundredth of a second.
User avatar
mahlemiut
Editor
Posts: 4191
Joined: Mon Feb 04, 2002 10:05 pm
Location: New Zealand
Contact:

Post by mahlemiut »

It's 16.667ms for 1 frame of a 60Hz game.
- Barry Rodewald
MARP Assistant Web Maintainer
Image
User avatar
The TJT
MARPaholic
MARPaholic
Posts: 2479
Joined: Wed Mar 06, 2002 10:56 am
Location: 20 Grand Palace

Post by The TJT »

mahlemiut wrote:It's 16.667ms for 1 frame of a 60Hz game.
Yeah, that's what I said didn't I...
:)
User avatar
mahlemiut
Editor
Posts: 4191
Joined: Mon Feb 04, 2002 10:05 pm
Location: New Zealand
Contact:

Post by mahlemiut »

Just clarifying. Dumb people might get confused with commas used as decimal points. :)
- Barry Rodewald
MARP Assistant Web Maintainer
Image
User avatar
BBH
Editor
Posts: 1585
Joined: Wed Feb 06, 2002 7:06 am
Location: Portland, Oregon
Contact:

Re: Input Lag

Post by BBH »

As of MAME 0.123u5, extra input lag is gone so any frame delays in games should be comparable to MAME 0.99 and prior. This is a good thing, obviously.
Post Reply