diff --git a/docs/BRIEF-B2-depot-textures.md b/docs/BRIEF-B2-depot-textures.md new file mode 100644 index 00000000..c6fcc31b --- /dev/null +++ b/docs/BRIEF-B2-depot-textures.md @@ -0,0 +1,65 @@ +# BRIEF — B2: Depot (-level_30) wrong-colour / garbage textures + +M-29 diagnostic pass. **Not fixed.** Evidence captured, leading hypothesis +recorded. Companion: `docs/BACKLOG.md` B1/B2, `docs/SMALL-FIXES.md` C-section. + +## Symptom (captured) + +`-level_30`, opening loading-bay area, `GE_PCDUMP` frames ~700-1150 +(camera panning up toward the roof): + +- The **ceiling / roof surface** renders as bright blue with a dense green + speckle and radial "light-ray" streaks emanating from a point. On N64 this + is a dark, low-contrast corrugated roof. +- Walls (green wall panels right, tan crates left) look approximately + correct — mild green tint at most. +- HUD ammo digits mirrored = D116, unrelated. + +Frames: `ppm/frame_0007..1150` this session (regenerate with +`GE_PCDUMP="700-1600:150" ./build-pc/ge007.x86_64.exe -level_30`). + +## Leading hypothesis (revised M-29): this is mostly B1, not a decode bug + +The radial-ray + sparkle pattern is the **classic grazing-angle aliasing** +signature of a high-frequency texture sampled with point/bilinear filtering +and no working LOD/mipmap chain. The ceiling is at a very shallow angle to +the camera in these frames — exactly where N64 3-point + LOD filtering +suppresses shimmer and our fast3d path does not (see BACKLOG B1: "whole game +has an interlaced/shimmering look"; `port/fast3d/gfx_pc.cpp` mip handling is +stubbed — `gfx_lod_tile_offset` / "for now just ignore smaller mips" at +~1540, and D107 notes fast3d fabricates a crop when detail textures are off). + +**Decode path was audited and looks correct:** +- `gfx_dp_load_tlut` byteswaps entries (`PD_BE16`), `palette_to_rgba32` + decodes RGBA16 5551 and IA16 correctly, `rdp.palette_fmt` is set from + `other_mode_h & (3< B3 blood-stain +converter > B5/B6 menu input > C2 (D75 models) > C4 (D148 cutscene) > +C1 (mirrored HUD — user unsure it's worth it). Full plan + +`docs/SMALL-FIXES.md` mapping in the `m29-release-push` memory. + +- **`0bd0ceec`** — aim sensitivity (SMALL-FIXES B4 / BACKLOG B3): + `Input.MouseAimSpeed` default 50→25 (overshot), new `Input.AimBand` knob + (5..40, def 20). Port-only, `ge007.ini`-tunable. Needs playtest feel check. +- **`bf5e4d3d`** — file-backed EEPROM saves (BACKLOG B5 / Phase 4): + `osEeprom*` in `port/src/libultra.c` now back `data/ge007.eep` (2 KB / + 16Kbit, lazy-load + write-through, PD pattern). `osEepromProbe` → + `EEPROM_TYPE_16K`. Verified: game writes the file (checksum @blk 0 + + save_data @blk 4), `-level_09` unregressed, persists across runs. + Campaign progress now survives quit. +- **SMALL-FIXES B1 (D74 wrap block) — DEFERRED.** The in-place one-liner + (`G_TX_CLAMP` test + `[t]` index) activates never-run code and boot-crashes + `-level_09` (0 frames). Left inert with a NOTE in `gfx_pc.cpp`. Needs the + hoist-out-of-vertex-loop rework + per-level visual check. +- **B2 (Depot wrong textures) — DIAGNOSED, not fixed.** `docs/BRIEF-B2-depot- + textures.md`. Captured `-level_30` frames: the roof/ceiling renders as + blue + green speckle + radial rays. Decode path (TLUT bswap, + `palette_to_rgba32`, `import_texture_*`) audited clean. **Leading + hypothesis: this is mostly BACKLOG B1** (grazing-angle aliasing from + missing N64 3-point filtering + a stubbed mip chain), not a decode bug. + Recommendation: do B1 (filtering + mips, PD/Nightdive reference) as its own + focused effort — highest-leverage single graphics fix, likely collapses B2 + into it. Next diagnostic = `GE_DTEX` probe of the ceiling texture params. +- **D153 reminder cost real time this session:** back-to-back `-level_09` + runs during builds boot-crash under machine thrash; only regression-test on + a settled machine (clean run = 600+ frames fine). + ## Done this session (M-28) — D150 (watch page crash) + D151 (watch text blank) - **D150** (`src/str.c`, `#ifdef PORT`, uncommitted) — user found a crash