r/EmuDev • u/Senior_Contract5290 • 11h ago
Video [WIP] Porting Unreal (1998) / SurrealEngine to N64 using a custom bare-metal SDK and RSP microcode
Hey folks,
Wanted to share an early milestone on a project I’ve been working on: getting Unreal (1998) running on the Nintendo 64 on top of my own bare-metal SDK (kestrel64-sdk, built without libultra or libdragon, using Claude as an AI pair-programmer under my architecture and hardware design) and SurrealEngine.
How it's currently wired up:
- Pipeline: All geometry goes through my custom RSP microcode (
kgfx) feeding the RDP via a ring buffer—covering BSP surfaces, lightmaps, masked/translucent passes, skybox, and lit actor meshes. - Offline Baking: To avoid choking the CPU and RDRAM bus, textures are pre-baked into TMEM-friendly CI4/CI8 layouts and geometry into native display sublists offline.
- Gameplay Logic: UnrealScript runs natively for triggers, lifts, doors, HUD (via 2D blitter), and multi-map travel.
- Recent fixes: Added W-normalization (
wnorm) and tuned near/far planes to cut down distant Z-fighting/shimmer, and got the full castle flyby intro working.
Caveats & Roadmap:
- Recorded on my custom cycle-accurate emulator (kestrel64); real hardware testing comes right after trimming the memory footprint down from devkit RAM (>8 MB) to fit cleanly inside the 8 MB Expansion Pak limit.
- Currently ~15 fps before any serious optimization pass. Audio, first-person weapon rendering, and enemy animations are next on the list.
(Uses assets extracted locally from my own retail copy; no copyrighted data is shared).


