Input Lag
Moderators: mahlemiut, seymour, QRS
Input Lag
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.
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.
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.
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

MARP Assistant Web Maintainer

-
- MARP Serf
- Posts: 160
- Joined: Sat Oct 27, 2007 4:12 pm
- Location: Italy
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
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...
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

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...
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.
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.
Re: Input Lag
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.