How To Get A Gamecube Controller To Work In Retroarch
RetroArch Controller Configuration
RetroArch is the official front finish for the libretro API. RetroArch and libretro provide a way to accept an existing emulator and load that emulator as a library or "core". RetroArch then handles the input (controls) and output (graphics and sound) while the emulator core handles the emulation of the original system. With a few uncomplicated changes to the emulator source code, almost whatsoever existing emulator could become a libretro core.
In RetroPie, the libretro emulator cores are identified with a lr-
in forepart of their name. For example, lr-snes9x2010
is the libretro core of the SNES emulator called snes9x2010.
RetroArch and libretro provide power to configure controllers one time for many emulators instead of having to configure each emulator individually. However, RetroArch also provides the freedom to configure specific emulators individually and fifty-fifty individual games differently if the user wants. This allows a specific setting or button mapping for a certain console or even merely for a certain game.
For emulators which are non libretro cores, at that place are emulator-specific configurations under the corresponding organisation's wiki page.
The RetroPad concept
When you configure your controller in EmulationStation, the RetroPie setup script automatically configures RetroArch with the aforementioned controls.
RetroArch controls map real-world controller buttons to a virtual controller called a "RetroPad". A RetroPad does not exist in existent life, it's a concept merely within RetroArch. A RetroPad has an ABXY layout like a SNES controller plus four shoulder buttons and dual analog sticks like a Sony DualShock.
You don't take to map all of the RetroPad buttons to a existent world push. If your real controller has less buttons than a DualShock, then the virtual RetroPad also has less buttons, that'due south perfectly fine.
Equally RetroArch starts an emulator core, it maps the RetroPad configuration to the emulated system's original controls. The mapping for many consoles is represented past the pictures beneath and on each organization's wiki page. If you wish, y'all can reconfigure this control mapping, either for all RetroArch, for a specific arrangement, or even for a specific ROM.
Retroarch Controls
There are 3 master ways to configure input for RetroArch:
- Autoconfigurations - fabricated in EmulationStation
- Hardcoded Configurations - fabricated past editing
retroarch.cfg
file(due south) - Core Input Remapping - an like shooting fish in a barrel way to do specific control configurations for specific cores, made in the RetroArch RGUI
AutoConfigurations
RetroArch controls have been integrated into EmulationStation and will be the start thing you run into when you boot from the RetroPie SD image the commencement fourth dimension. Yous can also admission it from the offset menu within EmulationStation nether the Configure Input option. Your joypad is automagically configured for libretro (RetroArch) emulators when y'all configure your controller in EmulationStation. Y'all'll know if your controller has been automagically configured if you come across a flash of yellow text on the bottom of the screen with your gamepad ID when you start a game.
The following diagrams are for the 3 most common controllers: Super Nintendo, Xbox 360, and PlayStation three. They tin can exist used as a reference when configuring your controllers. Each emulator page on the wiki has a diagram of the original controller for its respective console that will represent to the same inputs listed below.
After yous've configured your controller the autoconfig volition be created here:
/opt/retropie/configs/all/retroarch/autoconfig
This is an instance config for a USB SNES controller
USB gamepad.cfg
input_device = "USB gamepad " input_driver = "udev" input_r_btn = "5" input_save_state_btn = "five" input_start_btn = "9" input_exit_emulator_btn = "9" input_l_btn = "4" input_load_state_btn = "iv" input_up_axis = "-1" input_a_btn = "one" input_b_btn = "2" input_reset_btn = "2" input_down_axis = "+1" input_right_axis = "+0" input_state_slot_increase_axis = "+0" input_x_btn = "0" input_menu_toggle_btn = "0" input_select_btn = "8" input_enable_hotkey_btn = "eight" input_y_btn = "3" input_left_axis = "-0" input_state_slot_decrease_axis = "-0"
For instance, suppose the "A" button on a USB SNES controller has a value of "1." When setting up the controller, EmulationStation would prompt you to press the "A" button on your controller. Pressing the "A" push button would then record into the config file every bit input_a_btn = "1"
, so RetroArch volition know that the "A" push on your physical controller corresponds to the "A" button on RetroArch's virtual controller, the RetroPad. Therefore, the next time you lot play a game such as Super Mario Bros. pressing the "A" button will tell RetroArch to press the "A" push on its RetroPad, causing Mario to spring. If you lot accidentally pressed the "B" button with a value of "2" during setup when information technology prompted for "A," then information technology would be recorded into the config file equally input_a_btn = "2"
, so if you want to jump in Super Mario Bros., you would have to press "B" on your controller.
Hotkeys
Hotkeys are combinations of buttons yous can press in society to admission options such equally saving, loading, and exiting games. The following defaults are set automatically the first time you gear up your controller from EmulationStation (the numbers will vary depending the controller you lot use).
Default joypad hotkeys:
Hotkeys | Activity | Code Example |
---|---|---|
Select | Hotkey | input_enable_hotkey_btn = "six" |
Select+Start | Exit | input_exit_emulator_btn = "vii" |
Select+Right Shoulder | Save | input_save_state_btn = "5" |
Select+Left Shoulder | Load | input_load_state_btn = "4" |
Select+Right | Input State Slot Increase | input_state_slot_increase_btn = "h0right" |
Select+Left | Input State Slot Decrease | input_state_slot_decrease_btn = "h0left" |
Select+X | RGUI Menu | input_menu_toggle_btn = "3" |
Select+B | Reset | input_reset_btn = "0" |
Determining Button Values
If yous want to edit the entries in the .cfg file for your controller, you will need to know the values corresponding to the buttons on your controller. Unremarkably the human relationship between the two can exist deduced by looking at the file and noting the entries' names along with the values next to them, bold that the values have not been jumbled from previous edits or been mixed upwardly due to unknown issues. For example, the USB gamepad higher up has an entry for input_x_btn = "0"
, indicating that the "10" push button on the controller (or the button that yous associated as "X" during controller setup in EmulationStation) has a value of "0."
On the other mitt, possibly you lot are non sure if the values in the .cfg file is correct or the file is missing entries for buttons that are available on your own controller, such as a "Home" button. You can run jstest (joystick exam) in the last past selecting Quit EmulationStation (a keyboard volition exist required for the following steps).
In the terminal, type and enter
jstest /dev/input/js0
Replace js0 with js1, js2, js3, etc. equally needed if non detected.
A multitude of rows and columns should appear. Pressing buttons or moving analog sticks/joystick will crusade various entries in the columns to swap between on and off and fluctuate through a range of numbers. The value side by side to an on/off entry corresponds to the push button that you take pressed. The fluctuation of numbers from -32767 to 32767 correspond to the input on your controller that has a range of motion, such as analog sticks/triggers.
If y'all are interested in figuring out which is your "Select" button, pressing and holding "Select" on your controller will crusade one cavalcade to switch from off to on. The value adjacent to it corresponds to the "Select" push button. If you accept a controller with a "Habitation" push button, pressing the "Home" push will besides cause one cavalcade to switch from off to on. To leave jstest, printing Ctrl + c
. To render to EmulationStation from the terminal, type and enter emulationstation
.
Using these values, you tin can edit the .cfg file for that controller as needed. For example, if you were interested in switching the your Hotkey button to a "Domicile" button available on your controller, you would edit input_enable_hotkey_btn = "some number"
, replacing "some number" with the value you constitute for your "Abode" push button in jstest.
Video Tutorial
Hardcoded Configurations
These configurations are manual edits you can make that are locked to a specific libretro core and controller. Hardcoded controls can be configured either globally, specific to the emulator core, or specific to an individual game.
Config Bureaucracy
All RetroArch based emulators tin be configured in the following way:
Global settings - that are settings which should apply to all systems - are washed in the file:
/opt/retropie/configs/all/retroarch.cfg
(example)
System-specific settings are done in the files:
/opt/retropie/configs/SYSTEMNAME/retroarch.cfg
(example)
Here, SYSTEMNAME is atari2600
, snes
, etc. All settings in these files will override the corresponding global setting as long equally they are placed above the #includeconfig
line.
ROM-specific settings tin can be created in the runcommand bill of fare and evidence upward as configuration files by ROM title:
/dwelling house/pi/RetroPie/roms/SYSTEMNAME/ROMNAME.cfg
(example)
The ROMNAME
includes the original file extension before the .cfg
, eastward.g. supermariobros.nothing.cfg
These configurations are used when starting this specific ROM.
Custom RetroArch Override Examples
Example Default Per-System retroarch.cfg
# Settings fabricated hither volition only override settings in the global retroarch.cfg if placed above the #include line input_remapping_directory = /opt/retropie/configs/megadrive/ #include "/opt/retropie/configs/all/retroarch.cfg"
Case Per-System Control Override retroarch.cfg
Note the values below are for 1 person's controller, your values may differ. Make certain that these values are placed above the #includeconfig
line:
retroarch.cfg
# Settings fabricated here will just override settings in the global retroarch.cfg if placed higher up the #include line input_remapping_directory = /opt/retropie/configs/megadrive/ input_player1_joypad_index = 0 input_player1_b_btn = 2 input_player1_a_btn = one input_player1_y_btn = 3 input_player1_x_btn = 0 input_player1_l_btn = 4 input_player1_r_btn = v input_player1_start_btn = nine input_player1_select_btn = 8 input_player2_joypad_index = 1 input_player2_b_btn = 2 input_player2_a_btn = 1 input_player2_y_btn = 3 input_player2_x_btn = 0 input_player2_l_btn = iv input_player2_r_btn = five input_player2_start_btn = 9 input_player2_select_btn = viii # Axis for RetroArch D-Pad. # Needs to exist either '+' or '-' in the first character signaling either positive or negative management of the axis, then the centrality number. input_player1_up_axis = -1 input_player1_down_axis = +one input_player1_left_axis = -0 input_player1_right_axis = +0 input_player2_up_axis = -1 input_player2_down_axis = +ane input_player2_left_axis = -0 input_player2_right_axis = +0 #Hotkeys- Hotkeys enable you to press a combination of buttons to do such things as exit emulators, save states, # and load states, besides every bit any other functionality in an emulator. (In the example below viii is the select cardinal # and 9 is the commencement key and then when I agree down select and press start it volition go out the emulator.) input_enable_hotkey_btn = 8 input_exit_emulator_btn = ix input_save_state_btn = 5 input_load_state_btn = 4 input_menu_toggle_btn = 0 input_state_slot_increase_axis = +0 input_state_slot_decrease_axis = -0 #include "/opt/retropie/configs/all/retroarch.cfg"
Case Per-ROM Override retroarch.cfg
aspect_ratio_index = "19" # Never save-on-exit after an override config # or the override will brand into the core config. config_save_on_exit = false
Core Input Remapping
Core Input Remapping differs from the other two methods as it remaps how the cadre receives input rather than how the gamepad is coded, for example you can tell the snes core to switch button A and B on the controller for gameplay, but you tin still apply "A" to select in the RGUI and "B" to get back where every bit hard-coding would make B select and A back. Cadre Remapping is much more practical than hard-coded mapping but is limited to the cores that support it.
- Start a game of the system y'all want to remap the buttons
- Invoke RGUI (Hotkey+Ten with thespian 1)
- Go to Quick Card and then Controls
- Configure the buttons the mode you lot desire
- Select Salvage Core Remap File
- OR, if yous want to save this remapping for the electric current game merely, select Save Game Remap File
Remaps are saved as .rmp
files in directory:
/opt/retropie/configs/SYSTEMNAME/
Retroarch Controls Cheat-Canvas
Video Tutorials
Default Cadre Controls for All Emulators
3do
Atari 2600
Atari Lynx
Gameboy
Gameboy Colour
Gameboy Accelerate
Game Gear
Mastersystem
Megadrive/Genesis (3 Button)
Megadrive/Genesis (half dozen Push)
Nintendo 64
Nintendo DS
NES
Neo Geo
Neo Geo Pocket
PS1
PSP
SG-1000
Super Nintendo
Sega Saturn
Turbografx16
Videopac/Odyssey2
Vectrex
VirtualBoy
Sega Dreamcast
Intellivision
How To Get A Gamecube Controller To Work In Retroarch,
Source: https://retropie.org.uk/docs/RetroArch-Configuration/
Posted by: doyleobed1994.blogspot.com
0 Response to "How To Get A Gamecube Controller To Work In Retroarch"
Post a Comment