Post subject: Possible Lead on Desyncs
Emulator Coder
Joined: 5/8/2014
Posts: 125
It was brought to my attention that savestates definitely can cause desyncs. Issue 9561 exposed that the behavior of a stage loading can change if loading from a savestate. I'm not too technically minded in Dolphin, but if it can cause a huge difference like that, then it may explain why some users are running into desyncs. I've done a lot of work in Netplay, which uses a lot of the same features and determinism as TASing. The one difference that I know of in netplay is that we cannot use savestates during a netplay session. In 190 hours of testing in preparation of 5.0, I had zero desyncs that were not caused by my negligence. Hell, I even managed to do a disc swap without desyncing! Anyway, I don't have the means to fix the bug but I feel like it needs to be documented permanently somewhere. This bug is going to get fixed someday, and with it, one of our leads to fixing desyncs in Dolphin could be gone too.
Dimon12321
He/Him
Editor, Reviewer, Experienced player (596)
Joined: 4/5/2014
Posts: 1219
Location: Romania
Wow, the related PR has Fix Pending status now! Too bad, leoetlino who announced a new version of savestates, which would have solved some desync problems, didn't finish it. I think this is one of the branches he used to work on.
TASing is like making a film: only the best takes are shown in the final movie.
JosJuice
She/They
Editor, Emulator Coder
Joined: 7/3/2010
Posts: 193
Location: Sweden
Dimon12321 wrote:
Wow, the related PR has Fix Pending status now!
That PR doesn't actually fix the problem that games which replace code without invalidating the icache can behave differently after using a savestate. It's more of a hack to get a few specific games working without having to use the savestate "trick". I suppose the PR would solve some desync problems in those specific games, though. Do however keep in mind that desyncs caused by loading a savestate after a game replaces code without invalidating the icache generally cause game-breaking glitches, so if you have a desync where the input just comes out on the wrong frame or something like that, it most likely has no relation to issue 9561.