Picade Hat joystick not detected w/out usb keyboard plugged in

OK, I’m totally stumped. If I start w/ the USB keyboard for any retroarch games, I can use the USB keyboard, but the joystick & buttons don’t get recognized at all.

Can you offer any other advice? I’ve deleted the opt/all/retroarch.cfg file, I’ve deleted the es_input file, I’ve looked through all the likely directories, but I’m stuck. This stinks as this means that 90% of the games are now unplayable, even with the keyboard plugged in.

Hi

My advice would be to wipe the SD card and start again. At the moment the config has been changed several times so there is no valid starting point.

I am running a Picade with just the built in controls no keyboard attached and haven’t had any issues.

Cheers

Paul

Oof - I have spent so much time configuring everything & getting all my roms / etc in the right place, configuring it to work w/ attract mode, etc. Starting over would be terrible. Is there any other solution? I don’t want the picade hat to have ruined my previous setup. Note that this is not the standard picade, but the picade hat card I just got.

could it just be that you had a custom keycode mapping implemented in the pcb picade? by default the HAT shares the ‘factory’ keycodes with the AVR/PCB version.

… as @gadgetoid said earlier, EmulationStation is supposed to auto-configure RetroArch. if you deleted es_input.cfg then it should allow you on next run of ES to reconfigure the bindings. Did that happen?

Hi

Sorry I can’t offer any other advice as I find its best to start from a know position when trying to debug issues.

Personally I would have taken a backup before I started.

Cheers

Paul

I deleted the es_input.cfg (it was created again when I restarted) and have gone through input bindings multiple times via emulationstation as well as manually editing retroarch.cfg files (even deleting them), but even though retrorarch.cfg is updated, it doesn’t appear to fix it.

Some more debugging I’ve done:

When I launch an emulator, I’ve also SSH’d in to the Pi so I can issue debugging commands. I ran showkey and was able to confirm that the pi is responding to the joystick / button commands (keycode 103 press, etc), but the emulator does not. What’s strange is that if I plug in a USB keyboard as well, I can see that the OS receives the same commands from the keyboard as the joystick (ex: keycode 103 press is shown for both keyboard & joystick actions), but the emulator will only respond to the action if it’s done from the actual keyboard.

Is there any chance that I need to somehow configure a “named controller” in retroarch? The fix to get emulationstation to respond was captured here:

https://github.com/pimoroni/picade-hat/commit/aab9b1d209c088c6c976aa0289adaae8dec19bbf

The only thing I can guess now is that maybe the input is “named” now (name=“Picade-HAT”) and needs to be specifically identified in retroarch? Can anyone else reproduce this after running the same script that gadgetoid provided earlier in the thread?

Thanks for bearing with me on this!

I have exactly the same issue as martymoo. When this topic first started I discounted it as being the same as mine because I could navigate in emulation station with my Picade joystick, but reading the latest posts it seems to have evolved into the same problem as I have. I’ve a separate forum post on Retropie but with no answer yet either: https://retropie.org.uk/forum/topic/7063/controls-not-working-in-game-ok-on-retropie

Basically, I can fully navigate with all buttons in Retropie, but if I launch a game in SNES or GBA (using libretro emulators), none of the buttons or joystick works, but the keyboard does.

I did a fresh build of Retropie 4.1 last night, and after configuring wifi on my RPi 3 and installing the Picade HAT software, the same issue occurs. I’m sure this is reproducible given my stock setup and it still not working with a fresh image.

I was going to look into showkey but I’ll probably see the same results as martymoo. My next steps were to go back to the USB PCB to see if there’s still an issue.

1 Like

OK - if you manually roll back the “fix to allow daemon detection in ES” (change line 106 back to ui = UInput() ) then you can at least play games with the joystick by booting with a USB keyboard plugged in. This returns back to the original problem of requiring a keyboard at boot. Somehow RetroArch is not picking up on the uiinput command that emulation station is!

right, I was able to reproduce and implement a (hopefully) universal fix… to get it, simply re-run the one-line installer:

curl https://get.pimoroni.com/picadehat | bash

I have tested the fix only with lr-picodrive but since I was in the dead end you described after implementing @gadgetoid earlier workaround I think it’s hopeful it will work with all libretto emulators (can’t speak of the others, I have no roms to test them with).

if that still does not work for you, check there is a udev rule at:

/etc/udev/rules.d/10-picadehatd

and check that evtest has a virtual input device named exactly “Picade-HAT” (it should, but just in case your manually touched up file doesn’t get overwritten as expected).

2 Likes

Thanks for the update! I have just left on a trip, but I’ll be back this weekend & will report back how the fix works!!

Thank you RogueM, I can confirm this now works for me as well!

1 Like

Thank you! The last fix worked perfectly - I’m back in business!!

1 Like

Set up a new Picade and ran into this same issue. This thread helped immensely, thank you. One item I would add: my /etc/udev/rules.d/10-picade.rules file was blank (0 bytes), so I had to populate the following lines from the github here (https://github.com/pimoroni/picade-hat/blob/master/lakka-driver/10-picade.rules).

sudo nano /etc/udev/rules.d/10-picade.rules
SUBSYSTEM==“input”, ATTRS{name}==“gpio_keys”, ENV{ID_INPUT_KEYBOARD}=“1”

This immediately fixed my issue where the joystick would work in RetroPie but not in games.

2 Likes