Project

General

Profile

Actions

Emulator Issues #3443

closed

Harry Potter and the Half-Blood Prince (RH6P) is unable to read/save the game

Added by DimitriPilot3 over 13 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What steps will reproduce the problem?

  1. Let the game reach the first menu, press A
  2. Select "New adventure"
  3. Select one of the save slots (they're all empty, even after importing the save files from my Wii)

What is the expected output? What do you see instead?
The game should be able to load/save the game without errors. Instead, when attempting to create a slot, it says an error occured while saving to the Wii System Memory, and auto-saving is disabled.
Notice that even after importing a save file from a real Wii, the game shows three blank save files.

Dolphin version with the problem? Other Dolphin version without the
problem?
Tested some revisions from the latest (R6321) up to R3085, without success. I'm pretty sure this issue always existed...

32-bit or 64-bit and any other build parameters?
32-bit

OS version and versions of tools/libraries used?
Windows 7

Please provide any additional information below.
I might post more info whenever I get the chance...

Actions #1

Updated by DimitriPilot3 over 13 years ago

That's for the PAL version of the game.

This issue is also present in Interpreter mode. The only workaround to this saving issue is to use savestates, which aren't perfectly stable and may break between revisions...

Actions #2

Updated by lpfaint99 over 13 years ago

is this launching from the system menu, or does it happen when you launch from the gamelist?

Actions #3

Updated by DimitriPilot3 over 13 years ago

I don't have the Wii system menu installed, all my GC/Wii games are started directly.

Actions #4

Updated by skidau over 13 years ago

I suspect that this issue is related to issue 1749. Mario Kart Wii will do the same if it is started with a fresh NAND dump.

Actions #5

Updated by DimitriPilot3 over 13 years ago

Well yeah, I remember Mario Kart Wii used to have that savefile-creating problem which required using a completed save file...

However, I don't think this issue is related to issue 1749 (fopen mode)... Have a look at this log:
http://pastebin.com/Q3TBibyf

Lines 37 and 38 are very interesting, because they show that the game is trying to work with files that contain a colon in their name (HP:HBP0, HP:HBP1 or HP:HBP2 depending on the save slot used). So when the game tries to create one of these files, an empty file named "HP" is created instead... And I think that's exactly what is causing this issue. That should also be what is causing the "Import Wii Save" feature to silently fail when attempting to create these files.

By the way, I forgot to describe a step before step 3: one second after selecting a slot, the game shows a "Ready to save" message and waits until you press A before trying to save. The "An error occured while saving to the Wii System Memory" error message appears shortly after pressing A...

Actions #6

Updated by DimitriPilot3 over 13 years ago

I just confirmed that loading/saving works after hacking RAM memory when in the menu (for example, by replacing all ':'s with '-'s in 'HP:HBP'). So yeah, the colon is exactly what is causing this issue.

Maybe implementing something that replaces invalid characters with a certain character (such as _ or ΓΏ) should do the trick...

Actions #7

Updated by Anonymous over 13 years ago

this is kinda funny :p
I wonder what a nand extraction program will create the files as?

Actions #8

Updated by Anonymous over 13 years ago

  • Status changed from New to Work started

answer: they replace ':' with '-'

Actions #9

Updated by Anonymous over 13 years ago

can someone with the game try this patch? http://pastie.org/1363862

Actions #10

Updated by DimitriPilot3 over 13 years ago

I'll have to make a comment later. This issue isn't entirely fixed...

Actions #11

Updated by Anonymous over 13 years ago

Try with a revision after 6564. My computer seems to be too slow for this game, and I can't find any save files online from other peoples' wiis :(

Actions #12

Updated by DimitriPilot3 over 13 years ago

My 2.66Ghz Core 2 Duo CPU appears to be too slow for this game too... :P

Anyway, the fixes introduced in r6545 (I also tested a similar fix myself back then, and it was the same deal) and r6557/r6564 only fix the "file creation/saving" issue.
The game still shows three blank save files because it isn't able to find the "renamed" files. Although I'm not sure how this game checks that the three save files exist, it sounds like some other parts of Dolphin's code should be fixed too...

If you want, you may try using the save data that came from my Wii (http://www.mediafire.com/?z3wld1iiljmys68). Otherwise, to test the "loading" part of this issue, just let the game create a save file (in the "New adventure" menu), exit the game and verify that the game sees the save file.

Also, speaking of the "hack" mentioned in comment #14, I had created a game patch that rewrites the "HP:HBP" string in memory as "HP-HBP" so that loading/saving worked the same way without issues. I might eventually rewrite it for testing, but whatever...

Actions #13

Updated by lpfaint99 over 13 years ago

you can attempt to import the save using r6640 or later

Actions #14

Updated by DimitriPilot3 about 13 years ago

The attached patch appears to fix the "loading" part of this issue.

The game no longer shows three blank save files, and no longer throws an error when attempting to create save files. In addition, importing a data.bin file for this game seems to work now, thanks to r6640.
So, unless there are still parts of code waiting for file name replacements, I think this issue can be closed now...

Actions #15

Updated by DimitriPilot3 about 13 years ago

Actually, since I renamed "CompleteFilename" to "FileName", I thought I should rename "Filename" to "DirName" and do some minor modifications.

I attached another version of that (above) patch. Use this one instead.

Actions #16

Updated by hrydgard about 13 years ago

Dimitri, you got SVN commit access, feel free to commit the patch.

Actions #17

Updated by DimitriPilot3 about 13 years ago

  • Issue type set to Bug

Well, that was quick... Thanks :)

I just committed the changes in r6791.

Actions #18

Updated by Anonymous about 13 years ago

  • Status changed from Work started to Fixed
Actions

Also available in: Atom PDF