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

"Disc control" option is enabled when emulating Master System, Game Gear and SG-1000 #250

Open
fmaida opened this issue Jun 19, 2021 · 3 comments · May be fixed by #353
Open

"Disc control" option is enabled when emulating Master System, Game Gear and SG-1000 #250

fmaida opened this issue Jun 19, 2021 · 3 comments · May be fixed by #353

Comments

@fmaida
Copy link

fmaida commented Jun 19, 2021

I'm trying Genesis Plus GX on both Ludo and RetroArch on a MacBook Air with macOS 11.4, and I'm experiencing the same issue: "Disc control" option is enabled and can be used on Master System, Game Gear and Sega SG-1000 as well when emulated by Genesis Plus GX.

I have also opened an issue on Ludo, because in that case if you try to select the option it will crash the frontend: libretro/ludo#437

IMHO this option should be disabled when Genesis Plus GX is emulating a console system that at the time of its original release couldn't interface with a CD-Rom player.

I have also taken some screenshots:

RetroArch

RetroArch

RetroArch

RetroArch

@ekeeke
Copy link

ekeeke commented Jul 14, 2021

Afaik, the only way to hide the disc control interface in the frontend is that the core does not set the associated environment. Genesis Plus GX sets this environment once in retro_init function (via environment API), which is called by the frontend before content is loaded and therefore before emulated system hardware can be detected by the emulator. I am not sure if it is possible to set or clear disc control environment outside of retro_init (libretro API does not clearly state when it can be set but it seems like all other cores set that environment here so I did the same when I implemented it). If it is not possible or if not all libretro frontends allow it, there is nothing that can be done on core side. However, it seems simple enough from user perspective to simply avoid using disc control features with non-disc games.

As for the error messages you get in retroarch, they are perfectly normal and expected behavior: when called by the frontend, the disc control interface functions in genesis plus gx core return an error (return status set to false, as specified in libretro api) if the emulated system is not mega cd hardware or if there is no disc available so it's up to the frontend to properly react to error status (and up to end user to not use disc control interface with non-disc games).

The crash in that other frontend is therefore entirely a fault on that frontend side, which apparently ignores the error status returned by the core.

@fmaida
Copy link
Author

fmaida commented Jul 15, 2021

I can understand that by design, this issue is not easily fixable.
But from a logical standpoint, I guess that you would agree with me that is quite odd to be able to insert or eject virtual CDs on a forty-years old console that never had support for reading CD-ROMs.

I don’t know exactly how RetroArch and their cores works in detail, so I’m probably asking for something stupid and impossible to do…

Before reading your reply, in my mind I always imagined that when a user is playing a game and suddenly triggers the quick menu in RetroArch, some sort of event is fired back, to tell the core “hey, pause the emulation for a moment and give me a list of possible options to adjust”.

So I guess there is no chance at that moment to take a look at what is happening inside the core and which machine is being emulated. And therefore I guess you couldn’t alter the core options menu?

I know that this is a minor issue and I don’t want to force anyone to fix this, especially when there may be more important stuff to do, but I personally think that this problem should be addressed one day.

@ekeeke
Copy link

ekeeke commented Jul 15, 2021

some sort of event is fired back, to tell the core “hey, pause the emulation for a moment and give me a list of possible options to adjust”.

Well that's not exactly how it works. The core can only set a few configurable things, like the list of core-specific settings or the list of core-specific input controllers and register a few callbacks that the frontend can use when it wants, for example for controlling disc interface. But there are restrictions that are imposed by libretro API or the frontend design (not just the core design) so some of these things can only be configured once when the core is initialized and not changed after that, or only partially.

So I guess there is no chance at that moment to take a look at what is happening inside the core and which machine is being emulated.

That's not what I said. Actually, I already explained in my previous post how this worked and gave hints how it could potentially be fixed (by either moving the disc control environment initialization from retro_init function to retro_load_game function after emulated system hw has been set by the core and make it conditionnal to mega cd hw or by clearing that
environment in that same function if emulated hw is not mega cd). The problem is that there is no guarantee that this will work as it depends entirely on how libretro frontends are designed and their constraints regarding the setting of the disc control environment. Afaik, none of the cores that implement that environment are using it this way, hence why I have some doubts. But this shouldn't prevent anyone to test it as it is really simple change.

And therefore I guess you couldn’t alter the core options menu?

As explained, disc control menu is a generic menu interface handled by the frontend. It appears if the core sets the associated environment when it is initialized. The core option menu is a different thing that has nothing to do with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants