Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Input Playback desyncs if built with MSVC #11549

Open
sestain opened this issue Jul 13, 2024 · 8 comments
Open

[BUG]: Input Playback desyncs if built with MSVC #11549

sestain opened this issue Jul 13, 2024 · 8 comments

Comments

@sestain
Copy link
Contributor

sestain commented Jul 13, 2024

Describe the Bug

Input playback seems to desync because emulation is a bit different between MSVC and Clang builds.

Reproduction Steps

Have "Pause on Start" enabled and turn off fast-boot for a good measurement with all memcards ejected.
Create a input recording that is around 4900 frames (this should be plenty if fast boot is turned off for desyncs to occur, so 98 seconds of gameplay for 50fps and 81.67 seconds for 60fps), and try to playback it after restarting the whole emulator.
With my any% tas of Crash Twinsanity, a desync occured a bit before 4900 frames because camera movement was different.

Expected Behavior

Input playback/emulation should be the same on both compilers.

PCSX2 Revision

v2.0.3

Operating System

Windows 11

If Linux - Specify Distro

No response

CPU

i5-12400F

GPU

RTX 2080Ti

GS Settings

No response

Emulation Settings

Pause On Start: Enabled
Fast Boot: Disabled
Memory Card Slots 1 & 2: Ejected + Disabled
Pause On TLB Miss: Enabled

GS Window Screenshots

No response

Logs & Dumps

clang.txt
msvc.txt

@TheLastRar
Copy link
Contributor

So I attempted to repo this issue myself, using the PAL version of Jak X (recording the tutorials).

Tested on commit cd3e11b (Tagged v2.0.3)

For a recording performed on MSVC (Release AVX2 build)
Playback on MSVC will de-sync faster, failing to pass the second tutorial.
Playback on Clang stays in sync until reaching the 3rd tutorial.

For a recording performed on Clang (Release Clang AVX2 build)
Playback on MSVC stays in sync until reaching the 3rd tutorial
Playback on Clang will de-sync faster, failing to pass the second tutorial.

I have no clue what's going on

@kage2051
Copy link

How does it behave when using the Cmake builds instead of AVX2 or SSE4 versions?

@TheLastRar
Copy link
Contributor

How does it behave when using the Cmake builds instead of AVX2 or SSE4 versions?

Turns out my issues was that there was run to run variance with how Jak X was emulated, see #11607

@TheLastRar
Copy link
Contributor

TheLastRar commented Jul 23, 2024

Managed to repo with Crash Twinsanity

For me the game hitched for a frame on the official builds, this hitch didn't occur on a MSVC build for me, which caused a desync for playback.

This behaviour seems consistent run to run

@kage2051
Copy link

Managed to repo with Crash Twinsanity

For me the game hitched for a frame on the official builds, this hitch didn't occur on a MSVC build for me, which caused a desync for playback.

This behaviour seems consistent run to run

Was it with a recording done on the MSVC build?

@TheLastRar
Copy link
Contributor

Managed to repo with Crash Twinsanity
For me the game hitched for a frame on the official builds, this hitch didn't occur on a MSVC build for me, which caused a desync for playback.
This behaviour seems consistent run to run

Was it with a recording done on the MSVC build?

Recording was made (and plays correctly) on the official clang builds

@TheLastRar
Copy link
Contributor

Can you test #12183 and see if that resolves the playback differences between MSVC and Clang.

@kage2051
Copy link

Can you test #12183 and see if that resolves the playback differences between MSVC and Clang.

There is another PR that has to do with TAS functionality: #12175

Which should be worth testing as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants