Emulator Issues #12290
"Import Wii Save" fails if game has never been played
0%
Description
What's the problem? Describe what went wrong.
Using Tools → Import Wii Save fails if the game being imported has never been played. A popup titled "Save Import" with the message "Failed to import save files." appears, and "Core\HW\WiiSave.cpp:456 E[CORE]: WiiSave::Copy: Failed to write header" is logged.
What steps will reproduce the problem?
- Move the existing Dolphin Emulator folder to some other name (so that a new, empty one is created upon launching dolphin).
- Start dolphin.
- Select Tools → Import Wii Save.
- Select a save file, such as this one for the US version of Super Paper Mario.
- Observe that the import fails.
Note that as long as the game has been started, even if creating a save file is declined (e.g. Super Paper Mario prompts for it), the Wii\title\00010000\52385045\content
and Wii\title\00010000\52385045\data
folders are created and the import works. The import seems to specifically be failing because data
is missing; if only Wii\title\00010000\52385045
exists then the import fails but it works once data
is created.
Is the issue present in the latest development version?
Yes, 5.0-12716.
Is the issue present in the latest stable version?
No, 5.0 works fine.
If the issue isn't present in the latest stable version, which is the first broken version?
Introduced in 5.0-7972 (PR 6988). Affects both DolphinQt and DolphinWx.
Logs from 5.0-7964:
12:29:692 FileUtil.cpp:206 I[COMMON]: CreateFullPath: path C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/52385045/data 12:29:693 FileUtil.cpp:173 I[COMMON]: CreateDir: directory C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/ 12:29:694 FileUtil.cpp:173 I[COMMON]: CreateDir: directory C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/52385045/ 12:29:695 HW\WiiSave.cpp:156 I[CONSOLE]: Creating file C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/52385045/data/banner.bin 12:29:695 FileUtil.cpp:206 I[COMMON]: CreateFullPath: path C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/52385045/data/wiimario00 12:29:697 FileUtil.cpp:173 I[COMMON]: CreateDir: directory C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/52385045/data/ 12:29:698 HW\WiiSave.cpp:330 I[CONSOLE]: Creating file C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/52385045/data/wiimario00 12:29:730 FileUtil.cpp:206 I[COMMON]: CreateFullPath: path C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/52385045/data/wiimario01 12:29:732 HW\WiiSave.cpp:330 I[CONSOLE]: Creating file C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/52385045/data/wiimario01 12:29:753 FileUtil.cpp:206 I[COMMON]: CreateFullPath: path C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/52385045/data/wiimario02 12:29:755 HW\WiiSave.cpp:330 I[CONSOLE]: Creating file C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/52385045/data/wiimario02 12:29:781 FileUtil.cpp:206 I[COMMON]: CreateFullPath: path C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/52385045/data/wiimario03 12:29:783 HW\WiiSave.cpp:330 I[CONSOLE]: Creating file C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/52385045/data/wiimario03
Logs from 5.0-7972:
14:06:196 FileUtil.cpp:206 I[COMMON]: CreateFullPath: path C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/52385045/data 14:06:197 FileUtil.cpp:173 I[COMMON]: CreateDir: directory C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/ 14:06:199 FileUtil.cpp:173 I[COMMON]: CreateDir: directory C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/52385045/ 14:06:200 FileUtil.cpp:401 I[COMMON]: ScanDirectoryTree: directory C:/Users/Pokechu22/Documents/Dolphin Emulator/Wii/title/00010000/52385045/data 14:06:206 HW\WiiSave.cpp:508 E[CORE]: WiiSave::Copy: Failed to write header
It creates Wii\title\00010000\52385045
only; the data
folder does not exist despite the message.
What are your PC specifications?
- CPU: AMD A6-340M APU with Radeon(tm) Graphics, 1500 Mhz, 4 Core(s), 4 Logical Processor(s)
- GPU: AMD Radeon HD 6520G
- OS: Windows 10 Pro (Insider preview) 10.0.19042.541
History
#1
Updated by ShadowMyst 4 months ago
I might be wrong on this, but I believe this would be normal behavior as a real wii will not allow you to import save data from a SD card if the related game has not been played.
#2
Updated by pokechu22 4 months ago
JMC mentioned the same thing in #dolphin-dev:
2020-10-01 06:25:09 +JMC47 pokechu22: 12290 is invalid 2020-10-01 06:25:13 +JMC47 that's actually how the Wii works 2020-10-01 06:25:50 pokechu22 This is in Dolphin's UI, not in the Wii Menu. I vaguely recall that being how it works in the Wii Menu but it's annoying for Dolphin 2020-10-01 06:26:06 +JMC47 yes 2020-10-01 06:26:10 +JMC47 we had to do it in Dolphin's UI 2020-10-01 06:26:16 +JMC47 because if you don't you corrupt the Wii NAND 2020-10-01 06:26:38 +JMC47 leoetlino: ^ you can explain why if you remember 2020-10-01 06:26:40 +JMC47 I don't 2020-10-01 06:44:00 Techjar yeah but doesn't betplay break that rule when copying the save from the temp nand back to the main nand? 2020-10-01 06:50:59 +JMC47 dunno 2020-10-01 06:51:03 +JMC47 probably 2020-10-01 06:51:36 Techjar i mean it doesn't seem to be breaking anything 2020-10-01 06:53:20 +JMC47 It breaks shop access 2020-10-01 06:53:25 +JMC47 and saving in certain games I think?
That said, I'm still not sure if that really means it's impossible to make importing work for Dolphin's UI (which is what I care about; doing it via the system menu shouldn't work if it doesn't work on console). And even if it is, IMO it should give a more explicit message along the lines of "Failed to import save: the game associated with the save has never been played." (Ideally, it would also include the name of the game, but I'm not sure if that's possible; I do think a game name is included in the save file since e.g. the Jodi save file has it changed from Lego Star Wars.) The current way it's failing doesn't make that particularly obvious.
#3
Updated by JMC4789 4 months ago
I mean, we bypass it for netplay, but that's because online services and the actual structure of the NAND doesn't matter that much for a single session like that.
I'm 99% sure we did this on purpose to prevent NAND corruption - games like Dragon Quest X do not function properly with any kind of NAND malfunction.
#4
Updated by Pikachu025 4 months ago
If you remove the check (or try to play Netplay, I guess), does this bug return: https://bugs.dolphin-emu.org/issues/10234 ?
#5
Updated by JosJuice 4 months ago
If I recall correctly, the issue is that save files don't contain a TMD that we can put in the NAND, and when TMDs are missing you can get the kinds of issues JMC is describing. I don't believe this has any relation to the Bolt issue, and I'm not sure if there is any issue with netplay. If there is an issue with netplay, that can probably be solved, but I don't think we can do anything about the save file importing issue that doesn't cause problems other than adding a clearer warning message.
#7
Updated by pokechu22 4 months ago
What actually is responsible for writing the TMD? Does the game itself write it on startup (without actually giving a message about saving data), or does the system menu write it? If the system menu writes it, I assume Dolphin HLEs it when launching Wii games directly, in which case it might be possible to write the save file if the appropriate game is in the games list (but that might be a bit weird to do).