mirror of
https://github.com/jkdansereau/goldeneye-pc-port.git
synced 2026-10-24 00:02:45 +02:00
- bondtypes.h/model.c/chr.c/objecthandler_2.c/tex.c: PORT-guarded pointer-width and Gfx-size fixes (D43 step 2, uncommitted since prior session) - front.c cast-screen bufferRemaining 0x1C000->0x25000, initmenus.c logo buffer 0x7C000->0x85000 (D46 strict bound) - gfx_pc.cpp seg_addr: resolve raw 0x05xxxxxx via segmentPointers[5] + low24 (unmarked segmented addresses, ROM convention) - docs: D47 finding — converter contract finalized (compaction delta=R-P, accessors at 0x80090000, G_VTX GBI1 encoding, opcode-aware w1 remap rule, vertex formats, no embedded blobs, zero-vtx-array rule, staging contract, reload-hazard poolRemaining reset); HANDOFF rewritten around the remaining C implementation - build-pc/d43_convert.py (gitignored, local): reference converter + validator — full N64->PC conversion spec run on all 512 ROM files, ALL CLEAN (max D_PC=0xB7E0)
fast3d — software RSP for the GE PC port
This directory will hold the software RSP: a C++ interpreter that consumes the Gfx display list the game builds and emits OpenGL calls, bypassing the N64 RDP entirely.
Source: adapt from the Perfect Dark PC port
The PD port ships a complete, working fast3d at
perfect-dark-pc-port/perfect_dark/port/fast3d/:
| File | Role | ~Lines |
|---|---|---|
gfx_pc.cpp |
The RSP interpreter: matrices, lights, fog, tri1/tri4, vtx | 2800 |
gfx_opengl.cpp |
OpenGL backend: shaders, textures, zbuf, framebuffers | 1300 |
gfx_cc.cpp |
Color-combiner equation -> GLSL shader compiler | 60 |
gfx_sdl2.cpp |
SDL2 window-manager backend | 460 |
gfx_api.h |
Public API (gfx_init/run/start_frame/end_frame/...) |
58 |
gfx_pc.h |
Internal state (RSP struct, texture cache, combiner pool) | 60 |
gfx_rendering_api.h |
Rendering-API vtable (GL backend implements this) | 61 |
gfx_window_manager_api.h |
Window-manager vtable (SDL2 implements this) | 54 |
glad/ |
GL loader | — |
The PD fast3d already handles G_TRI4 (GE's 4-triangle command) — the PD
game uses it too. So the bulk of the RSP work is done; we adapt, not rewrite.
GE-specific work to add
G_SETTEX(opcode0xc0) — GE's custom texture-bank command (include/gbi_extension.h,gsSPUseTexture). Add a case in thegfx_pc.cppdispatch and a corresponding texture-bank selection in the GL backend. Reverse the exact semantics fromrsp/graphics/gmain.s+src/game/tex.c/initmttex.c.- Verify custom color-combiner modes —
G_CC_MODULATEIFADE,G_CC_FADE,G_CC_DECALFADE,G_CC_BLENDRGBFADEA, etc. Thegfx_cc.cppcompiler handles arbitrary CC equations; confirm each GE mode compiles to correct GLSL. - Verify the custom render mode —
G_RM_CUSTOM_AA_ZB_XLU_SURF(AA_ZB_XLU withZ_UPD). gDPLoadTLUT06/07— map onto the existingG_LOADTLUTpath.
Ground truth
rsp/graphics/gmain.s (repo root) is the real GE RSP ucode. We do not run
it on PC, but it is the authoritative reference for the exact command
encodings GE emits — use it to validate the software RSP's decoding.
Status
Empty (scaffolding). Populate during Phase 2 by adapting the PD fast3d and adding the GE-specific commands above.