2 x joystick config

Tagged: 

This topic contains 16 replies, has 6 voices, and was last updated by Profile photo of bjkidder bjkidder 1 year, 8 months ago.

Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #104714
    Profile photo of andrewvalentine
    andrewvalentine
    Participant

    Hi all,

    Bit of a newcomer to the world of RetroPie and Emulation Station. Go easy on me!

    I’ve put together a desktop arcade cabinet like this one:

    http://www.instructables.com/id/2-Player-Bartop-Arcade-Machine-Powered-by-Pi/?ALLSTEPS

    I’ve got a Pi model B and a set of these joysticks/buttons:

    http://www.ultracabs.co.uk/usb-interface–standard-joystick-set-109-p.asp

    I’ve got the sticks and buttons wired to the USB controller, and connected to the Pi. When booting to Emulation Station, the joysticks are not detected.

    So I’ve got a couple of questions:

    – Is it better to simply wire the sticks and buttons to the 40 pin GPIO on the Pi?
    – Can anyone recommend any guides on this? Have found loads online, but can’t identify one that matches this setup.

    Cheers,

    Andrew

    #104757
    Profile photo of efraimsangil
    efraimsangil
    Participant

    Hi!

    You need to change the Linux kernel to use 2 joysticks using XinMo USB controller.

    Try it!

    Custom Kernel for Xinmo
    https://www.dropbox.com/s/f610y6q91mfv9zb/custom_kernel_1.20150317-1.tar.gz?dl=0

    #106657
    Profile photo of andrewvalentine
    andrewvalentine
    Participant

    Hi!

    Thanks, but that link doesn’t work anymore. Any chance you could re-upload?

    Cheers,

    Andrew

    #106658
    Profile photo of colinshare84
    colinshare84
    Participant

    @andrewvalentine

    I was in your position not long ago! I’ve learned a lot since then!

    Assuming you’re running the most recent version of RetroPie! Follow this post to sort out the XinMo:

    104433

    No need to patch the kernel, simply go through the terminal and run “sudo nano /boot/cmdline.txt” to add the “usbhid.quirks=0x16c0:0x05e1:0x040” entry or take your SD card and plug it into a PC which will give you access to the cmdline text file.

    Good luck!

    #106664
    Profile photo of andrewvalentine
    andrewvalentine
    Participant

    That’s cracked it! Thanks so much!

    Is there a file that controls the XinMo bindings? I want to add an “Exit Emulator” key. Found this:

    /opt/retropie/configs/all/retroarch-joypads/Xin-MoXin-MoDualArcade.cfg

    Is that the one?

    Cheers,

    Andrew

    #106774
    Profile photo of colinshare84
    colinshare84
    Participant

    @andrewvalentine

    No problem!

    I understand the logic for the auto config files like you mentioned but since I only use a Xin-Mo with my setup, I’ve not really delved into utilising them I’m afraid.

    If it helps, here are the steps that I took to set up my controls once I had added the entry to cmdline.txt:

    Quit to the terminal using F4
    Type “cd /dev/input” to change to that directory
    Type “ls” and it will show the directory contents
    Look for js0, js1, js2, etc.
    Type “jstest js0”
    Press buttons to see what they are identified as and make a list/diagram, press Ctrl-C to quit jstest

    Type “sudo nano /opt/retropie/configs/all/retroarch.cfg”
    Go to the end of this file and add custom controls using the list/diagram such as:

    input_enable_hotkey_btn = “9”
    input_pause_toggle_btn = “7”
    input_exit_emulator_btn = “10”
    input_menu_toggle_btn = “6”
    input_volume_up_axis = “-1”
    input_volume_down_axis = “+1”
    input_audio_mute_btn = “8”

    input_player1_joypad_index = “1”

    input_player1_up_axis = “-1”
    input_player1_down_axis = “+1”
    input_player1_left_axis = “-0”
    input_player1_right_axis = “+0”
    input_player1_a_btn = “1”
    input_player1_b_btn = “0”
    input_player1_x_btn = “2”
    input_player1_y_btn = “3”
    input_player1_l_btn = “4”
    input_player1_r_btn = “5”
    input_player1_select_btn = “6”
    input_player1_start_btn = “7”

    input_player2_joypad_index = “0”

    input_player2_up_axis = “-1”
    input_player2_down_axis = “+1”
    input_player2_left_axis = “-0”
    input_player2_right_axis = “+0”
    input_player2_a_btn = “1”
    input_player2_b_btn = “0”
    input_player2_x_btn = “2”
    input_player2_y_btn = “3”
    input_player2_l_btn = “4”
    input_player2_r_btn = “5”
    input_player2_select_btn = “6”
    input_player2_start_btn = “7”

    input_player1_joypad_index = “1” should refer to the js name found previously
    Press Ctrl-X to quit and make sure to press Y to save
    Type “emulationstation” to get back to the familiar menus and try one of the retroarch emulators!

    Hope this helps! Maybe not the clearest steps but if you need any more help just ask!

    #106775
    Profile photo of colinshare84
    colinshare84
    Participant

    Also, check out floob’s videos:

    floob

    He does well at keeping them updated to the most recent versions of RetroPie so they should help. There’s a few looking at exactly what you need.

    #107051
    Profile photo of enigma90
    enigma90
    Participant

    This sounds similar to my issue, I have also just completed the Instructables Guide and bought the XinMo USB only difference is I went for the LED version.

    I have managed go through terminal and followed your structions making a map

    This is what is in my retroarch.cfg and also my xin-moxin…cfg file

    input_device = “Xin-Mo Xin-Mo Dual Arcade”
    input_driver = “udev”
    input_player1_joypad_index = “1”
    input_player1_up_axis = “-1”
    input_player1_down_axis = “+1”
    input_player1_left_axis = “-0”
    input_player1_right_axis = “+0”
    input_player1_a_btn = “3”
    input_player1_b_btn = “4”
    input_player1_x_btn = “0”
    input_player1_y_btn = “1”
    input_player1_l_btn = “2”
    input_player1_r_btn = “5”
    input_player1_start_btn = “8”
    input_player2_joypad_index = “0”
    input_player2_up_axis = “-1”
    input_player2_down_axis = “+1”
    input_player2_left_axis = “-0”
    input_player2_right_axis = “+0”
    input_player2_a_btn = “19”
    input_player2_b_btn = “20”
    input_player2_x_btn = “6”
    input_player2_y_btn = “7”
    input_player2_l_btn = “18”
    input_player2_r_btn = “21”
    input_player2_start_btn = “9”

    However when I go into Emulation station the joystick etc works fine however when I load an emulator no configuration is there except when i press Button 0 it does everything :S on the same button i.e Start, A, B. All in one go

    I am a complete novice at programming etc so may need some more help. Is there any information I can copy and paste into a reply that you can let me know what’s right and wrong

    #107559
    Profile photo of fightclub
    fightclub
    Participant

    Hi!

    You need to change the Linux kernel to use 2 joysticks using XinMo USB controller.

    Try it!

    Custom Kernel for Xinmo
    https://www.dropbox.com/s/f610y6q91mfv9zb/custom_kernel_1.20150317-1.tar.gz?dl=0

    Can you repost the kernel? its gone from dropbox. thanks!

    #107584
    Profile photo of efraimsangil
    efraimsangil
    Participant

    Try with this:

    2 x joystick config

    It’s better that changing Kernel.

    #107787
    Profile photo of fightclub
    fightclub
    Participant

    Try with this:

    http://blog.petrockblock.com/forums/topic/2-x-joystick-config/#post-106658

    It’s better that changing Kernel.

    efraimsangil,

    i added the line to my cmdline.txt file. unfortunately, i dont see anything in /dev/input other than ‘mice’ and my xinmo is connected. is 0x16c0:0x05e1:0x040 the same for all xin-mo’s? when i run lsusb, i get Bus 001 Device 005: ID 0314:0326. ive tried 0x0314:0x0326:0x040 and that isnt recognized either.

    i am running the newest retropie image with a full apt-get upgrade and thats it. no modified kernel.

    any help?

    #107788
    Profile photo of fightclub
    fightclub
    Participant

    looks like i needed to update the cmdline.txt line with my product id that i got from lsusb.

    i guess my xin-mo isnt the same as everyone elses. it does work now though.

    also, you may want to specify to append that line vice creating a new line. if you create a new line, its not recognized.

    #107896
    Profile photo of bjkidder
    bjkidder
    Participant

    fightclub-

    I think I have the same issue as yourself, when I run the lsusb command I find my product ID to be 0314:0326. There is no listed name next to it. I try and update the cmmndline.txt file with the product ID, but with no success. How did you phrase it exactly? I’ve tried adding the text to end of the first line, and on it’s own line. Ive attempted with “usbhid.quirks=0314:0326:0x040” and “usbhid.quirks=3014:0326”

    Any thoughts? Programming NOOB, so apologies if this is blatantly dumb and obvious

    I have a Raspberry Pi 2 B+ with RetroPie v3.0, trying to setup a 2 player joystick with a USB interface PCB kit off Amazon. “RA-PC-2-2-JAMMA-USB” is listed as a detail on the amazon website

    #107917
    Profile photo of efraimsangil
    efraimsangil
    Participant
    #107930
    Profile photo of bjkidder
    bjkidder
    Participant

    Thanks! I found a test command called evtest that recognizes the pci board as a joystick and responds to button pushes etc… so I think the custom Kernel is the way to go for me. If I download the Kernel and later update my retropie image to 3.1, do I have to repeat the Kernel update process?

    #107950
    Profile photo of efraimsangil
    efraimsangil
    Participant

    Yes, always that you update Retropie with script (retropie-setup.sh), you must apply the path again 🙂

    #108108
    Profile photo of bjkidder
    bjkidder
    Participant

    Thanks so much for the help!

    Installed a fresh retropie image, added the usbquirks line to the cmmndline.txt file, installed the modified Kernel and it worked! Haven’t had a ton of time to tweak the button mapping and it seemed a little glitchy, but I got to put a solid few hours into SFII last night, which is a win. Seems like issues that a little more time and digging on the forums should be able to fix no prob.

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

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

Skip to toolbar