Vegz78
September 2, 2021, 9:35pm
4
Happy to announce that the popular Picade DIY arcade controller today was confirmed working with McAirpos!:
opened 07:14AM - 01 Sep 21 UTC
closed 06:28AM - 02 Sep 21 UTC
documentation
help wanted
Controller
thanx for this great tool!
I try to get my games up and running on a picade and… retroflag GPi case.
So far, I go with the picade, since I get the games at least up and running. I see the start screen with animations and hear sound.
But my input will not work. Not a single button.
What I've done so far:
used evtest to find out which scan codes I need:
```
evtest
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0: gpio_keys
Select the device event number [0-0]: 0
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "gpio_keys"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 1 (KEY_ESC)
Event code 23 (KEY_I)
Event code 24 (KEY_O)
Event code 28 (KEY_ENTER)
Event code 29 (KEY_LEFTCTRL)
Event code 42 (KEY_LEFTSHIFT)
Event code 44 (KEY_Z)
Event code 45 (KEY_X)
Event code 56 (KEY_LEFTALT)
Event code 57 (KEY_SPACE)
Event code 103 (KEY_UP)
Event code 105 (KEY_LEFT)
Event code 106 (KEY_RIGHT)
Event code 108 (KEY_DOWN)
Event code 116 (KEY_POWER)
```
configures my `/sd/arcade.cfg` according to this map:
```
SCAN_CODES=/dev/input/event0
BTN_LEFT=105
BTN_RIGHT=106
BTN_UP=103
BTN_DOWN=108
BTN_A=29
BTN_B=56
BTN_LEFT2=0
BTN_RIGHT2=0
BTN_UP2=0
BTN_DOWN2=0
BTN_A2=0
BTN_B2=0
BTN_RESET=28
BTN_EXIT=1
BTN_MENU=23
```
use the `nomap` option to start the games.
Still, nothing happends. Any Idea?
```
/home/pi/McAirpos/McAirpos/uinput-mapper/input-read -v -p /dev/input/event0
Input: 0 Type: EV_KEY
KEY_ESC → ([0, EV_KEY], KEY_ESC)
KEY_UP → ([0, EV_KEY], KEY_UP)
KEY_LEFT → ([0, EV_KEY], KEY_LEFT)
KEY_LEFTSHIFT → ([0, EV_KEY], KEY_LEFTSHIFT)
SCAN_CODES=/dev/input/event0
KEY_Z → ([0, EV_KEY], KEY_Z)
KEY_X → ([0, EV_KEY], KEY_X)
KEY_LEFTALT → ([0, EV_KEY], KEY_LEFTALT)
KEY_POWER → ([0, EV_KEY], KEY_POWER)
KEY_RIGHT → ([0, EV_KEY], KEY_RIGHT)
KEY_DOWN → ([0, EV_KEY], KEY_DOWN)
KEY_I → ([0, EV_KEY], KEY_I)
KEY_O → ([0, EV_KEY], KEY_O)
KEY_SPACE → ([0, EV_KEY], KEY_SPACE)
KEY_ENTER → ([0, EV_KEY], KEY_ENTER)
KEY_LEFTCTRL → ([0, EV_KEY], KEY_LEFTCTRL)
```
and here are the logs (`/tmp/McAirpos.log`):
```
nomap argument detected,
launCharc starting /home/pi/RetroPie/roms/makecode/arcade-Brick-Breaker2.elf with no automatic gamepad mappings...
[-1607608811] GC block 16376b @ 0x20000000
[ 0] runtime starting, pid=31899...
[ 17] FB: BCM2708 FB at 640x480 640x960 bpp=32
[ 31] FB: BCM2708 FB at 640x480 640x960 bpp=32 2560
[ 49] init keys
[ 49] read config: /sd/arcade.cfg
[ 97] SCAN_CODES=/dev/input/event0
[ 113] BTN_LEFT=105
[ 128] BTN_RIGHT=106
[ 143] BTN_UP=103
[ 158] BTN_DOWN=108
[ 174] BTN_A=29
[ 202] BTN_B=56
[ 217] BTN_LEFT2=0
[ 232] BTN_RIGHT2=0
[ 248] BTN_UP2=0
[ 263] BTN_DOWN2=0
[ 278] BTN_A2=0
[ 293] BTN_B2=0
[ 309] BTN_RESET=28
[ 324] BTN_EXIT=1
[ 339] BTN_MENU=23
[ 355] config done
[ 370] sx=4 sy=4 ox=0 oy=0 32=1
[ 385] fbuf=0x76235000 sz:1228800
[ 403] loop
[ 424] GC block 16376b @ 0x20004000
[ 1316] PCM name: 'default'
[ 1333] PCM state: PREPARED
```
Thank you very much to the MakeCode Arcade fan and GitHub user @rdmueller for all his help and testing!
He has also hinted that he might make a go at getting the Retroflag GPi case’s controller to work with MakeCode Arcade games on the Raspberry Pi with McAirpos, so stay tuned!
Still hoping for help in a new Github issue for each of these controllers:
Joy Bonnet
Retroflag GPi
PSPi (Othermod reports “…there might not be much work needed to make it work on my setup. I’m running basically stock RetroPie with a custom controller driver, and the driver is compatible with just about everything out there… ”)
Maybe also @Neslou soon will write two summaries for us of his experiences with the GPi and the PSPi ?