Project reference snapshot. Recovery notes retain earlier subsystem milestones; use the current feature overview for playable scope.

Native actor collection and projection

src/actor_projection.c recovers the complete 0800D2D0, 0800D338, 0800D490 and 0800D884 rendering routines. It uses the actual actor resources loaded by actor_assets.c, original direction/reciprocal data, the host world's sector lists, and the native mixed actor/wall queue. ROM instructions execute only in the differential tests.

SsaActorSource borrows a stable entity and supplies its animation, displayed frame, facing, owner and render flags. flags is an explicit snapshot of entity +30, allowing the requested third-person extension to expose the local player without modifying its collision/gameplay flags. That extension remains separate from original behavior.

ssa_actor_project implements one complete billboard or fixed-screen projection; ssa_actor_collect implements the visible-sector traversal and both original player passes. The root actor_scene adapter composes collection, mixed-list insertion and final actor drawing after native world geometry.

Original contracts

D2D0 resets the actor clip-word cursor, copies the order/clip backing pointers, then walks sectors in ascending index order. A set world visibility bit selects a sector. D338 follows that sector's current linked-list order, rather than the active entity-pool order. Native collection uses the corresponding stable world.sectors and entity.sector_next links; each visited body must have exactly one source mapping.

Entity flag 2000 selects D884; ordinary actors use D490. Flag 10 adds a second D490 pass with animation temporarily increased by 5 * (owner + 1). The original restores the animation afterward. The native version uses a local source copy, so the caller's metadata stays unchanged.

D490 preserves these gates and calculations:

D884 selects displayed frame +1, uses fixed horizontal scale one-half and vertical scale three-quarters, centers at60, sets world XY to zero, and queues depth 10000. It still retains source Z/height and resource identity.

The shared SsaActorProjection is the exact 36-byte scalar record in actor_queue.h. Its reserved leading word is never cleared by projection. Original +1C is the actor resource/animation ID; +0C holds the image index with horizontal flip in bit31. +10 is the 12-bit image scale. Queue allocation, wall depth/occlusion, clip-word construction and final reverse draw order are implemented by the separate native actor_queue module.

Ownership and failures

Keep maps, world lists, camera, assets, math tables, entity addresses and source arrays stable throughout collection. Source/entity/assets storage cannot alias queue output. Collection rejects active world queries, nested projector/queue updates, mismatched maps, missing/duplicate source mappings and broken/cyclic sector lists. Original record-cap rejection is successful no-draw behavior; invalid resources or native backing bounds are explicit errors. Earlier queue effects survive a later error, and the projector guard always clears.

Run queue_begin once after a fresh geometry pass. Collection's reset of the clip cursor does not reset projection or actor counts. The root actor_scene adapter performs this ordering and binds the full backing capacity of wall opening clips, including the original inclusive endpoint reads.

Validation

tests/test_actor_projection_rom.py builds strict C11 with undefined-behavior sanitization and compares:

tests/test_actor_scene_rom.py then executes the complete original chain:

B6B0 -> BSP/017CC -> BE60/AB10 -> D2D0/D338/D490/D884
      -> 1238 -> 01828 -> 09238/09258 -> ARM0638

No actor or renderer call is hooked out. BIOS division/CpuSet and DMA copies are the modeled hardware boundaries. The original self-modifying wall-column code is synchronized with Unicorn's instruction cache without replacing its math or pixels. Native code uses the root ssa_actor_scene_init/draw/free adapter.

The full oracle passes 256 frames across all 16 maps, comparing 3,686,400 world pixels, the 120-byte predecessor row, every projection/actor/clip/order record, wall columns, plane records and opening data. It covers 317 actor draw commands, 2,584 wall commands (1,088 portals), and 128 consecutive animation frames with both native and original 00908 state updates. Original map objects retain their actual pre-AI construction state; these tests do not invent enemy AI activation, health, attacks or movement.

Camera inputs use eight bounded views at original player starts, repeated while animation advances. This is not a claim that the original's small scratch area is safe for every possible camera. During development a level6 variant needed 741 opening bytes, crossing the original720-byte space and overwriting its own cursor at 03004C70. The native renderer's explicit 24,000-byte backing avoids that corruption. Such undefined original-state views are outside the equality oracle. The evidence and all tested source hashes are recorded in native-actor-projection-validation.json and native-actor-scene-validation.json. Native framebuffer index artifacts are written under build/native-tests/ only after equality succeeds.

The actual decomp.wtf engine claimed sub_0800D490, recorded these recovery findings, and released the claim. This host implementation is behavioral recovery, not an exact compiler match. No new exact match is claimed here. The rendered actor pass does not implement the remaining game/HUD/audio/combat integration or establish a complete playable game port.