BizHawk icon indicating copy to clipboard operation
BizHawk copied to clipboard

[Nymashock] Fake lag frames

Open ThunderAxe31 opened this issue 3 years ago • 9 comments

I've always thought that the point of lag frames is pointing out that the core isn't reading the inputs during that frame. However, I stumbled more than once in lag in which the provided inputs are actually read and resulted in the relative game acting accordingly. Here is my example: Emulator version: 2.8 Game: Time Crisis (USA) http://redump.org/disc/1871/ .tasproj file: Time Crisis (USA)_nonlag.zip Incriminated frame: 27693 Repro: just try removing the "1" input from frame 27693, you'll see that the player gun doesn't shot. Set it again to have the gun shooting again. Clearing the greenzone doesn't change the outcome. You even get the game result if you play back as a .bk2 file.

ThunderAxe31 avatar Sep 19 '22 20:09 ThunderAxe31

A look at guncon code seems to say there is nothing wrong for the lag detection code per se. The issue seems to more due to how guncon works (at least according to mednafen's code). The trigger being pressed variable is not cleared until after the input poll and if the trigger button is not pressed. So while the frame you press the trigger button may be a lag frame, the guncon remembers that until the input poll actually occurs. (i.e. the input meant for a non-polling frame is "stored" until the next polling frame.) Not really any way to fix this.

CasualPokePlayer avatar Sep 19 '22 22:09 CasualPokePlayer

I can switch this out from being a GunCon issue by mentioning that Salary Man Champ: Tatakau Salary Man also has this exact same issue where it polls false lag frames every other frame for whatever reason.

Spikestuff avatar Sep 20 '22 06:09 Spikestuff

With what controller? Do you have a repro movie?

CasualPokePlayer avatar Sep 20 '22 06:09 CasualPokePlayer

Any standard controller (dpad, dualanalog/dualshock), I don't have a movie but it'll happen instantaneously in the first mini-game regardless (and carries throughout the rest of the game), it's extremely noticeable since it drops lag every other frame.

Spikestuff avatar Sep 20 '22 13:09 Spikestuff

How are these lag frames false lag frames? The game is not responding to inputs on these frames. As far as I can tell the emulator is correctly reporting lag frames here.

CasualPokePlayer avatar Sep 21 '22 01:09 CasualPokePlayer

Please provide a repro movie that contains "fake lag frames" where input on those fake lag frames have the game do something.

CasualPokePlayer avatar Sep 23 '22 00:09 CasualPokePlayer

I read the repo wrong apparently. The issue is that the lag frames shouldn't exist in SMC.

Spikestuff avatar Sep 23 '22 01:09 Spikestuff

Why not? Is there no "lag" on actual console? Or is this based on another emulator (which itself has as much claim to "accurate lag" as Nymashock)?

CasualPokePlayer avatar Sep 23 '22 02:09 CasualPokePlayer

Actual console.

Spikestuff avatar Sep 23 '22 04:09 Spikestuff