Repository navigation
Field Control and Movement
Blizz127 edited this page Sep 21, 2026
·
1 revision
Input delivery, player-control opcode, walkmesh, collision, and verified locomotion milestones.
Fei is visibly controllable with real keyboard input on a rendered Map1 field.
-
Commits:
55a2dda,6bc1752,b9266c5(documented) -
Chain (all verified end-to-end):
Step Function / component Status Input delivery SDL → D_800AFE9Cd-pad state✅ Player-control opcode OP_UPDATE_CHARACTER(0xA7)func_8009F5F4✅ e7b0101Animation / facing func_8001F8E8non-delegating path✅ Walk-step vector func_80081F80✅ 79c7ee7Walkmesh triangle lookup func_8007B1C4✅ 55a2ddaWalkmesh movement func_8007BAC0✅ 55a2ddaCollision auto-move func_80082620+func_800825AC✅ 6bc1752On-screen result Position advances; Fei visible ✅
distrobox enter xenogears-dev -- bash -lc 'cd /home/blizz/Projects/xenogears-decomp && \
SDL_VIDEODRIVER=x11 XENO_FIELD_TEST=1 XENO_KERNEL_SEL=0 \
XENO_FIELD_MAP=1 XENO_FIELD_ENTRANCE=0 XENO_FIELD_0BB_VRAM_UPLOAD=1 \
./pc_port/build_native/xeno-port'- Fei = actor 1 (
g_PlayerActorIndex=1) - Arrows = D-pad; C = run/Cross
-
XENO_FIELD_ENTRANCE=8also works - Needs live X display for real keyboard input
- Handler:
func_8009F5F4insrc/field/main/misc6.c - Retail gate:
scriptFlags(offset 0x00) bit0x4000= player-controlled -
Bug found: port originally checked
flags(offset 0x04) instead ofscriptFlags; player branch was missing -
Fix committed:
e7b0101— player branch from retail asm; direction from d-pad nibble → LUT → camera angle → facing
Synthetic injection via D_800AFE9C:
| Value | Direction |
|---|---|
0x1000 |
+X |
0x2000 |
+Z |
0x4000 |
−X |
0x8000 |
−Z |
| Function | Role | Commit |
|---|---|---|
func_80081F80 |
Walk-step vector from facing/input | 79c7ee7 |
func_8007B1C4 |
Walkmesh triangle lookup | 55a2dda |
func_8007BAC0 |
Walkmesh movement resolution | 55a2dda |
func_80082620 |
Collision-aware auto-move (slope, follow, work-object paths) | 6bc1752 |
func_800825AC |
2D distance between field actors | 6bc1752 |
-
XENO_FIELD_ENTRANCE=NwritesD_8006F954→ field script var 2 → spawn table index - Valid documented entrances: 0, 8, 9 (among others in spawn table)
- Invalid: entrances 6, 10 — out-of-range walkmeshId; crash
-
func_80079288— random encounter management (177 insns) - Called from
OP_UPDATE_CHARACTERduring held input after exit op54 - Generated stub returns normally; not the missing map-transition step
- Do not port full battle path for transition hunt (handoff classification)
| Limitation | Notes |
|---|---|
| Map0 default route | Black screen without XENO_FIELD_MAP — separate issue |
| Synthetic vs real input | Exit-route proofs use gdb injection; milestone uses real keyboard |
func_80079288 stub noise |
Encounter bookkeeping fires per held-input frame |
| Battle movement |
XENO_KERNEL_SEL=1 hits func_8001B6C4 stub immediately |
| Walkmesh navigation to exit boxes | Some zones reachable; the Map1->Map15 transition chain is verified via the zone-5 reload probe (July 9); the natural door path is still gated by the rand()/var0x0408 issue (see Current Status) |
- Zone 11 reachable from entrance 9 with documented d-pad route
- Zone 8: X/Z reachable but height gate fails at
y=-1,y0=-106 - Zone 9: height-valid; reachable with longer route (frame 533 proof)
- Wall-stuck paths documented for some entrance/heading combinations
How it fits together
Field
Working on it