Root-caused the D397 interlaced/comb symptom on the file-select background and intro gun-barrel (first display, not round-trip): titleRenderFolderMenuBackgroundLines loads 299 one-pixel 440-byte I8 rows with gDPLoadTextureBlock(I, 8b) and samples G_TX_RENDERTILE but never emits gSPSetTile, so the tile's fmt/siz is whatever the previous screen left (CI/4b spectrum-screen leftover, D116 probe). fast3d ran the I8 bytes through import_texture_ci4 against a stale/all-zero 16-entry palette -> periodic black rows (GL texture-cache artifact, not a ground-truth dither — no ROM RLE decode needed). - gfx_pc.cpp import_texture: route the import through the source's fmt/siz when a CI/RGBA tile genuinely disagrees with an I8 8b load (mirrors the D229 case); real CI/RGBA textures untouched. - gfx_opengl.cpp: GE_D397SH env-gated shader-formula probe for the file-select gunbarrel combine (label initially written as D398, renamed to avoid the PC-Options-label finding collision). - findings: D397 row -> FIX LANDED (by-eye + PCDUMP verification owed); tail section notes the fix. CSV regenerated. Cross-ref D182(2) (same symptom family), D159/D183 (disproven leads), D229 (mirror-case precedent).
fast3d — software RSP
A C++ interpreter that consumes the Gfx display list the game builds each
frame and emits OpenGL calls, replacing the Nintendo 64's Reality Signal
Processor and Reality Display Processor.
Origin and license
This code is adapted from the Perfect Dark PC
port (port/fast3d/), which in
turn is the Ship of Harkinian /
libultraship fast3d, itself descended from
sm64-port.
LICENSE.txt in this directory (MIT, © 2020 Emill, MaikelChan) covers that
lineage. glad/ is generated by glad
(© David Herberth, MIT). GoldenEye-specific changes in this directory are
under the repository's top-level MIT license.
Files
| File | Role |
|---|---|
gfx_pc.cpp |
the RSP interpreter — matrices, lights, fog, G_TRI1/G_TRI4, vtx |
gfx_opengl.cpp |
OpenGL backend — shaders, textures, z-buffer, framebuffers |
gfx_cc.cpp |
color-combiner equation -> GLSL shader |
gfx_sdl2.cpp |
SDL2 window-manager backend |
gfx_api.h |
public API (gfx_init / gfx_run / gfx_start_frame / ...) |
gbiex.h |
GoldenEye custom GBI command definitions |
glad/ |
OpenGL loader |
GoldenEye-specific work
The PD fast3d already handles G_TRI4 (GoldenEye uses it too). The GE additions
are the custom color-combiner / render modes and the handling of GE's GBI
extension commands. rsp/graphics/gmain.s (GE's real RSP microcode, in the
repo root) is the ground truth for the exact command encodings.