|
|
před 2 měsíci | |
|---|---|---|
| .. | ||
| src | před 2 měsíci | |
| CMakeLists.txt | před 2 měsíci | |
| NOTICE | před 3 měsíci | |
| README.md | před 3 měsíci | |
| pico_sdk_import.cmake | před 3 měsíci | |
A Steam Controller 2 puck emulator for the Raspberry Pi Pico W and Pico 2 W.
Where the original OpenPuck is an nRF52840 dongle that talks to the controller
over Valve's proprietary 2.4 GHz ESB link, PicoPuck uses the Pico W's CYW43
radio to reach controllers over Bluetooth — both BLE and Classic — while
presenting the host with the exact same Valve puck USB device
(28DE:1304). Steam therefore sees a normal puck, and:
Pairing, unpairing and scanning are driven from the same WebUSB panel
(docs/index.html) as the other OpenPuck devices.
Status: under construction. See the phase checklist below.
You need the Arm GNU toolchain, CMake ≥ 3.13, and the Pico SDK 2.x with its
btstack, cyw43-driver, lwip, mbedtls, and tinyusb submodules
initialised. Point PICO_SDK_PATH at it.
# Pico W (RP2040)
cmake -S PicoPuck -B PicoPuck/build-pico_w -DPICO_BOARD=pico_w
cmake --build PicoPuck/build-pico_w -j
# Pico 2 W (RP2350)
cmake -S PicoPuck -B PicoPuck/build-pico2_w -DPICO_BOARD=pico2_w
cmake --build PicoPuck/build-pico2_w -j
Outputs: picopuck_pico_w.uf2 / picopuck_pico2_w.uf2. Flash by holding
BOOTSEL while plugging in, or from the panel's "reboot to bootloader" button.
There is also a make picopuck / make picopuck-pico2w convenience target in
the repo root Makefile.
The full architecture is in place and compiling for both boards, but has not been run on real hardware yet. Everything below is correct-by-construction (ported from OpenPuck / joypad-os byte layouts and the reversed SC2 protocol); expect to iterate once flashed.
PicoPuck presents whichever controller the active mode selects, fed by the
connected Bluetooth controller's canonical input — the same g_in → report
path as OpenPuck. Switch modes from the panel's Output mode selector or by a
controller chord (hold L2+R2+LB+RB on a generic pad, or all four back
paddles on an SC2, then A=Steam / B=PS5 / X=DS4 / Y=Switch); the device persists
the mode and reboots into it.
054C:0CE6, gyro + split trackpad + rumble054C:05C4, gyro + trackpad + rumble0F0D:0092045E:028E, custom vendor-class driver (xinput.c) alongside WebUSB + rumble057E:2009, subcommand handshake + SPI cal + HD-rumble decoder054C:0268, feature-report console enable handshake + rumbleThese are additional controllers PicoPuck could read over Bluetooth (each an
input_driver_t decoding into g_in) — separate from the USB output modes
above, which are all implemented.
drv_ds5.bcdDevice is bumped to 0x03xx to force a fresh cache
entry; test both plug orders.LICENSE.RP grant only on
Raspberry Pi silicon; see NOTICE.