USB N64 controller mapping.[Solved]
-
Hardware:
- Raspberry Pi 3B+
- Generic USB Keyboard for Windows 10 OS(Meant for faster menu navigation and Hotkey Shortcut usage)
- Vilros Retro gaming usb N64 controller(see this for more info)
RetroPie version:
- Latest Version as of 10/16/2019( v4.5.1)
Emulator:
- Default N64 Emulator(Mupen64plus)
Issue: I am currently using an USB Xbox controller, but would like to use the controller listed above. The N64 controller I am using can be detected and used, but C buttons don't work as the Right Analog stick and A and B buttons are reversed or not working at all. . I'm hoping the online community can help me solve this issue. I am already aware that I have to edit the .cfg files, but I am not sure on which ones to configure and what to change.
You are welcome to reply here with Links to other Retropie forums that cover the same topic and/or what you did to fix your controller.[EDIT-10/24/2019]
Thanks to the post made by @feloric and some digging around on the website listed in their post, I have fixed the N64 Controller for use with Mupen64plus. Open a ROM with Mupen64Plus and pull up the Retroarch GUI, go to Controls, and save the core remap file. Exit the ROM and remove your MicroSD card(if you're using a Raspberry Pi) and go to this file:/opt/retropie/configs/n64/Mupen64Plus GLES2/
. In it will be a file named:Mupen64Plus GLES2.rmp
. Open it and replace the text with this:input_libretro_device_p1 = "1" input_libretro_device_p2 = "1" input_libretro_device_p3 = "1" input_libretro_device_p4 = "1" input_libretro_device_p5 = "1" input_player1_analog_dpad_mode = "0" input_player1_btn_a = "0" input_player1_btn_b = "1" input_player1_btn_r2 = "-1" input_player1_btn_select = "-1" input_player1_btn_x = "1" input_player1_btn_y = "9" input_player2_analog_dpad_mode = "0" input_player2_btn_select = "-1" input_player3_analog_dpad_mode = "0" input_player4_analog_dpad_mode = "0" input_player5_analog_dpad_mode = "0"
After this, you'll want to open a ROM for the N64 and open the Retroarch GUI one last time and go to controls and load the remap file that you just edited. Close the GUI and if you followed these instructions correctly, congratulations, you can emulate N64 games and play them with an USB N64 Controller.
This will correct the issues I mentioned when I was describing my issue. The only difference between an original N64 and this is now the C buttons have to be spammed in games where they control the camera like Super Mario 64. Still better then not working at all though. Also, if most of you guys(or gals) use your left trigger as the hotkey enable button, it may mess with that function(I don't know since I use a keyboard to exit ROMs and stuff like that). I hope this is useful and helps a lot of you out there who are experiencing the same issues I was before.
-
I had a similar problem to you. Are you having issues while in game or are you having issues with emulationstation as well? I was able to configure emulationstation easy enough from the autoconfig setup, but had issues in game. This guide helped me a lot: https://github.com/RetroPie/RetroPie-Setup/wiki/RetroArch-Configuration
I found the best strategy is to set the hotkey to a useless button like L then set the
input_menu_toggle_btn = "3"
in/opt/retropie/configs/SYSTEMNAME/retroarch.cfg
to any button of your choosing. Press the hotkey (L) + whatever button you set toinput_menu_toggle_btn
at the same time. This will bring up the retroarch GUI. It will have a "controls" section where you can remap the controls while in emulator. Find your optimal settings and save the control mapping. Use that mapping for other games.Another protip is to use the
jstest
utility (see linked guide) to figure out which buttons map to which numbers. It can help you set comfortable hotkeys likeinput_menu_toggle_btn
.Good luck.
-
Thank you so much, @feloric !
I've been just about banging my head against a wall for the last few days since purchasing a dragonrise n64 controller, looking at every forum post under the sun, and none of them were useful. I must have edited every config file there is thrice and no dice. But your post led me to the config file which, although it didn't contain the string "input_menu_toggle_btn", told me that I could hit f1 on a secondary input to open the core specific menu and remap the input according to the results of jstest. I can finally play starfox 64. Thank you so much. This post was a needle in a haystack of irrelevant advice. -
I'm still having a lot of issues with mapping: I was hoping this would help but not seeing a
Mupen64Plus GLES2/
folder in the/opt/retropie/configs/n64/
location.I seem to have controller config files in:
/opt/retropie/configs/n64/retroarch.cfg
That says:input_remapping_directory = "/opt/retropie/configs/n64/"
/opt/retropie/configs/all/retroarch/autoconfig/SWITCH CO.,LTD. Controller (Dinput).cfg
saysinput_device = "SWITCH CO.,LTD. Controller (Dinput)" input_driver = "udev" input_enable_hotkey_btn = "6" input_r_y_minus_btn = "9" input_l_btn = "4" input_load_state_btn = "4" input_r_y_plus_btn = "0" input_up_btn = "h0up" input_left_btn = "h0left" input_state_slot_decrease_btn = "h0left" input_r_x_minus_btn = "3" input_l_y_plus_axis = "+1" input_l_x_plus_axis = "+0" input_right_btn = "h0right" input_state_slot_increase_btn = "h0right" input_l2_btn = "6" input_l_x_minus_axis = "-0" input_r_x_plus_btn = "8" input_r_btn = "5" input_save_state_btn = "5" input_l_y_minus_axis = "-1" input_down_btn = "h0down" input_start_btn = "12" input_exit_emulator_btn = "12" input_b_btn = "2" input_reset_btn = "2" input_a_btn = "1"
Any ideas or suggestions would be appreciated!
-
@CobaltEcho The .rmp file doesn't exist by default. That's why you can't see it if you look through SSH. You have to go into your RGUI (in game) to create one manually (select + x to open the rgui).
Alternatively, you could try making hardcoded configuration changes through the various retroarch config files.
-
This is what I did for mine
Left shoulder + Z trigger is load state
Left shoulder + Right shoulder is save state
Left shoulder + C up is the menuinput_device = "SWITCH CO.,LTD. Controller (Dinput)" input_driver = "udev" input_vendor_id = "9571" input_product_id = "1397" input_r_y_minus_btn = "9" input_r_y_minus_btn_label = "C Top" input_menu_toggle_btn = "9" input_l_btn = "4" input_l_btn_label = "Left Shoulder" input_enable_hotkey_btn = "4" input_r_y_plus_btn = "0" input_r_y_plus_btn_label = "C Bottom" input_up_btn = "h0up" input_up_btn_label = "D-Pad Up" input_left_btn = "h0left" input_left_btn_label = "D-Pad Left" input_state_slot_decrease_btn = "h0left" input_r_x_minus_btn = "3" input_r_x_minus_btn_label = "C Left" input_l_y_plus_axis = "+1" input_l_y_plus_axis_label = "Analog Down" input_l_x_plus_axis = "+0" input_l_x_plus_axis_label = "Analog Right" input_right_btn = "h0right" input_right_btn_label = "D-Pad Right" input_state_slot_increase_btn = "h0right" input_l2_btn = "6" input_l2_btn_label = "Z Trigger" input_load_state_btn = "6" input_l_x_minus_axis = "-0" input_l_x_minus_axis_label = "Analog Left" input_r_x_plus_btn = "8" input_r_x_plus_btn_label = "C Right" input_r_btn = "5" input_r_btn_label = "Right Shoulder" input_save_state_btn = "5" input_l_y_minus_axis = "-1" input_l_y_minus_axis_label = "Analog Up" input_down_btn = "h0down" input_down_btn_label = "D-Pad Down" input_start_btn = "12" input_start_btn_label = "Start" input_exit_emulator_btn = "12" input_b_btn = "2" input_a_btn = "1"
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.