ekeeke / Genesis-Plus-GX Public
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
[libretro] Disk swapping #51
Comments
|
Nope. This can be handled in "retro_load_game" by not reseting emulation when virtual CD tray is "open" (like it is done in genesis plus gx wii version) and just "load" the new disk image but the core cannot control what the frontend (retroarch) is doing when new content is being loaded so if retroarch resets some stuff on its side or needs everything to be reseted, it might not work. |
|
Would it be possible to use the disk control interface for this purpose? It allows the frontend to "append" additional images and change them, it also has tray control (disk needs to be ejected first to swap disks). That's what we do in mednafen-psx at least. |
|
Probably but I have no idea how this works. Automatic disk swapping is a little bit more intuitive though as it does not need user to eject the disk manually but simply to load the new disk image when prompted by the game (in Sega CD, tray is opened by software when necessary so an emulator can detect it) |
|
Since the core uses need_fullpath it should be relatively easy, I will try to implement the libretro interface and send a PR if I succeed |
|
I tried to implement automatic disk swapping but, no matter what I do, retroarch will always completely resets the core (all data seem to be reseted to zero) when loading content so that feature is not possible via libretro. Manual disk swapping should be possible using libretro dedicated interface though as said above by fr500. I will be waiting for the PR. |
|
Wouldn't it be possible via the m3u methodology that Mednafen supports? The Beetle/Mednafen PSX core supports it as described below: Usage CUE sheet example: FILE "Mega Man 8 (USA) (Track 1).bin" BINARY The recommended method to play games consisting of more than one CD, is to create an M3U file(plain-text, ".m3u" extension), and enter the filenames of the CUE/TOC/CCD files, one per line. Load the M3U file instead of the CUE/TOC/CCD file and swap disks from the core disk options menu (under Options), make sure to cycle tray status before attempting to change disks. M3U playlist example: Final Fantasy IX (USA) (Disc 1) (v1.1).cue An alternative is to append disks to the current playlist via RGUI. A side advantage of the M3U method vs. the Append Disk method is that memory cards are named after the playlist itself, so you don't have different saves for different disks of the same game. Jump up ↑ untested |
|
It could be done but it would require rewriting the whole CDD implementation in Genesis Plus GX to allow having multiple CD images opened & loaded simultaneously during emulation. It seems to be a way too much complex solution for a very simple problem that should be handle by the frontend in my opinion, not the core. For example, this is how disc swap is done currently in standalone Genesis Plus GX. This is sadly not possible with libretro frontends, but there seems to be a disc swap feature available in libretro API that can be used for this, which is what needs to be implemented as discussed in above posts. |
|
Hmmm... From all of using RetroArch as part of a larger Arcade Frontend, like HyperSpin, this just doesn't work. ): |
|
What "doesn't work" ? |
|
Before I answer that question, so I can best answer it, are you familiar with HyperSpin & RocketLauncher/HyperLaunch? |
|
Absolutely... not |
|
ekeeke, you think if you went and talked to the RA devs in IRC or made a issue in the retroarch github page you might be able to get this issue underway with their help? just a suggestion. |
|
I posted on the main RA github last night. I'll check out the IRC channel, too to try to figure out if this is a core or RA issue |
|
I don't think you understood what has been said. Read the discussion above. Off course, disc swapping does not work. It has yet to be implemented in the Genesis Plus GX libretro port, hence why this is a still-opened enhancement request, and fr500 said he will eventually try to do it. That's all. |
|
Ah, I misunderstood. I understand now. Thanks |
|
I actually was looking at this but I got distracted with some other things. The disk interface in the frontend controls the state of the tray, and what disk is selected. It also defines a few callbacks that can be used to build the "list of disks: It works like this:
Then the core should do whatever it needs internally to swap the disk. From what I understand, the frontend can ask to eject via: So yeah it's definitely doable but it sounds like it requires quite a bit of work. BTW, just to clear up I'm not asking you to implement this, I said I would try but I don't know were to start tbh. |
|
Doesn't picodrive-libretro support disc swapping? |
Removed redundant CFLAG on the Rpi2 and Rpi3 platforms
|
was this ever handled? Aka a means to swap sega cd discs? Personally I use steamlink to play scd games via RA so adding more than the shortcut to the initial disc is just bad juju. I'd like to be able to simply shortcut into the RA interface and swap discs via navigation when its called for. I know psx can be done via m3u or psp format (both are which are also un ideal to me) and would prefer being able to simply navigate to the file. Havent seen anyone post in awhile so what do you guys w/ a steam link do about multi disc SCD games at current? |
|
Been nearly a year now, curious as well if this has been worked on. Thank you. |
|
Support for disk control interface and m3u file list in libretro port was added by 82c4821 It was simple enough to implement and,contrary to what I initially thought, no core changes were required. There are a few limitations I noticed though with Retroarch 1.8.5 (maybe fixed in later versions ?): 1/ disk control menu in Retroarch only lets you add a new disk when the current disk status is set to 'not ejected', which can be problematic with Sega CD games since the disk tray is automatically opened by the game (using a BIOS command) when disk swapping is required so, if you want to manually add the new disk when prompted by the game, you first need to close the disk tray, then add the new disk, then close disk tray again since it was re-opened by Retroarch when adding new disk. Note that this won't work with some games (like Sherlock Holmes 2) which automatically check the disk as soon as disk tray is closed and re-open disk tray automatically if it is not the expected disk, making it impossible to add the disk when the game asks for it. 2/ although "m3u" file extension was added in the "valid_extensions" field returned by retro_get_system_info function ( see https://github.com/ekeeke/Genesis-Plus-GX/blob/master/libretro/libretro.c#L2190 ), it seems like these infos are completely ignored by Retroarch as it is impossible to load a m3u file in Genesis Plus GX core unless you modify the "genesis_plus_gx_libretro.info" file located under /info in your Retroarch installation to modify the supported extension list in there. Again, I don't know if this is expected behavior, but it seems quite odd to me that you have to rely on external infos to let you load a file supported by the core. |
|
Added f0429f1 to fix a compilation issue |
|
I googled and found this issue, and I followed your instructions of altering the info file, and the m3u will load, but the game itself will not. Tried with 'Dracula Unleashed (USA) (Disc 2).m3u' (so that I could change to disc 1 when prompted). Nothing but black screen. In the m3u file I tried just the file names, like this: Dracula Unleashed (USA) (Disc 2).cue And also, full paths, like this: R:\Arcade\Sega CD\CDImages\New folder\Dracula Unleashed (USA) (Disc 2).cue Cue files point to the correct bin files. Are these updates in the current core? |
|
Afaik, the required changes have not yet been backported in libretro repository so it won't work if you are using core downloaded from retroarch, you will need to use the core (.dll) built in this repository but it's windows 32-bit only. Also, you shouldn't put absolute filepaths in m3u file, it won't work. m3u file should be in same path as the the CD image files and list only relative filenames. Lastly, you are better listing files in disc order, even if it works fine, as retroarch disk interface only shows you disk indexes, not filenames. |
|
Thanks for the reply. Only reason I tried absolute paths is because the 'Dolphin' emulator required them in order to get m3u to work via command line (loading an m3u through the GUI did not require the absolute paths). The short answer for the reason I put them in reverse order for disc 2 is that I only use keyboard hotkey shortcuts to change disc, I never use the menu unless I have to. :) I have little bit of experience compiling. If it's not too much trouble, can you point me in the right direction on how to produce a 64 bit version of it? |
|
Never mind, figured it out. It works great, thanks for adding this! |
|
sorry i dont understand where to find the new dll core ? or maybe is it in the core downloader of retroarch ? sorry i feel so noob ^^ |
|
Core downloader should pull it fine, and it won't require 32-bit. |
Is the automatic disk swapping feature of genesis-plus-gx exposed to libretro?
The text was updated successfully, but these errors were encountered: