Project

General

Profile

Actions

Emulator Issues #11174

closed

Playing an Input Recording corrupts Wii system memory

Added by master0fdisaster1 almost 6 years ago. Updated almost 6 years ago.

Status:
Fixed
Priority:
High
Assignee:
% Done:

0%

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

Description

What's the problem? Describe what went wrong.

Recording input and then playing it back corrupts the savefile of the game you recorded the input on(unless it's a gamecube game).
I have tested this on Super Mario 64 (NAAE01), Mario Kart Wii (RMCE01) and Super Mario Sunshine (GMSE01). Sunshine's save file was fine. SM64 and MKW's were not.

Replaying the Input recording in wx also corrupts the savefile.

What steps will reproduce the problem?

1.Start a Wii/VC game
2.Create a savefile
3.record an input sequence
4.stop the game and play the input sequence back
5.Restart the game.

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.

5.0-7827

Is the issue present in the latest stable version?

No.

Atleast it doesn't tell me on 5.0 that the Wii system menu has been damaged when i boot up the game (in this case Super Mario 64(VC) NAAE01)
I don't know if the system memory is actually fine.

If the issue isn't present in the latest stable version, which is the first broken version? (You can find the first broken version by bisecting. Windows users can use the tool https://forums.dolphin-emu.org/Thread-green-notice-development-thread-unofficial-dolphin-bisection-tool-for-finding-broken-builds and anyone who is building Dolphin on their own can use git bisect.)

I can bisect the issue if necessary.

What are your PC specifications? (CPU, GPU, Operating System, more)

Windows 10, i3-4360, R9 280


Files

second bisect.log (742 KB) second bisect.log master0fdisaster1, 05/28/2018 12:07 PM
first bisect.log (397 KB) first bisect.log master0fdisaster1, 05/28/2018 12:07 PM
Actions #1

Updated by leoetlino almost 6 years ago

Please bisect.

The Movie and Netplay code does all kinds of awful things to the NAND. Combined with save states that don't actually save the state of the NAND, I'm not entirely surprised things are breaking. (The regression was likely introduced by me when I made Wii emulation stricter)

Actions #2

Updated by leoetlino almost 6 years ago

It would also help to have log messages (enable IOS log types, set level to Info)

Updated by master0fdisaster1 almost 6 years ago

From 5.0 to the version before 5.0-4318 https://dolphin-emu.org/download/dev/master/5.0-4318/?nocr=true the save file was unaffected
From 5.0-4318 to the version before 5.0-5728 https://dolphin-emu.org/download/dev/master/5.0-5728/?nocr=true the save file was deleted
From 5.0-5728 to current version the save file is corrupted and i get the "The Wii system memory has been damaged"

Actions #4

Updated by master0fdisaster1 almost 6 years ago

  • message

i get the "The Wii system memory has been damaged" message

Actions #5

Updated by leoetlino almost 6 years ago

  • Status changed from New to Fixed
  • Fixed in set to 5.0-7871

Should be fixed in 5.0-7871

Actions #6

Updated by master0fdisaster1 almost 6 years ago

I just tested it in 5.0-7871 and in the currently latest version 5.0-7905 and the issue was still present.

Actions #7

Updated by JMC4789 almost 6 years ago

  • Status changed from Fixed to Accepted
  • Assignee set to leoetlino

You definitely shouldn't be starting an input recording after the game has booted, especially for something that installs to the NAND.

I'm not sure what Dolphin does in this case.

Actions #8

Updated by master0fdisaster1 almost 6 years ago

You shouldn't!?

"Start Recording Input" is greyed out until you boot up a game (or as i just found out until you select a game in the gamelist but you can easily overlook that).

Anyway I tested it again, and if you start the game through the "Start Input Recording" option than that alone corrutps the system memory.
If you start the recording after you boot up the game normally then the system memory doesn't get corrupted until you play the input recording back.

Actions #9

Updated by leoetlino almost 6 years ago

  • Regression changed from No to Yes

Reproduced. Looks like for some reason the copy code in WiiRoot isn't copying back files to the configured NAND properly...

I am in the process of rewriting the whole thing anyway, and it turns out the issue is already fixed in my local branch, so this is currently blocked by https://github.com/dolphin-emu/dolphin/pull/6988

Actions #10

Updated by leoetlino almost 6 years ago

  • Status changed from Accepted to Fixed
  • Priority changed from Normal to High
  • Fixed in changed from 5.0-7871 to 5.0-7991

Should be fixed (for real, this time) in 5.0-7991. The final copy works fine for me. Please update the issue if it's still broken for you.

Note: the deterministic NAND mechanism was changed in 5.0-7871. Now Dolphin will only use a Blank NAND if you start input recording before launching emulation. Also, since 5.0-7991, backups are saved as .bin files and named after the title ID. To restore those, just use Tools > Import Wii Save.

Actions

Also available in: Atom PDF