Raspberry Pi Zero built into a NES Controller (Buttons won't work in Retroarch, but do work in Emulationstation) [SOLVED]
-
It worked for me in what seems to be similar circumstances, but our situations may be different. The easiest way to find out is to try it. You can always remove the udev rule if you need to.
-
allright then :)
silly question where do i put this?
-
@NeoTrace said in Raspberry Pi Zero built into a NES Controller (Buttons won't work in Retroarch, but do work in Emulationstation):
silly question where do i put this?
Not silly at all.
First, drop to the command line by pressing the 'F4' key on your keyboard. from there type:
sudo nano /etc/udev/rules.d/99-keyboard.rules
Press enter and then type the rule into the empty field as follows:
SUBSYSTEM=="input", ATTRS{name}=="The Name of Your Device Goes Here", GROUP="users", MODE="0666", ENV{ID_INPUT_KEYBOARD}="1"
If you need to get the name of your device, do a 'evtest' on the proper event listing at
/dev/input/
and the name will be at the top. If you need to know more about that I can elaborate. Next, save the rule and close it out by pressing 'ctrl+o' to save, 'enter' to confirm and 'ctrl+x' to exit. Finally, type:sudo reboot
Press enter and when it reboots, you should be able to enter RetroArch and test to see if the controls are recognized. You might have to remap in Emulation Station also, but I don't think it will be necessary. It's also worth repeating for others who might try this, that this trick is specifically intended for a controller device that is already configured to present itself as a keyboard, but fails to be recognized as a keyboard by some software.
-
thank you, will try it out in a second :)
-
Thank you so much, that did the trick!
Working now :) -
@mediamogul Hey, i'm kinda new to this and having the same problem. Wired up with GPIOs, compiled the overlay, and is working in ES, but it's not working within the emulators. i did what you said above, but since i'm not a pro at this, i'm not sure if i typed it and executed it correctly. Do i change any of the other quotes besides the Device Name (which is retropie by default, right)?
i've mapped the buttons again in ES and restarted the Pi a couple of times. i tried mapping it inside of the RetroArch menu too, but the button presses won't register in there, only in ES. The funny thing is that i noticed it registers the button presses for the USB controller as the same keyboard presses that i have my GPIO controller buttons set at. I'm doing all this with a Pi Zero that i'm trying to fit inside a NES controller :) Thanks for any help.
-
@KairosZenith said in Raspberry Pi Zero built into a NES Controller (Buttons won't work in Retroarch, but do work in Emulationstation) [SOLVED]:
Do i change any of the other quotes besides the Device Name (which is retropie by default, right)?
The device name is actually not 'retropie', but instead the name of your specific input device. You can get that name using
evtest
. The full command isevtest /dev/input/eventX
, with 'X' being the event number of your device. The resulting text output from the command will list the name at the top. -
everything has been said :D
-
@mediamogul Thank you so much for the fast reply, that worked :)
That made sense, i feel so foolish, lol. i should've known you were talking about the input device because that's what the discussion was about. The name for it was "gpio_keys".
-
Nice! I'm glad it worked.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.