NEURAL N64

A Nintendo 64 whose logic is neural networks โ€” verified against real hardware

The R4300i CPU, the IEEE-754 FPU, the RSP vector unit (including the console's silicon reciprocal ROM, reborn as a 512-case verified net), and the RDP rasterizer โ€” every unit trained on its complete input domain, exact at N-of-N, validated by QEMU fuzzing and krom's hardware test ROMs. It boots and plays real N64 homebrew โ€” live, in your browser.

๐Ÿ™ Homebrew by James Lambert

MegaTextures, Junk Runner 64, and Portal 64 are all the work of James Lambert (github.com/lambertjamesd, YouTube). This Space exists because of his homebrew โ€” none of this work could be shown publicly without his open N64 projects. Thank you, James.

๐ŸŽฎ MegaTextures โ€” rendered live on the neural N64

Press โป Power On and the neural N64 boots MegaTextures (a libultra homebrew 3D demo by James Lambert) and renders its streamed-texture chapel scene in a few seconds โ€” every pixel produced by neural-network logic. A C orchestrator drives the R4300i CPU, the RSP vector unit, and the RDP rasterizer, all bit-identical to the verified neural cores (only the I/O bus stays in Python). Watch the live execution trace below count the neural work as the scene streams in.

Press โป Power On to boot MegaTextures.

๐Ÿง  Where are the neural networks?

This isn't an emulator with an ML feature bolted on โ€” the console's logic itself is neural networks. Every arithmetic & logic operation the N64 performs is computed by a small trained network, verified to reproduce the exact hardware result at N-of-N (every possible input checked) before it's allowed in:

  • R4300i CPU โ€” the integer datapath is composed from verified neural slice nets: an 8-bit add-with-carry net (ADD8C), logic-gate nets (AND8/OR8/XOR8/NOR8), a 1-bit shift net, and partial-product nets for multiply. 32- and 64-bit add / sub / shift / multiply are built by wiring these verified slices together and rippling carries โ€” the wide ops are exact because every slice is exact.
  • FPU (COP1) โ€” the IEEE-754 datapath (convert / round / compare) realized the same slice-and-verify way.
  • RSP vector unit โ€” the SIMD lanes, including the N64's silicon reciprocal / inverse-sqrt ROM reborn as a single 512-case verified net.
  • Instruction decode โ€” opcode / funct / regimm are three tiny enumerable tables learned as classifier nets.

Each net is trained on its entire input domain and kept only if it scores 100% against the truth table; correctness is then cross-checked with QEMU fuzzing and krom's real-hardware test ROMs (run them yourself below). For a responsive public demo the live run takes native fast paths proven bit-identical to the verified nets โ€” so what you see is exactly what the neural units compute, just fast enough to render in real time.

๐ŸŒ€ How a fully-neural N64 ended up running Portal

Portal 64 is a real fan-made demake by James Lambert, built on Nintendo's libultra SDK. Getting it from a black screen to a walkable test chamber on a machine made of neural nets took a long chain of exact fixes โ€” every bug was in the wiring (tables, masks, timing), never in a verified unit:

  1. libultra boots. The OS came alive once two gates were satisfied โ€” the osMemSize Expansion-Pak check (HLE boot writes 8 MB to 0x318/0x3F0) and GCC's TEQ divide-guards as real trapping instructions.
  2. The frame loop runs. Cause.IP2โ€“7 had to be live interrupt lines (not latched), MTC0-to-Compare must ack the timer, and MI_MODE must clear the DP interrupt โ€” otherwise the idle thread spins forever.
  3. The RSP wakes up. At ~frame 564 the game DMAs Nintendo's F3DEX2 microcode into the RSP, which runs it on the verified vector unit with zero errors. RSPโ†’RDP commands flow over the XBUS FIFO; the CPU pumps it.
  4. Pixels. The RDP grew a TMEM + texture pipeline (LOAD_TILE/BLOCK with odd-line swizzle, RGBA16/IA/CI formats, per-tile clamp/mirror/mask, perspective-correct triangles with a Z-buffer). The Valve intro, then the 3D menu chamber, rendered clean.
  5. The menu text. The menu drew its glyphs as IA4 texrects whose shape lives in the alpha channel; we were writing white-on-white. Adding the combiner's alpha output + a 1-cycle alpha-blend made PORTAL / NEW GAME / LOAD GAME / OPTIONS legible.
  6. Loading in. Start skips the intro, A picks NEW GAME, A confirms Testchamber 00 โ€” then the level loads (~1650 frames of DMA + scene build) and the first-person chamber renders. The player becomes controllable ~180 frames later; the stick then drives the camera. We're in the game.
  7. Speed. Native fast paths for the hot RSP vector ops (proven bit-identical to the verified slices over 250k cases) gave the multiply-heavy frames up to a 25ร— speedup โ€” enough to make all of the above iterable, and this very Space possible.

What it looks like

๐ŸŽ› Run a real N64 hardware test, live

These ROMs were written by the emulator community to validate against real consoles. They run here on the neural machine and draw their own PASS/FAIL verdicts.

test ROM