Input: PadRIO -- play without the pod (L4CONTROLS=PAD), Workstream A.1
Ported from RP412: RIOBase split out of the serial RIO (L4RIO.h), rioPointer is RIOBase* (L4CTRL.h), PAD token -> new PadRIO() speaking the RIO surface from an XInput pad + keyboard (L4PADRIO/L4PADBINDINGS, vRIO bindings.txt grammar, hot-plug), KeyLight RGB mirror TU (BT412KEYLIGHT, /std:c++17 per-file). BT-side fixes PadRIO forced into the open: - Both keyboard input bridges (mech4.cpp, mechmppr.cpp BT_KEY_BRIDGE) stand down when a RIO device exists -- they overwrote the engine controls push every frame. M/X conveniences stay live. - Mapper attribute chain OFF BY ONE (latent real-pod bug): the DOS chain below MechControlsMapper carried two base attributes, WinTesla carries one, and AttributeIndexSet::Find is positional -- the .CTL stick mapping wrote throttlePosition. Pad slot + binary-locked enum; gotcha ledgered (reconstruction-gotchas #11). Verified: PAD throttle lever ramps + sticks, stick turns with the authentic speed-vs-turn clamp (61.5 -> 22.0 u/s), mech drives; keyboard fallback intact (BT_FORCE_THROTTLE harness). New diags: BT_CTRLMAP_LOG, BT_STICK_LOG. (Phase 2 of docs/BT412-ROADMAP.md) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -206,6 +206,19 @@ as `AttributeIndexSet::Find` crashing in `WeaponCluster::WeaponCluster("PercentD
|
||||
(mechweap.cpp now static_asserts its pad base against `PoweredSubsystem::NextAttributeID`).
|
||||
[T2]
|
||||
|
||||
**The inverse trap — SHORT parent chain (BT412, 2026-07-14):** `Find(ID)` is positional
|
||||
(`attributeIndex[ID-1]`), so when the WinTesla parent chain carries FEWER attributes than the
|
||||
DOS binary's did, every child attribute resolves one slot EARLY relative to a 1995 stream's
|
||||
numeric IDs — no crash, values silently land in the WRONG MEMBER. Proven live the first time
|
||||
a real device drove `MechControlsMapper`: the binary's `.CTL` control-mapping stream uses
|
||||
stick=3/throttle=4 (the DOS Subsystem chain had 2 base attrs), the WinTesla chain has 1
|
||||
(`SimulationState`), so the stick mapping wrote `throttlePosition` and the throttle mapping
|
||||
wrote `pedalsPosition`. Only the numeric-ID path (CreateStreamedMappings / `.CTL`) is
|
||||
affected — gauge databinding resolves by NAME and never saw it. Fix: a named pad slot at the
|
||||
front of `mechmppr.cpp AttributePointers[]` + the enum locked to the binary's values.
|
||||
Diagnostic: `BT_CTRLMAP_LOG=1` dumps each streamed mapping's resolved pointer — compare against
|
||||
`&mapper->member` (the mech4 `[mppr]` log prints `&stick`/`&thr`). [T2]
|
||||
|
||||
## 12. Frame-pacing trap — the binary assumes a LOCKED 60 fps (task #11)
|
||||
|
||||
The 1995 pod ran frame-locked; reconstructed per-frame logic can carry HIDDEN frame-rate
|
||||
|
||||
Reference in New Issue
Block a user