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
Fix IPL crash when launching MIOS-patched games #9663
Conversation
MIOS puts patch data in low MEM1 (0x1800-0x3000) for its own use. Overwriting data in this range can cause the IPL to crash when launching games that get patched by MIOS. See https://bugs.dolphin-emu.org/issues/11952 for more info. Not applying the Gecko HLE patches means that Gecko codes will not work under MIOS, but this is better than the alternative of having specific games crash.
Oversight from dolphin-emu#9545, which moved the "new game has been loaded" logic to a separate OnNewTitleLoad function that has to be called explicitly *after* a title has loaded. Coupled with the commit that makes Dolphin not clobber 0x1800-0x3000 when using MIOS, this fixes Wind Waker and other MIOS-patched games when they are launched from the System Menu.
|
On console, do Gecko codes work with MIOS-based games? (I'm not entirely sure how Gecko codes even work on console to be honest.) |
|
Gecko hooking does not work with MIOS on my Wii. You have to use a MIOS replacement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is better than crashing regardless of what happens on console. Our emulation of MIOS is limited as it is.
|
Just throwing in some thoughts to consider: I don't really see a use case for gecko codes and running a game from the wii menu's disc channel. If there is, then it should be considered. Maybe even as a hard option even for the patched games, because the MIOS patches can be replaced with gecko codes or other forms of patching. As far as i know, NeoGamma is the only software that can run gecko codes on retail gamecube discs on a wii. But it doesn't even work for wii games in Dolphin, at least last time i checked. And it requires cMIOS support, which i guess is not implemented in Dolphin. cMIOS basically does 2 things, if i remember correctly, allow reading DVD-Rs(which is irrelevant for Dolphin and there should be a cMIOS variant without it), and running homebrew software, that has been loaded into memory before starting MIOS(or BC). NeoGamma comes with its own gamecube executable that handles booting the gamecube games, and that one writes the gecko code handler into memory. So, even for NeoGamma this PR should be irrelevant, because the code from the PR would be executed before booting the homebrew software from memory, if i'm not mistaken. |
|
Gecko OS can also hook into GameCube games, but only if you've done a MIOS replacement I believe? the neogamma thing makes more sense though. I do remember that. |
MIOS (the IPL code running on the PPC, not the ARM part) puts patch data in low MEM1 (0x1800-0x3000) for its own use. Overwriting data in this range can cause the IPL to crash when launching games that get patched by MIOS. See https://bugs.dolphin-emu.org/issues/11952 for more info.
Not applying the Gecko HLE patches means that Gecko codes will not work under MIOS, but this is better than the alternative of having specific games crash.
This also fixes an oversight from #9545, which moved the "new game has been loaded" logic to a separate OnNewTitleLoad function that has to be called explicitly after a title has loaded.
Those two changes fix Wind Waker and other MIOS-patched games when they are launched from the System Menu.