Emulator Issues #3761
closedFrom revision r6634 Zelda Twilight Princess says the quest log is corrupted.
Added by Theraot almost 14 years ago.
0%
Description
What's the problem?
From revision r6634, when you start up Zelda Twiligh Princess with old save data, it will say the quest log (in the three slots) is corrupted. If it's the first time running Zelda Twilight Princess it will all go ok, until you close the game and play again, then it says the quest log is corrupted. You can erease the "corrupted" entries and (optionally start a new game and save it, and) the next time you start the game it will say that the quest log is corrupted.
Taking the save data to a prior version of Dolphin and then running Zelda will show that the data is actually been saved correctly (or at least well enough to work as expected), so I suspect that the problem is reading the save data.
Dolphin version with the problem (as it appears in the title bar, Ex.: "R
4779" or "R 6403M"):
The last without the problem is r6633, r6634 introuced the issue.
(optional) Dolphin version that does not have the problem:
In r6633 all is ok, I have also played in r6632, r6631, r6630, r6623 and r6654 without the problem.
Operating system and version:
32-bit or 64-bit:
Running Windows 7 64 bits.
Game ID (as it appears in game properties, Ex.: "GZ2P01" or "RSBE01"):
RZDE01 (from info tab in game properties inside Dolphin).
Updated by BhaaL almost 14 years ago
I don't have ZTP for Wii, so I can't try this.
Can you (or anyone else that compiles his own builds) do a Debug(Fast) Build and follow those steps to create a log?
- Clear/Delete User\Logs\dolphin.log.
- Open the Log Window (View > Show Logwindow).
- Hit "Toggle All" to disable all checkboxes.
- Enable the checkboxes "WII IPC FILEIO" and "Write to file".
- Set the log level to "Debug".
- Run ZTP until the error appears.
Append dolphin.log here, or better pastebin it somewhere and just link us.
Updated by Theraot almost 14 years ago
Hello @j4ck.fr0st,
I haven't tried to compile Dolphin (yet), and I don't know the exact test you would like (with old save data or not, try erasing the "corrupted" data or not). Or what revision do you want to test on. But I've made a few logs following your instructions, I've commited the sin of not doing the same exact thing in them all, but I hope they are at least meaningful.
So, if you need more (expecific) tests, tell me.
By the way, your code is C++ for Visual Studio hosted with Subversion, right? I'll try to compile it.
Updated by BhaaL almost 14 years ago
Sorry, the logs don't help us in any way, we really need a DebugFast build here which provides additional information.
And yes, you should be able to build Dolphin with either Visual Studio 2008 or Visual C++ Express 2008. Refer to the wiki page http://code.google.com/p/dolphin-emu/wiki/Windows_Build for more information.
Updated by BhaaL almost 14 years ago
Can someone try this patch from blubberdiblub, create in response to the MK Wii problems in Issue 1749 (that also contained a hack for ZTP which we removed in r6634)
http://pastie.org/1410746
Updated by Theraot almost 14 years ago
Hello again
I've had some trouble compiling, the matter is that I use Visual Studio 2010, got DirectX SDK Jun10, had to rediscover how to set the directories... But Visual Studio still asks me about OpenCL, wxWidgets (I think), and I do not know what else.
I'll stop trying to compile this.
Updated by BhaaL almost 14 years ago
If possible, use Visual Studio 2008. 2010 has a few changes that do not allow conversion without errors and/or manual work afterwards.
Updated by DimitriPilot3 almost 14 years ago
Well, I just compiled and uploaded a DebugFast build of r6634M: http://www.mediafire.com/?mxo8dc0au2hid63
It might look like a rush job, as I didn't compile it in a clean folder and I had to clean it myself, but I hope it suffices... The local modifications shouldn't be relevant to this issue.
I can't seem to reproduce this yet for some reason, weird... Just tested that on r6656 (from the official website) and r6634M (my own build), with the PAL version of the game (RZDP).
Updated by DimitriPilot3 almost 14 years ago
I couldn't reproduce the "quest log corrupted" issue on r6690 either. The file data is successfully created and saved, and it's still present after I exit and re-run Dolphin. I also tried copying the file data from another revision and it was the same thing. Could it be some sort of "NTSC-only" issue?
Hint: once you somehow manage to compile Dolphin, maybe try reverting the removal of the "SeekPosition % m_FileLength" hack (by reverting back to the CWII_IPC_HLE_Device_FileIO::Seek() function from r6633 and lower)?
Updated by BhaaL almost 14 years ago
- Status changed from New to Questionable
Its (kinda) good that you can't reproduce it anymore. I mean, neither of us could either, with or without patches.
In theory, we shouldn't need the hack anymore, as Seek and GetFileStats is now correct.
Updated by DimitriPilot3 almost 14 years ago
Actually, I couldn't reproduce this at all (using Windows 7 x86). I just tested the 32-bit build of r6634 on the official website (basically with the default settings), and the newly-created quest logs showed fine after re-running ZTP...
For sure, I can say that Theraot and some users on the forum (http://forums.dolphin-emulator.com/showthread.php?tid=14002) encountered this problem, whereas I don't for some reason... Let me guess about the few differences:
- What if it only occurs in x86 builds? Theraot, try using the 32-bit build of r6634 (not the 64-bit one) here and tell the results: http://www.dolphin-emulator.com/download.html?ver=6634&arch=32
- What if it's a NTSC-U-only problem (you have RZDE whereas I have RZDP)? That sounds unlikely...
Updated by vanillaatbest almost 14 years ago
It is not the x86 build that causes the problem. I'm running r6692 in 64 bit on windows 7 64 bit and I have the corrupt save file problem too. Other than the false save file corruption everything is incredible. I guess I'll try r6690 and see how it goes.
Updated by Theraot almost 14 years ago
Hello,
I can confirm the problem happens in both x64 and x32 versions, I have testes on the build r6634 for 32bits @dimitri linked here (http://www.dolphin-emulator.com/download.html?ver=6634&arch=32), with the r6690 vanillaatbest suggested and also with the lastest r6692 with the same results.
About compiling in Visual Studio 2008, I need Visual Studio 2010 for my work, and sadly I don't have the space to install the old one, I'll try C++ express as it's lighter. Please tell me if I need to configure something else aside of DirectX SDK.
If I can get a different version of Zelda Twilight for Wii, I'll let you know, but I don't think it will be soon.
Screenshot of r6634 attached.
Updated by BhaaL almost 14 years ago
No need to include obvious screenshots (please remove it), the thing that really helps is a dolphin.log created by a DebugFast build, with Debug level selected.
Updated by Theraot almost 14 years ago
I've deleted the old logs and the screenshot.
I've succefully compiled the source, updated to r6692 (lastly).
I've created three log with WII IPC FILEIO on verbosity = debug and Write to file.
In the first I've opened Zelda Twilight Princess, created the save file (first time), started a new game in the first slot, default hero and horse name, skip the intro, save the game, told it I don't want to continue playing, back in the quest log screen it looks ok, then I stop emulation and start it over again, go to the quest log screen to see it says the quest log is corrupted, then stop emulation and close dolphin.
In the second one, I've opened the game again, on the quest log screen it says it's currupted, then I erase the three slots (top down order) and stop emulation, start emulation over again, in the quest log screen it says the quest log is corrupted, stop emulation and close dolphin.
For the third, I open the game once more, on the quest log screen it says it's corrupted, then I erase the three slots (top down oreder) after that I star a new game in the first slot, default hero and horse name, skip the intro, save the game, tell it I don't want to keep playing, stop emulation in the title screen, start emulation again, in the quest log screen it says the quest log is corrupted, stop emulation, close dolphin.
I'll try to revert r6634 changes later.
Updated by Theraot almost 14 years ago
Hello once more...
I have reverted the changed to the function CWII_IPC_HLE_Device_FileIO::Seek() to what it was before r6634, after doing so and compiled the problem was solved, at least for me.
I attach a log done with dimitri's custom build (with the problem), and one with mine (solved as described above).
Updated by Theraot almost 14 years ago
Hello,
I've got a PAL Zelda Twilight Princess thanks to a friend, and I've used it on Dolphin, the Game Id as Dolphin shows it in game properties inside Dolphin is: RZDP01
And the interesting thing is that this problem is not present with that version, so I think this got to be NTSC specific.
Updated by BhaaL almost 14 years ago
Thearot: Can you compile your build with this patch and tell us if it fixes the problem?
http://pastie.org/1421188
Updated by Theraot almost 14 years ago
Yes, a custom build with the provided patch applied to the head revision to the time of posting have the problem solved while the head resvision alone still presents it. Tell me if you want a log of the custom build.
Updated by BhaaL almost 14 years ago
- Status changed from Questionable to Fixed
This issue was closed by revision r6718.
Updated by Theraot almost 14 years ago
Will test the build as soon as it's available.
Thank you so much.
Updated by Theraot almost 14 years ago
Hello,
The debug build I did seems to save and load without trouble, but I'm still getting the problem on r6718 and newer. I have updated my copy of the repository and built again... and the problem appeared.
@Dimitri... can you tell Toriano and those people at the forums to verify if they have the problem too? Because I'm thinking it may be something of my machine.
I don't know what's going on... any clue?
I'm suspecting I may have done something different with that patch than you did, I applied it with TortoiseSVN. Sadly I deleted the patched file, I'll try to uptade to r6717 and patch again to see if I can get the situation where the problem is solved and compare the files... later.
Updated by Will.Humber almost 14 years ago
I can confirm that r6718 still exhibits the problem. I'm running Win7 x64 with the 64-bit build.
Updated by Theraot almost 14 years ago
Hello,
Thanks @Will.Humber by the feedback.
I've been unable to reproduce the patched file, but instead I'm working on one of my own, I think I understand what Zelda does, and why the weird behaviour.
Will post patch soon (give an hour or so... there are a couple of things I want to test first to be sure).
Updated by Theraot almost 14 years ago
Hello again,
I have finished a patch of my own, I did debug stepping on WII_IPC_HLE_Device_FileIO.cpp with Zelda Twilight Princess, Mario Kart Wii (Both NTSC) and Super Mario Bros Wii (PAL) for control. I've experimented to discover what's the expected behaviour by those games, and a good guess on the what they check while loading.
I may have not updated currectly the repository when I tested the patch j4ck.fr0st posted, leaving code from r6633, based on that hypothesis I started searching form a solution based on that.
The code is done to give this games what they expect, but the case is that I don't know the correct behaviour, but until I can debug with another games with a problem related to this, this is my best guess. Can anybody point me another affected game?
If you think my patch smells bad, I'll tell you that it works, and it smells better and have better performance than the r6633 alternative.
I have cleaned and updated my copy of the repository to r6722 applied the patch and verified that it worked.
patch (created with tortoiseSVN) attached.
Updated by BhaaL almost 14 years ago
- Status changed from Fixed to Work started
Its a bit of a problem trying to fix something without having most of the games, I could only rely on my own homebrew that were verified against a real Wii, and the reports in here.
I'll review the patch in a second, and see what I might have missed.
Updated by Will.Humber almost 14 years ago
r6723 seems to have fixed the problem for me.
Updated by Theraot almost 14 years ago
Yes it's fixed,
Let this issue rest in peace
Thanks