Repository navigation
Field Rendering and Camera
Blizz127 edited this page Sep 21, 2026
·
1 revision
Camera, framing, and visibility findings from committed handoff notes. Only proven items are stated as fact; unresolved issues are labeled.
- Field overlay loads; main loop runs.
- Actor sprite primitives link into the OT via
func_8001E3D8(code=0x2dPOLY_FT4). -
DrawOTagruns once per frame; PsyCrossParsePrimitivereaches actor packets. - User-confirmed visual recovery: sprite visible, fade, slow zoom (
work_list_port.cfix). -
D_800ADC18fade-in gate: starts at 4, decrements per frame, clears at frame 4; gatesFieldAddPrimitivesbut not direct actor OT linking.
| Fix | What | Evidence |
|---|---|---|
FieldScene.unk7C type |
u_long → u_int on host (8-byte u_long broke offsets) |
&g_Scene.worldToScreenMatrix == g_Scene+0xD4 in gdb |
func_8007254C defaults |
sceneScrZ=0x200, sceneDIP=0x1e, sceneScale=0x1000
|
GTE C2_H=512; on-screen quad coords plausible |
Z-clamp in func_8007CD80
|
Inverted bounds clamp corrected | Map1 actor visible milestone (Jul 5) |
func_800764B4 active-actor quad |
Full billboard path implemented | Map1 executes real quad path (128 OT splices) |
Model prim 0x0C walker |
ModelPrimQuadF4Variant0 (0x18 stride) |
Fixed corrupt prim codes from wrong GT4 walker |
- Field background from streamed archive
(mapNum<<1)+0xBB. -
PcPortDrain0xBBToVram(opt-inXENO_FIELD_0BB_VRAM_UPLOAD=1) uploads VRAM strips synchronously. - Model actors use world matrix with retail
mvmva cv=0(translation included) — TR-add proven correct forfunc_800748E8. - Sprite actors use separate base matrix in
func_8001E3D8(pBase+0x0C), not the actor-center matrix fromfunc_80075B44.
- Symptom: Map1 black screen despite valid player spawn.
-
Root cause:
func_80072A38fallback corrupted camera target; compounded by inverted Z-clamp infunc_8007CD80. - Status: Z-clamp fix applied; Map1 actor visibility milestone reached.
- Adding
worldToScreenMatrix.ttoactorMatrix.tinfunc_80075B44was wrong for sprite path. - Sprite quads project through
func_8001E3D8's own matrix (pBase+0x0C), which had independently bad translation. - Conclusion: camera/sprite-base-matrix tracing was a symptom thread; camera-target/Z-clamp was the actual root cause for Map1 black screen.
-
func_800748E8asm uses GTEmvmva cv=0—modelMatrix.t = R × pos + work.t. - C
ApplyMatrixLVis rotation-only; TR-add reconstructs retail behavior.
| Issue | Status | Notes |
|---|---|---|
| Screen coordinate OT anomaly | Unresolved | OT1 frames: high 16 bits 0x7ffd; OT2 frame: high byte 0x25. Lower 32 bits consistent. Possible OT-switching or address-formation bug. |
| Default Map0 black | Known separate | Without XENO_FIELD_MAP; pre-existing at baseline 79c7ee7
|
Permanent 0xBB loader |
Not done | Opt-in env flag; needs retail-shaped drain from func_80070488
|
| Camera framing/scale cleanup | Open | Center-black region, tiny sprites noted in handoff |
func_80075B44 rare branches |
Assert-only | Four real asm branches; not hit on Kernel0 route in bounded probes |
| Child sprites invisible | Open | Type-2 render callback func_80025718 (D_8004FD40[2]) not ported; one-shot [port] log marks it; queued behind the anim-opcode frontier (see Active Frontier) |
| Map15 frame-117 full render | Not yet proven | Current abort happens mid-frame in the anim tick (0xBC sub 0x16) |
| Hack | Location | Notes |
|---|---|---|
XENO_FIELD_0BB_VRAM_UPLOAD=1 |
archive_port.c |
Uploads streamed VRAM; default-off |
| PsyCross GPU patches | build_port.sh |
Font 0xFC mask, dfe always on-screen, DR_MODE full length |
USE_EXTENDED_PRIM_POINTERS=0 |
build_port.sh |
Simple primitive pipeline for this title |
-
D_800ADC18lifecycle (init → per-frame decrement → render gating). -
FieldScenelayout on host must mirror 4-byte PSX types. - GTE
cv=0vscv=3distinction in handwritten asm — audit item for future ports. - Actor sprite draw is not blocked by
D_800ADC18; onlyFieldAddPrimitivesis.
How it fits together
Field
Working on it