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
Add hack to IPCHLE to make NeoGamma work. #3816
Conversation
I still think this is a better behavior than it being undocumented in the code and then crashing. |
Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion. Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb.cpp, line 204 [r1] (raw file): Comments from Reviewable |
Why does this differ from the "default" clase of the next switch/case? |
Thanks, it seems to work now. But i think it uncovers another issue, GetCoverStatus does not return that no disc is inserted, instead it times out. This might be related to the hack, but it might also be a general issue with Dolphin. On hardware, NeoGamma returns error 0x01023A00, if no disc is inserted, which translates into 0x01XXXXXX = "No disc inserted" and 0xXX023A00 = "Medium not present / Cover opened" according to NeoGamma, and according to YACD it means "lid open" and "Medium not present / Cover opened". Could this explain some issues with the wii menu that are related to disc changes? |
I just hacked together a homebrew and ran it on my Wii; that one simply returns -4 as error when I pass command 3 or higher (if I didn't mess up anywhere). |
Can you post the source code and the .dol of this, so magumagu can check if that is really what he means? |
Here you go. And the Dol. Just bear in mind that its copy+paste from a different copy+pasted and hackish solution. I didn't verify the rest of the buffer tho, so I'm not sure if anything else should happen there (yet). @degasus: I suppose it breaks during parsing inside the |
@BhaaLseN Okay, -4 makes sense, I guess. @degasus The SIOCtlVBuffer constructor can crash (maybe that shouldn't be the case, but it's not obvious how to fix that). Also, the existing default case doesn't send a reply. @mimimi085181 Err, check again? I see a timeout, but it has nothing to do with GetCoverStatus. |
Yeah, i need to check that again, it's either resetting the drive or reading the disc id that times out. Gecko OS does not require this hack, but crashes with no disc inserted, so i guess there's at least 1 unrelated issue at play here. |
If we have a test saying -4 is what it should return, then is it really a hack if we did it like that? Or am I missing something. |
-4 is the error returned by the IOCtlv call, which is |
NeoGamma is explicitly sending a nonsense command to the Bluetooth module; make sure to respond with something sane. Fixes issue 9470, a regression from PR dolphin-emu#1856.
Updated with a less hacky version. I think this behaves correctly. |
Suppose thats good enough (and it gets rid of another existing hack). At least on WiiBrew, theres no known IOCtl documented (only IOCtlv). LGTM unless someone else finds a reason to keep the IOCtl active. |
Seems to perform fine for me. |
Reviewed 1 of 1 files at r2. Comments from Reviewable |
NeoGamma is explicitly sending a nonsense command to the Bluetooth module;
make sure to respond with something sane.
Fixes issue 9470, a regression from PR #1856.
Yes, it's a bit hacky, but @JMC47 encouraged me to submit this. Feedback from anyone with a better understanding of how error handling works on IOS would be welcome.
This change is