RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    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

    Two controller types - same device name

    Scheduled Pinned Locked Moved Help and Support
    controllerconfiguration
    2 Posts 1 Posters 734 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      Paco
      last edited by

      Hi. I'm aware this question has been posted before, but I haven't found a a solution for my specific problem.

      Raspberry Pi 3B. RetroPie 4.3. 2 identical NES controllers, 2 identical SNES controllers, not manufactured by Nintendo. To make the retro experience complete, my aim is to play NES and SNES games using their respective controllers.

      Both controller types tell the software: "My name is usb gamepad". So both are using the same config file. In other words, the software can't know which controller type is currently plugged in. Both controllers share the same set of buttons (A, B, D-pad, SELECT, START), while SNES adds X, Y, L, R. So I decided to configure the SNES controller first, it works. I replaced them by the NES controllers in order to see if that works. Not exactly. NES has button B configured as "0", while SNES has button B configured as "2". SNES's "0" is button X. That's why my NES B button does a page-down in a game list instead of exiting the list, as well as why inside a game the B button does the same as the A button (NES games only see one bit for each button, so "2" becomes "0", which is button A). :-)

      Doing a full controller configuration each time I swap the controllers is not very convenient, so I was thinking about some solutions. For example creating two separate config files. I don't think that's gonna work: both devices bear the same name, so the software wouldn't be able to know which config file to use. Some other ideas that came to mind...

      1.) Is there a setting that does automatic controller detection based on something else than a device name? If possible: I know devices have identifiers which consist of a manufacturer and model number, but experience tells cheap devices use generic ones however. (I'm no stranger to Linux, but I forgot how to look up these numbers on my system.)
      2.) Is there a menu item in Emulation Station or RetroPie-Setup in which I can say: now explicitly use this configuration file?? Or could I even add such a menu item myself and couple it to a script that does the job? Is it possible to create such a script anyway?
      3.) Because I'm using the extremely nice Nespi case with a built-in USB hub, the case's exterior has 4 USB ports. Is it possible to connect all 4 controllers at the same time and couple these different USB ports to different config files? It would look like a mess, but if it's the only solution I'm ok with that.

      I would like to read your ideas on this. I know I'm not the only one encountering this issue, and I would appreciate it if RetroPie already has a built-in solution of which I'm not aware.

      P 1 Reply Last reply Reply Quote 0
      • P
        Paco @Paco
        last edited by

        NES has button B configured as "0", while SNES has button B configured as "2". SNES's "0" is button X. That's why my NES B button does a page-down in a game list instead of exiting the list, as well as why inside a game the B button does the same as the A button (NES games only see one bit for each button, so "2" becomes "0", which is button A). :-)

        "0" isn't A, so my logical thinking doesn't feel correct. :-) Anyway, in order to make things more clear, here are the two configurations:

        NES controller:

        input_device = "usb gamepad "
        input_driver = "udev"
        input_start_btn = "9"
        input_exit_emulator_btn = "9"
        input_up_axis = "-1"
        input_a_btn = "1"
        input_b_btn = "0"
        input_reset_btn = "0"
        input_enable_hotkey_btn = "8"
        input_down_axis = "+1"
        input_right_axis = "+0"
        input_state_slot_increase_axis = "+0"
        input_select_btn = "8"
        input_left_axis = "-0"
        input_state_slot_decrease_axis = "-0"

        SNES controller:

        input_device = "usb gamepad "
        input_driver = "udev"
        input_l_btn = "4"
        input_load_state_btn = "4"
        input_start_btn = "9"
        input_exit_emulator_btn = "9"
        input_up_axis = "-1"
        input_a_btn = "1"
        input_b_btn = "2"
        input_reset_btn = "2"
        input_enable_hotkey_btn = "8"
        input_down_axis = "+1"
        input_r_btn = "6"
        input_save_state_btn = "6"
        input_right_axis = "+0"
        input_state_slot_increase_axis = "+0"
        input_x_btn = "0"
        input_menu_toggle_btn = "0"
        input_select_btn = "8"
        input_y_btn = "3"
        input_left_axis = "-0"
        input_state_slot_decrease_axis = "-0"

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        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.