Problem Setting Up Controller

Welcome Page Forums RetroPie Project Controller Configuration in RetroPie Problem Setting Up Controller

This topic contains 30 replies, has 4 voices, and was last updated by  Floob 2 years, 2 months ago.

Viewing 31 posts - 1 through 31 (of 31 total)
  • Author
  • #108829


    Hi everyone,

    Firstly would like to say that I am somewhat an amateur in the world of computing, coding etc. I have made my own full size arcade machine and am running the most recent RaspberryPi on it.

    The controller set I bought is almost identical to the below image:

    I have two joysticks, 6 buttons each and a start and select button. Both going through the same control board and into one usb port on the RaspberryPi.

    When I configure the controller on booting up RetroPie it allows me to select buttons for one joystick, six buttons and the start and select button.

    I am unable to use the second set. If I go to the configuration on EmulationStation it will allow me to program the buttons on the second set but then the first set becomes wiped out.

    I’m hoping it is a simple enough task.

    It may be worth adding that I transferred the roms using usb as I have no wifi dongle or ethernet cable to transfer them that way.

    Any help would be much appreciated.

    I have attached an image of the machine, I refurbished an old poker machine, gave it a custom paint job, installed a lightbox with my logo and made some new panels for the controls and for easy access to keyboard etc. Hope you all like it!

    Thanks in advance,



    Did any file get created in here?

    When you start a game, say a megadrive one, do you get any yellow text appear at the bottom of the screen?

    RetroPie help guides -->
    Please read this before asking for help -->



    I’m not sure how or where to access:

    When I start a megadrive game it reads the following on the bottom of the screen in yellow text:

    Xin-Ho Xin-Ho Dual Arcade Configured in port #0



    Try plugging a keyboard into the Pi, F4 to get to the command prompt and type
    “ls -lah /opt/retropie/configs/all/retroarch-joypads”

    RetroPie help guides -->
    Please read this before asking for help -->



    My apologies if this is incredibly stupid but I only have a mac keyboard, the same as this:

    F4 does nothing when I press it and have tried different combinations using control, option and command.

    Apologies for my lack of knowledge, I really appreciate your help on this.



    Can you try fn + F4?

    Or maybe you could temporarily hook it up so its closer to the router so you can use an ethernet cable.

    RetroPie help guides -->
    Please read this before asking for help -->



    oops i just created a similar thread… having the same issue….

    ive set it up in retroarch but unsure of how to set up the second. I do get yellow text coming at the bottom when i star i game.

    Ive used filezilla to connect to my pi and in /opt/retropie/configs/all/retroarch-joypads is a file called Xin-MoXin-MoDualArcade.cfg

    in it reads
    input_device = “Xin-Mo Xin-Mo Dual Arcade”
    input_driver = “udev”
    input_r_btn = “13”
    input_save_state_btn = “13”
    input_start_btn = “17”
    input_exit_emulator_btn = “17”
    input_l_btn = “14”
    input_load_state_btn = “14”
    input_up_axis = “-1”
    input_a_btn = “10”
    input_b_btn = “11”
    input_reset_btn = “11”
    input_down_axis = “+0”
    input_right_axis = “+1”
    input_state_slot_increase_axis = “+1”
    input_x_btn = “12”
    input_menu_toggle_btn = “12”
    input_select_btn = “16”
    input_enable_hotkey_btn = “16”
    input_y_btn = “15”
    input_left_axis = “-0”
    input_state_slot_decrease_axis = “-0”

    how do i set up the second controllers?



    I haven’t used a Xin-Mo, so could you check what the codes are when you use jstest?
    Can you do that for P1 and P2?

    RetroPie help guides -->
    Please read this before asking for help -->



    Nothing happens when I press fn + F4 on the keyboard. I plugged the keyboard into my Mac to see if it might be faulty. Only some of the f keys work (for volume etc). I think it may be broken.

    I do not have any ethernet cable to connect directly to the internet modem. Is it possible to use my Macbook through the hdmi connection as a keyboard?



    sure, its here

    button layout






    Okay I went and bought a keyboard, pressed F4 and got a big screen full of code.

    I entered: ls -lah /opt/retropie/configs/all/retroarch-joypads
    and got: total 16k
    drwxr-xr-x 2 pi pi 4.0k Jul 20 20.46 .
    drwxr-xr-x 3 pi pi 4.0k Jul 20 19.51 ..
    -rw-r–r– 1 pi pi 563 20.46 Xin-Moxin-MoDualArcade.cfg
    -rw-r–r– 1 pi pi 553 19.21 Xin-Moxin-MoDualArcade.cfg.bak



    @steveowl if you type this line, is your output the same as dalehitchy posted above?
    “nano /opt/retropie/configs/all/retroarch-joypads/Xin-Moxin-MoDualArcade.cfg

    @dalehitchy Thanks – but do you have buttons for Player 1 / Credit style, which would be your start and select buttons? Any others at all? (As I’m thinking maybe something relates to button 8 and 9 – does the jstest output name the buttons?)

    Anyway bsaed on your info try replacing the info in your Xin-Moxin-MoDualArcade.cfg with this:

    If that doesnt work, try adding this to a system based retroarch.cfg.
    For example: /opt/retropie/configs/megadrive/retroarch.cfg

    Although if you are only ever going to use that controller, you could just add it to the file /opt/retropie/configs/all/retroarch.cfg

    RetroPie help guides -->
    Please read this before asking for help -->



    It’s blank!



    It’s blank! I do have the commands at the bottom though like ‘Get help’, ‘exit’ etc



    i do have a p1 and select button just not listed as not wired them up. just trying to get any of p2 controls working first.

    that didnt work… i tried pasting that into the Xin-Moxin-MoDualArcade.cfg
    restarted retropie and tried playing a game with no luck. my first player controls didnt even work.

    i reverted it back and tried pasted that at the bottom of the retroarch.cfg but again still no luck.

    i think the issue im having is retropie thinking that the xin-mo is one controller as its only connected via 1 cable. ive seen some guides and tried following but i need it in simple terms.



    @steveowl – That suggests you have a typo – try typing
    β€œnano /opt/retropie/configs/all/retroarch-joypads/X (then press tab to auto complete the name)

    @dalehitchy What game/emulator are you testing with – how do you start the P2 player without a start button for it?

    It looks like the issue may be resolved by adding this to /boot/cmdline.txt

    Autofire on the axis

    However, reading that thread as a whole would be helpful as many other people have the same issue – mostly resolved by editing that file – just make sure you do it properly in nano with a space after whats there then adding the new data based on your vendor id.

    RetroPie help guides -->
    Please read this before asking for help -->



    That worked!

    On screen is very similar to what dalehitchy got:

    input_device = β€œXin-Mo Xin-Mo Dual Arcade”
    input_driver = β€œudev”
    input_r_btn = β€œ15”
    input_save_state_btn = β€œ15”
    input_start_btn = β€œ16”
    input_exit_emulator_btn = β€œ16”
    input_l_btn = β€œ14”
    input_load_state_btn = β€œ14”
    input_up_axis = β€œ-1β€³
    input_a_btn = β€œ11”
    input_b_btn = β€œ13”
    input_reset_btn = β€œ13”
    input_down_axis = β€œ+1β€³
    input_right_axis = β€œ+0β€³
    input_state_slot_increase_axis = β€œ+0β€³
    input_x_btn = β€œ10”
    input_menu_toggle_btn = β€œ10”
    input_select_btn = β€œ17”
    input_enable_hotkey_btn = β€œ17”
    input_y_btn = β€œ12”
    input_left_axis = β€œ-0β€³
    input_state_slot_decrease_axis = β€œ-0β€³



    @steveowl When you type
    “ls /dev/input/”

    how many js values are showing 1 or 2?

    RetroPie help guides -->
    Please read this before asking for help -->



    I am getting:

    by-id by-path event0 event1 js0 mice



    finally got it working…. its a big thread that… but the bit you are looking for steve is:

    in command line, type – cd boot
    sudo nano cmdline.txt

    add this line of text

    make sure you save.

    reboot. It should now recognise the xin-mo as two controls.

    then in the retroarch.cfg file i added what floob told me to as above.



    I have added that line to the cmdline.txt

    Will I need to add all of those lines manually to the retroarch.cfg file on the raspberry pi then and save it (I am not hooked up with wifi and have no ethernet cable)

    Apologies, I am majorly amateur, never done anything with coding before so am sorry if I need to be told in exact and very basic steps. Really appreciating the help though.




    one thing that is a bit weird is that the controller you showed me looks fine…

    but the top left button thats jumping for player1, on player 2.. the top left its doing something different… confused as to why



    My line of code reads this:

    When I input: /opt/retropie/configs/all/retroarch.cfg

    It says: Permission denied




    @herbfargus – Yep, just added that today, I’m hoping that should help me out when I finally get one and have forgotten all this πŸ™‚

    @steveowl Before you edit your retroarch.cfg it would be worth getting the Xin-Mo identified as 2 devices.

    To edit the file you do
    “sudo nano /boot/cmdline.txt” but check the first section in the wiki to see the exact code to add

    RetroPie help guides -->
    Please read this before asking for help -->



    also just to add that before i had 0-5 for p2 and 1-5 for p1
    since adding that line of code i had one the joysticks working but one controllers buttons wernt working.

    it was because now they they are both recognised as two controllers…. p1 is 0-6 and p2 is 0-6



    one last comment from me….

    before i just pressed start and select at the same time to quit the game

    with this in retroarch.cfg …. which is my quit game button now… i dont understand it

    input_player1_r_btn = “3”
    input_player1_save_state_btn = “3”
    input_player1_start_btn = “7”
    input_player1_exit_emulator_btn = “7”
    input_player1_l_btn = “4”
    input_player1_load_state_btn = “4”
    input_player1_up_axis = “+1”
    input_player1_a_btn = “0”
    input_player1_b_btn = “1”
    input_player1_reset_btn = “1”
    input_player1_down_axis = “+0”
    input_player1_right_axis = “-1”
    input_player1_state_slot_increase_axis = “+1”
    input_player1_x_btn = “2”
    input_player1_menu_toggle_btn = “2”
    input_player1_select_btn = “6”
    input_player1_enable_hotkey_btn = “6”
    input_player1_y_btn = “5”
    input_player1_left_axis = “-0”
    input_player1_state_slot_decrease_axis = “-0”



    Its now holding whatever button 6 is (marked as select above), then tap whatever button 7 is (marked as start above)
    Bear in mind you seem to have a range of different ” marks there, as long as they are ok in the file its ok – although it will probably work without any quotes.

    RetroPie help guides -->
    Please read this before asking for help -->



    Still have not managed to sort this problem out.

    Since my last post I have purchased a wifi dongle to make things easier.

    Here is where I am at:
    – Fresh installed Retropie
    – Expanded system
    – Configured wifi
    – Connected to Raspberrypi on my mac using Terminal
    – Accessed cmdline.txt file and added this quirk: usbhid.quirks=0x16c0:0x05e1:0x040
    – Rebooted
    – Went into rom to test and saw that it now recognises two controllers instead of just one
    – Accessed retroarch.cfg file to add my controller configs into the file.
    – Added this:
    input_player1_r_btn = β€œ15”
    input_player1_save_state_btn = β€œ15”
    input_player1_start_btn = β€œ6”
    input_player1_exit_emulator_btn = β€œ6”
    input_player1_l_btn = β€œ14″
    input_player1_load_state_btn = β€œ14″
    input_player1_up_axis = β€œ-1”
    input_player1_a_btn = β€œ11”
    input_player1_b_btn = “13”
    input_player1_reset_btn = “13”
    input_player1_down_axis = β€œ+1″
    input_player1_right_axis = β€œ+0”
    input_player1_state_slot_increase_axis = β€œ-1”
    input_player1_x_btn = β€œ10”
    input_player1_menu_toggle_btn = β€œ10β€œ
    input_player1_select_btn = β€œ7”
    input_player1_enable_hotkey_btn = β€œ7”
    input_player1_y_btn = β€œ12”
    input_player1_left_axis = β€œ-0”
    input_player1_state_slot_decrease_axis = β€œ-0”
    input_player1_shader_next_btn = β€œ13”
    input_shader_prev_btn = β€œ7”

    input_player2_r_btn = β€œ8”
    input_player2_save_state_btn = β€œ8”
    input_player2_start_btn = β€œ6”
    input_player2_exit_emulator_btn = β€œ6”
    input_player2_l_btn = β€œ9”
    input_player2_load_state_btn = β€œ9”
    input_player2_up_axis = β€œ-1”
    input_player2_a_btn = β€œ1”
    input_player2_b_btn = β€œ3”
    input_player2_reset_btn = β€œ3”
    input_player2_down_axis = “+1”
    input_player2_right_axis = β€œ+0”
    input_player2_state_slot_increase_axis = β€œ-1”
    input_player2_x_btn = β€œ0”
    input_player2_menu_toggle_btn = β€œ0”
    input_player2_select_btn = β€œ7”
    input_player2_enable_hotkey_btn = β€œ7”
    input_player2_y_btn = β€œ2”
    input_player2_left_axis = “-0”
    input_player2_state_slot_decrease_axis = “-0”

    – I ran a test to see what buttons are assigned to what number and took them down BUT when I rebooted and tested the controllers in a game it is not working properly.
    – Joystick on one side is fine, on the other it is messed up. The start and select buttons no longer work and the jump button (I’m testing on Sonic 2) also pauses the game at the same time.
    – Another thing to note is that when I exited the game (used the keyboard as start and select now do not work) I navigated to the retropie controller configure menu that comes up when you first boot up retropie to set buttons that way.
    – Where before I did a test and start and select were assigned to 16 and 17 they now appear to read 6 and 7 when set this way. Also the A,B,X,Y buttons on both sets are reading the same values (1,3,0,2) even though there is no possible way they could be wired to the same place?

    I feel like I’ve made some good progress but am unsure what to do now!



    If you use the configure menu in the retroarch-setup script it should create a new file in /opt/retropie/configs/all/retroarch.cfg

    Can you post that up on Then do it again but this time with the second controller? I think it may overwrite the first file, so thats why I say grab those details first.

    RetroPie help guides -->
    Please read this before asking for help -->

Viewing 31 posts - 1 through 31 (of 31 total)

Forums are currently read only - please visit the new RetroPie forums at

PLEASE NOTE: All orders that are placed between January 14th and January 28th will be shipped on January 29th. Dismiss