Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Raspberri Pi B+ and retropie  (Read 3454 times)

0 Members and 1 Guest are viewing this topic.

elPaulio

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:March 17, 2016, 01:36:24 pm
  • I want to build my own arcade controls!
Raspberri Pi B+ and retropie
« on: April 12, 2015, 05:41:54 am »
Hi all

Newly registered here :)

Ive built myself a bartop arcade and not needed much help, until now!

Has anyone got any experience with setting up retropie (particularly retroarch) on the Pi?

Let me be a bit more specific - its going to be a long post... sorry in advance!

Ive started from scratch and got all the stuff fitted into the cab etc etc. build is basically done and im onto software config

Ive Installed Adafruit to map my joystick + 9 buttons to keypresses
Got the emulators = roms to work, no issues
Installed retropie

The emulationstation works fine, I was able to configure successfully the joystick and buttons first time
mame4all is working fine, all buttons mapped too
but neither of these use retroarch

now when I try and use snes or megadrive roms, they cant be controlled, or can, but some buttons are mapped, and some are not, and with the wrong function

So this is my joystick to keyboard mapping with Adafruit and directly connecting the buttons+stick to the GPIO pins
Joystick, up, left, right, down = always fine!
I have 6 buttons, which Im labelling A,B,C, X,Y,Z
and then 3 more buttons for start, select, and exit emulator

The keyboard map equivalent (tested with Adafruit and successful)
A= Enter
B= B
C= C
X= X
Y= Y
Z= Z
start button= 1
select button= 2
exit= 3

So, if I press the B button on the arcade, the screen will type a letter b out to the screen (they all work perfectly using the software and a text editor)

https://github.com/petrockblog/RetroPie-Setup/wiki/RetroArch-Configuration
Tries to help, but as below, the methods are not working properly in reality

My retroarch config file looks like this:

input_player1_joypad_index = 3
(I think this forces keyboard, but other values dont seem to work anyway)

input_player1_b = b
input_player1_a = enter
input_player1_y = y
input_player1_x = x
input_player1_l = c
input_player1_r = z
input_player1_start = 1
input_player1_select = 2
input_exit_button= 3

The above doesnt work whether I define it in the /opt/retropie/configs/all, or the /opt/retropie/configs/snes or megadrive directories
In fact, If I put it in the ‘all’ directory, everythings stops working altogether and I cant even use a keyboard to escape

Ive also tried hitting F1 in game and getting a menu where I can configure controls. but when I try that, it just waits for a keypress from somewhere forever (until I hit Enter to skip)

The problem seems to be with retroarch, but I cant quite figure it out?

Again, apologies for the long post, but im losing the will to live with this configuration as ive spent hours trying to figure it out.

Thanks in advance

edekoning

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 591
  • Last login:November 10, 2022, 02:21:38 pm
Re: Raspberri Pi B+ and retropie
« Reply #1 on: April 13, 2015, 11:39:43 am »
Just started looking into retroarch myself, and I ran into the exact same issue. The GUI does not support changing keyboard key mappings, so you need to do it in the config file :( Unfortunately, it is not specified anywhere what all the supported key names are. So I decided to check the code, and found the complete list of key names: https://github.com/libretro/RetroArch/blob/master/input/input_keymaps.c

So in your case it should be:
input_player1_b = b
input_player1_a = enter
input_player1_y = y
input_player1_x = x
input_player1_l = c
input_player1_r = z
input_player1_start = num1
input_player1_select = num2
input_exit_button= num3

elPaulio

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:March 17, 2016, 01:36:24 pm
  • I want to build my own arcade controls!
Re: Raspberri Pi B+ and retropie
« Reply #2 on: April 18, 2015, 06:22:36 am »
Just got around to having a go on this. Perfect.

num1, num2, etc. was where I was going wrong.

I had previously tried playing with the F keys, but found that the default mapped keys were also doing the same thing.
So where F2 I mapped as, 'select', it would also 'Save' as it was getting the global config - which I thought the local cfg file in the emulator folder would take priority...
Turns out, I had an #include global config at the top of the file (I didnt really know what it did, so I left it)

Ive swapped back to num1, num2, and 3 now as per your post.

input_player1_joypad_index - I still dont know what this does, but it works without it, so im guessing its Joypad/controller exclusive, so ive left it blank now

Thanks for the help, very much appreciated :)