N64 Dev Log

3/27/2024

first clip of demo gameplay, running in an emulator

The N64 was a childhood defining experience for me. Majora's Mask was one of my favorite games of all time. The patents and many of the licensing restrictions on the system have expired, opening the door to the potential for commercial unlicensed games. My goal is to produce a commercial N64 game, on a cartridge, in a box, on a shelf, in a store.

I do still need to consult an attorney about the minutia, but so far it looks like this is in the clear.

First I made a quick prototype game in win32 using mostly Castlevania sprites.

Next I installed libdragon, which is an open source SDK for N64 development. This avoids legal issues from using Nintendo's proprietary SDK. I quickly ported the demo game over to libdragon, and got it running in Ares, a precise low-level n64 emulator.

Having to install MSYS2 as a terminal emulator to use libdragon is a bit more than I'd like in terms of dependencies. I'd much prefer to just be able to build in cmd with a bat file. I'm avoiding the temptation right now to write my own MIPS3 toolchain, but I may ultimately have to write one anyway to get what I want out of the system.

I bought an N64 and a couple cheap cartridges to start figuring out how I might start manufacturing these. A flash cart would be a good first step to getting it running on real hardware. After that to do real cartridges I would need a ROM burner and to have some means of spoofing the CIC-NUS chip to get around the console's copy protection, otherwise it won't run. Essentially the chip takes data from the ROM, produces a check-sum, then feeds that to the console, which produces its own checksum and compares if they match.

Thankfully you can do this with cheap microcontrollers nowadays, and there's open-source firmware you can flash to an ATtiny25/45 that should be cycle accurate.

These cartridges are pretty simple. Just a ROM chip, one of the CIC-NUS lockout chip variations, a couple of resistors, and some leads/contact points. These shouldn't be terribly hard to make.

Next steps after getting the demo onto real hardware will be...producing a real game. Preferably one that smashes the limitations of what people think is possible on the system. The n64 is a much more capable machine than you'd think based on the games that were written for it, limited far more by memory throughput than by the relatively beefy graphics card (which runs at 62.5 MHz and ~100 MFLOPS). Kaze Emmanuar has great videos on optimizations that enable higher polycounts, getting results up to 5x the best games already on the system at higher framerates.

The max internal resolution the N64 supports is 640i. You could do a lot with pre-rendered sprites, maybe with normal maps to fake real-time lighting, except the N64's CPU only has 14kb of cache. I guess I'll just have to experiment and see what works.