Strange behavior in MAME ( lag/control )

I recorded both with my phone and the libretro core was 10ms behind stand-alone on average.
So it’s wasting a frame somewhere. (tested with gsync which bypass most RA methods)

On mk specifically ? Does it happen on other games ? Hmmm, did MAME do “something” to remove 1 frame of input lag ? I was half-joking with runahead above, but i don’t expect they would make any announcement if they ever introduced native runahead, not after half of their devs flamed that feature…

Could you check if older MAME standalone versions had the same input lag ?

It was just trying the other Core Mame. I do not know if it can be used for something. In 2000 and 2003 they have no delay. They work identically to the independent MAME.

I’m only interested in the results of older versions of standalone MAME, and only the ones from a few years back (4-5 years at most), there are too many differences between the glitched mk emulation from 20 years ago and its current emulation.

The frame advance thing is specifically related to mame-current and libretro. Others should be fine.

No, not on MK specifically, I tested on the neogeo unibios setting screen (1 frame reaction time, to make the testing easier).

It was to confirm that it was really there, as the method with the frame step hotkey (K) was showing it.

I do not know how to install an old version in Ubuntu.

The Core Mame has delayed in all the games that I tried many, some; Street Figther CE, Virtua Fighter, 1941 Counter Attack, Final Fight, The King of Fighters '99.

In FBNEO passes something curious, but not at all.

  • The King of Fighters '99. It has no delay, it works identically to independent MAME.
  • Street Figther CE, it has the same delay as the Core Mame.
  • MK, has mixed delay that I told you before.

All console cores work at the same speed, even a faster frame in RetroArch.

The arcade core are something else.

  • MAME 2000, 2003 They have no delay, they work the same as independent.
  • MAME 2010 If you have lag. Equal to the Core Mame.
  • FBNeo, it has delay and does not have, it is mixed. :laughing:

PS: forgive the translation please, I know it is horrible.

Yet another very weird result, FBNeo (libretro) goes as low as 0 frames of input lag in sf2ce (on select champ screen), meaning it’s already at the rock bottom of what can be achieved about input lag. That’s further proof of something unexpected being probably done in MAME’s frontend code, i can only think they don’t compute the frame and display it at the same time (which feels kinda the same as the runahead concept).

As i already implied above, those are false positives. More details : very old mame had broken video code that almost never emulated raster effects properly (shadows, transparency, …), a very common side-effect of fixing raster is that you’ll have more input lag (the other very common side-effect is that it requires a fair amount of additional processing power), which is why more recent MAME with fixed raster effects will inherently have additional input lag.

1 Like

If you want something strange about FBNeo…

For 2 different Neo-Geo games, you get different results in comparison with MAME (stand-alone, the libretro core always has +1 frame).

Viewpoint 3 frames to react in FBN / 2 in MAME.
Magician Lord 2 frames to react / 2 in MAME.

We have very precise timings in our neogeo driver, there are probably ways to reduce input lag by being more lax about them, but also with the possibility of introducing glitches. That’s a different problem from the few games like sf2ce, where we are voluntarily lax about rendering timings because we know it slightly reduces input lag without any known downside. Did MAME backport some GroovyMAME latency improvements or something ?

No idea about that, it’s been like this for a while (several years as far as I noticed).

the neogeo driver in fbneo is structured suboptimally for reducing input latency in retroarch. if it were rearranged to emulate vblank at the start of the frame slice, instead of towards the end, and stop right after graphics rendering it would reduce input latency by a frame in a lot of games since it’s common to poll input during vblank

I also set Run Ahead to 4 when playing Super Street Fighter 2 Turbo on FBNEO, without it, the game really feels it’s not responding right to my inputs, but Run Ahead brings it really close if not even a bit more responsive than the real arcade, I’d love having the real machine around so I could compare RA with run ahead against it.

Beware of the output lag of the flat monitor, I am running the tests with a CRT monitor.

The Run-Ahead in FBNEO is amazing, keeps the animations even if it is put on more.

Yes, SF is like that in Arcade. The input-lag in any game of fight is (on average) of 4-7 frames for a punch / kick and half for blocking, is thus ahead. It was Mortal Kombat who defined these times better to develop techniques.

This is news to me, I wish I had the real thing to make more tests. I’m starting to wonder if I got spoiled by runahead, I played Super Mario All-Stars yesterday and the game was just responsive enough for me at run_ahead=3. With that, it’s hard for me to come back to real hardware, really. I cannot ignore delayed inputs for quite some time now.

3 It’s a lot. Nintendo’s Marios have 1 lag frame. Putting more breaks the animation. To know when frames have of lag. Pause, press and maintain jump or “whatever”, press K to advance by frame. How many count before the jump, are the lag. Mario de Nintendo, the first one does nothing, the second jumps, is one.

1 Like

It actually played perfectly fine, I know if you up the numbers beyond the game’s original input lag, it gets weird, it skips the gameplay, etc. The thing is, as I started the game, I felt the input delay, once I set it to 3, I could control Mario as I never did on the SNES, the second, harder loop was so much easier than I remember.

1 Like

Super Mario World has 2 frames of lag, natively, AFAIK.

If you put 3 frames of run ahead to it, you are breaking it.

Also, in many games not all moves have the same lag. A certain move may have less lag than some other. For instance, jumping may have 3 frames of lag and punching may have 2. This means you need to put runahead frames to no more than 2 as the game has 2 frames of lag.

You always take the fastest move in a game to measure it’s lag. If you try to remove all lag from the slowest moves, you are breaking the fastest ones.

Finally, if a game reacts on, say, the 3rd frame, like Mario World, it means it has 2 frames of lag, not 3. You are probably already aware of this but just saying.

Completely irrelevant if you do comparisons with the same screen.

Anyway, the method of counting frames with K seems reliable to work with, as opposed to what was said at the beginning of this thread, which was just an hypothesis made in the past.

1 Like

In all the cores, less in FBNeo, it is amazing. KOF98 has 5 frames in the punch and 1 frame in the special. You can delete the 5 and do not miss the animation of the special, just like this with all the games that I have tried. Now, you have to understand that this is part of the game design, if the punch is placed at the same time as the special (escape), you can no longer escape.

You’re right I thought about it after writing it, if it progresses by frame no matter the monitor. I’m doing something that can be of great help now I show you.