TASEmulators / BizHawk

BizHawk is a multi-system emulator written in C#. BizHawk provides nice features for casual gamers such as full screen, and joypad support in addition to full rerecording and debugging tools for all system cores.
http://tasvideos.org/BizHawk.html
Other
2.16k stars 381 forks source link

[Nymashock] Fake lag frames #3390

Open ThunderAxe31 opened 2 years ago

ThunderAxe31 commented 2 years ago

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.

CasualPokePlayer commented 2 years ago

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.

Spikestuff commented 2 years ago

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.

CasualPokePlayer commented 2 years ago

With what controller? Do you have a repro movie?

Spikestuff commented 2 years ago

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.

CasualPokePlayer commented 2 years ago

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 commented 2 years ago

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

Spikestuff commented 2 years ago

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

CasualPokePlayer commented 2 years ago

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)?

Spikestuff commented 2 years ago

Actual console.