Option to present as USB HID gamepad

I think the Playdate would be a really cool USB controller for applications or games!

The most cross-platform way I can think of enabling that would be an option to present as a HID gamepad when connected via USB.

So far in my proof of concept hack I've been able to programmatically enable controller mode over USB and parse its output. That let's me simulate keyboard presses on the Host for button presses, but I don't have a good way to send the crank's angle to the Host app. I'm not a driver dev, so now I'm trying to find a userland way to spoof a HID device and feed the parsed controller values as inputs.


Another request related to this one that I'm still thinking over is bidirectional communication between a Host app and Playdate app over USB. This would allow developers to enable interactive second screen functionality between their Playdate app and a host app.

Technically only Host->Playdate communication is needed, but also enabling Playdate->Host would allow for richer integrations.

For Playdate->Host, my hacky plan is to dump NJSON formatted data payloads to the log since I'm already parsing every line for the controls anyway.

For Host->Playdate, I'm hoping that the eval Lua over USB function can pass data that can be accessed by the Playdate app.

Thank you for hearing out my daydreams/hacks!

3 Likes