nbarkhina / N64Wasm

A web based N64 Emulator
https://www.neilb.net/n64wasm/
MIT License
624 stars 133 forks source link
emulator n64 webassembly

N64 Wasm

Thanks for checking out N64 Wasm! An N64 emulator that runs in the browser. It is a port of the excellent RetroArch ParaLLEl Core to WebAssembly. This project started because I wanted to have a well playing open-source N64 emulator designed for the web. I also wanted to learn OpenGL and this was a good way to dive in. Game compatibility is decent with a good portion of the 3D games playable and at full speed on a mid-range computer. Also works on the iPhone 13 and Xbox Series X Browser.

Supports the following features -

You can try it here: https://www.neilb.net/n64wasm/

Build Instructions

I used WSL on Windows but any Linux environment would work as well. First Install Emscripten version 2.0.7

Another way you can easily build the app is by using a preconfigured environment via GitHub Codespaces. This repo has a dev container configuration which will already have all the required build tools installed.

Hosting

This emulator supports hosting the app yourself with your own rom list. Create a folder called roms in the dist\ folder and copy them there. Then go into romlist.js and uncomment the code and populate the paths and names of your roms.


var ROMLIST = [
    {url:"roms/rom1.z64",title:"Game 1"},
    {url:"roms/rom2.v64",title:"Game 2"},
    {url:"roms/rom3.v64",title:"Game 3"},
];

This will then display a dropdown on the UI to select a game. You can also enable Cloud Save States with some additional configuration. See this README for information on how to set that up.

Windows Version

If you want to actually do debugging you will want to get the Windows version working on your machine. Debugging in WebAssembly is practically non-existant other than logging print statements. I did all of my debugging and testing using the Windows version with Visual Studio 2019 and then would compile the web version with Emscripten. Make sure you are on a computer that has a graphics card which supports OpenGL.

References