Controller Override Per Core, Swap Buttons


#1

Wanted to provide an example of a controller override. In my case I am using a Logitech 310. For Nintendo NES and Gameboy systems the buttons are mapped horizontally by default, I wanted to put them vertically. I think people with XBox 360 and PS3 controllers have the same issue.

I have 3 extra folders and files.

  • ~/.config/retroarch/Nestopia/Nestopia.cfg
  • ~/.config/retroarch/Gambatte/Gambatte.cfg
  • ~/.config/retroarch/mGBA/mGBA.cfg

Each cfg files has the same contents:

input_player1_b_btn = "2" input_player1_y_btn = "3" input_player1_a_btn = "0" input_player1_x_btn = "1" input_player2_b_btn = "2" input_player2_y_btn = "3" input_player2_a_btn = "0" input_player2_x_btn = "1"

Thats it!

Since I am on Linux, I just have all 3 symlinked to one file. If you have individual files, you can remove the player2 lines from the mGBA.cfg and Gambatte.cfg files.

I had to do this manually because the RGUI (I am on version 1.4.1) method of bringing up the Retroarch menu (F1) while playing, adjusting the controls and then saving with Save Core Overrides only created empty cfg files. To find out what to put in the cfg files I backed up my original retroarch.cfg, then changed the controls globally and saved the updated retroarch.cfg. I then did a

diff retroarch.cfg.orig retroarch.cfg

to find out the exact lines to put in the core cfg files.

Hopefully this helps some people. I kept finding guides that said to put the overrides in a file, but none said what exactly to write.


trying to get a second controller to work without breaking the first
#2

Well… You don’t need to do that for inputs… You are changing buttons bindings for something so simple…

Just go to “controls” once you load content remaps there and save a remaps instead…

still, thanks for sharing


#3

Where do those remap files get saved? I want to try this other way out but I don’t think anything is getting saved even though I am getting a success message


#4

Into whatever you have configured as input remapping dir


#5

By default they get saved to /configs/remaps

Or as radius said whatever path you have set in settings->directories

(My memory is bad but it’s something like that)


#6

I have a similar problem, just that i’m re-binding the D-Pad and for some reason it won’t remember after a restart, i get the yellow text that it is saving some config file and i exit cleanly so it should save on exit anyway… nope.

Only difference is that i want it to save globally, not per core… and only for this one specific gamepad (i have multiple different pads that i connect/disconnect on the fly depending on system i emulate most of them 8bitdo bluetooth stuff). The on the fly swapping still works fine after i change the config, so it remembers which pad i changed it for, only problem is that it won’t remember next time.


#7

If you want it to change across cores, that’s a higher level than the overrides can provide. Instead, you’ll want to edit the autoconfig profile for your controller. Unfortunately, you’ll have to do that in a text editor, but it shouldn’t be too hard. Just find the buttons you want to change and move the keycodes around accordingly.


#8

I get so cofused by inputs ( not the ra system so much) just tge sheer amout of use case and how to manage it.

I’m gonna be hair pulling when I properly give this a go! Gonna have to write down some examples of different combos lol


#9

I’m currently trying to set different keyboard bindings specific for the PrBoom core (using WASD keys for movement, etc), but it doesn’t seem to be working. It seems only some specific options can be overriden, not really the bindings. Is that right?

Using “Save Core Overrides” does work for some settings like video_shader_enable but if I only change the bindings it’ll undo any changes I did and generate an empty PrBoom.cfg file. Even if save the settings in retroarch.cfg and copy them over to the PrBoom.cfg (like this thread suggests) it still won’t keep using them after restoring my original retroarch.cfg


#10

yes, that’s correct.