Detail production output mode plan

This commit is contained in:
Joey Yakimowich-Payne 2026-09-02 20:40:58 -06:00
commit 1837f42e21

View file

@ -417,40 +417,64 @@ Completion evidence:
### Phase 4 — Production USB output modes ### Phase 4 — Production USB output modes
Implement in this order: This is shorter than Phase 3 because Switch and XInput already work, but it is
not a small change: USB descriptors are fixed before `tusb_init()`, mode changes
require a persisted reboot, and DInput/Mac need real-host qualification.
1. Existing Switch driver behind the output-driver boundary. Release blocker: replace development identity `CAFE:4010` with an appropriate
2. Production XInput based on the verified feasibility implementation. project VID/PID before calling XInput production-ready. Development can continue
3. DInput generic HID. with the current identity.
4. Mac-compatible HID.
Controller-count policy: Switch, XInput, DInput, and Mac target four #### 4A — Output-driver boundary and production XInput
independent interfaces.
Mode selection: - replace `SWITCH_PICO_ADAPTER_FEASIBILITY` branches in `switch-pico.cpp` with
one fixed static driver interface: descriptors, init/reset, input, task,
readiness/capabilities, and host output
- keep the Phase 3 profile/runtime transform exactly once before serialization
- move the verified four-slot XInput implementation out of feasibility naming
- preserve current Switch descriptors, handshake, motion, and rumble bit-for-bit
- persistent PC command Gate: descriptor/report golden tests plus current Switch hardware and Windows
- controller chord held for three seconds four-slot XInput regression. No mode-selection work lands before this boundary
- mode-specific LED and rumble acknowledgement is behavior-equivalent.
- `auto` mode for the verified Windows/Switch path
- physical recovery gesture to a known mode
Before release: #### 4B — Persistent mode selection and recovery
- replace `CAFE:4010` with an appropriate project VID/PID - extend `AdapterConfiguration` with `auto`, `switch`, `xinput`, `dinput`, and
- repeat Windows XUSB binding and four-slot tests `mac`; migrate the existing schema without losing profiles or bonds
- verify no phantom active controller remains after the probe transition - add `switch-pico-config mode MODE`
- verify cold power on Switch does not trigger the Windows path - select one descriptor family before `tusb_init()`; a changed mode commits,
cancels synthetic state, acknowledges, and watchdog-reboots
- keep the verified Windows/Switch probe only for `auto`
- add a distinct three-second controller chord for mode cycling
- make the existing destructive ten-second BOOTSEL reset also restore `auto`,
providing physical recovery from a bad manual mode
Acceptance per mode: Gate: persistence, power-cycle, interrupted-write, reboot-loop, recovery, and
no-phantom-controller tests on Switch and Windows.
- descriptor golden tests #### 4C — Generic HID outputs
- report serialization tests
- output/rumble tests - implement four-interface DInput generic HID first
- real target enumeration - capture DInput rumble requirements before promising force feedback; Windows
- buttons, D-pad, sticks, triggers, and menu controls HID PID force feedback is not a free consequence of a gamepad descriptor
- disconnect/reconnect - research whether the same standards-compliant HID report is sufficient on
- multi-controller isolation where applicable macOS; share the driver when hardware proves it, otherwise add only the
descriptor/report differences required by macOS
- do not duplicate profile transforms inside either output driver
Gate: descriptor/report/output tests, then real Windows DInput and macOS
enumeration, controls, reconnect, and four-controller isolation. Any unavailable
Mac hardware remains an explicit qualification blocker, not an inferred pass.
Final acceptance:
- cold Switch boot never enters the Windows path
- Windows `auto` reaches four XInput slots without phantom devices
- manual modes survive power cycles and recover through BOOTSEL reset
- profiles, macros, Turbo, motion, and per-slot rumble remain isolated in every
supported mode
- each mode passes real-target enumeration and complete input checks
### Phase 5 — Controller compatibility ### Phase 5 — Controller compatibility