r/CardPuterZero • • 1d ago

Bluetooth controller with Retro-Zero

Can anyone please explain how to configure retro-zero to use a BT controller as input instead of the keyboard. Tia.

2 Upvotes

4 comments sorted by

2

u/jaxx-04 1d ago

At this point I'd settle for a working USB gamepad.

2

u/SiestaBanditEins 1d ago

Have you already connected the controller, but Retro Zero isn't recognizing it? There’s a controller app in the store that I use to play Pico-8 with my 8BitDo Zero.

2

u/jaxx-04 1d ago

I've installed and run the controller app from the store which works fine. The controller (8bitdo M30) connects and button presses are registered fine. If I then go into retro-zero and start a game, only the keyboard works.. Feels like there's something else I should be doing , to tell it to accept input from the controller, but I don't know what !

3

u/SiestaBanditEins 1d ago

Since no one else responded, I showed the repository to an agent, and this was the answer: Retro-Zero contains no Bluetooth-related code. Running grep -rn "bluez|bluetoothctl|dbus" src/ yields zero results. Pairing takes place at the OS level (via BlueZ); Retro-Zero merely reads the resulting evdev nodes—and it does so in a very basic way: src/Input/evdev_input.cpp:196 opens /dev/input/event0 through event31 once at startup—there is no hotplugging or rescanning. If a device is disconnected, the file descriptor (fd) is simply closed and discarded (line 339). evdev_input.cpp:259: if (ev.type != EV_KEY) continue; — only keyboard events are processed. Analog sticks and D-pads reported as ABS_HAT0X/Y are completely ignored. app_ui.cpp:1500: The rebind-capture function accepts any code ≤ 767, which includes BTN_* codes from gamepads. Consequently, the statement in the README—"rebind the keys to external USB or Bluetooth controllers"—is only partially true: buttons work, but hat-style D-pads and analog sticks do not. Issue #2 ("Bluetooth gamepad") remains open.