libretro / libretro-uae

PUAE libretro
GNU General Public License v2.0
110 stars 60 forks source link

Tooltypes in RetroArch #631

Closed InterClaw closed 10 months ago

InterClaw commented 10 months ago

I'm having a bit of a problem figuring out how to set and use tooltypes while using PUAE 2021 in RetroArch.

I found this in the documentation: https://docs.libretro.com/library/puae/#overrides-at-startup ... but I don't understand how I can hold those buttons down when the same buttons navigate the RetroArch menu. 🤷

I also found "Overrides" on the quick menu. Setting a game override creates a .cfg file in config\PUAE 2021, so right next to the .opt files for the core.

What I'm trying to accomplish is to start the game Chaos Strikes Back (WHDLoad) with the "utility disk", which I believe is Disk.2. The way I understand it from the ReadMe is that you're supposed to start the game normally, pick your team, save, and then restart with the utility disk to play the actual game. The ReadMe says to set CUSTOM2=1 for this.

In the .cfg created there was already one line as menu_thumbnails = "3", which seems very RetroArch related and not related to the emulation itself. Anyway, I put CUSTOM2=1 under that and saved and restarted, but I notice no difference in the game, so I don't think it's working. I think it's still starting with Disk.1, so this might not be the way to do this at all.

So now I'm at a loss. I can't figure out how to use tooltypes within RA. The answer to this is probably very simple.

sonninnos commented 10 months ago

Obviously you hold the buttons after you launch the game from the menu.. Or just quit WHDLoad with the quit key which will start the same cycle.

Frontend overrides and configs (cfg) have absolutely nothing to do with any core side settings (opt).

The script running inside the emulator creates a file that is accessed inside the emulator (which also have nothing to do with any core option opts) as stated in the docs: https://github.com/libretro/libretro-uae#new-whdloadhdf-features-for-old-users

Script called MkCustom for simplest custom file handling. Launches after quitting WHDLoad. MkCustom will create a slave-based custom_$SLAVE in WHDSaves:. Essential with readonly images.

Also that is not what the ReadMe says:

Important Notes:

  • select active game disk using CUSTOM1=# of disk image (start from 3)
  • boot on custom disk using the "UtilityDisk" icon (the one with CUSTOM2 set)
  • re-run the install script to import your savegames, caution: CSB games are imported as 'disk.3', DM games are imported as 'disk.4'. Rename previous savegames if needed.

Edit: But indeed with this particular game the tooltype script won't work, since this installer has multiple infos, so it can't decide which one needs the custom tooltype. So it needs to be created manually if at all. This slave is indeed pretty cryptic about how it should be done in the end.

InterClaw commented 10 months ago

Ah you hold the buttons down right after you've started it! 🤦 I thought I needed to hold the buttons down before starting it. But as you say red, red+blue, blue don't seem to do anything. With the mouse buttons I was able to produce this screen.

image

I'm slowly beginning to understand more about how WHDLoad works and what the files in the .lha do. So the .info files are the "shortcuts" you'd get in Workbench then? The EnglishUtilityDisk.info one still calls ChaosStrikesBack.slave, but with the added parameter (tooltype) CUSTOM2=1. If I've understood this correctly.

image

So the challenge here is how do I "click" EnglishUtilityDisk.info instead when running it through RetroArch... 🤔 And is that ultimately disk.2 it's going to be using then?

I'm trying to understand this about manually creating something. Not entirely sure what custom_$SLAVE resolves to. I tried creating saves\WHDSaves\ChaosStrikesBack\custom_ChaosStrikesBack.slave and put CUSTOM2=1 in it, but it doesn't seem to be recognized, so I'm doing something wrong here for sure.

Hey thanks for supporting me on this particular game. This is perhaps not the right forum for this. Maybe this should be on EAB. However, if I would be running this game from Workbench I guess I wouldn't be having this problem. This is more about taking it one step further and wrangling it through RetroArch.

sonninnos commented 10 months ago

Because like I said, the script isn't working for that game because it shows the info requester at start. Which is because the slave is not named like the directory it is in. Try with some other game to see how it is supposed to go. That WHDLoad stuff is running inside the emulation after all. I can try improving the script to be able to write the custom tooltype in that case.

The custom file does not go into the game subdirectory, because the game does not know about it. They go directly in WHDSaves: like the document says.

But again I don't understand why the need to hassle with that. Disk 3 is the default disk, so that does not have to be defined, and the utility disk info is clearly selectable at launch without holding down fire button (which will open the requester regardless), so that does not need to be defined either.

sonninnos commented 10 months ago

Ok, just tried it, and I did not have to edit anything. Simply did what the bottom text instructed at first launch when you can start moving. Picked the group, saved, quit WHDLoad/core so that the save disk is written to disk. Launched LHA again, picked the Utility Disk info, "make new adventure", "chaos strikes back", "ok", "make new adventure", "quit". Then quit again to flush the save disk. Then just launch the normal info and pick "resume", and it starts from what I'm assuming is the actual start of the game.

InterClaw commented 10 months ago

picked the Utility Disk info

image

I realized that I was doing something wrong here, since I was not getting any boot menu.

Turns out I was pressing the fire button too early (or just kept holding it if starting with the controller), so it was being held already when WHDLoad was starting, which doesn't seem to count then. If I wait until the screen turns slightly lighter gray for a second, that's the moment to press and hold fire. I guess WHDLoad pauses here to wait for hotkey input?

... and then I got the menu. 🤦

Screenshot 2023-09-02 115222

Now everything makes much more sense. Everything I tried was just overcomplicating everything.

sonninnos commented 10 months ago

But that info selector comes up without holding anything in that game, as I already explained. Holding fire is only necessary when the requester does not come up automatically. WHDLoad script does not pause for anything while startup, it simply checks joyport states.

InterClaw commented 10 months ago

Hm, well, not for me. Could it be a setting I have that picks the default .info or something? I'm guessing it would be under "Media"?

image

Btw, here are the checksums of the .lha I'm using: CRC-32: 264e61ae MD5: ad6025942012fdea73282701d124e3dc

sonninnos commented 10 months ago

Yes, ChaosStrikesBack&EnglishUtilityDisk_v1.21.lha, same default settings, and no core option affects that Amiga-side script. I deleted WHDLoad from saves before trying with both PUAE cores, and same result. The requester comes up by itself.

Only reason I can think of for different behavior is that the core version was different the first time you launched any lha, which means you have an older version of the startup script, since it is not written on every run. So delete WHDLoad from saves and try again.

InterClaw commented 10 months ago

Yep, that sure was it! The menu popped right up now when launching the game. 👍

Even more convenient now. 😄