forked from Ports/goldeneye-pc-port
Docs: sync all state trackers to D70-D72 (two live threads: D72.3 logo pixels, D69 stage load)
- PCPortResearch.md: G status + H handoff now list D70-D72, the open D72.3 bug with its next diagnostic step, and the env-gated visual-debug tooling; stale 'current frontier (post-D31)' note in the plan marked done - AGENTS.md: phase status carries the D70-D72 summary; D69 stays the milestone blocker - HANDOFF.md: title reflects both threads
This commit is contained in:
1 parent
8ed411d3f1
commit
5f4e90ddfc
3 files changed
+43
-25
No files matched your search
@@ -48,6 +48,6 @@ Run `/linkcheck` for this sweep. Record new findings in `docs/PCPortResearch.md`
|
||||
- **Compile+link milestone:** all ~235 TUs compile and `ge007.x86_64.exe` links clean (`ninja ge007 -k 0`, 236/236). Findings D7–D17 in `docs/PCPortResearch.md` §11; asset stubs in `port/src/assetstubs.c`, fast3d no-ops in `port/src/gfxstub.c` (delete when real fast3d lands).
|
||||
- **Phase 1 (boot to window):** done — ROM loads/validates/maps at cart base 0x10000000 (`romdata.c`), SDL2 window + GL clear loop (`video.c`), absolute asset symbols from `scripts/gen_romassets.py` → `port/src/romassets_<r>.s` (findings D18–D23).
|
||||
- **Phase 1.5 (boot to first frame):** DONE — boot chain complete AND real frames render (`[NOTE] frame N rendered in … us`). D34–D42 closed the blockers on top of D31–D33: ANIM_DATA lvalues, music seq-table ABI+endianness, music-heap sizing, libaudio bank-tree re-layout, implicit-declaration prototype shim (D38), Globalimagetable rebasing + true segment size (D39), ModelHitEntry pool sizing (D40), cross-thread GL context release (D41), rsp task-settings toggle (D42). ROM dump verified against the No-Intro good dump (byte-identical, header CRCs re-checked — `tools_pc/romverify.c`).
|
||||
- **Phase 2 (rendering):** IN PROGRESS — fast3d integrated + real frames render. **Plan B EXECUTED (D50, committed):** all 512 NTSC model files converted offline by `tools_pc/d43_emit.py` → `data/pcmodels-ntsc-final/pcmodels.bin` + manifest.csv (single concatenated RZ image; regenerate per region with the script — sidecars are gitignored), served through the existing load path via a port-layer table patch (`port/src/pcmodels.c`, romdata cart-extension, one-shot `pcmodelsPatchTable()` + poolRemaining reset hook in `load_object_fill_header`); runtime C fixups for language-bank BE offset tables + font re-layout (D50.3/D50.4); legal-screen UB seed (D50.5); **D50.6 fixed the first model-render crash** — `texCopyGdls` copied only w0 of each 16-byte Gfx slot on PC (the union's trailing `long long` is 8 bytes), leaving stale mempool w1s in the compacted GDLs; byte-proven against PlegalpageZ, fixed with a full-slot copy under #ifdef PORT. Model GDLs now execute to completion (PlegalpageZ sub-DLs). **D51 RESOLVED** (font `pixeldata` fixup wrote the pointer at the wrong offsets — frame-5 `import_texture_i8` crash gone; GE opcode space decoded along the way, G_TEXRECT=0xE4/0xE5 non-F3DEX numbering), **D52 RESOLVED** (`osGetCount` now advances at the N64 RSP counter rate ≈ 46.5525 ticks/µs — fixed the non-deterministic post-frame-2 hang), **D53 RESOLVED** (model RW-data pool addressing: D53.1 `Model.datas` word-stride → `u32 *` under PORT + casts; D53.2 ModelSlot/AnimModelSlot re-laid on top of the PC struct Model — in-use@0x10 / pool@0x20, slot size = sizeof(Model) = 0xE8 — plus PORT-guarded heap-fallback bumps in model.c), **D54 RESOLVED** (cseq ALCMidiHdr BE header: port-layer `romdataFixupCseq` bswap32 of the first 17 u32s, called from music.c after each decompress), **D54b RESOLVED** (synth param slots sized for ALStartParamAlt = 0x28 in synthesizer.c alSynInit under PORT), **D55 RESOLVED** (RLE folder-menu background BE w/h header: bswap32 of the first word at `(u32 *)&unknown2` at cart-map time in romdataInit, guarded). Build GREEN; game boots, plays intro music, renders through logo/gun-barrel, instantiates Brosnan, and executes the gun-barrel hole DL clean to ENDDL. **D56 RESOLVED** (watch Model/RW-pool raw offsets: field-name Model access + static 0xC8-byte pool under PORT in bondview2.c), **D57 RESOLVED** (pointer-grown rwdata records overflowed N64-sized spare pools — Brosnan PC numRecords 153 > 140: capacities grown in initunk_005520.c + dynamic slot+pool fallback in model.c), **D58 RESOLVED** (gun-barrel DL: vertex-pointer K0 idiom rebuilt via `OS_K0_TO_PHYSICAL(…) | 0x80000000` in title.c + DL reserve 0x100→0x200 because `sizeof(Gfx)` is 16 on PC). **D59–D68 RESOLVED (committed):** the "GL DLL" crash was D64's unbounded blood-RLE write (sentinel section-adjacency lost on PC) clobbering the gun-barrel sub-DL; then D60–D62 (DMA target validation, OSMesgQueue layout), D65/D65b (HEADS/BODIES enum signed sentinels under PORT), D66 (romCopyAligned + ramrom replay 64-bit pointer width), D67 (struct image_entry N64 layout), **D68 (Globalimagetable BE→LE fixup** — `port/src/gimgfixup.c` bswaps IMAGESEG Gfx w1 words + sImageTableEntry.index after texReset's romCopy; compiled globalDL shadows synced for explosion.c). The game now renders the **entire ~3.5-minute intro** (logo → gun barrel w/ Brosnan → cast) at ~59 fps. **Current blocker D69:** `load_bg_file` (bg.c:830) faults on first stage load — BG-file headers/records are N64 big-endian segment-0x0F offsets, read LE on PC; the bg `.seg` + `Tbg_*_stanZ` format work is next (decode from bg.c/stan.c → offline sidecar conversion per the D43 pattern or runtime port-layer fixup; PD `preprocess/filebg.c` is approach-reference only — its BG format differs). Details in PCPortResearch.md §F/D59–D69. Recurring sub-task: ABI/layout fixes per the D32 procedure (§H) as more asset types are first touched (PD's `preprocess/` module already solves most of them; prefer the offline pattern for format work — D48; full-struct Gfx copies on PC — D50.6; audit struct type-puns after pointer-width changes — D53.2; raw byte offsets into pointer-containing structs shift on PC — D56; N64-sized reservations must be re-checked against 16-byte Gfx/Vtx widths — D58).
|
||||
- **Phase 2 (rendering):** IN PROGRESS — fast3d integrated + real frames render. **Plan B EXECUTED (D50, committed):** all 512 NTSC model files converted offline by `tools_pc/d43_emit.py` → `data/pcmodels-ntsc-final/pcmodels.bin` + manifest.csv (single concatenated RZ image; regenerate per region with the script — sidecars are gitignored), served through the existing load path via a port-layer table patch (`port/src/pcmodels.c`, romdata cart-extension, one-shot `pcmodelsPatchTable()` + poolRemaining reset hook in `load_object_fill_header`); runtime C fixups for language-bank BE offset tables + font re-layout (D50.3/D50.4); legal-screen UB seed (D50.5); **D50.6 fixed the first model-render crash** — `texCopyGdls` copied only w0 of each 16-byte Gfx slot on PC (the union's trailing `long long` is 8 bytes), leaving stale mempool w1s in the compacted GDLs; byte-proven against PlegalpageZ, fixed with a full-slot copy under #ifdef PORT. Model GDLs now execute to completion (PlegalpageZ sub-DLs). **D51 RESOLVED** (font `pixeldata` fixup wrote the pointer at the wrong offsets — frame-5 `import_texture_i8` crash gone; GE opcode space decoded along the way, G_TEXRECT=0xE4/0xE5 non-F3DEX numbering), **D52 RESOLVED** (`osGetCount` now advances at the N64 RSP counter rate ≈ 46.5525 ticks/µs — fixed the non-deterministic post-frame-2 hang), **D53 RESOLVED** (model RW-data pool addressing: D53.1 `Model.datas` word-stride → `u32 *` under PORT + casts; D53.2 ModelSlot/AnimModelSlot re-laid on top of the PC struct Model — in-use@0x10 / pool@0x20, slot size = sizeof(Model) = 0xE8 — plus PORT-guarded heap-fallback bumps in model.c), **D54 RESOLVED** (cseq ALCMidiHdr BE header: port-layer `romdataFixupCseq` bswap32 of the first 17 u32s, called from music.c after each decompress), **D54b RESOLVED** (synth param slots sized for ALStartParamAlt = 0x28 in synthesizer.c alSynInit under PORT), **D55 RESOLVED** (RLE folder-menu background BE w/h header: bswap32 of the first word at `(u32 *)&unknown2` at cart-map time in romdataInit, guarded). Build GREEN; game boots, plays intro music, renders through logo/gun-barrel, instantiates Brosnan, and executes the gun-barrel hole DL clean to ENDDL. **D56 RESOLVED** (watch Model/RW-pool raw offsets: field-name Model access + static 0xC8-byte pool under PORT in bondview2.c), **D57 RESOLVED** (pointer-grown rwdata records overflowed N64-sized spare pools — Brosnan PC numRecords 153 > 140: capacities grown in initunk_005520.c + dynamic slot+pool fallback in model.c), **D58 RESOLVED** (gun-barrel DL: vertex-pointer K0 idiom rebuilt via `OS_K0_TO_PHYSICAL(…) | 0x80000000` in title.c + DL reserve 0x100→0x200 because `sizeof(Gfx)` is 16 on PC). **D59–D68 RESOLVED (committed):** the "GL DLL" crash was D64's unbounded blood-RLE write (sentinel section-adjacency lost on PC) clobbering the gun-barrel sub-DL; then D60–D62 (DMA target validation, OSMesgQueue layout), D65/D65b (HEADS/BODIES enum signed sentinels under PORT), D66 (romCopyAligned + ramrom replay 64-bit pointer width), D67 (struct image_entry N64 layout), **D68 (Globalimagetable BE→LE fixup** — `port/src/gimgfixup.c` bswaps IMAGESEG Gfx w1 words + sImageTableEntry.index after texReset's romCopy; compiled globalDL shadows synced for explosion.c). The game now renders the **entire ~3.5-minute intro** (logo → gun barrel w/ Brosnan → cast) at ~59 fps. **Current blocker D69:** `load_bg_file` (bg.c:830) faults on first stage load — BG-file headers/records are N64 big-endian segment-0x0F offsets, read LE on PC; the bg `.seg` + `Tbg_*_stanZ` format work is next (decode from bg.c/stan.c → offline sidecar conversion per the D43 pattern or runtime port-layer fixup; PD `preprocess/filebg.c` is approach-reference only — its BG format differs). **D70–D72 (intro-logo pixels):** D70 env-gated PPM frame capture (`GE_PCDUMP` → `./ppm/`, gitignored); **D71 RESOLVED** — C-array texture sources (the four rarewarelogo.c RGBA16 images) byte-swapped on LE PC → pink/green logo; port-layer per-source bswap in `import_texture`; **D72 RESOLVED** the UV path (GE always uses authored `tc[]` UVs — no G_TT_BASE/CLAMP anywhere; `lookat_enabled` defaults false since N64 boots with RSP mem zeroed) but **D72.3 OPEN**: all logo triangles project off-screen and a flat dark-blue checkerboard triangle rasterizes instead (identity pending via `GE_DBGUV`/`GE_DBGTALL` traces); D69 remains the milestone blocker. Committed through D72. Recurring sub-task: ABI/layout fixes per the D32 procedure (§H) as more asset types are first touched (PD's `preprocess/` module already solves most of them; prefer the offline pattern for format work — D48; full-struct Gfx copies on PC — D50.6; audit struct type-puns after pointer-width changes — D53.2; raw byte offsets into pointer-containing structs shift on PC — D56; N64-sized reservations must be re-checked against 16-byte Gfx/Vtx widths — D58).
|
||||
- **Phase 3 (audio + input):** libaudio → SDL — largely copy-and-adapt from PD (`mixer.c` 722 lines vs our 31-line stub; `input.c` SDL_GameController backend; §2.4); decide the ASP strategy (C2: `aspMain*` dummies in `ucode.c`).
|
||||
- **Phase 4 (saves + polish):** file-backed EEPROM — build on PD's `fs.c` (file-backed save dir); PFS/motor already no-op stubs.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# Handoff brief — GoldenEye 007 PC port (Phase 2: Session H — D69 BG/stan stage loading)
|
||||
# Handoff brief — GoldenEye 007 PC port (Phase 2: Session H — D72.3 intro-logo pixels + D69 BG/stan stage loading)
|
||||
|
||||
_Paste-ready briefing. Authoritative detail lives in `AGENTS.md` and
|
||||
`docs/PCPortResearch.md` (§F/D59–D69 findings, §G status, §H procedure); this
|
||||
|
||||
+41
-23
@@ -363,7 +363,7 @@ sync/flush) is shared.
|
||||
|
||||
### Phase 1.5 — Boot to first frame (ABI reconciliation)
|
||||
* Get mainThread through all of `bossInitMainthreadData()` → `bossEntry()` →
|
||||
`bossMainloop()` and render frame 1. This is the current frontier (post-D31).
|
||||
`bossMainloop()` and render frame 1. (Done — D34–D58; see §G.)
|
||||
* Recurring mechanism: **ROM-data struct ABI/layout fixes** (the D32 pattern) —
|
||||
a 32-bit-pointer struct read as a 64-bit-pointer struct misaligns; convert
|
||||
embedded pointer fields to `u32` + cast at use sites (PD ground truth), then
|
||||
@@ -2217,38 +2217,56 @@ sImageTableEntry.index; compiled globalDL shadows synced after texLoad).
|
||||
The game now boots, plays the intro music, and renders the **entire ~3.5-
|
||||
minute intro** (Nintendo logo → gun barrel with Brosnan → cast screen) at
|
||||
~59 fps, then crashes in `load_bg_file` on the first stage load —
|
||||
**D69, the current blocker**: BG-file headers are N64 big-endian
|
||||
**D69, the milestone blocker**: BG-file headers are N64 big-endian
|
||||
(segment-0x0F offsets) and PC reads them LE. Details in §F/D59–D69.
|
||||
|
||||
**Committed at D68** (this milestone): D51–D68 fixes + TEMP diagnostics
|
||||
still present (strip list in HANDOFF Task 3); build is GREEN.
|
||||
**D70–D72 (intro-logo pixel work):** D70 env-gated PPM frame capture
|
||||
(`GE_PCDUMP` → `./ppm/`) for numerical visual debugging; **D71 resolved** —
|
||||
C-array texture sources (the four rarewarelogo.c RGBA16 images) were
|
||||
byte-swapped on LE PC (pink/green logo); port-layer per-source bswap in
|
||||
`import_texture`. **D72 resolved** the UV path (GE always uses authored tc[]
|
||||
UVs; `lookat_enabled` defaults false) but **D72.3 is OPEN**: all logo
|
||||
triangles project off-screen and a flat dark-blue checkerboard triangle
|
||||
rasterizes instead — identity pending (GE_DBGUV/GE_DBGTALL traces).
|
||||
|
||||
**Committed through D72**: D51–D72 fixes + TEMP diagnostics still present
|
||||
(strip list in HANDOFF Task 3); build is GREEN.
|
||||
|
||||
### H. Handoff & plan (current session)
|
||||
|
||||
Full paste-ready brief: **docs/HANDOFF.md** (rewritten for the D69 session —
|
||||
BG/stan format work). Immediate task: reverse-engineer GE's bg .seg +
|
||||
Tbg_*_stanZ formats from the decompiled consumers (bg.c, stan.c), then
|
||||
choose offline sidecar conversion (Plan-B pattern, D43) vs runtime port-layer
|
||||
fixup; PD's preprocess/filebg.c is a reference for the *approach* only — its
|
||||
BG format is different (zipped multi-section).
|
||||
Full paste-ready brief: **docs/HANDOFF.md** (two live threads: D72.3
|
||||
intro-logo pixels, then D69 BG/stan stage loading). For D69:
|
||||
reverse-engineer GE's bg .seg + Tbg_*_stanZ formats from the decompiled
|
||||
consumers (bg.c, stan.c), then choose offline sidecar conversion (Plan-B
|
||||
pattern, D43) vs runtime port-layer fixup; PD's preprocess/filebg.c is a
|
||||
reference for the *approach* only — its BG format is different (zipped
|
||||
multi-section).
|
||||
Summary:
|
||||
|
||||
**State.** D50–D68 all resolved and verified; committed at the D68
|
||||
milestone. The game boots, plays intro music, and renders the entire
|
||||
~3.5-minute intro (logo → gun barrel with Brosnan → cast screen) at ~59
|
||||
fps. TEMP diagnostics from the D51–D69 sessions are still in the tree
|
||||
(strip list in HANDOFF Task 3). Build is GREEN.
|
||||
**State.** D50–D72 resolved and verified (except D72.3, open); committed
|
||||
through the D72 milestone. The game boots, plays intro music, and renders
|
||||
the entire ~3.5-minute intro (logo → gun barrel with Brosnan → cast screen)
|
||||
at ~59 fps — logo lettering now gold-on-blue (D71/D72) but not yet visible
|
||||
(D72.3). TEMP diagnostics from the D51–D72 sessions are still in the tree
|
||||
(strip list in HANDOFF Task 3); visual-debug tooling: `GE_PCDUMP` frame
|
||||
capture, `GE_DBGUV`/`GE_DBGTALL` UV+triangle traces. Build is GREEN.
|
||||
|
||||
**Current blocker — D69.** `load_bg_file` (src/game/bg.c:830) faults on
|
||||
the first stage load (BUNKER1): BG-file header words are N64 big-endian
|
||||
segment-0x0F offsets; PC reads them LE, so the room-fileposition-list
|
||||
pointer lands ~5 MB past the stack header buffer. Full analysis +
|
||||
strategy options in §F/D69.
|
||||
**Thread 1 — D72.3 (intro logo).** All logo triangles project off-screen
|
||||
(clip x=y≈−1.6e11, w<0) while a flat dark-blue (0,0,64) checkerboard
|
||||
triangle rasterizes in the lower screen; matrix-format mismatches ruled out
|
||||
(§F/D72). Next: identify the checkerboard's triangle via GE_DBGTALL, then
|
||||
verify MP matrix + viewport at logo time (title.c load_display_rare_logo).
|
||||
|
||||
**Thread 2 — D69 (milestone blocker).** `load_bg_file` (src/game/bg.c:830)
|
||||
faults on the first stage load (BUNKER1): BG-file header words are N64
|
||||
big-endian segment-0x0F offsets; PC reads them LE, so the
|
||||
room-fileposition-list pointer lands ~5 MB past the stack header buffer.
|
||||
Full analysis + strategy options in §F/D69.
|
||||
|
||||
**After D69:** get a stage to load + render (bg .seg + Tbg_*_stanZ format
|
||||
work — see §H immediate task), then continue the diagnose→fix→verify loop
|
||||
through gameplay; strip TEMP diagnostics at each milestone; pixel-assert
|
||||
soak (PPM dump + tools_pc/pixcount.py) once a stage is stable.
|
||||
work), then continue the diagnose→fix→verify loop through gameplay; strip
|
||||
TEMP diagnostics at each milestone; pixel-assert soak (PPM dump +
|
||||
tools_pc/pixcount.py) once a stage is stable.
|
||||
|
||||
**D32 repeatable fix procedure** (apply to any ROM-serialized struct that faults
|
||||
on a pointer-field read):
|
||||
|
||||
Reference in new issue
Block a user