Files
psxrecomp/accuracy
Matthew Stanley 82e0523749 fix(sio): faithful DualShock 0x43/0x45 + analog-mode lock (axis 5)
Transcribe the modern-SM pad config semantics from Beetle dualshock.cpp, fixing
the hybrid phantom-input root causes (accuracy/axis5_sio_controller.md):

- 0x43 (enter config) now transmits the LIVE poll frame — id, 0x5A, buttons,
  + 4 stick axes in analog — identical framing to 0x42 (dualshock.cpp:471-490),
  instead of an all-zero frame. The zero frame fed any driver that reads the
  0x43 response as input a phantom "all-pressed"/centered-stick (active-low
  0x00 = all buttons down). In-config 0x43 (exit) keeps the zero frame
  (dualshock.cpp:660-674). [D4]
- 0x45 status byte now reports the LIVE analog state (pad_analog?1:0) rather
  than a hard-coded analog-on, so a driver tracking the mode parses the right
  poll-frame length (dualshock.cpp:743). [D8]
- 0x44 0x..03/0x02 now sets/clears a per-slot analog_mode_locked; a locked slot
  ignores the host hybrid auto-flip (the emulated analog button), matching a
  real pad that ignores the physical button when locked (dualshock.cpp:203,
  714-725). [D6]

Gated to the modern SM; Tomba 1's legacy_pad_config path is untouched. MMX6
(modern SM) gains the phantom-dash fix. Validated no-regression on Tomba 2
(digital pad, 0xFFFF at rest, boots). Retiring g_pad_legacy_cfg (the doc's
fix 4) is gated on a DualShock-game behavioral validation pass — see the
STATUS note in the doc.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 19:40:10 -07:00
..