Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove force disable WC24 Standby #12064

Merged
merged 1 commit into from Aug 10, 2023
Merged

Conversation

noahpistilli
Copy link
Member

When WiiConnect24 Standby is enabled, we would disabled it upon shutdown because

If it is enabled, it prevents us from receiving shutdown commands in the State Transition Manager (STM)

which would cause the emulator to hang on shutdown.

Upon removing the lines of code, it shuts down gracefully as far as I can tell. Please test.

@larsenv
Copy link

larsenv commented Aug 2, 2023

Doesn't removing that code cause Dolphin to hang on shutdown because it goes into standby mode?

@noahpistilli
Copy link
Member Author

It used to but from testing with NAND's with and without the Wii Menu, it shuts down fine.

@leoetlino
Copy link
Member

Yes, STM and ES were fixed a while ago so this should now work if you have the System Menu installed. Are you sure this also works fine without the System Menu though? IIRC games would try to launch the menu which would then issue the STM standby command. Make sure you don't have panic alerts disabled as this can mask launch failures.

@noahpistilli
Copy link
Member Author

noahpistilli commented Aug 4, 2023

Testing with Lego Indiana Jones 2: The Adventure Continues, on shutdown it only calls STM, nothing to ES. This is with both Wii Menu and no Wii Menu.

I have noticed the behaviour you described with old versions of Dolphin, such as the one when you added the disable standby trick.

I forgot to enable standby connection, oops. Testing with Lego Indiana Jones 2: The Adventure Continues with a Wii Menu allows for graceful shutdown.

Without however, it hangs on shutdown. With my old test, I realized that I forgot to enable standby connection on that NAND. This being said, I had to copy a SYSCONF with standby connection enabled in order to trigger this. Without the Wii Menu, there isn't really a way to enable standby connection without something like ConnectMii.

@AdmiralCurtiss
Copy link
Contributor

Played around with this a bit... Indeed, I can confirm that:

  • Standby Connect off + No Wii Menu shuts down fine.
  • Standby Connect on + Wii Menu shuts down fine (you can see it booting the Wii Menu for a bit if you look at the title bar, even).
  • Standby Connect on + No Wii Menu, shutting down freezes the emulated system.

It is indeed non-trivial to get into that last state, since you can't actually change that setting without having a Wii Menu installed in the first place, so I think this isn't really a big deal. It would be nice if we had some sort of better handling of it though.

If you have MMU off and issue a shutdown you can get some invalid reads before emulation fully freezes depending on the game, but with MMU on or in some games even with it off it just stops doing anything, presumably because it can't find the Wii Menu to boot into. The emulation still shuts down correctly if you issue a forced shutdown in this state, and Dolphin itself remains responsive just fine during all of it. I've also checked and NES games appear to save fine even in this setup, which makes since since they would have to finish their save flush before switching over to the Wii Menu.

If no one has any objections I'll merge this for the beta, since this does give significant convenience improvements for using WC24/WiiLink.

@JMC47 JMC47 merged commit 032c77b into dolphin-emu:master Aug 10, 2023
11 checks passed
@CaryllSimpas

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants