libretro / libretro-uae

PUAE libretro
GNU General Public License v2.0
114 stars 61 forks source link

How to edit the core UI? #609

Closed arithesage closed 1 year ago

arithesage commented 1 year ago

Hi, i would like to edit core menu, for example for changing some options position (like disc control) and for adding the possibility of creating M3U files to the core, without having to create them apart.

What source files must be edited for adding new options, sections, etc...?

sonninnos commented 1 year ago

Not by editing this core alone, since disc control stuff is done by the frontend. This core also already creates m3u files when suitable (when launching archives), so what do you mean exactly? What options are missing?

arithesage commented 1 year ago

Oh, well, i'll try to explain better...

I'm using m3u files to load all my games (floppy and hdf ones). Then i set the appropiate core settings (model, RAM, etc.) by game.

Actually i create these files by hand (i'm working on a python script to generate them), and i wondered if was possible to create and manage these files in the core...

You say that the core already generates m3u files? I suppose you mean Zip files, right?

sonninnos commented 1 year ago

Indeed why bother since you can simply launch all kinds of content directly. Yes, archives mean zip and 7z.

arithesage commented 1 year ago

Yes, i know there are solutions like WHDLoad to instant loading all games, but i was searching a A500-style experience...

About the Zips, i have a donde a quick test and yes, when i load a zipped game i have all floppies like when i use a M3U playlist, but there is one thing i don't understand:

ZIP support

ZIPs are extracted to a temporary directory in saves, bypassing the default frontend extraction. The temporary directory is emptied but not removed on exit. ZIP is not repacked, which means saves and highscores are lost.

This allows:

Automatic M3U playlist generation of all files
The use of zipped images in M3Us
If no compatible images are found, the ZIP will be treated as a directory

When i use a M3U, i can add savegame floppies to it, even label them.

Loading a zipped game i only can choose between the game floppies and, as the readme says, the zip contents are lost upon exiting the game, so, even if i include a savegame flopply, it would be useless because the zip don't get updated.

This is why i started using M3U files. I also use them to load installed games because i'm used to use two HDFs: one for booting Workbench and another one for the game.

P.D: Also, if we have multiple RetroArch copies in a multi-user environment, using the M3U assures that, event if all players share the same games, every one will have their savegame floppies in their RetroArch save folders.

sonninnos commented 1 year ago

Touching and altering the original zip files would be horrible practice. The core does have a save disk creating feature for games that require a separate save disk, and the ability to redirect all disk writes to separate disks under saves.

arithesage commented 1 year ago

Yes, i have seen that using the M3U. The save floppies are generated in the folder (i think FS-UAE does the same thing), but using zips... How can i select them if i only see the game floppies available?

I thought then that zip format was more convenient for games that doesn't save progress, or use codes...

sonninnos commented 1 year ago

The created save disk is appended to the floppy list.

arithesage commented 1 year ago

IMG_20230506_202233 IMG_20230506_202214

🤷🏼‍♂️

sonninnos commented 1 year ago

Since there is no "Save Disk 0" at the end, it means you simply have not created the disk via the available methods: VKBD button SVDS (seen when CapsLock is down) or pressing the Toggle Save Disk hotkey after binding it to a key.

arithesage commented 1 year ago

imagen imagen

Oh my... Well, that was the problem. The key was unbinded, and i didn't know of its existence...

So, there is certainly no need of using M3Us for floppy games... Thanks a lot for the tip.

Now my doubt is with HDFs. I wonder if i zip the two partitions, belonging to Workbench and the game itself, will be mounted as DH0 and DH1 and the modified files recorded in saves folder, although using M3Us i can easily share the Workbench partition among all games...

i30817 commented 1 year ago

I have a tool that automatically makes m3u's in linux if you're interested: https://gist.github.com/i30817/ba37fbb2b3c6e34ff926ad833f465055

m3u's are still useful in retroarch for the playlists to show only one 'cd/floppy', although i'm not altogether sure if they keep a record of the last loaded cd/floppy when loading them again.

sonninnos commented 1 year ago

I'll close this since the request is out of the core's reach regardless.