Document architecture checkpoint and restore original task callback order
This commit is contained in:
1 parent
69d0187a21
commit
531883aaac
45 files changed
+2935
-43
No files matched your search
@@ -0,0 +1,129 @@
|
||||
# Fresh laboratory construction and registry ordering
|
||||
|
||||
Static recovery,2026-10-25. Originals remain untouched; no legacy code executed.
|
||||
Neutron.exe SHA256
|
||||
`f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`;
|
||||
gam/level1b.gam SHA256
|
||||
`316fff40db565c2add5b07cbccdef640ddb67c64d6625fea1429ce2a0542a234`.
|
||||
All addresses below are preferred-base EXE VAs; their verified PE file offsets
|
||||
are VA-400000. The helper emits both coordinates and checks39 source anchors.
|
||||
|
||||
## Recovered fresh-load partial order
|
||||
|
||||
For a fresh lab with no matching reusable Jimmy, the source establishes:
|
||||
|
||||
```text
|
||||
LV1B game interface+8C enters registry
|
||||
-> Jimmy interface+C0 enters registry
|
||||
-> owned jetpack fire interface+C0
|
||||
-> other Jimmy constructor helpers
|
||||
-> owned Jimmy shadow interface+C8
|
||||
-> additional constructor helpers
|
||||
-> remaining serialized lab entities in file order, with their own helpers
|
||||
-> postload callbacks in registry order
|
||||
Jimmy creates absent Goddard interface+C0
|
||||
-> Goddard shadow interface+C8, then other Goddard helpers
|
||||
```
|
||||
|
||||
This is a **partial order**, not adjacent nodes or absolute list indices. The
|
||||
helper intentionally does not manufacture a full registry from the GAM alone:
|
||||
constructor-owned objects are not serialized entity records. Geometry/other
|
||||
postload objects can also intervene. The ordering does establish that normal
|
||||
fresh-lab input from the game object runs before Jimmy's controller, Jimmy runs
|
||||
before his fire effect, and Goddard follows both in the game callback pass.
|
||||
|
||||
| Boundary | Calls / source instructions (VA; file offset follows VA-400000) |
|
||||
|---|---|
|
||||
| Header first | Loader46E319..32B reads initial FourCC through imported stream operator48D3E0;46E335 /6E335 calls factory459CB0 before entity count read46E36A /6E36A |
|
||||
| LV1B class allocation | Factory45D3FD /5D3FD →44F300, allocating5C0 bytes; constructor44F3B8 /4F3B8 sets LV1B |
|
||||
| Game base chain |44F358 →44D2B0;44D306 →4745A0;474602 forms complete+8C;47460A →4586F0;458712 →46FBE0 |
|
||||
| Common registry insert |46FF4A..7F /6FF4A: global50999C sentinel; alloc12; node.next=sentinel;node.prev=oldtail;sentinel.prev=node;oldtail.next=node;node+8=interface |
|
||||
| First entity | Lab GAM has129 records; first is3JIM/JIM1 at file000008;46E37F reads its code and fresh branch46E3B9 calls factory459CB0 |
|
||||
| Jimmy factory/base chain |45B1E2 →422160;4221B1 →437280;4372DA →40D110;40D162 →462040;4620A2 forms complete+C0;4620AA →4586F0 →46FBE0 |
|
||||
| Fire during player base construction |4374DF →421D80;421DD2 →40D110, so it registers after Jimmy;4374EF stores fire complete pointer at Jimmy complete+7F8 |
|
||||
| Jimmy shadow |42250C →43F640;43F692 →4352F0;435341 →463F10;463F6C forms complete+C8;463F74 →4586F0 →46FBE0;42251C stores shadow at Jimmy complete+A2C |
|
||||
| Remaining GAM records |46E3FD invokes stream extraction48D190 on the current interface;46E426 reads next code;fresh branch46E49A calls factory;46E4BA loops to46E3D1 |
|
||||
| Postload after records |46E4FF invokes supervisor slot128. Vtable4D5EA0 entry4D5FC8 /D5FC8 resolves46E570, which traverses registry and invokes interface40C at46E61A |
|
||||
| Jimmy postload |Vtable4A373C entry4A3B48 /A3B48 resolves423610. This callback contains the Goddard construction below |
|
||||
| Goddard is runtime-owned |Lab GAM contains zero3GOD records.423C6A..72 tests Jimmy interface+95C; if absent,423C98 →41C810;423CAE stores Goddard complete pointer at interface+95C (complete+A1C) |
|
||||
| Goddard registers before his shadow |41C861 →407A40;407A92 →40D110 →462040 →4586F0;41C95F →43F640 builds his shadow afterward;41C96F stores shadow complete pointer at Goddard complete+994 |
|
||||
|
||||
The postload traversal reads next after the callback at46E668, so a newly
|
||||
tail-appended Goddard is eligible to receive postload later in that same traversal.
|
||||
This follows from the linked-list operations; it is not an original runtime
|
||||
capture. Allocation failure and callbacks that remove/reorder nodes need separate
|
||||
handling and are not silently interpreted as the normal successful load.
|
||||
|
||||
## Fresh input/controller/effect frame consequence
|
||||
|
||||
[input-frame-bridge.md](input-frame-bridge.md) establishes that viewport47E4F0
|
||||
first calls global physics479BC0, then registry updater473740, then transform
|
||||
synchronization473770, then base draw. Combining that with the fresh partial
|
||||
order gives the bounded interaction:
|
||||
|
||||
1. Physics consumes existing Jimmy velocity/acceleration/queued impulse.
|
||||
2. Game44DF80 advances timer records and dispatches input475A70 to current5099E4.
|
||||
3. Jimmy424600 updates base/rotation/controller437940, which may queue a jump or
|
||||
start/stop/change a burst.
|
||||
4. Owned fire421FB0 runs later, observes that controller state and decrements
|
||||
its timer/energy according to its already recovered rules.
|
||||
5. Goddard's ordinary game update occurs later in the same registry pass.
|
||||
6. All surviving logical actor transforms are synchronized before rendering.
|
||||
|
||||
Thus a fresh controller-created impulse waits until a later global physics pass,
|
||||
while a newly assigned positive fire timer can be decremented by its effect
|
||||
callback in the same game-object pass. This resolves the previous open
|
||||
Jimmy-versus-fire ordering without inventing a nominal60Hz source cadence.
|
||||
The baseline port's combined controller→physics→effect call differs at the first
|
||||
boundary. Splitting pending body inputs is directly supported for this fresh-load
|
||||
case; actual gameplay comparison remains required for latency/apex fidelity.
|
||||
|
||||
## Reuse and transition ordering remain a separate gate
|
||||
|
||||
Source explicitly supports existing-object reuse:
|
||||
|
||||
- Jimmy constructor42275A writes complete+C9=1, or interface+09. Goddard
|
||||
constructor41C9C0 writes the equivalent flag. Common constructor46FFAE starts
|
||||
interface+09 at0. This is an observed reuse flag; it alone does not prove
|
||||
lifetime across any particular level transition.
|
||||
- Supervisor vtable4D5EA0 slot11C at4D5FBC /D5FBC resolves46E6A0. It walks
|
||||
registry50999C and requires matching interface+404 class code **and** nonzero
|
||||
interface+09 at46E6B9..C6. Slot110 at4D5FB0 /D5FB0 resolves46E6E0, returning
|
||||
the first matching existing object without moving/re-appending its node.
|
||||
- Loader46E38B /6E38B and46E45A /6E45A use this predicate before choosing the
|
||||
fresh factory branch. Reusing Jimmy therefore does not repeat his constructor
|
||||
or append his fire/shadow again. Jimmy postload separately reuses his existing
|
||||
Goddard pointer if present.
|
||||
|
||||
**Follow-up for lab→tutorial→lab:** `scene-loader.md` now proves Jimmy/Goddard's
|
||||
zero teardown predicate and positive reuse flag together. Their retention/reuse
|
||||
contract is recovered, but the complete retained helper set, field resets and
|
||||
old current-game removal/eligibility remain open. Deferred transition46DFF0 queries each object's
|
||||
slot200, calls lifecycle slots20/34, marks some interface+06 for deletion and
|
||||
calls473710.473710 deletes flagged nodes through interface slot0 and restarts
|
||||
the list scan. A complete retained-set proof needs each relevant slot200 getter
|
||||
and flag write, plus each object's lifecycle callbacks and owned-child cleanup.
|
||||
Slot200 for Jimmy/Goddard is4719B0, reading interface+139; **it is not** the
|
||||
reuse flag+09. Conflating those two fields would fabricate persistent ordering.
|
||||
Do not assume the fresh game-before-Jimmy relation after a transition: the new
|
||||
game appends later, while old-game callback eligibility needs its own proof.
|
||||
|
||||
## Verification and bounded next implementation
|
||||
|
||||
`python3 tools/binary/checkpoint_lab_registry.py` verifies source hashes,
|
||||
12 decisive instruction ranges,23 direct calls and4 virtual entries, then parses
|
||||
the original lab GAM for its header/count/first record and absent3GOD record.
|
||||
`python3 -m unittest discover -s tests -p test_checkpoint_lab_registry.py -v`
|
||||
passes the original-data regression. This is static evidence; no port or original
|
||||
gameplay runtime verification was performed for this follow-up.
|
||||
|
||||
Baseline69d0187 groups simulation, mechanisms, patrols, director and effects by
|
||||
subsystem. A C3 scheduler can now model the fresh lab's proven input→Jimmy→fire
|
||||
ordering after global physics, with logical-to-visual synchronization last.
|
||||
Keep initial source-order replay separate from current playable policy while
|
||||
covering queued jump, same-pass burst countdown, landing and control transfer.
|
||||
For the tutorial return, first trace cleanup46DFF0→lifecycle20/34→473710 and
|
||||
prove the surviving node sequence; use that sequence when serializing/rebuilding
|
||||
the scheduler. Other Jimmy/Goddard helper identities, construction-time nested
|
||||
spawns and later runtime appends still need an explicit registry trace before
|
||||
claiming the complete list or all-level ordering is recovered.
|
||||
Reference in new issue
Block a user