Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Can I use a USB hub for controllers?



  • Pi Model: B
    RetroPie Version Used: most recent as of today 8/16/16
    Built From: SD Image
    USB Devices connected: 7 port USB hub, keyboard, 2 Generic USB joysticks, 2 Generic SNES controllers
    Controller used: Generic USB joysticks, Generic SNES controllers
    Error messages received: NA

    I am trying to figure out how to have 4 controllers and a keyboard attached to RetroPie. I can't find any posts other than general controller config posts (ie https://github.com/retropie/retropie-setup/wiki/retroarch-configuration)

    I have a 7 port hub with 2 SNES controllers, a joystick/buttons device, and a keyboard plugged in to it. I would like to use the SNES controllers for some emulators and the joystick devices for others.

    Before adding the hub and additional controllers I was able to edit the config files for individual roms by following the steps https://retropie.org.uk/forum/topic/6/different-controller-for-specific-emulator/7 , which is basically adding the "input_player1_joypad_index=XX" command to the config file for that rom. I was able to determine which XX to put because the pi is 0, 1, 2, 3.

    Now that I have added the hub, the ports don't seem to follow a logical indexing. I have tried changing the "input_player1_joypad_index=XX" to every possible port index combination using numbers from 0-2, and tried 3-7. I have tried changing individual emulator retroarch.cfg files, individual rom retroarch.cfg files, and even in the "all" retroarch.cfg file (even though that's not what I'm trying to accomplish). No matter what I put, the controls remain the same and retroarch determines the SNES controllers are p1 and p2. If I change the player1_index to different numbers, shouldn't it eventually go to the joystick controls?

    Is having a hub just confusing retroarch and making it use default settings? On rom startup the retroarch scrolls at the bottom indicating that the joystick is port 0, usb gamepad is 1, & the other usb gamepad is 2. (Haven't plugged in joystick 2 yet).

    Long story short I want the NES emulator to have joystick 1 as player 1, & joystick 2 as player 2; & the SNES emulator to have SNES controller 1 as p1, and SNES controller 2 as p2.



  • Coincidentally I have purchased and tested a cheap USB hub with 7 ports on my raspi1 today. Some ports doesn't work as expected, but I didn't have time to check it deeper.

    Did you turn on the "Save config on exit" in RetroArch (config_save_on_exit = "true" in retroarch.cfg). I'm not sure but by your description it seems to be your problem (at least one of them).

    BTW, maybe you like to know this tool: https://retropie.org.uk/forum/topic/1167/here-is-a-way-to-select-joystick-for-players-1-4-global-or-emu-specific



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.