Agamemnian
Posts: 6
Joined: Tue Apr 02, 2013 4:37 pm

RetroPie, EmulationStation and a PS2 Controller

Mon Apr 08, 2013 1:21 pm

Hi guys

Am hoping for some help here. So I have my Pi set up to use EmulationStation and RetroPie. I had some issues getting PSX and Megadrive games to work, but now that's sorted thanks to help from this forum.

I have a couple of new issues now.

Firstly I have a PS2 controller that I have setup, and mapped keys for using the 'retroarch-joyconfig -o /RetroPie/configs/all/retroarch.cfg' command.

That didn't seem to make any difference to what was in the retroarch.cfg file so I manually entered the following:
input_player1_joypad_index = "0"
input_player1_a_btn = "1"
input_player1_b_btn = "2"
input_player1_x_btn = "0"
input_player1_y_btn = "3"
input_player1_l_btn = "6"
input_player1_r_btn = "7"
input_player1_l2_btn = "4"
input_player1_r2_btn = "5"
input_player1_l3_btn = "10"
input_player1_r3_btn = "11"
input_player1_start_btn = "9"
input_player1_select_btn = "8"
input_player1_left_btn = "12"
input_player1_up_btn = "13"
input_player1_right_btn = "14"
input_player1_down_btn = "15"
input_player1_left_axis = "-0"
input_player1_up_axis = "-1"
input_player1_right_axis = "+0"
input_player1_down_axis = "+1"
All of the keys work on their assigned buttons and the left thumbsticks work too, however they seem to me that if I lightly push it on one direction its like it goes fully that direction. Is there something alternative I can enter that will give me more responsive thumbsticks, and also make use of the right thumbstick.

Second issue is since getting Megadrive working using DGEN, this seems to use a completely differnet configuration file for the controller. It generated a file called dgenrc. The contents of which is below.
joy_pad1_a = joystick0-button1
joy_pad1_b = joystick0-button2
joy_pad1_c = joystick0-button0
joy_pad1_x = joystick0-button3
joy_pad1_y = joystick0-button6
joy_pad1_z = joystick0-button7
joy_pad1_mode = joystick0-button8
joy_pad1_start = joystick0-button9
joypad1_b8 = key_quit
joy_pad2_a = joystick1-button0
joy_pad2_b = joystick1-button3
joy_pad2_c = joystick1-button1
joy_pad2_x = joystick1-button6
joy_pad2_y = joystick1-button4
joy_pad2_z = joystick1-button5
joy_pad2_mode = joystick1-button9
joy_pad2_start = joystick1-button8
I'm having issues trying to work out which buttons should be associated to using the [email protected] controller. I also am trying to work out a way to exit the emulator using the controller. Firstly I tried adding the lines
input_enable_hotkey_btn = "8"
input_exit_emulator_btn = "9"
like i did in retroarch.cfg, but this had no effect.

After some searching I found I could potentially use the line
input_exit_emulator = input_player1_l_btn
But this doesn't seem to work either so any help on configuring this would be greatly appreciated.

And my final question is in regards to The Sega Master System and Gamegear emulators in RetroPie, and exiting them. As I mentioned in the retroarch.cfg file under RetroPie/configs/all I have the lines:
input_enable_hotkey_btn = "8"
input_exit_emulator_btn = "9"
This doesn't seem to make a difference. As such I added these lines to the retroarch.cfg file in the individual configs for the 2 different systems but still no luck. Any ideas on what I might be doing wrong?

Thanks

User avatar
Aloshi
Posts: 359
Joined: Sat Jun 23, 2012 6:42 pm
Contact: Website

Re: RetroPie, EmulationStation and a PS2 Controller

Wed Apr 10, 2013 3:32 am

With regards to your first problem, I believe you need to remove the "input_player1_right_btn = " etc. lines (that's a digital mapping for an analog control, and you don't want that). Your axis definitions are also off; the format is something like "input_player1_l_y_plus = -1" and "input_player1_l_x_minus = -0" ("l" referring to the left stick, x/y and plus/minus to the direction).

The second problem is because DGen is completely separate from RetroArch. The config file format is completely different, and I don't think DGen even has a concept similar to the "enable_hotkey_btn". Sorry I don't have more answers for DGen, I haven't used it.

You only need to change the "all" config, as all the "individual" configs are appended to it at runtime.

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: RetroPie, EmulationStation and a PS2 Controller

Wed Apr 10, 2013 2:34 pm

In dgen to exit emulator, use 'joy_quit' entry in dgenrc.

Code: Select all

joy_quit = "joystick0-button5"

gilbdeth
Posts: 37
Joined: Fri May 17, 2013 9:49 am

Re: RetroPie, EmulationStation and a PS2 Controller

Mon May 27, 2013 5:19 pm

hi
ive been trying this and still cant get it to work!
i did as you suggested:
joy_quit = joystick0-button6
but still nothing

vashspike
Posts: 1
Joined: Fri May 31, 2013 3:47 pm

Re: RetroPie, EmulationStation and a PS2 Controller

Fri May 31, 2013 3:51 pm

Did you include the ' ' for the command? maybe thats a sore spot. I'm also trying to map this using an SNES usb controller and I'm trying to figure out how to hotkey quit and hotkey save state.

It can't be this could it?

Code: Select all

joy_quit = joystick1-button9+joystick1-button8
I'll try a few things until a skilled person schools me. :D

GoingOffRoading
Posts: 4
Joined: Sat Jun 01, 2013 6:48 am

Re: RetroPie, EmulationStation and a PS2 Controller

Sat Jun 01, 2013 6:55 am

I'm going to retry what you did above but wanted to throw this out there.... I'm using a PS2 USB controller as well and here's the long story...

I got RetroPi up and running, updated, roms uploaded, they all work great but now I’m struggling with my USB PS2 controller.

I some how messed up the config of the controller when I first launched RetroPi… I.E. When Emulationstation runs for the first time, it takes you through a controller configuration screen.

So the up button works as done and none of the other buttons works.

I went bouncing through /home/pi/retro pi/configs/all/retroarch.com but couldn’t seen to find what I was looking for to fix this.

I ran a jstest /dev/input/js0 and the USB PS2 controller is conected/feeding data/etc

I have all of the values of pressing each button if needed.

So how do I reconfigure the controller? Is there a command I can enter to get back to that screen? Or do I need to edit specific values in a specific file manually to fix it?

And hopefully if other people run into this down the line, then this will help it come up in Google…
My Reddit thread on this:
http://www.reddit.com/r/raspberry_pi/co ... ntrollers/
My petRockBlog (the guys that wrote RetroPie) forum post:
http://blog.petrockblock.com/forums/top ... iguration/

GoingOffRoading
Posts: 4
Joined: Sat Jun 01, 2013 6:48 am

Re: RetroPie, EmulationStation and a PS2 Controller

Sat Jun 01, 2013 7:00 am

Agamemnian wrote:Hi guys

Am hoping for some help here. So I have my Pi set up to use EmulationStation and RetroPie. I had some issues getting PSX and Megadrive games to work, but now that's sorted thanks to help from this forum.

I have a couple of new issues now.

Firstly I have a PS2 controller that I have setup, and mapped keys for using the 'retroarch-joyconfig -o /RetroPie/configs/all/retroarch.cfg' command.

That didn't seem to make any difference to what was in the retroarch.cfg file so I manually entered the following:
input_player1_joypad_index = "0"
input_player1_a_btn = "1"
input_player1_b_btn = "2"
input_player1_x_btn = "0"
input_player1_y_btn = "3"
input_player1_l_btn = "6"
input_player1_r_btn = "7"
input_player1_l2_btn = "4"
input_player1_r2_btn = "5"
input_player1_l3_btn = "10"
input_player1_r3_btn = "11"
input_player1_start_btn = "9"
input_player1_select_btn = "8"
input_player1_left_btn = "12"
input_player1_up_btn = "13"
input_player1_right_btn = "14"
input_player1_down_btn = "15"
input_player1_left_axis = "-0"
input_player1_up_axis = "-1"
input_player1_right_axis = "+0"
input_player1_down_axis = "+1"
All of the keys work on their assigned buttons and the left thumbsticks work too, however they seem to me that if I lightly push it on one direction its like it goes fully that direction. Is there something alternative I can enter that will give me more responsive thumbsticks, and also make use of the right thumbstick.

Second issue is since getting Megadrive working using DGEN, this seems to use a completely differnet configuration file for the controller. It generated a file called dgenrc. The contents of which is below.
joy_pad1_a = joystick0-button1
joy_pad1_b = joystick0-button2
joy_pad1_c = joystick0-button0
joy_pad1_x = joystick0-button3
joy_pad1_y = joystick0-button6
joy_pad1_z = joystick0-button7
joy_pad1_mode = joystick0-button8
joy_pad1_start = joystick0-button9
joypad1_b8 = key_quit
joy_pad2_a = joystick1-button0
joy_pad2_b = joystick1-button3
joy_pad2_c = joystick1-button1
joy_pad2_x = joystick1-button6
joy_pad2_y = joystick1-button4
joy_pad2_z = joystick1-button5
joy_pad2_mode = joystick1-button9
joy_pad2_start = joystick1-button8
I'm having issues trying to work out which buttons should be associated to using the [email protected] controller. I also am trying to work out a way to exit the emulator using the controller. Firstly I tried adding the lines
input_enable_hotkey_btn = "8"
input_exit_emulator_btn = "9"
like i did in retroarch.cfg, but this had no effect.

After some searching I found I could potentially use the line
input_exit_emulator = input_player1_l_btn
But this doesn't seem to work either so any help on configuring this would be greatly appreciated.

And my final question is in regards to The Sega Master System and Gamegear emulators in RetroPie, and exiting them. As I mentioned in the retroarch.cfg file under RetroPie/configs/all I have the lines:
input_enable_hotkey_btn = "8"
input_exit_emulator_btn = "9"
This doesn't seem to make a difference. As such I added these lines to the retroarch.cfg file in the individual configs for the 2 different systems but still no luck. Any ideas on what I might be doing wrong?

Thanks
Would it be possible to post your retroarch.cfg in a pastebin or something? If you fixed this issue, it would be amazing to make it an easy fix for those of us that are still struggling with it. Thanks!

User avatar
Aloshi
Posts: 359
Joined: Sat Jun 23, 2012 6:42 pm
Contact: Website

Re: RetroPie, EmulationStation and a PS2 Controller

Sat Jun 01, 2013 5:58 pm

GoingOffRoading wrote:I some how messed up the config of the controller when I first launched RetroPi… I.E. When Emulationstation runs for the first time, it takes you through a controller configuration screen.
Delete ~/.emulationstation/es_input.cfg. The input config will re-run when you restart ES.

Link2001
Posts: 17
Joined: Sat May 03, 2014 3:09 pm

Re: RetroPie, EmulationStation and a PS2 Controller

Tue Jul 29, 2014 6:54 am

The problem with your exit emulator is that you have used quotes. Apart from that your exit emulator text looks fine.

Return to “Gaming”