dolphin
dolphin copied to clipboard
Add option to report empty GC disc drive as closed (issue 11840)
https://bugs.dolphin-emu.org/issues/11840
This gives important doot-doot-doot music and bouncy cube.
Only problem: when an empty disc drive is reported as closed, the IPL encounters a read error:
The disc could not be read.
Please read the NINTENDO GAMECUBE
Instruction Booklet for more information.
This means the menu does not load afterwards.
I don't know why that happens. I wasn't able to fix it. So setting is off by default.
Unless I misread the issue report, having an IPL dump, disabling "Skip Main Menu" option in Dolphin's settings then holding B button on GC Controller 1 when booting any GameCube game should achieve the same, no?
Yeah you misread the issue report. This applies when booting the IPL directly without a disc (Tools > Load GameCube Main Menu).
Do you think “The disc could not be read.” prevents merging this? I do not expect that this error is a regression. I think it is likelier that it was simply hidden before, because Dolphin did not ever report the drive as empty and closed at the same time when the IPL runs. The new option I add does not default to on, in order that it would not break anything for users unless they should choose to edit the setting.
It's probably because the drive isn't returning the proper error code. If I recall correctly from my earlier tests, the high byte should be 0x03000000 (ERROR_NO_DISK_L
) and the low bytes should be 0x023a00 (ERROR_NO_DISK_H
). I think, at least.
Note that my tests were on the Wii, and were based on a rather silly edge case; the Wii will report the cover being closed with no disc if you insert something other than a DVD in it, such as an audio CD. This also causes the disc channel to be confused, same as in dolphin. I don't have a gamecube (and as such, I don't have an IPL dump), so I can't say whether the same thing would work here.
You probably need to add another case here:
https://github.com/dolphin-emu/dolphin/blob/b29ba7119a6695f6302da4d0f59ea50d02ee65b7/Source/Core/Core/HW/DVD/DVDInterface.cpp#L718-L734
It's probably because the drive isn't returning the proper error code. If I recall correctly from my earlier tests, the high byte should be 0x03000000 (
ERROR_NO_DISK_L
) and the low bytes should be 0x023a00 (ERROR_NO_DISK_H
). I think, at least.
If I am remembering right, I did exactly what you said and it did not work. But, I will try this again, it could have been another combination of bits.
Oh, I should also note that it should probably be returning ERROR_COVER
for the high bits in the current case, and that I locally renamed ERROR_COVER_H
to ERROR_NO_DISK_H
, which is probably why you didn't run into that...
@Pokechu22 The current code s_error_code = ERROR_NO_DISK | ERROR_COVER_H;
is already those hex values.
Can you run it with the DVD Interface (DVD)
log enabled, and then post the log file? Also, can you post a screenshot of the disc could not be read screen?
@Pokechu22
Log level is Info.
34:40:891 Core/HW/DVD/DVDInterface.cpp:928 I[DVD]: Read DiscID 00000000
34:40:909 Core/HW/DVD/DVDInterface.cpp:1070 I[DVD]: DVDLowStopMotor kill!
I apologise that I did not see your comment sooner.
I'm not entirely sure what to make of that, unfortunately. It doesn't seem to have even requested the error, which doesn't match up with my expectations.
What happens if you boot the IPL with a Wii disc set as the default disc (both before and after this change)?
(As a side note, the DVDLowStopMotor kill!
message having kill!
in it is a bug, but shouldn't be causing this issue; it's using DICMDBUF1
and DICMDBUF2
as its params which are instead set off of the previous read disc ID (so DICMDBUF1
is 0, and DICMDBUF2
is 0x20). The wii DVDLowStopMotor
command takes 2 parameters, but those parameters aren't passed directly to the actual drive interface and are instead put into DICMDBUF0
; the oddness here is caused by dolphin implementing Wii ioctls and the actual DI commands in the same place. I'm working on something to fix that, but it's not done yet. I haven't tested it, but I highly doubt that the gamecube even has those parameters since one of them is for ejecting the disc...)
What happens if you boot the IPL with a Wii disc set as the default disc (both before and after this change)?
- With 'Report disc drive as closed when empty' - same error message
- Without 'Report disc drive as closed when empty' - same lack of doot doot doot
Apologise again for slow response.
Rebased code.
It seems the error message was fixed?
Now:
- With 'Report disc drive as closed when empty' - doot doot doot. No error message. ✔️
- Without 'Report disc drive as closed when empty' - no doot doot doot. No error message. ✔️
PAL & NTSC-U IPL tested.
Could some one remove the " WIP / do not merge "?
What happened with this pr? :(
What's the status of this?
Can you rebase this?
Rebased as #11570