Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GPIO buttons in retrorangepi 2.5.2
#1
Hello, I installed https://github.com/ericktarzia/GPIO_cont...trorangepi and all buttons works perfect.

With command line: jstest /dev/input/js0 and: jstest /dev/input/js1 I can test all buttons are recognized.
Player 1 has button: 1,2,3,4,7 and 8. Player 2 has 1,2,3,4 and 8.

I configured emulestation gamepad1 buttons:
up, down, left, right,
start: button 8
a=button 2
b=button 1
x=button 3
y=button 4

When I play to mame (lr-mame2003) keys are not mapped correctly. Coin(button 7 and Start(buttons 8) not work.

I tryed to configure /opt/retropie/configs/arcade/retroarch.cfg:
Code:
input_player1_b = "z"
input_player1_b_btn = "1"
input_player1_b_axis = "nul"
input_player1_y = "x"
input_player1_y_btn = "4"
input_player1_y_axis = "nul"
input_player1_select = "backspace"
input_player1_select_btn = "nul"
input_player1_select_axis = "nul"
input_player1_start = "enter"
input_player1_start_btn = "8"
input_player1_start_axis = "nul"
input_player1_up = "up"
input_player1_up_btn = "nul"
input_player1_up_axis = "nul"
input_player1_down = "down"
input_player1_down_btn = "nul"
input_player1_down_axis = "nul"
input_player1_left = "left"
input_player1_left_btn = "nul"
input_player1_left_axis = "nul"
input_player1_right = "right"
input_player1_right_btn = "nul"
input_player1_right_axis = "nul"
input_player1_a = "a"
input_player1_a_btn = "2"
input_player1_a_axis = "nul"
input_player1_x = "s"
input_player1_x_btn = "3"
input_player1_x_axis = "nul"
input_player1_l = "q"
input_player1_l_btn = "nul"
input_player1_l_axis = "nul"
input_player1_r = "w"
input_player1_r_btn = "nul"
input_player1_r_axis = "nul"
input_player2_b_btn = "2"
input_player2_b_axis = "nul"
input_player2_y = "nul"
input_player2_y_btn = "4"
input_player2_y_axis = "nul"
input_player2_select = "nul"
input_player2_select_btn = "7"
input_player2_select_axis = "nul"
input_player2_start = "nul"
input_player2_start_btn = "8"
input_player2_start_axis = "nul"
input_player2_up = "nul"
input_player2_up_btn = "nul"
input_player2_up_axis = "nul"
input_player2_down = "nul"
input_player2_down_btn = "nul"
input_player2_down_axis = "nul"
input_player2_left = "nul"
input_player2_left_btn = "nul"
input_player2_left_axis = "nul"
input_player2_right = "nul"
input_player2_right_btn = "nul"
input_player2_right_axis = "nul"
input_player2_a = "nul"
input_player2_a_btn = "1"
input_player2_a_axis = "nul"
input_player2_x = "nul"
input_player2_x_btn = "3"
input_player2_x_axis = "nul"
input_player2_l = "nul"
input_player2_l_btn = "nul"
input_player2_l_axis = "nul"
input_player2_r = "nul"
input_player2_r_btn = "nul"
input_player2_r_axis = "nul"
input_player2_l2 = "nul"
input_player2_l2_btn = "nul"
input_player2_l2_axis = "nul"
input_player2_r2 = "nul"
input_player2_l3 = "nul"
input_player2_l3_btn = "nul"
input_player2_l3_axis = "nul"
input_player2_r3 = "nul"
input_player2_r3_btn = "nul"
input_player2_r3_axis = "nul"
input_player2_l_x_plus = "nul"
input_player2_l_x_plus_btn = "nul"
input_player2_l_x_plus_axis = "nul"
input_player2_l_x_minus = "nul"
input_player2_l_x_minus_btn = "nul"
input_player2_l_x_minus_axis = "nul"
input_player2_l_y_plus = "nul"
input_player2_l_y_plus_btn = "nul"
input_player2_l_y_plus_axis = "nul"
input_player2_l_y_minus = "nul"
input_player2_l_y_minus_btn = "nul"
input_player2_l_y_minus_axis = "nul"
input_player2_r_x_plus = "nul"
input_player2_r_x_plus_btn = "nul"
input_player2_r_x_plus_axis = "nul"
input_player2_r_x_minus = "nul"
input_player2_r_x_minus_btn = "nul"
input_player2_r_x_minus_axis = "nul"
input_player2_r_y_plus = "nul"
input_player2_r_y_plus_btn = "nul"
input_player2_r_y_plus_axis = "nul"
input_player2_r_y_minus = "nul"
input_player2_r_y_minus_btn = "nul"
input_player2_r_y_minus_axis = "nul"
input_player2_turbo = "nul"
input_player2_turbo_btn = "nul"
input_player2_turbo_axis = "nul"

/opt/retropie/configs/all/retroarch.cfg
Code:
input_player1_a = "a"
input_player1_b = "z"
input_player1_y = "x"
input_player1_x = "s"
input_player1_start = "enter"
input_player1_select = "backspace"
input_player1_l = "q"
input_player1_r = "w"
input_player1_left = "left"
input_player1_right = "right"
input_player1_up = "up"
input_player1_down = "down"
input_player1_joypad_index = "0"
input_libretro_device_p1 = "1"
input_player2_joypad_index = "1"
input_libretro_device_p2 = "1"
input_player2_b = "nul"
input_player2_b_btn = "2"
input_player2_b_axis = "nul"
input_player2_y = "nul"
input_player2_y_btn = "4"
input_player2_y_axis = "nul"
input_player2_select = "nul"
input_player2_select_btn = "7"
input_player2_select_axis = "nul"
input_player2_start = "nul"
input_player2_start_btn = "8"
input_player2_start_axis = "nul"
input_player2_up = "nul"
input_player2_up_btn = "nul"
input_player2_up_axis = "nul"
input_player2_down = "nul"
input_player2_down_btn = "nul"
input_player2_down_axis = "nul"
input_player2_left = "nul"
input_player2_left_btn = "nul"
input_player2_left_axis = "nul"
input_player2_right = "nul"
input_player2_right_btn = "nul"
input_player2_right_axis = "nul"
input_player2_a = "nul"
input_player2_a_btn = "1"
input_player2_a_axis = "nul"
input_player2_x = "nul"
input_player2_x_btn = "3"
input_player2_x_axis = "nul"
input_player2_l = "nul"
input_player2_l_btn = "nul"
input_player2_l_axis = "nul"
input_player2_r = "nul"
input_player2_r_btn = "nul"
input_player2_r_axis = "nul"
input_player2_l2 = "nul"
input_player2_l2_btn = "nul"
input_player2_l2_axis = "nul"
input_player2_r2 = "nul"
input_player2_r2_btn = "nul"
input_player2_r2_axis = "nul"
input_player2_l3 = "nul"
input_player2_l3_btn = "nul"
input_player2_l3_axis = "nul"
input_player2_r3 = "nul"
input_player2_r3_btn = "nul"
input_player2_r3_axis = "nul"
input_player2_l_x_plus = "nul"
input_player2_l_x_plus_btn = "nul"
input_player2_l_x_plus_axis = "nul"
input_player2_l_x_minus = "nul"
input_player2_l_x_minus_btn = "nul"
input_player2_l_x_minus_axis = "nul"
input_player2_l_y_plus = "nul"
input_player2_l_y_plus_btn = "nul"
input_player2_l_y_plus_axis = "nul"
input_player2_l_y_minus = "nul"
input_player2_l_y_minus_btn = "nul"
input_player2_l_y_minus_axis = "nul"
input_player2_r_x_plus = "nul"
input_player2_r_x_plus_btn = "nul"
input_player2_r_x_plus_axis = "nul"
input_player2_r_x_minus = "nul"
input_player2_r_x_minus_btn = "nul"
input_player2_r_x_minus_axis = "nul"
input_player2_r_y_plus = "nul"
input_player2_r_y_plus_btn = "nul"
input_player2_r_y_plus_axis = "nul"
input_player2_r_y_minus = "nul"
input_player2_r_y_minus_btn = "nul"
input_player2_r_y_minus_axis = "nul"
input_player2_turbo = "nul"
input_player2_turbo_btn = "nul"
input_player2_turbo_axis = "nul"


¿How can I configure coin, player 1 start, player 2 start corretly?

Thanks in advanced.
Reply
#2
post full contents of /opt/retropie/configs/all/retroarch-joypads/xxxxxxx.cfg
Reply
#3
Hello alexkidd, this is /opt/retropie/configs/all/retroarch-joypads/TZGamesSPControle#1.cfg
Code:
input_device = "TZGamesSP Controle #1"
input_driver = "udev"
input_start_btn = "8"
input_exit_emulator_btn = ""
input_up_axis = "-1"
input_a_btn = "2"
input_b_btn = "1"
input_reset_btn = ""
input_down_axis = "+1"
input_right_axis = "+0"
input_state_slot_increase_axis = ""
input_x_btn = "3"
input_menu_toggle_btn = ""
input_y_btn = "4"
input_left_axis = "-0"
input_state_slot_decrease_axis = ""
input_state_slot_decrease_btn = ""
input_state_slot_increase_btn = ""
input_load_state_btn = ""
input_save_state_btn = ""
input_reset_axis = ""
input_menu_toggle_axis = ""
input_load_state_axis = ""
input_save_state_axis = ""
input_exit_emulator_axis = ""


And this is /opt/retropie/configs/all/retroarch-joypads/TZGamesSPControle#2.cfg
Code:
input_device = "TZGamesSP Controle #2"
input_driver = "udev"
input_start_btn = "8"
input_exit_emulator_btn = "8"
input_up_axis = "-1"
input_a_btn = "1"
input_b_btn = "2"
input_reset_btn = "2"
input_down_axis = "+1"
input_right_axis = "+0"
input_state_slot_increase_axis = "+0"
input_x_btn = "3"
input_menu_toggle_btn = "3"
input_select_btn = "7"
input_enable_hotkey_btn = "7"
input_y_btn = "4"
input_left_axis = "-0"
input_state_slot_decrease_axis = "-0"

Thanks in advanced.
Reply
#4
edit /opt/retropie/configs/all/retroarch-joypads/TZGamesSPControle#1.cfg with nano or pluma and add the following lines:

input_select_btn = "7"
input_enable_hotkey_btn = "7"

see if it works
Reply
#5
Don´t works
Reply
#6
Hello, I solved partially.

I go to retropie menu - retroarch - settings - input - input user 1 bind and bind buttons. Again the same with user 2.

Now, if I enter to mame and I run games with mame4all, buttons works perfect (insert coin, start player1, start player2, exit emulator with insert coin+start player 1 ) but if I enter arcade and I play games with lr-mame2003 buttons don`t work.

In arcade folder with lr-mame2010 emulator, buttons are mapped correct.

How can configure the buttons in lr-mame2003?

I don´t know why lr-mame2003 and lr-mame2010 are different button mappings.
Reply
#7
are you using ROPi 3.0? I strongly suggest you to try AdvanceMame, it has a different way to map buttons, and it have more compatible games. Copy a few roms to /home/pi/RetroPie/mame-advmame and try a few games. It's still experimental, there are a few bugs, but works fine

mame2003, try pressing TAB (or its equivalent mapping) to be able to change , mame2010 i dont really know, not tested it much
Reply
#8
(12-31-2016, 02:00 AM)alexkidd Wrote: are you using ROPi 3.0? I strongly suggest you to try AdvanceMame, it has a different way to map buttons, and it have more compatible games. Copy a few roms to /home/pi/RetroPie/mame-advmame and try a few games. It's still experimental, there are a few bugs, but works fine

mame2003, try pressing TAB (or its equivalent mapping) to be able to change , mame2010 i dont really know, not tested it much

I'm using ROPi 2.5.2.

When GPIO script is corrected in 3.0 I will try.

At the moment I configured with TAB key mame and is working well.

Now my problem is with N64, joystick is not working, buttons are working. How can I configure joystick? I tested with lr-Mupen64plus and lr-GLupeN64. I can't test with Mupen64plus because I press button when is launching a game and I can't select Mupen64plus. In this menu only lr-Mupen64plus and lr-GLupeN64 are available.

Thanks for all.
Reply
#9
you can try this, tested OK
http://orangepi.club/showthread.php?tid=83
Reply
#10
(01-02-2017, 11:24 AM)alexkidd Wrote: you can try this, tested OK
http://orangepi.club/showthread.php?tid=83

Thank you very much.

In my case:
input_l_x_plus_axis = "+0"
input_l_x_minus_axis = "-0"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"

Best  regards and happy new year 2017.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  DIY IR blaster via GPIO pins eadmaster 0 433 02-16-2017, 06:06 PM
Last Post: eadmaster
  3.0 version and GPIO? sergisat 4 1,207 02-12-2017, 03:32 PM
Last Post: Lamerjack
  Change buttons in emulators brnirons 2 799 01-26-2017, 08:17 AM
Last Post: brnirons
  Orange Pi lite and GPIO Problem pescara33 0 580 01-23-2017, 02:12 PM
Last Post: pescara33

Forum Jump:


Users browsing this thread: 2 Guest(s)