Project

General

Profile

Emulator Issues #9573

Savestates created while recording a Wii game don't save whole filesystem state

Added by magumagu9 almost 5 years ago. Updated about 3 years ago.

Status:
Work started
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

Basically, savestates save and restore "/tmp"... but never touch anything else, even when you're recording. Therefore, it's easy to cause a desync with a recording that loads a in-game save: if you try to continue from a savestate, the save data will be missing. Generally affects every Wii game which supports saves. Probably easy to fix.

Example of how to reproduce this, for completeness:

  1. Start recording Twilight Princess Wii
  2. Press A+B to start, click yes to the "create a new memory file" prompt, start a new file
  3. Make a savestate
  4. Press home, reset, then go through to the save screen; "create a new memory file" doesn't appear
  5. Stop recording, save the recording.
  6. Load the recording, and load the savestate.
  7. Let recording play through to the save screen
  8. Observe desync: the "create a new memory file" prompt appears

History

#1 Updated by Helios almost 5 years ago

  • Status changed from New to Fix pending

Whoops

#2 Updated by phire almost 5 years ago

I think this is by design as dolphin also doesn't save the memory cards in the savestate for gamecube games.

The same reproduction steps can be used there.

Though, I'm unsure of the wisdom of this design decision

#3 Updated by phire almost 5 years ago

  • Status changed from Fix pending to New

No it isn't. Read the bug report better

#4 Updated by magumagu9 almost 5 years ago

The savestate code for GC memory cards special-cases movies; see https://github.com/dolphin-emu/dolphin/blob/5e50c37c138e28821079c165b0cd72702ff9154f/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp#L510 and https://github.com/dolphin-emu/dolphin/blob/5e50c37c138e28821079c165b0cd72702ff9154f/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp#L239 . It's a little tricky to set up because "Start Recording Input" puts you into the wrong mode by default. but it appears to work otherwise.

#5 Updated by JMC4789 almost 5 years ago

Wii Games really don't work well at all with savestates. I've crashed Dolphin outright by having HID devices connected during a load-state.

I have a feeling savestates need to be completely rethought on Wii; simply loading a savestate for a game as you boot the game will usually crash the game, crash audio or crash Dolphin.

#6 Updated by JMC4789 over 3 years ago

  • Status changed from New to Duplicate

#7 Updated by JMC4789 over 3 years ago

#8 Updated by JMC4789 over 3 years ago

I made a bigger issue for this.

#9 Updated by JosJuice over 3 years ago

#10 Updated by JosJuice over 3 years ago

  • Status changed from Duplicate to New

#11 Updated by leoetlino over 3 years ago

  • Status changed from New to Accepted

In my opinion, savestates should save the whole state, including the NAND filesystem, but this would make states a bit larger... On the other hand, not including the NAND will cause various issues and inconsistencies.

#12 Updated by leoetlino about 3 years ago

  • Assignee set to leoetlino
  • Status changed from Accepted to Work started

I have a WIP branch that saves the entire filesystem. I'll open a PR when it's ready

Also available in: Atom PDF