152 lines
9.9 KiB
Markdown
152 lines
9.9 KiB
Markdown
# Retained character resets: bounded C3/C7 contract
|
||
|
||
Static investigation,2026-10-25. Originals remain read-only and were not executed.
|
||
Neutron.exe SHA256 is
|
||
`f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`.
|
||
All code/vtable anchors below are preferred-base EXE VAs; PE-mapped raw file
|
||
offset is VA−400000 for these sites. The new helper prints both coordinates and
|
||
checks individual bytes, virtual targets and source route GAM properties.
|
||
This report distinguishes proven local resets from fields whose enclosing
|
||
retention/property/callback semantics remain unresolved. No runtime code changed.
|
||
|
||
## Enclosing ordinary-load phases
|
||
|
||
The common loader evidence remains `scene-loader.md`: selective teardown, GAM
|
||
factory/reuse/property stream, then registry per-object28 followed immediately
|
||
by40C. Jimmy/Goddard can survive and be reused; that alone does not imply every
|
||
field survives. Jimmy uses game-interface complete+C0; shadow uses complete+C8.
|
||
Keep constructor/default-class initialization separate from callbacks28/40C.
|
||
|
||
The object property read at46E3FD uses IAT48D190, imported
|
||
`OMediaStreamOperators::operator>>(OMediaClassStreamer*)`. Route JIM1 property
|
||
records contain authored position/rotation/flags/StartPoint and no serialized
|
||
jump/movement-mode/burn timer field. This is a statement about decoded records,
|
||
not proof the read implementation cannot indirectly invoke another callback.
|
||
Full streamer virtual call provenance is still a separate gate.
|
||
|
||
## Jimmy initialization: exact resets and a coordinate correction
|
||
|
||
Jimmy interface vtable4A373C+28→437890. It first calls4587F0 at437896;
|
||
4587F0→470540 applies generic authored/live-property setters, then calls
|
||
interface68(1). Jimmy-specific43789B..4378C1 then:
|
||
|
||
| Instruction / raw offset | Field and recovered effect |
|
||
|---|---|
|
||
|4378A1 /378A1|Clear interface608 = complete6C8 (movement speed in existing recovery)|
|
||
|4378A7 /378A7|Clear interface614 = complete6D4 (air turning accumulator)|
|
||
|4378AD /378AD|Clear interface618 = complete6D8; full semantic name unresolved here|
|
||
|4378B8 /378B8|Invoke interface328 =4723F0, the logical Euler-vector getter|
|
||
|4378BE..4378C1 /378BE..378C1|Copy that vector's Y into interface61C = complete6DC|
|
||
|
||
**Correction:** interface328 is not velocity.4723F0 copies interface224/228/
|
||
22C/230, the logical Euler vector (position is214/218/21C/220). Therefore the
|
||
earlier scene-loader wording “captures another velocity component” is stale.
|
||
The clear618/capture61C pair should remain unnamed or associated with yaw
|
||
tracking until its consumers are traced; do not carry it as vertical velocity.
|
||
|
||
Generic470540 additionally clears interface274/278/27C and298 at4709CA..9DC,
|
||
then sets byte5=1 and bytesA/6=0. This report does not name that vector as impulse
|
||
without tracing the actual body consumer. It also re-applies authored defaults
|
||
through virtual getters/setters, so absence of a direct scalar write in437890
|
||
alone is not proof of scalar preservation.
|
||
|
||
## Jimmy PostLoad40C
|
||
|
||
Vtable4A373C+40C→423610. Selected proven effects relevant to transition state:
|
||
|
||
| Site | State transition / ownership |
|
||
|---|---|
|
||
|42363B|Clear interface1D91; semantic name not assigned|
|
||
|423642..423656|Load default SoundEffects.omt, set current bank696008; gate4F8434 initially clear|
|
||
|4236A3/4236AA|Set current interaction/body radius60 through interface110|
|
||
|4236B3/4236BA|Set support factor1.265f through interface100|
|
||
|4236C0|Clear interface938 (tutorial flag later set for VR01..08)|
|
||
|4236FF|Current game virtual168(0), a gameplay/modal state callback; do not equate every control state with world pause|
|
||
|42370A and423729|Complete11C(0) for Jimmy and existing companion; both resolve40D350 and disable morph animation pause flag complete654, not jump/movement mode|
|
||
|42375E/423778|Stop associated saved effect handles through458A00, mark handles974/988 as−1|
|
||
|42378B /2378B|Clear WORD interface728 = complete7E8, the jump state, to0|
|
||
|423792|Clear interface970 temporary object pointer before later allocation|
|
||
|42399D/4239E6|Apply matching STRT root and Euler rotation|
|
||
|423A90..423B1E|Consume pending RETURN flag, override Jimmy with saved departure root, apply identical companion root|
|
||
|423B3D|Grant control through current game virtual118|
|
||
|423B43..423C67|Write shared viewport: authored STRT camera occurs inside match loop, later unconditional actor-local(0,200,−300) overwrites viewport eye|
|
||
|423CD4..423CE2|When companion already exists, call its interface174(0,0,0); constructor is not repeated|
|
||
|
||
The final viewport assignment explains why merely carrying the old chase-eye
|
||
cache would not reproduce source scene entry. Full orientation/follow cache
|
||
setup remains in the camera investigation. The unconditional final eye uses
|
||
local(0,200,−300), distinct from DEFAULT's local(0,500,−500) conditional snap.
|
||
|
||
### Movement mode, fire and transition staging limits
|
||
|
||
Player constructor43748A initializes complete7C4 movement mode0, but the inspected
|
||
JimmyInit28 and JimmyPostLoad40C do not establish an unconditional reset of this
|
||
field. PostLoad does explicitly reset jump state7E8 as above. Stage43B5A0 is
|
||
called with the complete player pointer; its complete148 call43B7FB resolves
|
||
429A00, which stops sound handle completeA44 and assigns−1. That callback does
|
||
not reset movement mode or fire time. Stage also clears complete7FC at43B5EE.
|
||
|
||
Do not promote absence of writes in these bounded local functions to a complete
|
||
preservation proof: game/streamer/control callbacks and class-specific gadget
|
||
cleanup can change player state elsewhere. In particular RETURN457FF7 performs
|
||
gadget cleanup before flags/staging, distinct from ordinary stage. Carrying raw
|
||
movement mode, held input, physics vectors or arbitrary jump timers across scenes
|
||
is not yet justified by this report. The current port's blanket constructor
|
||
zeroing is likewise an implementation policy, not a recovered reset contract.
|
||
|
||
## Retained fire/shadow/companion callbacks
|
||
|
||
| Object | Constructor-only state | Ordinary per-object28 /40C |
|
||
|---|---|---|
|
||
|Jetpack fire complete+C0 interface4A3160|421E51 calls470F40(0), selecting retention;421E62 zeros complete6BC owner and421E68 zeros complete6C0 timer; player437525 later assigns owner interface to6BC|28=4587F0 generic Init;40C=40E7B0 generic visibility/animation policy. Neither local path assigns owner6BC or timer6C0. No repeated constructor assumed.|
|
||
|Shadow complete+C8 interface4B37B8|43F767 calls470F40(0); authored size/owner are separate from runtime position|28=4587F0;40C=43F810→4354C0, then copies authored size words to completeAC/B0, resets completeB4=2/B8=0 and optional visibility flag. More base4354C0 effects remain open.|
|
||
|Goddard complete+C0 interface49F480|Ctor sets retention/reuse and owns shadow; aliases/defaults are constructor state|28=41E6A0→407EB0→4587F0; then byteA=1, AIstate608=authored87C, current waypoint800=null.40C=41E590→409480, then level-specific visibility/collision/radius policy.|
|
||
|
||
Fire421FB0 later queries its owner and, when grounded, clears timer interface600
|
||
(complete6C0) at421FE9, then subtracts dt. That is an **effect tick**, not an
|
||
initialization reset. It can observe the controller's same-pass changes according
|
||
to the recovered registry ordering. Timer preservation through local28/40C does
|
||
not prove it survives the entire transition unchanged without an intervening
|
||
owner/gadget/frame callback; exact first destination tick remains a lifecycle test.
|
||
|
||
Goddard's ordinary PostLoad sets radius130 and enables normal body behavior for
|
||
LV1B/VR04/LEV1; source-level hide branches cover other levels. Its existing-instance
|
||
callback174 is4716D0, not a constructor. Full rotation/AI resource resets in
|
||
409480 are not recovered here; retain the earlier patrol approximations explicitly.
|
||
|
||
## Directly evidenced implementation candidate: gadget availability
|
||
|
||
JimmyPostLoad **always first enables** group0 gadgets in source order
|
||
`7,3,0,5,1,6,2,4` via403870(false), calls423DEF..423E3F. For numeric
|
||
VR01..VR08 it then calls403870(true) for those same indices at423E71..423EC1.
|
||
At40389E, disabling changes only owned state1→4; at4038AA enabling changes only
|
||
4→1. All other values are preserved, including unowned0 and unknown wire values.
|
||
This is availability state, not ownership acquisition or inventory reset.
|
||
|
||
For the route: lab entry converts disabled-owned4→1; practice VR04 converts
|
||
owned1→4; return lab converts4→1. The VR04 powered-jump path bypasses the normal
|
||
inventory state guard, so source state4 here does not imply the tutorial jetpack
|
||
should fail. Lab→outside similarly normalizes these group0 entries; tasks, score
|
||
and acquired-table state remain independent. The audited baseline lacked this
|
||
availability pass. Continuation now calls `SceneInventory.ApplyLevelAvailability`
|
||
once on level entry, before starting the authored sequence, and preserves raw
|
||
values in constructors/snapshots and arbitrary task assignments. Managed tests
|
||
cover every VR01..08 code, all relevant/unknown state boundaries, both untouched
|
||
inventory regions and TSK round-trip back to lab. GPU practice/RETURN smoke also
|
||
asserts state4 in VR04 and state1 on lab return. This correction does not invent
|
||
persistence for arbitrary physics/mode/fire fields.
|
||
|
||
## Verification and remaining gates
|
||
|
||
Run `python3 -m unittest discover -s tests -p test_checkpoint_character_reset.py -v`
|
||
and `python3 tools/binary/checkpoint_character_reset.py ../Original`. Tests verify
|
||
31 immutable instruction anchors,11 callback/vtable targets,16 exact gadget-call
|
||
arguments, source route player property names, and conditional1/4 conversion
|
||
boundaries. The state oracle tests interpretation, not execution of source code.
|
||
|
||
Remaining gates: complete property-streamer callback chain; RETURN gadget cleanup
|
||
versus ordinary departure; movement-mode/fire/hold/extra-acceleration writer
|
||
provenance through all destination callbacks; physical body re-registration/reset;
|
||
full shadow base reset and Goddard409480 policy; source camera orientation/cache
|
||
reset. Do not carry these fields merely because object identity persists.
|