Skip to content

Instantly share code, notes, and snippets.

@booherbg
Last active November 11, 2021 09:44
Show Gist options
  • Save booherbg/b4f26a947c52ba31940c to your computer and use it in GitHub Desktop.
Save booherbg/b4f26a947c52ba31940c to your computer and use it in GitHub Desktop.
Setting up RetroPi + iBuffalo SNES controllers
The documentation online can be confusing, especially with config paths from old files floating around.
1. Download an image file for RetroPi (Ideally 2.5+)
2. Unzip the image file, plug in your SD card (likely /dev/sdb)
3. dd if=retropi.img of=/dev/sdb (this will erase your entire SD card)
4. Optional: increase the size of the new partition with gparted
System Setup
1. Add your ROMs to ~/RetroPi/roms/snes (which will cause your EmulationStation to now show the system in the menu). Be sure to unzip them.
2. (Not needed in RetroPie 2.5) Update your controller config, either by running ~/retropi_setup/retropi_setup.sh, or copying a known config to /opt/retropie/emulators/RetroArch/USB,2-axis8-buttongamepad.cfg
I added the final two lines so that select+start will exit (and save) the emulator:
```
input_device = "USB,2-axis 8-button gamepad "
input_driver = "udev"
input_b_btn = "1"
input_y_btn = "3"
input_select_btn = "6"
input_start_btn = "7"
input_up_axis = "-1"
input_down_axis = "+1"
input_left_axis = "-0"
input_right_axis = "+0"
input_a_btn = "0"
input_x_btn = "2"
input_l_btn = "4"
input_r_btn = "5"
input_l2_btn = "4"
input_r2_btn = "5"
input_l3_btn = "4"
input_r3_btn = "5"
input_l_x_plus_btn = "4"
input_l_x_minus_btn = "4"
input_l_y_plus_btn = "4"
input_l_y_minus_btn = "4"
input_r_x_plus_btn = "4"
input_r_x_minus_btn = "4"
input_r_y_plus_btn = "4"
input_r_y_minus_btn = "4"
input_enable_hotkey_btn = "6"
input_exit_emulator_btn = "7"
```
There's also a recommended additional settings to active 'save' and 'load' game states through the emulator:
(select+R to remember, select+L to load)
```
input_enable_hotkey_btn = 6
input_save_state_btn = 5
input_load_state_btn = 4
```
I also uncommented a line in my config that forces the emulator to sync the game state. This is because I was losing game saves.
Not sure which has precedent:
/opt/retropie/emulators/RetroArch/retroarch.cfg or /opt/retropie/emulators/configs/all/retroarch.cfg
# Autosaves the non-volatile SRAM at a regular interval. This is disabled by default unless set otherwise.
# The interval is measured in seconds. A value of 0 disables autosave.
autosave_interval = 5
On 2.5 I had performance issues. There are two things you can do. Edit /boot/config.txt so that hdmi_safe=4 is set, which will boot in 720p mode (which helped me get better performance). Alternatively, I overclocked the RPi to the first setting with volt of 6 (by running sudo raspi-config). The other settings caused instability, likely because I needed more voltage to support the overclock. Now, with this setting audio and video work great on SNES without much issue at all, really.
@chanrry
Copy link

chanrry commented Jun 25, 2016

Could you kindly explain to configure 2 controllers ibuffalo in the nes folder?
Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment