Skip to main content

Research

Deep technical research into browser-based N64 emulation. Every claim in this project is backed by source code analysis, benchmarks, and real-world testing.


Research Areas


Key Findings Summary

1. The SIMD Gap is Real

N64Wasm's Makefile explicitly disables all SIMD with -DNOSSE. The RSP vector unit code has complete SSE2 implementations that Emscripten can compile directly to WASM SIMD. This is the single lowest-effort, highest-impact optimization available.

Evidence: mupen64plus-rsp-cxd4/vu/vu.h defines 32 vector registers as i16 VR[32][8] — exactly 128 bits. Every vector operation (VMULF, VADD, VMACF, etc.) has an #ifdef ARCH_MIN_SSE2 codepath using _mm_* intrinsics.

2. Nobody Uses Modern Web APIs

APIAvailable SinceUsed By Any Browser N64 Emu?
AudioWorklet2018No
OffscreenCanvas2019No
WASM SIMD2021No
WASM Threads2020No
WebGPU2023No
OPFS2022No
MediaRecorder2016No
Screen Wake Lock2020No
Gamepad Haptics2021No

All of these are mature, well-supported APIs. The emulation community simply hasn't adopted them yet.

3. The JIT Problem Is Solvable (Partially)

WASM can't execute dynamically generated code directly, which eliminates traditional dynarecs. But:

  • SIMD compensates for JIT loss on vector-heavy workloads (30-50% of game runtime)
  • Threading compensates by parallelizing what JIT would serialize faster
  • Late-linking (generating new WASM modules at runtime) provides a JIT-like path with higher overhead
  • Tail calls (shipped in Chrome/Safari) improve interpreter dispatch

4. WebGPU Can Port ParaLLEl-RDP (Eventually)

ParaLLEl-RDP achieves bitexact N64 rendering via Vulkan compute shaders. WebGPU supports compute shaders with similar capabilities. No one has attempted the port yet. This is our long-term moat.

5. The Best Reference Implementation Is mass-nes

A Rust NES emulator (nickmass/mass-nes) demonstrates the gold-standard browser emulator architecture:

  • SharedArrayBuffer multi-threading
  • AudioWorklet with WASM in the worklet
  • OffscreenCanvas in a Web Worker
  • Audio-driven frame pacing
  • 767KB WASM binary

This proves the architecture works. We scale it to N64.


Research Timeline

DateTopicStatus
May 2026Existing emulator analysisComplete
May 2026WASM SIMD/threading researchComplete
May 2026WebGPU feasibilityComplete
May 2026Rust/WASM architectureComplete
June 2026SIMD benchmark (fork + enable)Planned
June 2026Threading prototypePlanned
July 2026AudioWorklet integrationPlanned