How To Run
A hosted version is available on GitHub pages at https://hulkholden.github.io/n64js/.
Compile sources (pass --watch to automatically recompile on any change):
bun run build --watch
Run a local webserver in the root directory:
python3 -m http.server
Navigate to http://localhost:8000/.
If you want to run without installing bun, you can change the importmap in index.html to point at src/n64.js instead of build/n64.min.js.
Compatibility has improved a lot over the past few months.
As of 2023-09-23 95% of n64-systemtest tests now pass.
The areas where tests are failing are:
- 64-bit memory access (rarely/never used by roms)
- RDP (shouldn't be a problem, as n64js uses HLE)
- Floating point accuracy
The floating point issues are largely edge cases with rounding values close to the numerical limits for 32 bit floats.
Beyond the things n64-systemtest covers, the main compatibility issues I'm aware of are:
- imprecise cycle counting
Imprecise cycle counting affects some roms more than others. GoldenEye in particular seems to hang when LLE audio emulation is enabled on the RSP. I suspect this is due to the CPU running faster than it should be and causing the game to overflow audio buffers.
Graphics are rendered using high-level emulation and there are still a lot of TODOs. Many roms are playable but most have graphical issues of some kind.
- Chrome 116.0.5845.140 - I've been doing most of my development in Chrome so this is the preferred option
- Firefox 117.0 - runs, but is slower than Chrome.
- Safari 16.6 - runs, but is slower than Chrome.
- Edge - untested. Please let me know how you get on.
I've been testing on an Apple M2 Max and most roms run at full framerate most of the time. LLE audio emulation seems to be the biggest performance hit. To date I've mostly been focussed compatibility so there are likely a lot of improvements to be made here.
- cop0 instructions
- cop1 instructions
- Cycle accuracy
- Static key bindings
- Configurable bindings
- Gamepad API
- GBI0 - mostly implemented
- GBI1 - partially implemented
- GIB2 - partially immplemented
- LLE - not implemented
- HLE - not implemented
- LLE - implemented
- Persistance (via localStorage)
- Eeprom 4k
- Eeprom 16k
Here's some things I'd like to get around to:
- Fix graphics issues
- Save game import/export
- Gamepad support.