barbudreadmon / fbalpha-backup-dontuse-ty

Deprecated port of Final Burn Alpha to Libretro (v0.2.97.43).
61 stars 43 forks source link

Allow proper saving of remap configurations #158

Open Oggom opened 6 years ago

Oggom commented 6 years ago

With the current core it is not possible to properly save your input mappings when switching between games.

For example, if you create a remap file while running a 6-button fighting game ("Weak Punch", "Medium Punch", ...) and then load a NeoGeo game ("Button A", "Button B", ...) saving your remapping will overwrite the previously configured inputs.

barbudreadmon commented 6 years ago

I can't reproduce this issue, are you sure you used "Save Game Remap File" and not "Save Core Remap File" ? Also, what's your version of retroarch ?

Oggom commented 6 years ago

"Save Game Remap File" only creates a remap file for the game you're currently running. So if I were to create a remap file while playing sfa3 it would not be applied to sfa2 despite them sharing the same input scheme.

I'm currently running the latest stable release, RetroArch 1.6.7.

barbudreadmon commented 6 years ago

Well, that's how the remapping system works, if you use "Save core remap file", it will be applied on all games this core run. The remapping system don't really care about the descriptor name, it only uses the name of the "original" button (b, a, y, x, l1, r1, l2, r2, ...). Being able to set a remap file at an intermediate level, perhaps through an arbitrary string the core provide through some callback (which could be the machine name in mame/fba case), would have been nice, but i don't think that's on the roadmap of libretro, perhaps @fr500 and @twinaphex would be interested by this idea.

andres-asm commented 6 years ago

I don't think this is an issue per-se.

More like a misunderstanding of what the system is and what it's not.

That's why there are core and game remap files. Core remaps are global for the core, and hardly suitable for a core such as FBA. I don't see a way to implement this, the device name has no significance in RA, it's only "for show" It's an interesting idea but it would need a way to save different "sections" in the core remap file like:

[CPSx arcade] ....

[NeoGeo arcade] ....

The current parser doesn't support such a thing. Another alternative would be to save "Controller Name.cfg"

That I could do I guess... Then the core would need to differentiate the different gamepads / controllers / input devices depending on the loaded game.

Then the hierarchy would be core remap -> core / controller specific remap -> game remap

barbudreadmon commented 6 years ago

@fr500 How about saving it to another remap file instead of having sections ?

Suppose i run a neogeo game, i could send "neogeo-machine" to retroarch through some callback, then if retroarch detect i sent this, it would offer a third "Save XXX remap file" in controls, which would save to a file named "neogeo-machine.rmp".

The hierarchy for loading would need to be core remap -> callback remap -> game remap

Is that not in the realm of possible ?

Also, i've been wondering if storing all remap files from different level in the hierarchy in the same directory for a core is not kinda dangerous. What happens if i rename a megadrive game to "Genesis Plus GX.smd" then run it through this same core and set both a core and a game remap file while running it ? That's not really an issue at the moment, except if someone is kinda devious, but it could become one if the callback thing is possible and approved.

andres-asm commented 6 years ago

Yes that's what I was suggesting with this:

core remap -> core / controller specific remap -> game remap

Instead of it being callback based I would expect the "device name" to be NeoGeo Modern or something like that, it's simple and doesn't require API changes.

barbudreadmon commented 6 years ago

Well, i would need to define the device names after loading the game to be able to append the machine name to it. That's not what i do at the moment but it seems possible.