Restore Goddard leveling and Scooter positional pitch processing
This commit is contained in:
1 parent
74be19eb15
commit
fccc0b9d1b
24 files changed
+967
-8
No files matched your search
@@ -0,0 +1,59 @@
|
||||
# Goddard leveling after Scooter dismount
|
||||
|
||||
2026-11-04. User reports that Goddard retains the dismount angle. Reproduced in
|
||||
managed integration with actual VR05 steering/lean and normal selection cleanup.
|
||||
The cleanup copy itself is recovered behavior; the missing later AI phase caused
|
||||
pitch and roll to remain unchanged indefinitely.
|
||||
|
||||
## Original contract and implementation
|
||||
|
||||
-4281B3..4284FB (file offsets281B3..284FB) copies vehicle root and full Euler to
|
||||
the restored companion. Preserve that handoff; do not flatten at unequip.
|
||||
-4096E0..40988D (86E0..888D) is the AI game-interface facing update. It checks
|
||||
gameplay gate475CA0, interface+5 enabled and+A dirty, reads current Euler224/228/
|
||||
22C and destination274/278/27C, wraps each delta strictly>180 or<−180, multiplies
|
||||
axis factors810/814/818 by dt, and calls334→458F90→472480. The wrapper repeats the gameplay gate. All three axes participate.
|
||||
-41C8DB..41C90C (1C8DB..1C90C) overrides Goddard's complete8D0/8D4/8D8 factors to
|
||||
(.3,3.2,.3). These are interface810/814/818; the complete/game displacement isC0.
|
||||
-Ordinary supported moving AI4093BD..4093D0 (93BD..93D0) calls36C with pitch0,
|
||||
target yaw and roll0. Airborne and other AI branches differ; they are not added
|
||||
by this fix. The prior base/facing phase consumes the preceding destination.
|
||||
-472480..472570 (72480..72570) adds Euler with the source asymmetric negative
|
||||
truncation and strict>360 wrap. The existing RocketOrientation.Add reproduces
|
||||
that shared leaf, including canonical360 and unusual negative-input rounding.
|
||||
|
||||
ActorPatrol previously changed Y alone. Its opt-in Goddard follow bridge (VR05/
|
||||
LEV1) now applies the full original axis step toward its ordinary upright X/Z
|
||||
follow target. Heading selection/order and non-follow lab/Carl patrol stay in
|
||||
their existing bounded adapters. Disabled companions remain frozen. Cleanup
|
||||
still copies the actual lean; enabled subsequent updates gradually level it.
|
||||
At60Hz the.3 factor gives about22% of the original tilt after five seconds.
|
||||
|
||||
## Evidence and validation
|
||||
|
||||
Original EXE SHA256
|
||||
f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8.
|
||||
`tools/binary/goddard_leveling.py` guards the complete identity and records four
|
||||
bounded spans/hashes/PE offsets. Committed fixture
|
||||
`tests/GamePort.ScooterTests/original-leveling-reference.json` records source,
|
||||
probe generator/shared harness/executable/log hashes and11 copied-original
|
||||
observations. Nine active cases compare against the managed facing step: tilt,
|
||||
opposite signs, seams, negative angles, exact/over180, one60Hz tick, five seconds,
|
||||
and upright. Two additional native enabled/dirty gate observations remain separate
|
||||
from the pure step. The synthetic probe executes copied4096E0 and472480 only,
|
||||
with source Goddard factors; no original body/AI target selection/game entrypoint.
|
||||
The initialized-prefix run exits0 and prints GODDARD_LEVELING_COMPLETE. An earlier
|
||||
fresh-prefix15-second run did not finish startup and establishes no observations.
|
||||
|
||||
REA/Ghidra requests4096E0/409140 returned explicit procedure lookup failures.
|
||||
Complete replies, exported bundle and closed snapshot are retained under
|
||||
artifacts/scooter-dismount-followup/rea. No successful pseudocode or Evidence ID is
|
||||
attributed to these failed selectors and they were not repeated. Supporting
|
||||
instruction extracts and successful native numeric traces are retained alongside
|
||||
that directory. This does not claim whole-original gameplay comparison.
|
||||
|
||||
Scooter integration adds actual tilted dismount, exact cleanup copy, gradual
|
||||
next-phase decay, five-second recovery and disabled freeze, plus nine native
|
||||
numeric comparisons (13 groups total). Existing10 Patrol groups still pass.
|
||||
Native rendering/build/package follow-up is recorded in scooter-live.md. Native
|
||||
Windows/user-visible confirmation of this correction remains separate.
|
||||
@@ -185,3 +185,19 @@ The final post-package audit verifies all539 originals unchanged. The Windows
|
||||
package was cross-published and its resources checked; native Windows execution,
|
||||
audible quality and whole-original comparison remain pending. Validation notes
|
||||
are copied into each package; BUILD-INFO.txt separately identifies their commit.
|
||||
|
||||
## User feedback: pitch and angled dismount
|
||||
|
||||
The follow-up fixes the missing consumers rather than changing the original
|
||||
handoff: Goddard keeps the source copied Euler at release, then his enabled
|
||||
follow update gradually levels X/Z with source.3 axis factors. ScooterAudio
|
||||
applies recovered positional frequency/history after the nominal engine command,
|
||||
using the shared listener (including script and parked Jimmy camera). The nominal
|
||||
pitch ramp already matches the original.11 new original facing traces and11
|
||||
frequency traces are retained separately from the earlier53 drive observations.
|
||||
13 Scooter,2 audio,10 Patrol and24 targeted Python groups pass, as do lab/
|
||||
underground navigation and SDL dummy audio regressions. Native Linux GTX1070
|
||||
1920×1080 replays pass both10-phase scenes with zero enabled validation errors.
|
||||
The sound correction is slight; audible/native Windows comparison is still open.
|
||||
See [leveling](scooter-dismount-leveling.md) and [pitch](scooter-pitch.md) for the
|
||||
source/evidence, phase boundaries and limits.
|
||||
@@ -0,0 +1,86 @@
|
||||
# Scooter pitch: engine command and positional channel update
|
||||
|
||||
2026-11-04. User reported that engine sound rises too high. The existing engine
|
||||
formula is supported by the original instructions; the directly evidenced missing
|
||||
step is the separate positional channel update. No invented Scooter pitch ceiling
|
||||
or reduced acceleration/speed is introduced.
|
||||
|
||||
## Recovered source
|
||||
|
||||
EXE SHA256 `f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`;
|
||||
OMT2.dll SHA256 `3ec41ead011adf56387a6dbd4580e5b5a9721b5f8020c8a56420f42824354943`.
|
||||
`tools/binary/scooter_pitch.py` checks both identities, four bounded code ranges
|
||||
and three constants, with independently mapped PE offsets. For the listed EXE
|
||||
code, file offset=VA−400000; DLL code offset=VA−10000000.
|
||||
|
||||
| Original location / offset | Contract |
|
||||
|---|---|
|
||||
|412ED0 /12ED0;412F2D..412F60 /12F2D..12F60|Jeep's engine update calls game268→471B50 to read scalar speed, multiplies double495310=0.5263157894736842 then double495308=51, adds captured complete694 base frequency, truncates toward zero, floors at7000, writes channel command695E3C. Engine channel is complete690. First frame starts SFX46 and captures base without the later-frame pitch update.|
|
||||
|47D5DB /7D5DB;47D6E0 /7D6E0|Positional channel creation initializes frequency command695E3C to11025 and enables frequency adjustment byte695E1C. This matches Scooter's original Wave46 sample rate11025; WAV extraction is not resampling it.|
|
||||
|47D5CB /7D5CB;47D5EE /7D5EE|Store initial emitter/listener distance into history695F84, then invoke positional update47D9D0. At nonzero initial distance this first update writes nominal frequency and replaces history with integer0.|
|
||||
|47D9D0 /7D9D0;47DA0C..47DA7E /7DA0C..7DA7E|Read emitter root through310 and listener viewport509A50 eye+44/+48/+4C; compute original quick magnitude. Zero distance returns before frequency/history update.|
|
||||
|47DBB1..47DC1D /7DBB1..7DC1D|When adjustment enabled, correction=trunc((distance−history)*float.75). If distance>history, apply nominal−correction; otherwise nominal+correction. Thus the ordinary finite correction lowers pitch in both directions. The final FILD/FSTP stores the signed integer correction into history, **not distance**. This unusual source behavior is independently executed below.|
|
||||
|47D8F0 /7D8F0|Global sound update enumerates active channels and calls47D9D0. Source callers include44DF9A and47E57A. Its cadence relative to vehicle and render registry is a separate global scheduling contract.|
|
||||
|DLL1003BBA0..1003BBF9 /3BBA0..3BBF9|OMediaDXSoundChannel::set_frequency stores requested unsigned Hz, clamps nonzero values to100..100000 with a native buffer, and forwards to DirectSound slot44. Zero means source frequency. There is no lower hidden Scooter-specific maximum.|
|
||||
|
||||
Existing REA/Ghidra12.1.4 engine evidence:
|
||||
`ev_0001ffbd4f35880bb9fe9c53985f1953f475984404b5be77753031e07a77bfca`
|
||||
under artifacts/scooter-lifecycle-live/rea-camera. Its pseudocode loses x87
|
||||
frequency producers; the saved sound.asm and constant bytes establish the formula.
|
||||
|
||||
New REA evidence, exported with closed snapshots under artifacts/scooter-pitch:
|
||||
|
||||
-47D9D0: `ev_1b042ef49ef4615de500303bde18eb9da879d00a2e8ae9dfde76cfdfb31a2ec6`
|
||||
in rea-position/evidence.json. The decompiler aliases x87/local values incorrectly;
|
||||
instruction47DBFC and47DC11 establish which integer is published to history.
|
||||
-DLL1003BBA0: `ev_7439bef8e2bb303a2acba66af75a3513ab2ea007ebdb187732b9c7d4ab6cfe6c`
|
||||
in rea-dll/evidence.json.
|
||||
-DLL100EFF20: `ev_6cdab21683335bcecdc6e96aa42b96b63456cfa1ab02b64a283b07f91dc46a15`;
|
||||
shared inherited no-op export, not the active DX setter.
|
||||
|
||||
The MCP session reported GHIDRA_INSTALL_DIR unset. The established local
|
||||
scripts/rea.sh launcher has the configured Ghidra/JDK, so new analysis used that
|
||||
CLI with copied targets. No MCP registration/configuration was changed. No target
|
||||
entrypoint was executed during static analysis.
|
||||
|
||||
## Implementation and verification
|
||||
|
||||
`ScooterAudio` owns per-channel history and last applied device frequency. Its
|
||||
EngineFrequency preserves the original scalar slope/floor. Frequency applies the
|
||||
positional correction using emitter root and current rendered listener eye, then
|
||||
DX's unsigned/nonzero bounds; zero-distance calls retain applied Hz/history.
|
||||
Reset runs when a new engine stream starts. SDL maps resulting Hz to the original
|
||||
WAV input rate through SDL_SetAudioStreamFrequencyRatio; local SDL_audio.h confirms
|
||||
higher ratio raises pitch. No cumulative multiplication or input-rate inversion
|
||||
was found in SdlAudio/SceneAudio.
|
||||
|
||||
A copied-original47D9D0 harness uses synthetic actor/engine/channel/camera and
|
||||
original OMT quick-magnitude/trig exports; no game entrypoint, sound playback or
|
||||
DirectSound hardware is invoked. Eleven cases execute successfully in isolated
|
||||
Wine32, including zero-distance early return, positive and negative signed history,
|
||||
constant-distance recurrence, fractional truncation, reverse floor ordering and
|
||||
maximum-speed command. Native Wine exit0/capture success are saved under
|
||||
artifacts/scooter-pitch/probe. The committed reference fixture identifies source,
|
||||
generator, shared map helper, generated EXE and original-output log by hash.
|
||||
|
||||
Examples: nominal50885 at distance800/history0 applies50285 and stores600; next
|
||||
same-distance update applies50735 and stores150. Reverse nominal7000 at distance500
|
||||
applies6625: the7000 floor precedes positional adjustment and must not be repeated.
|
||||
Source positional update does not modify nominal command695E3C.
|
||||
|
||||
Two Python groups guard source/provenance and eleven native cases. Two managed
|
||||
ScooterAudio groups match those eleven observations and verify engine arithmetic,
|
||||
stream-reset history, zero-distance device retention and reverse ordering.
|
||||
|
||||
Integration API: create a scene-local ScooterAudio; on EngineStarted call Reset
|
||||
before starting SFX46. On EngineSpeedChanged pass Frequency(baseHz,speed,vehicle.Root,
|
||||
listenerEye) to SceneAudio.TuneLoop. Use the actual shared listener, including
|
||||
scripted eye and Jimmy eye when parked; summon-time Scooter.CameraEye alone is
|
||||
stale for parked engine sound.
|
||||
|
||||
Boundaries: this is the recovered engine+frequency path, not complete positional
|
||||
volume/pan, channel allocation/bank failure handling or exact scene-wide47D8F0
|
||||
scheduling. Applying once per engine-frame update is a bounded port composition.
|
||||
Native original audible comparison, speaker quality and native Windows playback
|
||||
remain unverified. The correction lowers pitch slightly; static/source-component
|
||||
evidence does not establish that every perceived pitch difference is resolved.
|
||||
Reference in new issue
Block a user