Next Generation Emulation banner
1 - 5 of 5 Posts

·
Registered
Joined
·
45 Posts
Discussion Starter · #1 · (Edited)
I'm sorry in advance if this is common knowledge already or if this is of little significance, but I thought I'd better post this because it presents a fairly interesting phenomenon which I haven't seen discussed yet. Anyway, feel free to ignore it if you feel that any of the info or all of it is insignificant or known already.

I've been experimenting with the saved states on the Wii game "LEGO Star Wars: Complete Saga" (PAL). The game itself runs fine on the Wii console, but it has an issue which makes it impossible to save anything in Dolphin because saved games become corrupt. It's a known and reported issue, so I won't discuss it any further here -- what I would like to speak about is about my experiments with the saved states which I started because the in-game saves didn't work properly, and there's one funny thing that I wanted to talk about in my post here.

At first, it seemed to me like the saved states don't work at all in LEGO Star Wars: Complete Saga. First I saved a game (using Shift+F1), then quit Dolphin and didn't return to the game for some six or seven hours, then I fired Dolphin, started the game and hit F1 to load. The game greeted me with a message "Communications with the Wii Remote have been terminated" or something to that effect, and I couldn't make the saved game work no matter how hard I tried. However...

I kept experimenting and decided to try saving the game and the loading it back within the same Dolphin session. What I did was basically hit Shift+F1 to save, then hit F1 to load right after I saved. To my surprise, the game loaded successfully, I could walk and everything - the only problem was that the Nunchuk emulation seemed to go haywire after I loaded (the character kept on walking even if I didn't touch the controls), which I solved by turning Nunchuk emulation off prior to saving and loading. But other than that, the saved game loaded fine, which surprised me, because I couldn't make it work no matter how hard I tried before. I closed Dolphin and tried it again. Sometimes the emulator would fail to load the state and report something like there's a command in the HCI buffer or something like that, and it wouldn't work (or the game would just hang), but after a few emulator restarts and retries I finally got the saved state working, so it was definitely a working saved state with some issues which apparently were "random" and didn't exclude the possibility of loading the saved state altogether.

Happy about being successful with the saved state, I turned Dolphin off and didn't return back to it for a few hours again, then I fired it up, hit F1 to load the state, and... was greeted with the familiar "Communications with the Wii Remote have been terminated" message. No matter how many times I tried to restart Dolphin and reload the previously working saved state, it would still either fail with the HCI message, or report that the Wii Remote communications have been terminated. It looks like the saved states were somehow time-dependent - after some time they would kind of "expire" and not load anymore. That made me curious and I wanted to investigate further.

I decided to go radical and roll back the time to that of the saved state, thinking it may have something to do with the time stamp when the saved state was made. I rolled back to the time when the state was made, fired Dolphin, hit F1, and after a few HCI failures there it was again, a working saved state. No Wii Remote termination messages, nothing - just a plain working saved state where I could walk, do things, and that wouldn't crash.

Then I decided to see if there are any programs on the web which can "halt" the time at the specified period for a given program. I found a program called RunAsDate, which basically fired an application and fed it the time you specified. That was exactly what I wanted, so I quickly created a batch file that would run Dolphin via RunAsDate and feed it a specific date and time - something like 08/01/09, 00:00. I also turned on the "Immediate" mode so that the date/time was propagated immediately, and I turned off the "Advance time" mode so that the time was halted altogether at 08/01/09, 00:00, and didn't advance at all for Dolphin.

I fired Dolphin that way and made a saved game via the saved states system (Shift+F1). I reloaded (F1) to make sure it worked. It did. So, I closed Dolphin, changed my system time to four hours ahead, and fired Dolphin *without* RunAsDate first. Just as I expected, advancing the time made the saved state stop working, so I got the "Wii Remote connection has been terminated" message. Then, without making any further changes to my system time, I ran Dolphin *via* RunAsDate with parameters above (essentially the same parameters as the game was saved with), and loaded with F1. It worked! There it was, working fine, which confirmed that saved states had this "expiration" thing to them for some reason.

In conclusion I'd like to say that, first of all, the experiment above is NOT meant as a solution to the saved states issue! It looks like there's more than one issue with saved states, such as Nunchuk emulation not saving/loading properly (at least for the game in question) and that HCI buffer error that appears to be transient (sometimes it'll show up and sometimes it won't and the game will load normally). Also, I have no idea what long-term effect halting the system date for Dolphin may have, so there may be other problems and issues ahead. Therefore, it's NOT a solution, it's a mere investigation of one of the phenomena I found interesting and that hopefully will be of some help to someone. Perhaps this information would be interesting for the developers of Dolphin - and if not, I'm sorry for speaking about something that might be known already or might be of little significance. Feel free to close or remove this thread if it's not interesting or irrelevant.

Also, thank you very much for Dolphin and congratulations on making Dolphin as great as it is! :)
 

·
Registered
Joined
·
45 Posts
Discussion Starter · #3 · (Edited)
seems unlikely, emulated wiimote or real?
Emulated wiimote, haven't tried the real one with Dolphin yet, didn't have time yet to figure out how to connect and use the real one with my PC and Dolphin. :) Btw, some particulars: the "easiest" revision where the above-mentioned issue can be seen and reproduced is R3403, it seems the easiest to make the saved state work there, though I also tried it with R3928 to ensure that the issue is still actual -- although it's a little more difficult in the latest release: it looks like more work (restarting emulator, the game, and hitting F1 routine) is required in the latest revision, the game hangs more often there upon loading than in R3403, though the general tendency is much similar. At least the latest revision I tried (R3928) definitely follows the same dependency on the system time when dealing with save states, as described in my first post here.

P.S. Just to exclude the possibility of the factor of randomness, I just tried the thing again a few dozen times with and a few dozen times without RunAsDate on the latest compiled revision I have (R3928) - I couldn't, no matter how hard I tried and how many times I reloaded, make the saved state work if the system time was too far ahead from the moment the saved state was made -- in the best scenario the game would just hang with the "Communications with Wii Remote have been interrupted" message. With RunAsDate however, every third or fourth reload (roughly) was successful, with other reloads just failing due to that HCI buffer error or just a hang (seem like random errors, really, don't know what's causing them - sometimes the game will just load, and sometimes it'll report this HCI stuff or hang; anyway, it looks like it's not related to the issue of time I'm talking about, at least such connection isn't apparent...) At any rate, the thing appears to be fairly certain - whenever the time is OK (same or similar to the time of save), it's possible to load the state; if it's too far ahead, it's no go no matter what you do.

My Wiimote Plugin options, if they're relevant: everything at default settings, Real Wiimote options off.
 

·
Registered
Joined
·
45 Posts
Discussion Starter · #5 ·
I tried adding the gc system time to the savestate, but it didnt seem to make a difference
Hmm, I don't know, I have very little idea how Dolphin works - I took a brief look at the source but it's complex and I have no practical knowledge about how Wii works internally, but my best guess would be that there might be some functions that depend on the PC system time when saving or loading states, maybe something's causing the time dependency there?..
 
1 - 5 of 5 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top