Author Topic: input lag is too high on certain games?  (Read 1296 times)

Offline Tatsuya79

  • Newbies
  • *
  • Posts: 8
  • Karma: +0/-0
input lag is too high on certain games?
« on: March 31, 2018, 12:45:37 pm »
Hello, thanks for this great emulator.

I'm using it more into RetroArch these days but I want to report a problem I verified in stand-alone as well.
Some games have extra frames of input lag compared to Mame.

Example, Dodonpachi has 4 frames before a reaction on screen while it's only 2 in Mame stand-alone.
Viewpoint has 3 frames vs 2 in Mame.

Where it gets strange is that another Neo-Geo game like KOF98 doesn't exhibit any additional frame of lag.
So is it an auto-fire code or something that would add the lag? something particular to some games?

All this is tested by putting games on pause, then keeping a button/direction pushed down, going frame by frame ahead till you see the action effective on screen.
You can do that with the K hotkey in RetroArch.

In FinalBurn Alpha I couldn't find a key so I had to record a video before counting the frames in a media player.
It would be a great addition to have that for testing purpose.

Offline Fulg0re

  • Newbies
  • *
  • Posts: 43
  • Karma: +0/-0
Re: input lag is too high on certain games?
« Reply #1 on: March 31, 2018, 01:37:10 pm »
Hi

i also use FBA on my Custom Arcade Machine. Incl. Arcade PC.
I cant confirm this issue. On shooters i dont havce any problems.
I usually play it with standard setup an es?ecially for al kind of CAVE
Games i config a seperat button for autofire. For some CAVE Games
i need to run MAME cause a few games are not possible to run on
FBA for now..... All Neo Geo Beat em ups i play on FBA without any
problems and i pleay some of the on a very high difficult level which
assume a high accuracy of input for some move. Also i use MAME
for Killer Instinct 1 & 2 ... without an problems an MAME for all
kind of Mortal Kombat Games....

I Play on a CRT Monitor. Normal and Tate Mode

Kind regards

Offline iq_132

  • Administrator
  • *****
  • Posts: 3559
  • Karma: +373/-0
  • Just a lion with a sword
    • NeoSource
Re: input lag is too high on certain games?
« Reply #2 on: March 31, 2018, 02:05:22 pm »
Are you using MAME from MAMEDev.org or something shmupMAME?


Offline Fulg0re

  • Newbies
  • *
  • Posts: 43
  • Karma: +0/-0
Re: input lag is too high on certain games?
« Reply #3 on: March 31, 2018, 02:13:38 pm »
Me ?


latest MAME 0195 32bit.
10 % Overclock CPU Ingame and everythings runs okay.


Offline Tatsuya79

  • Newbies
  • *
  • Posts: 8
  • Karma: +0/-0
Re: input lag is too high on certain games?
« Reply #4 on: March 31, 2018, 04:13:41 pm »
It's official MAME.

Offline dink

  • Administrator
  • *****
  • Posts: 2593
  • Karma: +221/-0
  • feed the horse yumyum
Re: input lag is too high on certain games?
« Reply #5 on: March 31, 2018, 07:13:14 pm »
technique:
fba: pause + right key + F1 to frame advance
mame: pause + right key + leftShift-P to frame advance

Windowed: Using mame 0.195 I get 2 frames in DoDonpachi and 4 in FBA for inputlag.
You will get an extra frame of lag fullscreen due to video buffers/flipping/etc.  I didn't test fullscreen. 

Let's do some debugging:
so, testing DoDonpachi in fba, I have it print out the inputs every frame to a debug window.  It registers that the input has been pressed on the very first frame, but, the game doesn't respond until the fourth frame.

What could be going on here?  Definitely the problem isn't FBA's input handling, because it registers the input immediately.  I think something might be wrong with the game's timing.  I will look into it deeper tonight / do some experimentation and post back here when I have some good info.

best regards,
- dink

Offline dink

  • Administrator
  • *****
  • Posts: 2593
  • Karma: +221/-0
  • feed the horse yumyum
Re: input lag is too high on certain games?
« Reply #6 on: April 01, 2018, 12:24:20 am »
DoDonpachi:

After a bit of tweaking and without doing anything too hacky, I got the inputlag down to 2 frames in FBA(!). 

I will have to do some playtesting tomorow to make sure nothing had been adversely affected.

best regards,
- dink

Offline furiadeoso

  • Newbies
  • *
  • Posts: 42
  • Karma: +0/-0
    • EMUpartidas online
Re: input lag is too high on certain games?
« Reply #7 on: April 01, 2018, 04:54:46 am »
Could it also be happening in some neo-geo and cps1 games like metal slug or kod? I have always had the feeling of having a little more input lag than in MAME++ 0.119. But I've never stopped to test it.

Offline Fulg0re

  • Newbies
  • *
  • Posts: 43
  • Karma: +0/-0
Re: input lag is too high on certain games?
« Reply #8 on: April 01, 2018, 05:22:22 am »
HI

worst Laag on Neo Geo Games is without a doubt on Art of Fightin 2.
I got this on AES and on FBA or Mame ... very ugly to me....

Offline Tatsuya79

  • Newbies
  • *
  • Posts: 8
  • Karma: +0/-0
Re: input lag is too high on certain games?
« Reply #9 on: April 01, 2018, 06:03:10 am »
technique:
fba: pause + right key + F1 to frame advance

Oh cool! I did not find that!

Glad you found what was the problem in Dodonpachi.
Is it something that can also happen in other game/driver or specific to this one only?

Offline dink

  • Administrator
  • *****
  • Posts: 2593
  • Karma: +221/-0
  • feed the horse yumyum
Re: input lag is too high on certain games?
« Reply #10 on: April 01, 2018, 09:03:01 am »
Tatsuya79, this is a hard one to answer.  There is nothing wrong with the input system in fba, it responds perfectly.  The thing is, every game uses an almost completely different timing method.
I found that donpachi & dodonpachi can both be improved, since they both have very similar emulation code.

Please check your pm :)

best regards,
- dink


Offline dink

  • Administrator
  • *****
  • Posts: 2593
  • Karma: +221/-0
  • feed the horse yumyum
Re: input lag is too high on certain games?
« Reply #11 on: April 01, 2018, 09:27:26 am »
Actually, going to need to look into this deeper.  I noticed a nasty side effect.  Back to the drawing board :)

Offline dink

  • Administrator
  • *****
  • Posts: 2593
  • Karma: +221/-0
  • feed the horse yumyum
Re: input lag is too high on certain games?
« Reply #12 on: April 01, 2018, 10:14:53 pm »
Hmm, seems the best I can get so far is 3 frames in DonPachi / DoDonpachi.  I can bring it down to 2, the tile:sprite layers get desynched.  I'm not too convinced that these extra 1 or 2 frames faster response will help the games any - and I'm quite the master of both of them.  I'm also worried that the timing differences might cause problems down the line, because I've been playing DonPachi/DoDonPachi for years in fba without issue.  Anyhow.. my personal opinions aside - what do you guys think?


Offline Tatsuya79

  • Newbies
  • *
  • Posts: 8
  • Karma: +0/-0
Re: input lag is too high on certain games?
« Reply #13 on: April 02, 2018, 08:15:40 am »
Well, the shorter input delay is always the best, as long as it doesn't break anything.

I thought it was some particular problem but perhaps FBA is just using and older driver for this game that was modified at a later date in MAME, and that gave better result on the input lag front.

Perhaps it's different for neogeo games?
As some like Last Resort or Viewpoint react in 3 frames vs 2 for MAME, while other games of the same driver like KOF98 don't?

Offline dink

  • Administrator
  • *****
  • Posts: 2593
  • Karma: +221/-0
  • feed the horse yumyum
Re: input lag is too high on certain games?
« Reply #14 on: April 02, 2018, 08:57:26 am »
Don't worry, I didn't give up - I will not be beat.  I have just been collecting recon with rant's inbetween... :)

dp and ddp are very very timing sensitive when it comes to vbl and sprite buffering, I mean, just a couple cycles off and it will do one of 3 things:
1: go out of sync with sprite:tile layer (usually when getting close to the 2 frames of reaction time)
2: go between 2-4 frames of reaction time
3: explode!

if you get it exactly right, it will react in 2 frames with no bad side effects.  that being said, our dp / ddp now reacts in 2 frames. with no side effects.  tonight I'll do the ultimate playtest.

p.s. fba doesn't use drivers from mame :)

best regards,
- dink