Emulator - Emulator Issues #9019 Change Disc doesn't properly notify games about the disc change 10/08/2015 04:02 AM - ProjectRevoTPP

Status: Fixed % Done: 0% Priority: Normal Assignee: Category: Target version: Operating system: N/A Relates to No performance: Issue type: Bug Easy: No Milestone: Relates to No maintainability: Regression: No Regression start: Relates to usability: No Fixed in: 5.0-12436 Description Party 4 has the "Tray is open" message when the cover is open on a real Gamecube, but this causes the game to crash on the emulator when changing the disc to another before resetting, preventing us from switching games programmatically (MP4 to MP6).

It's a mundane feature since it's an emulator and not a real Gamecube, but not having it is causing us problems. Related issues: Has duplicate Emulator - Emulator Issues #11726: GameCube Games aren't proper... Duplicate

History #1 - 10/08/2015 04:16 AM - Felk Here's an example of 6 continuing to read it's music from the changed iso and causing distorted music: https://youtu.be/ifx1Ax6rLGc

#2 - 10/08/2015 06:44 AM - JosJuice When you change disc, Dolphin simulates the tray being open for 1 second before inserting the new disc. Which problem are you reporting? Not having a function for opening the tray for longer than 1 second, or games like Mario Party 6 not behaving as on console when the tray is open?

#3 - 10/08/2015 07:08 AM - ProjectRevoTPP JosJuice wrote:

When you change disc, Dolphin simulates the tray being open for 1 second before inserting the new disc. Which problem are you reporting? Not having a function for opening the tray for longer than 1 second, or games like Mario Party 6 not behaving as on console when the tray is open?

More specifically have the disc cover be open while the file dialog is open to select the new disc, so yes, open longer than 1 second.

#4 - 10/08/2015 07:16 AM - JosJuice Could you explain why you want that? It sounds like a very weird feature. I'm all for adding a separate "remove disc" option, though.

09/23/2021 1/6 #5 - 10/08/2015 07:19 AM - Anonymous If this really doesn't work anymore, then it's a regression. All you (used to?) have to do to simulate removing the disc is to do "change disc..." and then click cancel instead of selecting a new disc image. I coded it originally. Feel my wrath if you broke it :)

#6 - 10/08/2015 07:25 AM - Felk godisgovernment wrote:

If this really doesn't work anymore, then it's a regression. All you (used to?) have to do to simulate removing the disc is to do "change disc..." and then click cancel instead of selecting a new disc image. I coded it originally. Feel my wrath if you broke it :)

Yes, it does not work anymore. Opening the "change disc" dialog does not affect the game. clicking cancen does not affect the game. choosing another iso makes the game break. If you separately call DVDInterface::SetDiscInside(false) it does not affect the game.

#7 - 10/08/2015 07:27 AM - JosJuice This commit changed how cancelling the file open dialog works: https://github.com/dolphin-emu/dolphin/commit/b3c9f437db116eae1d6df1068029c8b1eab60357

#8 - 10/08/2015 07:33 AM - JosJuice Also, this commit seems to have removed the "empty the drive" function being triggered by the file name being empty. Now it just re-inserts an old disc if it couldn't insert a new one. https://github.com/dolphin-emu/dolphin/commit/a3b59f684575086f233233fbae04fb7eabfd1f46

#9 - 10/08/2015 11:14 PM - theincrediblemastere JosJuice wrote:

Could you explain why you want that? It sounds like a very weird feature. I'm all for adding a separate "remove disc" option, though.

Wasn't the exact same question asked for the "Wiimote battery charge" setting?

Since there are things you can't do like run out of charge or open a disc tray in a virtual space like an Emulator, having these sort of trivial things as an option just puts that little bit more "reality" into the equation. And besides, maybe an issue could be uncovered involving behavior when the disc tray is open!

#10 - 10/09/2015 06:48 AM - JosJuice Like I said, I'm all for having an option to remove the disc. What I don't understand why it should happen when opening the disc change dialog.

09/23/2021 2/6 Looking for the disc image you want to insert is like looking for a real disc you want to insert, in that you don't have to eject the old disc until it actually is time to insert the new one. I think it would be confusing to have the disc change dialog do something by just opening it (or cancelling it...)

#11 - 10/10/2015 02:23 AM - ProjectRevoTPP JosJuice wrote:

Like I said, I'm all for having an option to remove the disc. What I don't understand why it should happen when opening the disc change dialog. Looking for the disc image you want to insert is like looking for a real disc you want to insert, in that you don't have to eject the old disc until it actually is time to insert the new one. I think it would be confusing to have the disc change dialog do something by just opening it (or cancelling it...)

You know you can open the disc cover without taking the game out right?

#12 - 10/10/2015 07:24 AM - pauldacheez - Subject changed from [Enhancement] Support Disc Cover being open to Change Disc doesn't actually open the disc cover, other disc manipulation tasks are missing - Status changed from New to Accepted

Whether the disc is physically in there or not, when the disc cover's open, the game can't read the disc. The issue here is that we're not properly telling the game that the lid is open in our current disc-switching code, we're just swapping the disc without notifying the currently-running game (as evidenced by the first comment's example, whereas on real console you'd instantly get an open-cover message). Are we not blocking disc reads or forgetting to set a bit that the open-lid sensor sets or something? I'm amazed this functions at all for multi-disc games.

I see plenty of valid complaints here about missing functionality (having the lid open indefinitely or having no disc in the drive); I'll ignore the UI part of the debate and just say that you should be able to do everything you can on real console.

Since I took the time to test this, lemme give examples of behavior exhibited by my two real consoles (DOL-101 GameCube, early launch-era ) and the handful of games I had lying around:

GameCube: games either instantly complain when you open the cover ("Please close the disc cover.") or they delay their complaining until the next disc read ("Please close the disc cover to continue."). Removing the disc (and optionally inserting another) and closing the lid makes them ask for their original disc ("This disc is not [game]. Please insert the [game] Game Disc." or just the latter sentence if no disc was inserted), at which point you can press Reset to reboot back to IPL. (Reset is a soft button, e.g. the game handles its signal, so it'd normally flush most of the RAM and send you back to the title logos, but when there's no disc or a different disc in the drive, it resets the console completely. Games that delay their complaints to the next disc read don't need to display any of these disc-related messages before pressing Reset does this.)

Wii (Wii discs, firmware 4.2U): games generally just complain instantly when you eject the disc ("Please insert the disc for [game]."), and pressing Reset (still a soft button; signal's probably still handled by the game, but it probably calls Starlet to do most of the actual reset work anyway) sends you back to the with whatever method pressing Home > Wii Menu uses (e.g. it shows the "grey channels" animation before showing the home menu).

Wii (GameCube discs, MIOS v10): when ejected, games act like the disc cover's open ("Please close the disc cover."). Inserting another game's disc makes them ask for their original disc ("This disc is not [game]. Please insert the [game] Game Disc."); games attempt to read the disc regardless of whether it's a GameCube or Wii disc. Reset reboots the console entirely (e.g. "Health & Safety" white-text-on-black-screen, then home menu). There seems to be no way to get it to a state where games think the disc cover's closed without a disc inside.

09/23/2021 3/6 #13 - 10/10/2015 08:04 AM - JosJuice Dolphin is supposed to open the cover when a disc is ejected. Maybe there is something wrong with the implementation. https://github.com/dolphin-emu/dolphin/commit/61da252858644b1ca52b4e3eac1317854fb17977

#14 - 10/12/2015 04:03 AM - windows4ya - File Screenshot (13).png added

ProjectRevoTPP wrote:

Mario Party 4 has the "Tray is open" message when the cover is open on a real Gamecube, but this causes the game to crash on the emulator when changing the disc to another before resetting, preventing us from switching games programmatically (MP4 to MP6).

It's a mundane feature since it's an emulator and not a real Gamecube, but not having it is causing us problems.

Try this 1. open note pad 2. name it as eject.iso and save 3. disable Use Panic Handlers in config 4. change disc to eject.iso while the game is running 5. and dolphin will eject the game disc

I tried this method on SSBB I got this Screenshot (13).png

#15 - 10/12/2015 01:22 PM - Felk I tried changing the iso mid-game on the following games: GC: Mario Kart Double Dash!!, Mario Party 4-6, Pokemon Colosseum, Rayman 3 Hoodlum Havoc, TLoZ: The Wind Waker Wii: Mario Party 8, Pokemon Battle Revolution, Smash Bros. Brawl In that order:

Gamecube: 1: During title cutscene: Game hangs During title screen: game crashes on selecting to start the game "Invalid read from 0x6ec055f6, PC = 0x80015b0c" 2: During title cutscene: Game hangs During title screen: Dolphin crashes (a) 3: During title cutscene: Game hangs During title screen: distorted music, hang upon continuing 4: During title cutscene: distorted music, game crash upon continuing "invalid read..." During title screen: same 5: During title screen: game crash upon continuing "invalid read..." 6: During title cutscene: game hangs During title screen: distorted music, hang upon continuing 7: During title screen: distorted music, hang upon continuing

Wii: 1: During title screen: hang

09/23/2021 4/6 During game mode selection: hang 2: During title screen: "Please insert the PBR Game Disc" During main menu: same 3: During title cutscene: "Please insert the SSBB Game Disc.", for half a second, a bit of cutscene, then back to insert-disc-screen. During main menu: same During title screen: Nothing. "Tried to decrypt data from a non-Wii volume" upon continuing, hang afterwards

Used Dolphin version: 4.0-8033-dirty (newest commits). So it appears that this does not work on at all, and is a matter of luck on the Wii.

#16 - 10/12/2015 01:28 PM - Felk Forgot to mention what my "(a)" meant: dolphin throws an exception here: https://github.com/dolphin-emu/dolphin/blob/737de5e115c79a5e85d3c0caf7888edd46ce9453/Source/Core/Core/HW/DVDInterface.cpp#L341 But now mario party 4 just gets distorted music and hangs as well on the title screen. Also noteworthy that i replaced the iso with mario party 4 each time (except for mp4, i used mp5 for that one)

#17 - 10/12/2015 01:36 PM - JosJuice - Subject changed from Change Disc doesn't actually open the disc cover, other disc manipulation tasks are missing to Change Disc doesn't properly notify games about the disc change

Thanks for all the testing. This seems like quite a major issue with disc changing. I'll change the issue title to only be about that, because keeping track of two issues in one issue report gets messy. Anyone, feel free to create a separate issue report for being able to remove discs without inserting a new one if you want to.

Good catch with the (a) thing. Dolphin checks that a disc is inserted before it starts executing a DVD command, but it doesn't do it before finishing, so it's possible to run into that problem if you change disc while a command is executing. Fixing that won't fix the main issue, though.

#18 - 12/02/2015 06:09 PM - JosJuice I think 4.0-8172 happens to fix the (a) problem.

#19 - 12/07/2015 04:08 PM - Felk Using 8377, a quick test switching from mp4 iso to mp6 and vice versa on the title screen still results in scrambled music. Switching from mp8 to mp4 still results in a hang. The behaviour seems to not have changed

#20 - 12/07/2015 04:14 PM - JosJuice The only behavior change that I expected was that Dolphin no longer will crash with an exception in the DVD reading code sometimes. 4.0-8172 doesn't do anything about in-game hangs or garbled music.

#21 - 05/12/2019 10:30 AM - JosJuice - Has duplicate Emulator Issues #11726: GameCube Games aren't properly informed about disc removal added

#22 - 01/20/2020 09:06 AM - JosJuice

09/23/2021 5/6 - Status changed from Accepted to Fix pending https://github.com/dolphin-emu/dolphin/pull/8571

#23 - 08/11/2020 06:07 PM - JosJuice - Fixed in set to 5.0-12436 - Status changed from Fix pending to Fixed https://dolphin-emu.org/download/dev/07a0d44b36c487967cbd957ed9bd20384bf3e33a/

Files Screenshot (13).png 29.1 KB 10/12/2015 windows4ya

09/23/2021 6/6

Powered by TCPDF (www.tcpdf.org)