From 17a81010b41f58427698ee72376b77ab4dec257c Mon Sep 17 00:00:00 2001 From: arcattack Date: Wed, 15 Jul 2026 21:45:14 -0500 Subject: [PATCH] KB: subsystem state audio done (0 skips); inert secondary attrs documented (task #50) Co-Authored-By: Claude Opus 4.8 (1M context) --- context/wintesla-port.md | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/context/wintesla-port.md b/context/wintesla-port.md index c9a6606..b3cd593 100644 --- a/context/wintesla-port.md +++ b/context/wintesla-port.md @@ -39,14 +39,27 @@ on top of it. Full detail: `docs/PROGRESS_LOG.md §5b, §8`. `ReplicantAnimationState` (driven from `SetBodyAnimation`) and `CollisionState` (driven from `ProcessCollision` via `collisionTemporaryState`) are now real `StateIndicator` members — **verified: walking fires `SetupPatch`+`PlayNote`/`alSourcePlay` (footstep/gait patches 78/80/116)**. So mech - movement/animation/collision audio is live. **Remaining for 100%**: audio also binds ~40 attrs across - ~15 subsystems still stubbed as `ReconSubsystemStub` (Generators A-D `GeneratorState`/`GeneratorOn`, - Condensers 1-6 `CondenserState`, Myomers/Avionics/all `ReportLeak`, Torso `SpeedOfTorsoHorizontal`/ - `MotionState`, Reservoir/ControlsMapper …) — those need their state models + attribute tables - reconstructed (a per-subsystem audio wave). Until then, **bring-up guards** [T3, temporary, - self-clearing] keep audio-on stable: a NULL subsystem attr → inert pad (was a fatal `Fail`); an - `AudioStateWatcher` on an unconstructed indicator → skip (was an AV). Both pass automatically once the - subsystem is built. Diagnostics: `BT_AUDIO_LOG` (chain + skips/redirects), `BT_ATTRBIND_LOG` (every + movement/animation/collision audio is live. **Subsystem STATE audio DONE** (commits 5ba541e/0e05a22/dcdd7dd): + the audio watcher TYPE per attribute was recovered via a `MakeObjectImplementation` ClassID trace + (class 28 = `AudioStateTrigger`/StateIndicator). KEY: the binary's 0x54-byte subsystem alarm + (`FUN_0041b9ec`, reconstructed as `GaugeAlarm54`) **IS a StateIndicator** — its "three sub-indicators" + @0x18/0x2c/0x40 are the audio/video/gauge watcher SChains, `level@0x14` = currentState. The + reconstruction had modeled that tail as an opaque `_tail` (never constructed → AddAudioWatcher AV'd on + 0xCDCDCDCD). FIX: `GaugeAlarm54` now has three REAL constructed sockets + `AddAudioWatcher`; `SetLevel` + fires them on change (empty sockets = no-op, so other alarms/weapons unaffected; `levelB`/`LevelCountB` + untouched; sizeof stays 0x54). Then registered each state attr → its subsystem's own alarm (own + `AttributePointers[]` chained to the parent): `Generator.GeneratorState`→stateAlarm, + `Condenser.CondenserState`→condenserAlarm, `Reservoir.ReservoirState`→reservoirAlarm, + `AmmoBin.AmmoState`→ammoAlarm (+ chained AmmoBin's bare index so `SimulationState` resolves too). + `GeneratorOn`→generatorOn. **audiostate skips 85 → 0** — every StateIndicator audio attribute across + the mech + all subsystems binds to a real indicator, and the alarms are already `SetLevel`'d by the + sims, so generator/condenser/reservoir/ammo state sounds fire on transition. **Still inert** (read 0, + silent, non-crashing — no modeled backing member in the size-locked layouts, a polish follow-up): + `ReportLeak` (Logical), `ConfigureActivePress` (Integer), `Torso.MotionState` (Enum), + `Torso.SpeedOfTorsoHorizontal` + `ControlsMapper.TargetRangeExponent` (Scalar). The **bring-up guards** + [T3, self-clearing] stay: a NULL subsystem attr → inert pad (was a fatal `Fail`); an + `AudioStateWatcher` on an unconstructed indicator (chain@+0x18 null/0xCDCDCDCD) → skip. Both pass + automatically once a subsystem is built. Diagnostics: `BT_AUDIO_LOG` (chain + skips/redirects), `BT_ATTRBIND_LOG` (every attr bind), `BT_AUDIO_TEST` (proof-of-life buffer0). NOTE: `AUDIO1/2.RES` were SF2 v1.0 (16-byte shdr; sample rate assumed 22050 Hz — may need tuning if pitch is off). - **L4 HAL on Windows + the VS build system: DONE.** [T1]