Auto 1 Auto 2, etc. in RetroArch
-
Hello,
I'd like to remap a controller for all the Megadrive/Genesis games. There's a good bit of information out there to do that.
This a a Raspberry Pi B running RetroPie. I am using a script in RetroPie setup that allows me to set a joystick for a core (emulator). I have a PS4 controller connected an a GPIO based SNES gamepad connected. The SNES gamepad is the default for MegaDrive.
This is what the joystick looks like.
Right now, A and B are Red and Yellow. X and Y are Blue and Green.
I'd like to lay out the buttons like a 6-button MegaDrive controller.
But in RetroArch, I see several things that could be controlling the button layout. (Note; I am using the rgui layout for RetroArch, not the PS4 style one.)
For instance:
Auto: 1 (N/A), (Key: z) [User 1] B
Auto: 3 (N/A), (Key: a) [User 1] A
Auto: 7 (N/A), (Key: rshift) [User 1] ModeSo, I don't think I know where to begin with remapping the keys.
I played around with this a little bit earlier and broke most everything about the controls, so I'm trying to be more cautious.
Any help is appreciated.
Also, is there a way to exit RetroArch and not save any changes you made (accidentally or otherwise?) It sure seems like the changes are saved even though I haven't explicitly saved anything and the save on exit is not enabled.
(Here's another question: I set the pad type to 6-button per the instructions in the RP wiki. But I nuked the retroarch cfg file due to having screwed it up. Why is the core still set to 6-button if I nuked the config?)
Sorry for the question dump. I'm trying! :-)
m
-
I've learned a little bit about RetroArch's autoconfig. So I think there's where all the "Auto" items are coming from. However, if I assume the Key: refers to the MegaDrive's actual controller keys, then there's no C, X, Y, and others.
So, I'm quite confused over how to remap.
RetroPie's wiki recommends a video, but that one shows items that don't exist in the current-shipped version of RetroArch. I'm assuming the example is from a version before Auto configuration.
-
@ultramagnus_tcv said in Auto 1 Auto 2, etc. in RetroArch:
Auto: 1 (N/A), (Key: z) [User 1] B
Auto: 3 (N/A), (Key: a) [User 1] A
Auto: 7 (N/A), (Key: rshift) [User 1] ModeThe left part is the physical (gamepad) configuration: Auto <X> means it's coming from an gamepad auto-configuration file,
<X>
being the gamepad input code (as the one generated by EmulationStation when you configure your input). N/A means the input doesn't have a label (normal), the (Key: z) shows how this is mapped for a keyboard input.
The right part is the RetroPad's input code - buttons like A, B, Start, etc.
You can change the mapping by using the D-Pad buttons and it will cycle (the right part) between the available RetroPad inputs (A, B, C, etc.)To mimic the Megadrive/Genesis 6button gamepad, map the C/Z buttons in Emulationstation to L/R (left/right shoulder buttons), then use the RGUI to assign them to C/Z.
Also, is there a way to exit RetroArch and not save any changes you made (accidentally or otherwise?) It sure seems like the changes are saved even though I haven't explicitly saved anything and the save on exit is not enabled.
Save on Exit is disabled by the default in RetroPie, so I don't know why it's automatically saving for your - did you use the RetroPie's installation image or another similar image ?
-
Hi Mitu,
Thanks for your reply. I think I may already have the controller configured in the way you suggested?
Currently it's setup like this... using the button colors of the joystick in the picture I mentioned before.
A = Red
B = Yellow
X = Light Blue
Y = Green
Left Shoulder = White
Right Shoulder = Black(The Labels are the ones that ES prompts for, but I imagine you know that already.)
Currently, X activates what would be C on the Genesis controller. I'd like..
C to be in the black position
X to be in the white positionYou asked me to reconfigure the controller in ES. I can do that. When ES prompts for X, I could choose the black button. When ES prompts for the Left Shoulder, I can choose... ? Green? Blue? I don't really know.
Plus, if I reconfigure the controller to be more laid out like a SNES layout, wouldn't that screw up the Genesis layout?
These numbers next to Auto... these are RetroPad numbers, correct? If I could determine what those numbers meant, couldn't I remap everything in RGUI. If 7, for instance, is ES's Right Shoulder and it's set to the black button, couldn't I remap 7/RtShoulder to C in RGUI?
I apologize. I am finding this pretty mind-bending.
Thanks for everything!
-
It sounds like... based on this page, that ES creates a profile that it then passes to RetroArch which builds its own controller configuration. RA's controller configuration can be overwritten with adjustments. Is that right?
-
@ultramagnus_tcv said in Auto 1 Auto 2, etc. in RetroArch:
RA's controller configuration can be overwritten with adjustments. Is that right?
Yes, you can adjust the auto-configuration file manually, just be aware that re-configuring the input in EmulationStation will overwrite that file.
-
Thanks, mitu!
I've been poking around a bit more today and have a question at the end.
Here's my current setup. I grabbed this from the autoconfiguration directory:
input_device = "SNES-to-Gamepad Device" input_driver = "udev" input_l_btn = "5" input_load_state_btn = "5" input_start_btn = "6" input_exit_emulator_btn = "6" input_down_axis = "+1" input_r_btn = "4" input_save_state_btn = "4" input_right_axis = "+0" input_state_slot_increase_axis = "+0" input_select_btn = "7" input_left_axis = "-0" input_state_slot_decrease_axis = "-0" input_up_axis = "-1" input_a_btn = "0" input_b_btn = "1" input_reset_btn = "1" input_enable_hotkey_btn = "7" input_x_btn = "2" input_menu_toggle_btn = "2" input_y_btn = "3"
Here's what I want:
input_device = "SNES-to-Gamepad Device" input_driver = "udev" input_l_btn = "5" input_load_state_btn = "5" input_start_btn = "6" input_exit_emulator_btn = "6" input_down_axis = "+1" input_r_btn = "2" input_save_state_btn = "4" input_right_axis = "+0" input_state_slot_increase_axis = "+0" input_select_btn = "7" input_left_axis = "-0" input_state_slot_decrease_axis = "-0" input_up_axis = "-1" input_a_btn = "0" input_b_btn = "1" input_reset_btn = "1" input_enable_hotkey_btn = "7" input_x_btn = "4" input_menu_toggle_btn = "2" input_y_btn = "3"
I imagine you look at this so often you can quickly see what I did. I moved the X key (input_x_btn) to 4 which is the bottom right-most button on my joystick. This puts the Genesis's C button on the lower right, which is what I want. I moved input_r_btn to 2. So I just swapped positions. It's probably not the ideal place for the right shoulder, but I'm taking very small steps.
Can I put this in a place where ES can't overwrite it? Is that what a core input remap does?
If so, do I just plop my changes into PicoDrive.rmp? If so, do I need to include all the inputs or just the changes? (i.e. input_x_btn = "4" and input_r_btn = "2")
-
@ultramagnus_tcv said in Auto 1 Auto 2, etc. in RetroArch:
Can I put this in a place where ES can't overwrite it?
If you don't re-configure the gamepad, ES will not overwrite it. You can also choose to not auto-generate these configus from ES - there's an option in the
Configuration/Tools
for theemulationstation
package that does that.Is that what a core input remap does?
Yes, I would suggest to use that if you need remaping only for the Megadrive/Genesis system.
If so, do I just plop my changes into PicoDrive.rmp? If so, do I need to include all the inputs or just the changes? (i.e. input_x_btn = "4" and input_r_btn = "2")
Just do it from the RGUI - https://retropie.org.uk/docs/RetroArch-Configuration/#core-input-remapping - and it will be fine.
-
But the way the lines are defined inside retroarch I can’t tell what it is exactly I am modifying. I see that I can change the button that corresponds to but when it’s prefaced with auto I have no idea what that means. Can you give me an example based upon the lines I gave you at the beginning of this thread?
-
Please re-read my first reply in the topic.
-
@mitu said in Auto 1 Auto 2, etc. in RetroArch:
Auto: 1 (N/A), (Key: z) [User 1] B
I apologize sincerely. I still don’t understand.
The line I quoted above doesn’t really give me any indication where B is on my controller. So I understand how I can change the mapping by cycling through the options but what am I changing and to where? I suppose I could iterate each change. Look where B is now—which is the right flipper in Sonic Spinball—make a change, then see where it goes on the controller. I can then do the same for the other buttons.
Is this what you’re referring to when you ask me to reread the response? There’s a another item in there about remapping on ES and I can do that, but I think I’m stuck with the same issue. I can’t see what the items to the left in the mapping means in order to change it.
I’m sorry I’m not understanding it. Please be a little more patient because I will get it. :-)
-
@mitu Oh... wait. I think I see what you mean.
I'm going to try some things and report back.
-
@mitu said in Auto 1 Auto 2, etc. in RetroArch:
N/A means the input doesn't have a label (normal)
So if I remember correctly, retroarch used to show button labels and then at some point when retroarch got updated (maybe a year or two ago?) The control menu was a bit different and the labels were missing. At one point I found a forum post that showed how to add the labels back in. I think it was @pjft that posted it but unfortunately I can't find that post anywhere.
-
The good news! I'm an idiot.
The bad news! I'm an idiot.
What I wasn't connecting is the number to the corresponding joystick button. That information really isn't anywhere in the Monster Joystick manuals. After reading a bit about remapping on the RetroPie page, I used the jstest program to find the number values of all the buttons. I then was able to figure that, for example, when 1 was listed in the RGUI, it maps to joystick button 1 which is the lower left of all group of six buttons on the Monster.
I still made a couple of mistake rearranging things, but it's all done now and I have a six button Genesis controller setup for the core. Yay!!
-
@quicksilver said in Auto 1 Auto 2, etc. in RetroArch:
@mitu said in Auto 1 Auto 2, etc. in RetroArch:
N/A means the input doesn't have a label (normal)
So if I remember correctly, retroarch used to show button labels and then at some point when retroarch got updated (maybe a year or two ago?) The control menu was a bit different and the labels were missing. At one point I found a forum post that showed how to add the labels back in. I think it was @pjft that posted it but unfortunately I can't find that post anywhere.
That's okay. If you come across it, please let me know!
Ooh! Time to make another backup!!
-
-
@quicksilver That looks good. I may do that.
Glancing at that message, it also points to a repo of various cfg files that might help.
But... is it saying that the labels will be matched up via autoconfig if there's a corresponding device entry available? For instance, my device is called (eg) "SNES GamePad." If RetroArch is aware of SNES GamePad, it'll automatically apply the labels?
Doesn't really matter. I can do it manually.
Thanks for sending the link!
-
@ultramagnus_tcv said in Auto 1 Auto 2, etc. in RetroArch:
If RetroArch is aware of SNES GamePad, it'll automatically apply the labels?
Yes, it will load the autoconfiguration file and apply the labels. Here's an example (taken from here):
input_driver = "udev" input_device = "8BitDo SN30 Pro+" input_device_display_name = "8BitDo SN30 Pro+" input_vendor_id = "11720" input_product_id = "24578" input_b_btn = "1" input_y_btn = "4" input_select_btn = "10" input_start_btn = "11" input_a_btn = "0" input_x_btn = "3" input_l_btn = "6" input_r_btn = "7" input_l2_btn = "8" input_r2_btn = "9" input_l3_btn = "13" input_r3_btn = "14" input_menu_toggle_btn = "2" input_up_btn = "h0up" input_down_btn = "h0down" input_left_btn = "h0left" input_right_btn = "h0right" input_l_x_plus_axis = "+0" input_l_x_minus_axis = "-0" input_l_y_plus_axis = "+1" input_l_y_minus_axis = "-1" input_r_x_plus_axis = "+2" input_r_x_minus_axis = "-2" input_r_y_plus_axis = "+3" input_r_y_minus_axis = "-3" input_b_btn_label = "B" input_y_btn_label = "Y" input_select_btn_label = "Select" input_start_btn_label = "Start" input_a_btn_label = "A" input_x_btn_label = "X" input_l_btn_label = "L1" input_r_btn_label = "R1" input_l2_btn_label = "L2" input_r2_btn_label = "R2" input_l3_btn_label = "LS" input_r3_btn_label = "RS" input_menu_toggle_btn_label = "Home" input_up_btn_label = "Dpad Up" input_down_btn_label = "Dpad Down" input_left_btn_label = "Dpad Left" input_right_btn_label = "Dpad Right" input_l_x_plus_axis_label = "LS Right" input_l_x_minus_axis_label = "LS Left" input_l_y_plus_axis_label = "LS Down" input_l_y_minus_axis_label = "LS Up" input_r_x_plus_axis_label = "RS Right" input_r_x_minus_axis_label = "RS Left" input_r_y_plus_axis_label = "RS Down" input_r_y_minus_axis_label = "RS Up" # Dpad axis input_up_axis = "-7" input_down_axis = "+7" input_left_axis = "+5" input_right_axis = "+4" input_up_axis_label = "Dpad Up" input_down_axis_label = "Dpad Down" input_left_axis_label = "Dpad Left" input_right_axis_label = "Dpad Right"
-
It sounds like there's some kind of library of controllers that Retroarch knows about? Is that pulled from the Internet or does a group of them exist inside the Retropie installation?
I guess what I'm getting at here is: If I were adventurous, could I create my own autoconfigure entry for my particular controller since it doesn't match up with anything currently in there? I don't plan to do this. It's a curiosity.
Another question: Let's say I want to get an N64-style controller. Is there a way for me to look up whether a particular mfg's controller exists inside RetroArch's known controllers so that wouldn't need to manually remap?
Thanks!
-
@ultramagnus_tcv said in Auto 1 Auto 2, etc. in RetroArch:
It sounds like there's some kind of library of controllers that Retroarch knows about?
Yes, at the link I posted previousy - https://github.com/libretro/retroarch-joypad-autoconfig
Is that pulled from the Internet or does a group of them exist inside the Retropie installation?
Neither. When you configure your gamepad in EmulationStation, an auto-config file is generated automatically by RetroPie and copied into the right place, so it's loaded by each libretro core (RetroArch).
I guess what I'm getting at here is: If I were adventurous, could I create my own autoconfigure entry for my particular controller since it doesn't match up with anything currently in there? I don't plan to do this. It's a curiosity.
Yes, you can - https://docs.libretro.com/guides/joypad-autoconfiguration/ - but, as I said, an auto-configuration is generated for your when you configure your gamepad in EmulationStation, so you don't have to.
Another question: Let's say I want to get an N64-style controller. Is there a way for me to look up whether a particular mfg's controller exists inside RetroArch's known controllers so that wouldn't need to manually remap?
You can look it up in the RetroArch's joypad repository - link posted above.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.