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

DI MIOS crash fixes #8560

Merged
merged 2 commits into from Jan 14, 2020
Merged

DI MIOS crash fixes #8560

merged 2 commits into from Jan 14, 2020

Conversation

@Pokechu22
Copy link
Contributor

Pokechu22 commented Jan 14, 2020

This should the problem with launching Gamecube games from the Wii menu (through MIOS) that @Miksel12 mentioned on #8394.

My mistake was that IOS::HLE::GetIOS() can be empty, and is when launching with MIOS. This was obscured by the existing checks, which assumed that IOS::HLE::GetIOS()->GetDeviceByName("/dev/di") could fail, but only with GetDeviceByName returning nothing. As noted in the (existing!) comment about that behavior, it is hit from UpdateRunningGameMetadata, which MIOS calls:

DVDInterface::UpdateRunningGameMetadata();

What tricked me was that UpdateRunningGameMetadata is not hit when launching Gamecube games directly (which might be a bug, perhaps explaining issue 11503 but I'm not sure), so I never ran into this in my testing. I do think I tested MIOS at some point, but it must have been before the partition changes that added the IOS::HLE::GetIOS() call.


The second change, which is much more hacky, removes the call to DVDInterface::Reset() from MIOS. Resetting it resets the DTK configuration, which causes games that try to use DTK to fail. Removing the reset completely seems like it's probably incorrect (perhaps the way MIOS resets DI only resets some things but not DTK, but I'm not sure what that actually would look like), but it's better to have the games work. (Furthermore, the normal gamecube IPL doesn't reset DI after it's finished setting things up to my understanding, so it seems odd for MIOS to do so).

@Pokechu22 Pokechu22 force-pushed the Pokechu22:di-mios-fixes branch from 68747f6 to ddba801 Jan 14, 2020
@JosJuice

This comment has been minimized.

Copy link
Contributor

JosJuice commented Jan 14, 2020

What tricked me was that UpdateRunningGameMetadata is not hit when launching Gamecube games directly (which might be a bug, perhaps explaining issue 11503 but I'm not sure)

Assuming you mean when using the GC IPL, this is more of a missing feature than a bug. The problem is that we don't have a reliable way of detecting game launching on the GameCube – it's all handled on the PPC, without any equivalent of ES_Launch. (Though maybe we could just do something like treating a game as running as soon as you insert its disc when Dolphin is running in GameCube mode...)

If you mean when launching from the game list, that's because we don't need the UpdateRunningGameMetadata logic and just call SetRunningGameMetadata directly (from SetPathsAndGameMetadata).

Either way, I don't think this is related to issue 11503. Setting the game metadata shouldn't affect the emulated software other than loading/unloading game-specific settings and cheats.

@JosJuice JosJuice merged commit a2f2536 into dolphin-emu:master Jan 14, 2020
9 of 10 checks passed
9 of 10 checks passed
pr-osx-x64 Build failed on builder pr-osx-x64
Details
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-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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.