Skip to content

USB adapter for Playstation DualShock controllers or BlueRetro.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

timokroeger/psx-usb

Repository files navigation

psx-usb

USB adapter for Playstation DualShock controllers. Requires a multitap adapter.

WARNING: Not actually tested with physical playstation controllers.

As USB interface for BlueRetro

Instead of connecting actual playstation controllers you can use an ESP32 board running BlueRetro. BlueRetro receives data from wireless bluetooth controllers like Switch, PS3, PS4, PS5, Xbox One, Xbox Series X|S.

                        BT
Bluetooth Controller <------> BlueRetro <-\
                                          |
            USB: XInput                   |PSX SPI protocol
Computer <---------------> psx-usb <------/

The PSX controller communication protocol is an open drain SPI (LSB first) with additional acknowledge line. The RP2040s PIO makes it easy implement this custom SPI protocol.

A total of 5 wires (plus VCC and GND) is required to connect the two boards:

Pin Description BlueRetro psx-usb Comment
ESP32 Pin RPI Pico Pin
SCK / CLK 33 2
TXD / MOSI 32 3
RXD / MISO 19 4 Pullup required
DTR / CS 34 5
DSR / ACK 21 6 Pullup required

USB Protocol

Its easy to create a HID composite device which exposes many controllers on a single USB connection. Unfortunately the button mapping is not well standardized and usually requires additional setup/remapping steps on the computer.

The alternative is to emulate Xbox 360 controllers (aka XInput devices) which have a well defined button arrangement understood by most games. Unfortunately the windows driver only accepts exactly one wired Xbox 360 controller per USB device.

To overcome this limitation I had to reverse engineer the USB protocol of a "Xbox 360 Wireless Receiver for Windows" which supports up to 4 wireless controllers.

Resources I found useful during the process:

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Releases

No releases published

Packages

No packages published