libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.17k stars 1.82k forks source link

[Suggestion] Soft-patching improvements #13277

Open andiandi13 opened 2 years ago

andiandi13 commented 2 years ago

Recently Multi soft-patching was added through #11792

While it's a great feature, having patch files with random names is not convenient, we can't identify which patch is what.

1- I suggest that every character after the patch extension (.ips / .ips1 / .ups / .ups2 ...) would be ignored so that we can add a custom name after it, like that :

Castlevania - Harmony of Dissonance (USA).gba
Castlevania - Harmony of Dissonance (USA).ips-no-blue_outlines
Castlevania - Harmony of Dissonance (USA).ips1-music-overhaul

@eadmaster @Sanaki

2- Also, I take this opportunity to remind of that feature request #10135 which would make roms management way easier. I 'm suprised that RA doesn't feature this manual patch selection menu when it forces us to duplicates rom files + save files just for translations or small hacks.

Thanks to all contributors for considering this.

eadmaster commented 2 years ago

1- I suggest that every character after the patch extension (.ips / .ips1 / .ups / .ups2 ...) would be ignored so that we can add a custom name after it, like that :

Honestly i do not like having custom fantasy extensions like these. Some reasons are: 1. that they make filetype-based associations impossible, 2. harder to write code for them.

I think these would be more manageable, as i've suggested here:

Castlevania - Harmony of Dissonance (USA).gba
Castlevania - Harmony of Dissonance (USA) (no blue outlines).ips
Castlevania - Harmony of Dissonance (USA) (music overhaul).ips
...

(the parentheses are only for decoration, the general format is "rom filename + anything + .ips" )

They could be implemented using retro_opendir() and readdir(), but the performance cost would be higher than the current solution.

Btw, as i've said i do not plan to work on this anytime soon, so i'm just sharing my ideas in case somebody wants to drop in...

I 'm suprised that RA doesn't feature this manual patch selection menu when it forces us to duplicates rom files + save files just for translations or small hacks.

I think this is a better solution from the user perspective, but it requires some more involved work on the code side.

DisasterMo commented 2 years ago

(the parentheses are only for decoration, the general format is "rom filename + anything + .ips" )

Yeah, that won't work. Simple example:

game_name.x
game_name 2.x

game_name 2 anything.ips would be applied to both, wouldn't it?

eadmaster commented 2 years ago

usually properly-named roms should have a region tag after the title, so:

game name (region) anything .ips
game name 2 (region) anything .ips

It won't produce false matches, since "game name (region)" != "game name 2 (region)"

But, of course, if the roms aren't renamed properly you may still have false matches like in the example you made.

Sanaki commented 2 years ago

While slightly less convenient, there's the option of keeping a text file in the directory with patch names, one per line. Assuming fixed name format, could even reference that name in the widgets to specify which patches are being applied.

By extension, that could be used to specify custom named patches to load in order rather than just names.

For example: Castlevania - Harmony of Dissonance (USA).gba Castlevania - Harmony of Dissonance (USA).patchlist

no blue outlines.ips
music overhaul.ips
eadmaster commented 2 years ago

@Sanaki: looks exactly what was suggested here.

andiandi13 commented 2 years ago

While slightly less convenient, there's the option of keeping a text file in the directory with patch names, one per line. Assuming fixed name format, could even reference that name in the widgets to specify which patches are being applied.

By extension, that could be used to specify custom named patches to load in order rather than just names.

For example: Castlevania - Harmony of Dissonance (USA).gba Castlevania - Harmony of Dissonance (USA).patchlist

no blue outlines.ips
music overhaul.ips

Interesting. So if such a thing could be done, what about an option like that

ipspatches

You'd manually select all .ips/.ups files you want RA to load for that rom at start (at it'd be saved in a file like you mentioned .patchlist or whatever)

It seems feasible to me.

eadmaster commented 2 years ago

You'd manually select all .ips/.ups files you want RA to load for that rom at start

You may also load a patch after the content is loaded, if you do a forced-reset after applying. So my idea was to add a menu entry "Load patch..." that will open a file browser.

Technically a lot of things are feasible here, but i'd like to focus on a solution that is more reusable in different contexts and at the same time not too complicated to implement.

I think i've made my point for the ideal solution in this post here (at least from my user perspective, the implementation is much more involved than this but i've already considered working on it in the past).

andiandi13 commented 2 years ago

I agree a "Patch and run" menu would really be the ideal solution.

Sanaki commented 2 years ago

You may also load a patch after the content is loaded, if you do a forced-reset after applying.

This should never happen. So many issues if it did.