Skip to content

V1.1.0

Choose a tag to compare

@podulator podulator released this 21 Oct 08:23
· 45 commits to main since this release

All PR's applied locally, since upstream seems inactive.

Linux (SteamDeck compatible) and MacOS builds.

Aside from build stuff, main enhancements are

Sky and Water

The sky and water were a flat fill colour (white/blue depending on GPU), because on console skyRender draws them as raw RDP triangles (skyRenderTri/skyRenderFull), which RT64 doesn't implement.

This enables the skyRender patch and draws the polygons it builds as regular vertex triangles, the same approach as the Perfect Dark PC port.

Main points:

osVirtualToPhysical must not be called from patches. N64Recomp replaces it in the runtime, and the game's copy returns garbage when called from patch code, so every matrix/vertex pointer was random (streaks, white-out while aiming). Uses OS_K0_TO_PHYSICAL like viSetupCurrentPlayerView does.
Drawn camera-relative with a rotation-only modelview, vertices scaled per polygon to fit s16.
The polygon is scaled towards the eye so it fits between the near and far planes (screen position and texturing unchanged). Night levels with short draw distances (Statue, Depot) otherwise lose most of the sky.
WaterConcavity applied as a view-space shear, matching the screen-space shift of the RDP path.
Built for a view wider than the native 4:3 one, so it covers the widescreen area.
Water keeps the game's two-tile 2-cycle blend; the non-water ground below the horizon is a flat polygon in the environment colour.
Sky helper placeholders renamed to their real symbols, prototypes fixed.

Debug Menu gating

The patched main loop (workbench_theboy.c, "ported from pd beta") re-enables GoldenEye's leftover developer debug menu, which opens when C-Up and C-Down are held together.

With the default controller mapping, C-Up and C-Down are also on the right and left triggers, so pressing both triggers opens it during normal play. Found by playing on a Steam Deck: the camera can leave first-person view ("move view") and a garbled debug overlay appears.

This keeps the menu available behind GE_DEBUG_MENU=1 and otherwise takes the retail path, which never opens it.

Test harness

A small harness for checking rendering changes without playing through the menus each time.

tools/harness.sh <out.png> [wait-seconds] [binary]
starts the game, waits, takes a window screenshot and closes it. Controlled by environment variables, and completely inert unless they're set:

GE_HARNESS_STAGE=: the launcher presses Start by itself (after a 2 s delay; starting from the constructor directly crashes) and the legal screen goes straight into that level.
GE_HARNESS_LOOK=: skips the intro (GE_HARNESS_SKIP=0 keeps it) and holds the vertical look angle.
GE_HARNESS_BUTTONS=: holds buttons on controller 1, e.g. 0x0010 (R) to aim.
GE_HARNESS_DBG=: a free integer read by recomp_get_harness_dbg() in patches, for temporary A/B switches while debugging.
The screenshot uses KDE's spectacle; happy to make that configurable if you'd like to take this. Also fine if you'd rather not have it upstream.