Homepage Forums RetroPie Project Everything else related to the RetroPie Project Keyboard input from joystick using adafruit

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #94627
    elpaulio
    Participant

    Hi

    Ive been trying to get this to work for hours now, and multiple searches doesnt really get me very far.

    Ive built myself a bartop arcade and put retropie on it, on top of raspbian.
    Installed Adafruit to map my joystick + 9 buttons to keypresses
    Got the emulators = roms to work, no issues

    The emulationstation works fine, I was able to configure successfully the joystick and buttons first time
    mame 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

    Joystick, up, left, right, down = always fine!
    I have 6 buttons, A,B,C, X,Y,Z
    and then 3 more buttons for start, select, and exit emulator
    Keyboard 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

    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’ directry, 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?

    Any ideas? Apologies for the long post!

    Help much appreciated :)

    #95359
    elpaulio
    Participant

    OK, for anyone running into the same issues, you can get the correct keymaps from the source,
    https://github.com/libretro/RetroArch/blob/master/input/input_keymaps.c

    In my case, I was unable to get numbers 1 – 9 working, because I didnt use ‘num1, num2, num3’ etc

    Also, the GUI doesnt support keyboard mappings for some reason, so i had to make the changes directly in the config files

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.