diff --git a/docs/PLAN.md b/docs/PLAN.md index 17a3643..23166fd 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md @@ -304,7 +304,7 @@ lamps, plasma, wallpaper apply). | | Windows 10/11 (unchanged) | Windows XP SP3 | |---|---|---| | TFM / arch | net48, x64 | **net40, x86** (.NET 4.0 is XP's ceiling; 4.5+ needs Vista) | -| Virtual joystick | ViGEm → RioGamepad → vJoy → none | **vJoy 2.0.x** (last XP driver line) — full 6-axis/96-button fidelity | +| Virtual joystick | ViGEm → RioGamepad → none (unchanged) | **RioGamepadXP.sys** — our own thin WDM HID minidriver (same feeder contract) — full 6-axis/96-button fidelity | | Overlay render | SkiaSharp (generate + apply) | consume pre-rendered wallpaper only (**PNG→BMP** — XP's `SystemParametersInfo` takes BMP only) | | Editor | full (incl. wallpaper maker) | mapping editor only (pure WinForms/GDI+); wallpaper maker gated (Skia) | | JSON | System.Text.Json → **Newtonsoft 13** | Newtonsoft 13 (STJ needs net461+; one serializer for both flavors) | @@ -321,13 +321,26 @@ lamps, plasma, wallpaper apply). (`ViGEmJoystickSink`, `HidFeederJoystickSink`, `Hid/`). *Risk fallback:* if Bcl.Async misbehaves on real XP, the receive loop reverts to a dedicated thread (the legacy `CommWatchProc` shape) for net40. -- **8B — vJoy sink (both flavors):** `VJoyJoystickSink : IJoystickSink` - P/Invoking `vJoyInterface.dll` (SDK already on hand in docs/vJoy_SDK/); - arch-matched DLL load; report packing pure + unit-tested. Acquisition - order (decided): **the Xbox 360 pad (ViGEm) stays preferred on 10/11** — - net48: ViGEm → RioGamepad → vJoy → Null (vJoy is fallback only); - net40: vJoy → Null (the XP primary). Pin installers: - 2.0.5 (XP) / 2.1.9.1 (signed, 10/11) in `deploy/vendor/`. +- **8B — RioGamepadXP.sys, the XP flavor of our own driver.** Third-party + virtual-joystick drivers are ruled out (decided: **no vJoy** — the project + is unmaintained; PPJoy likewise). Instead, rebuild the thin driver side of + our existing split for XP: a **WDM HID minidriver** in the shape of the + DDK `vhidmini` sample (`HidRegisterMinidriver`, x86), exposing the **same + `Public.h` contract** as the modern driver — identical + `IOCTL_RIO_SUBMIT_REPORT`, identical 25-byte report, same descriptor + (6×16-bit axes, hat, 96 buttons) — so the existing `HidFeederJoystickSink` + drives it unchanged (only the device path differs). Precedent: the + original FASA `tasgame.sys` was exactly an XP HID minidriver + (docs/Win32RIO/, analyzed); ours stays thin with serial in user mode. + Toolchain: **WDK 7.1.0** (last XP-capable kit) under `driver/RioGamepadXP/`; + XP x86 enforces no kernel signing, so install is just the INF — none of + the Phase 1 test-signing/Secure Boot friction exists there. + Acquisition order (decided): **the Xbox 360 pad (ViGEm) stays preferred + on 10/11** — net48: ViGEm → RioGamepad → Null (unchanged); + net40: RioGamepadXP → Null. + *Staging:* the XP app is useful before the driver lands — milestone 1 + ships keyboard/mouse + lamps + plasma (joystick = Null sink), the driver + follows as milestone 2. - **8C — Tray on net40/x86:** multi-target `RioJoy.Tray` (net40 drops the ViGEm + RioJoy.Overlay references); gate `WallpaperMakerForm` + overlay generation; `WallpaperApplier` converts PNG→BMP via GDI+ before @@ -336,21 +349,23 @@ lamps, plasma, wallpaper apply). pre-rendered on a modern machine (`RioProfile.WallpaperPath` travels with the config). - **8D — Packaging:** `build-package.ps1 -Flavor XP` → - `RIOJoy-XP-.zip` (net40/x86 publish, vJoy 2.0.5 installer, + `RIOJoy-XP-.zip` (net40/x86 publish, RioGamepadXP.sys + INF, `.bat` install/uninstall, README-DEPLOY-XP: prereqs XP SP3 + .NET 4.0 Full + KB2468871). Modern zip unchanged; release both to Gitea. - **8E — Verification:** full suite stays net48-hosted (xUnit needs net452+; shared sources are what's tested) + a tiny net40 console self-test for the shims, run on XP. Ladder: net40/x86 binary boots on - Win10 → XP VM with vRIO over a virtual COM pair → real cabinet - (joy.cpl shows 6 axes + 96 buttons, SendInput into a game, lamps, - plasma, auto-switch yield, BMP wallpaper). + Win10 → XP VM with vRIO over a virtual COM pair (app milestone; the + driver needs real/virtualized XP too — vhidmini-class drivers run fine + in a VM) → real cabinet (joy.cpl shows 6 axes + 96 buttons, SendInput + into a game, lamps, plasma, auto-switch yield, BMP wallpaper). - **To confirm before starting:** (1) keep the mapping editor on XP or ship runtime-only? (2) which XP cabinets / how do files get onto them (drives the .bat installer shape)? *Decided:* the Xbox 360 pad (ViGEm) remains the preferred controller on - Windows 10/11 whenever ViGEmBus is present; vJoy is only the fallback - there, and the primary on XP. + Windows 10/11 whenever ViGEmBus is present. **No third-party virtual + joystick drivers** (vJoy/PPJoy are unmaintained) — XP gets our own + RioGamepadXP.sys instead. ---