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

Core: Only reset wiimotes in Wii mode #8504

Merged
merged 1 commit into from Nov 30, 2019

Conversation

@stenzek
Copy link
Contributor

stenzek commented Nov 30, 2019

This was causing the FifoCI runners to crash, as the Wiimotes were not initialized in the first place.

The whole g_wiimote_sources setup seems kinda janky in the first place...

This was causing the FifoCI runners to crash, as the Wiimotes were not
initialized in the first place.
@stenzek stenzek merged commit 0f6304a into dolphin-emu:master Nov 30, 2019
10 checks passed
10 checks passed
default Very basic checks passed, handed off to Buildbot.
Details
lint Build succeeded on builder lint
Details
pr-android Build succeeded on builder pr-android
Details
pr-deb-dbg-x64 Build succeeded on builder pr-deb-dbg-x64
Details
pr-deb-x64 Build succeeded on builder pr-deb-x64
Details
pr-freebsd-x64 Build succeeded on builder pr-freebsd-x64
Details
pr-osx-x64 Build succeeded on builder pr-osx-x64
Details
pr-ubu-x64 Build succeeded on builder pr-ubu-x64
Details
pr-win-dbg-x64 Build succeeded on builder pr-win-dbg-x64
Details
pr-win-x64 Build succeeded on builder pr-win-x64
Details
@stenzek stenzek deleted the stenzek:fifoci-wiimote-crash branch Nov 30, 2019
@Pokechu22

This comment has been minimized.

Copy link
Contributor

Pokechu22 commented Dec 2, 2019

This code was added in #8224. I don't remember if I actually tested it in raw Gamecube mode, but I did test it in the case of loading a Gamecube game from the Wii Menu. To make sure, is _CoreParameter.bWii still set to true when stopping in that case?

@stenzek

This comment has been minimized.

Copy link
Contributor Author

stenzek commented Dec 3, 2019

_CoreParameter.bWii was false for fifologs in GC mode, I didn't check games in GC mode but I imagine it should also be the case.

@Pokechu22

This comment has been minimized.

Copy link
Contributor

Pokechu22 commented Dec 3, 2019

Ah, looks like the reset was superfluous for the transition from Wii to GC, as they're reset in MIOS::ReinitHardware (which actually also sets bWii to false):

static void ReinitHardware()
{
SConfig::GetInstance().bWii = false;
// IOS clears mem2 and overwrites it with pseudo-random data (for security).
std::memset(Memory::m_pEXRAM, 0, Memory::EXRAM_SIZE);
// MIOS appears to only reset the DI and the PPC.
DVDInterface::Reset();
PowerPC::Reset();
Wiimote::ResetAllWiimotes();
// Note: this is specific to Dolphin and is required because we initialised it in Wii mode.
DSP::Reinit(SConfig::GetInstance().bDSPHLE);
DSP::GetDSPEmulator()->Initialize(SConfig::GetInstance().bWii, SConfig::GetInstance().bDSPThread);
SystemTimers::ChangePPCClock(SystemTimers::Mode::GC);
}

So this change shouldn't cause any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.