Jump to content
LaunchBox Community Forums

Does the pause menu support disc swaps in RetroArch?


SpaceMidget75

Recommended Posts

7 minutes ago, Nulion said:

I did find a strange thing that LaunchBox itself is doing that may be related to this; whenever I reboot LaunchBox, all of my PlayStation games that have more than one disc have their launch path changed from the m3u file I created back to the cue file. Even when I change them all back to the m3u file, it only lasts until I reboot LaunchBox...and then it'll have all my PSX games back to loading from the .cue instead of the .m3u.

Sounds to me like a saving issue. Launchbox saves data when it closes, and this sounds like it cant do so. There could be two reasons for this, 1) the data folder or the specific PS! xml file are read only, or you have extra files in there with the same name that shouldnt be there, never store any backups for example in the data folder.

Link to comment
Share on other sites

15 minutes ago, neil9000 said:

Sounds to me like a saving issue. Launchbox saves data when it closes, and this sounds like it cant do so. There could be two reasons for this, 1) the data folder or the specific PS! xml file are read only, or you have extra files in there with the same name that shouldnt be there, never store any backups for example in the data folder.

I can't recall ever having messed with the data folder for LaunchBox, but looking there (LaunchBox/Data/Platforms) now I do see a Sony Playstation.xml and a Sony PlayStation.backup.xml file, the same as it is for any of the other consoles. Looking at the actual file in Notepad++, I see that it is actually listing the .m3u file as the one it loads...but the backup file is listing the .cue file as the one it loads. LaunchBox seems to only be loading the backup xml file instead of the normal one.

Link to comment
Share on other sites

1 minute ago, Nulion said:

but looking there (LaunchBox/Data/Platforms) now I do see a Sony Playstation.xml and a Sony PlayStation.backup.xml file,

OK, so you have used Skraper and it has added those backup files, delete them. Launchbox is attempting to read both files, hence why your changes are not sticking as you have contradicting xml files.

Link to comment
Share on other sites

1 minute ago, neil9000 said:

OK, so you have used Skraper and it has added those backup files, delete them. Launchbox is attempting to read both files, hence why your changes are not sticking as you have contradicting xml files.

Yup! What I tend to do when I import roms is that I use Skraper first (since it nabs the video files along with everything else I need, plus I'm a donor with them) and then import the actual roms into LaunchBox afterwards. I went and deleted the backup file, loaded LaunchBox, and it is showing the m3u as how it loads now, the way it should. Should I be getting rid of the rest of the backup files too? I'm guessing they could cause other conflicts.

Link to comment
Share on other sites

4 minutes ago, neil9000 said:

Yes, never store any other files in that folder.

Got it. Cleared 'em all out.

That fixes the .m3u issue, but I still do have the problem of multi-disc games simply not working, in the way I'd described earlier. I'm not sure what would be causing such weird behavior there, but it's likely a RetroArch issue...and I'm still trying to figure out how to even make posts on their forums. *laughs*

Thank you very much for all your help!

Edited by Nulion
Link to comment
Share on other sites

Well keep us posted. (I'll try and take a look on the weekend) I can confirm I'm now seeing the same weirdness. Quickmenu works I think: switching disc index and hitting the close tray menu item, but key shortcuts aren't. I get the messages saying Ejected, Disc X Changed, Closed, but it's always the same disc.

Link to comment
Share on other sites

3 hours ago, SpaceMidget75 said:

Well keep us posted. (I'll try and take a look on the weekend) I can confirm I'm now seeing the same weirdness. Quickmenu works I think: switching disc index and hitting the close tray menu item, but key shortcuts aren't. I get the messages saying Ejected, Disc X Changed, Closed, but it's always the same disc.

Thank you!

I just tried an experiment (not sure what I expected) where I removed the script from RetroArch's pause menu AHK window, just to see if it had any effect. The one below:

 

Send {j down}
Sleep 50
Send {j up}

Sleep 50
Send {d down}
Sleep 50
Send {d down}

Sleep 50
Send {j down}
Sleep 50
Send {j up}

 

And...nothing changed.

Also noteworthy, and I cannot for the life of me get this to duplicate (it seems to happen at random) but on the RARE occasions where I get Disc 2 to actually load, it will boot into the Disc 2 sequence on Xenogears (which is a long text-scrolling section), and when I press ANY BUTTONS AT ALL, the emulator will instantly snap back to the "Please Insert Disc 2" screen. The emulator will freeze at that point, and nothing I do will affect anything unless I close out of RetroArch. Generally, it seems like when this happens, attempts to re-load the Xenogears rom will start on Disc 2 after this happens.

Also, it seems to do this same kind of thing for other games as well, though I don't have the save file exactly at the swap disc point for Chrono Cross for instance, it still has the same weird difficulty trying to change discs.

Edited by Nulion
Link to comment
Share on other sites

So, I think RA is working I just wasn't testing it properly.

Here's what I did:

  • Removed Parasite Eve (USA).ldci from the saves folder so it started clean with no remembered disc index.
  • Edited the m3u file to have disc 2 in the top slot (just for test purposes as I don't have any disc 2 saves at the moment).
  • Started a new game. 
  • It obviously asks to insert disc 1.
  • Hit J, D, J (No RA Menu)
  • Game started to load from Disc 1.

 

It goes without saying that if you do have some actual saves, make sure you rename them to the m3u name, if they were previously named after one of the discs.

Link to comment
Share on other sites

50 minutes ago, SpaceMidget75 said:

So, I think RA is working I just wasn't testing it properly.

Here's what I did:

  • Removed Parasite Eve (USA).ldci from the saves folder so it started clean with no remembered disc index.
  • Edited the m3u file to have disc 2 in the top slot (just for test purposes as I don't have any disc 2 saves at the moment).
  • Started a new game. 
  • It obviously asks to insert disc 1.
  • Hit J, D, J (No RA Menu)
  • Game started to load from Disc 1.

 

It goes without saying that if you do have some actual saves, make sure you rename them to the m3u name, if they were previously named after one of the discs.

Wait, save files need to be renamed to m3u as well? I have been tinkering with save files lately and trying to get them to work, and my saves folder is a *mess* as a result. I haven't been sure whether to name my saves (in Xenogears' instance) Xenogears (USA).sav, .mcr, or .srm. I'm also not sure what the .ldci file is in there either. I have been trying to get previous save games from Xenogears to work, and haven't had too much success with it (apart from renaming my old Xenogears (USA) save file to .srm. That did seem to allow me to load the save file...but swapping discs is completely borked, so I haven't been able to do much with that).

Edited by Nulion
Link to comment
Share on other sites

Not the extension just the filename. So I had some files in my RA saves folder called "Parasite Eve (USA) (Disc 1).mcd" probably from me testing and loading discs directly. If I load from the m3u I get a fill called "Parasite Eve (USA)_1.mcd" instead. 

To be honest, I'm not an expert at this side of things, I just knew to do a clean test as described above it was best to delete the files in this folder related to the game.

 

Link to comment
Share on other sites

Ahhh, I see. Yeah, the whole dealio with save architecture and the like has been extremely confusing to say the least. Was just doing some research on that and apparently the way save files are handled differs even between what emulator core RA is using. Still, I do wonder if that's somehow the root cause of all the weird disc loading problems happening here.

Link to comment
Share on other sites

On 2/3/2022 at 4:02 PM, SpaceMidget75 said:

At the very least make sure you delete the disc index file from this folder when testing, otherwise it will remember the disc from last time and confusing any testing you're doing. Either way, I'm afraid to say I think RA is working for me by the looks of it.

Unfortunately, deleting the ldci file doesn't seem to have any impact. I've tried it multiple times and no dice there.

However, I've been tinkering some more and found another wrinkle in this whole odyssey; the multi-disc booting behavior works differently if I use standalone RetroArch to boot the game.

When I boot the game directly by just going into RetroArch itself, the keymap shortcuts "j" and "d" for open disc tray/close disc tray and next disc actually work and load the second disc, on command, every time without issue. The game then proceeds to Disc 2, and immediately fails. If I press ANY button, the game will then snap back to the "Please Insert Disc 2" message, and the emulator locks up. When I reboot the game, it will reload on Disc 2. This happens every time, and when I look inside the RA menus, it actually from the get-go will even list a "2" in the Disc Index area, whereas with LaunchBox it will only ever have a "1" in the Disc Index, with no other numbers. Apparently LaunchBox simply isn't recognizing off the bat that there even is a Disc 2.

Seems like LaunchBox actually is having some kind of effect here and it isn't just an RA-specific problem...but RA standalone has its own problem. I've reported this over on the RA subreddit and am awaiting an answer from those guys, so we'll see that happens.

Ughh, what a headache. Thanks again, though!

Edited by Nulion
Link to comment
Share on other sites

So, I FINALLY managed to fix the problem!

After speaking with the people on the RetroArch subreddit, they made me realize that me putting (USA) after every title was actually done incorrectly; the .cue files would often not reference a (USA) in the game title even though I'd changed the names, and the .m3u files had the same problem in some instances. I went through every single .bin file's name and removed the (USA) tag, and then went with a text editor into every .cue and .m3u file and removed the (USA) tags I found there too, making the rom names all homogenous throughout. You have to keep the rom names CONSISTENT no matter where in the entire process that they appear. That was causing a LOT of problems.

I then deleted all of my PSX roms from within LaunchBox, ran Skraper again to generate a new gameslist.xml file with all the new rom names, and then re-imported them into LaunchBox.

That still didn't fix it though; I still had the problem of loading Disc 2 (which worked every time now with the keybind shortcuts I made) and Disc 2 would load without any sound at all. Pressing a button after Disc 2 loaded would instantly send me back to a "Please Insert Disc 2" screen, where the emulator would then lock up. This happened no matter which core I used, no matter if I used LaunchBox or used RetroArch stand-alone.

So, I figured it must be a global setting of some sort causing it. After some research, I found something about a setting called Run Ahead that caused people a lot of problems when moving between discs.

In the RetroArch folder, in retroarch.cfg, there is an entry called "run_ahead_enabled", with an entry of "true". Changing that to "false", and then saving the cfg file, fixed the problem.

However, I still have the issue of the Swap Disc script in the pause menu not working. And for some reason the "Reset Game" option in the pause menu has also stopped working, but those are minor gripes.

Whew! That was an ordeal.

Thanks again guys :)

Edited by Nulion
Link to comment
Share on other sites

  • 1 year later...
On 10/5/2020 at 11:19 PM, robbforce said:

I don't mean to raise the dead, but I've run into this problem of changing discs in the mednafen core of retroarch. I used the script from SpaceMidget75 (thank you) in the swap disc section of the emulation settings in Launchbox, but hcould only find a key mapping for next disc in retroarch, specifically input_disk_next = "d", which works to get me to the next disc from the pause menu just fine, but it doesn't loop back to the first disc. Is there another configuration setting for a loop? I ask because GTA London prompts immediately for the GTA1 disc, so I created a m3u with both chds for the swap, but then once it reads it, it asks for the London disc again, which I'd have to go through the retroarch UI to do.

Seems like a solution would be to loop back to the first disc in the index on a next, or split the swap disc script in Launchbox to swap next and swap previous.

Have you found a way to circumvent this? I have the same issue. If there's a way for the AHK script to read that current disc, I could try and write a if/then/else script to swap discs based on current disc.

Link to comment
Share on other sites

So the current disc information is saved in a `GAMENAME.ldci` file under `RetroArch\saves\SwanStation`.

Content of the file shows an `image_path` which is the current disc.

```

{
  "version": "1.0",
  "image_index": 2,
  "image_path": "M:\\library\\games\\sony-playstation.1\\D (USA)\\D (USA) (Disc 3).cue"
}
```

There's currently no option to instruct RA to disable creation of that file.
Please comment on this Git issue to get it added https://github.com/libretro/RetroArch/issues/16018

---

In the meantime we could try and fix it with an AHK script.

I'm not good with AHK and I'm not sure if it could check up in the `.ldci` file and lookup the disc number.

IF disc=1
THEN toggle_tray/cycle_next/toggle_tray
ELSE
	IF disc=2
	THEN toggle_tray/cycle_previous/toggle_tray
	ELSE
		IF disc=3
		THEN toggle_tray/cycle_previous/cycle_previous/toggle_tray
		ELSE
			IF disc=4
			THEN toggle_tray/cycle_previous/cycle_previous/cycle_previous/toggle_tray
			ELSE
				IF disc=5
				THEN toggle_tray/cycle_previous/cycle_previous/cycle_previous/cycle_previous/toggle_tray

We would need to define variables for disc1,2,3,4,5 which would look up in `GAMENAME.ldci`

Not sure though AHK can read stuff in a file.

If anyone could help that would be really appreciated!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...