Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › "Couldn't open joystick #0" when opening retroarch-joyconfig
Tagged: config, controller, set up, wired, xbox 360
- This topic has 7 replies, 3 voices, and was last updated 10 years, 7 months ago by trimmtrabb.
-
AuthorPosts
-
04/05/2014 at 18:50 #5974denny2k2Participant
Hi all,
I am trying to set up a wired 360 controller. I have it working in emulationstation menu no problem, can scroll, select roms etc. I am now trying to set it up for gameplay. I have tried going to the “Input Configuration” menu from emulationstation. It recognises my controller and I run through the prompts. I select all 3 emulators, map my buttons and when I try and save I get the message “Script Error!”.
So I tried going into retroarch-joyconfig from command line and I get the error “Couldn’t open joystick #0”.
Any ideas how I can solve this issue and get my xbox 360 wired controller working for gameplay? Do I need to perhaps need to manually enter the key maps in retroarch.cfg via FTP?
Many thanks in advance.
04/05/2014 at 19:34 #5975denny2k2ParticipantHmm. Further progress but still not working. I have been scouring the forums for similar problems and have ran:
jstest /dev/input/js0
It wouldn’t let me. So I tried
jstest /dev/input/js1
Out of courisotiy and it showed my wired controller!
So I bastardised someone elses retroarch.cfg and manually entered my button numbers and ended up with this:
input_player1_joypad_index = "1" input_player1_a_btn = "0" input_player1_b_btn = "1" input_player1_y_btn = "2" input_player1_x_btn = "3" input_player1_start_btn = "9" input_player1_select_btn = "8" input_player1_l_btn = "4" input_player1_r_btn = "5" input_player1_up_axis = "-1" input_player1_down_axis = "+1" input_player1_left_axis = "-0" input_player1_right_axis = "+0" input_player1_l2_btn = "6" input_player1_r2_btn = "7" input_player1_l3_btn = "11" input_player1_r3_btn = "12" input_player2_joypad_index = "2" input_player2_a_btn = "0" input_player2_b_btn = "1" input_player2_y_btn = "3" input_player2_x_btn = "2" input_player2_start_btn = "7" input_player2_select_btn = "6" input_player2_l_btn = "4" input_player2_r_btn = "5" input_player2_up_axis = "-1" input_player2_down_axis = "+1" input_player2_left_axis = "-0" input_player2_right_axis = "+0" input_player2_l2_btn = "6" input_player2_r2_btn = "7" input_player2_l3_btn = "11" input_player2_r3_btn = "12" input_enable_hotkey_btn = "8" input_exit_emulator_btn = "9"
Note: I changed input_player1_joypad_index = “1” to 1 instead of 0 as 0 wasn’t my controller.
I thought I was onto a winner! Loaded a rom, and nothing worked…until I tried the new hotkey to exit of Start and Select…AND IT WORKED.
So, it seems that it just isnt reading my controller as Player 1 is that correct? As the hotkeys to exit would apply to any controllers rather than player1 input?
Ahhh! Just as I thought I was getting somewhere, I am stuck again. Any help would be appreciated.
I am pretty much a n00b when it comes to Pi and coding – so I hope some of this at least made a little sense?
Thanks again.
04/05/2014 at 20:30 #5976trimmtrabbParticipantHi, did you install xboxdrv via the setup script or manually? I’m not sure exactly what the script configures but if you run sudo nano /etc/rc.local check the last line reads:
xboxdrv –trigger-as-button –id 0 –led 2 –deadzone 4000 –silent &
sleep 104/06/2014 at 01:05 #5977drapetomaniaParticipantYikes! I’m having the same problem–I just registered to say so! and I can confirm that I’m using –id 0 as well. I’m new to this–could it have something to do with the fact that the xbox controller is using the second/bottom usb port (if that goes top-to-bottom)!
04/06/2014 at 17:54 #5985denny2k2ParticipantHi Trimmtrab,
I tried it manually with no success and then ran the setup script, so technically both?
The last line reads:
xboxdrv --daemon --id 0 --led 2 --deadzone 4000 --silent --trigger-as-button --next-controller --id 1 --led 3 --deadzone 4000 --silent --trigger-as-button --dbus disabled --detach-kernel-driver & exit 0
Does anything look out of place with that?
Thanks for your help!
Drapetomania, I’m using a usb hub, so I might try swapping the usb to a different usb socket and see what happens.
04/06/2014 at 18:14 #5987trimmtrabbParticipantTry removing the other pad from that config so there’s just id 0
04/06/2014 at 18:20 #5988denny2k2ParticipantFurther update. I edited the /etc/rc.local and used the code:
xboxdrv –trigger-as-button –id 0 –led 2 –deadzone 4000 –silent & sleep 1
When I launched a ROM. WE HAD SUCCESS! Xbox controller worked great. Had a spot of Double Dragon and Mario. Brilliant! Just before I was going to mark this as solved I decided to reboot, just in case…
Now the controller won’t work in emulationstation at all, not even to change between the emulators and choose a ROM and strangle enough, neither does my usb keyboard now. Although Alt+F4 still allows me to access the console.
How odd…
04/07/2014 at 18:28 #6005trimmtrabbParticipantI think Emulation Station is expecting input from js1, try deleting /.emulationstation/es_input.cfg and reboot to reset the ES controls
-
AuthorPosts
- The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.