experimental low-level n64 emulator
Go to file
2021-05-08 18:09:55 -04:00
.github/workflows Update build.yml 2021-05-08 18:09:55 -04:00
cmake/modules Statically link capstone if possible 2021-03-13 11:26:02 -05:00
docs Hyphens 2021-04-26 09:00:25 -04:00
screenshots Add screenshot 2021-01-23 12:59:10 -05:00
src disable some stuff on Windows 2021-05-08 17:14:47 -04:00
tests disable some stuff on Windows 2021-05-08 17:14:47 -04:00
.gitattributes .h files are C 2020-06-17 17:09:16 -04:00
.gitignore ignore remaining build dirs 2020-11-29 12:07:14 -05:00
.gitmodules Use https url for parallel-rdp submodule 2021-02-12 17:28:17 -05:00
CMakeLists.txt Don't set C and CXX standards 2021-03-27 10:15:43 -04:00
README.md Update README.md 2021-02-23 17:21:53 -05:00

n64

Experimental low-level N64 emulator written in C and a bit of C++.

Still under heavy development and not ready for prime time. Compatibility is not high and performance is not great (yet.)

The goals of this project are to create a low-level emulator with good compatibility, while learning a lot along the way.

Build Documentation Status

Mario Face

Links

Goals

  • Reasonably accurate low-level emulation
  • Decent performance. Because this is a low-level emulator, it will never be as fast as high-level emulators.
  • Reasonable amount of automated testing

Features

  • Keyboard and gamepad support
  • GDB stub for debugging

Limitations & TODOs

  • Only Linux is currently supported, as I use Linux-specific features. This is planned to be fixed.
  • The dynamic recompiler currently only supports x86_64 with the System-V calling convention. Microsoft's x86_64 calling convention, as well as aarch64 support is planned.
  • Only little-endian host platforms are planned to be supported.
  • Only gcc and clang will be supported. I unapologetically use extensions like case ranges and binary literals.
  • Only software that uses NTSC video modes is currently supported. This is planned to be fixed.

Building

Currently, only Linux on x86_64 is supported.

  1. Install dependencies: SDL2, Vulkan, and optionally Capstone
  2. Run the following commands:
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make

Running

Run with no parameters to use the default settings and load your ROM using the GUI, or run with options:

./n64 [OPTION]... [FILE]
n64, a dgb n64 emulator

  -v, --verbose             enables verbose output, repeat up to 4 times for more verbosity
  -h, --help                Display this help message
  -i, --interpreter         Force the use of the interpreter
  -r, --rdp                 Load RDP plugin (Mupen64Plus compatible) - note: disables UI and requires ROM to be passed on the command line!
  -m, --movie               Load movie (Mupen64Plus .m64 format)
  -p, --pif                 Load PIF ROM

https://github.com/Dillonb/n64

Progress

CPU

An interpreter and a basic dynamic recompiler are available, able to be switched at launch time with a command line flag.

The dynamic recompiler currently only supports the System-V calling convention.

RSP

Reasonably complete, enough for most games to run.

Hardware-verified over the EverDrive 64's USB port using rsp-recorder.

Still greatly in need of optimization.

RDP

Very early stage. parallel-rdp by Themaister is integrated to provide RDP functionality in the meantime.

Credits

Libraries Used

  • DynASM as the emitter for the dynamic recompiler
  • SDL2 for graphics, audio, and input
  • Capstone as a MIPS disassembler for debugging
  • parallel-rdp as the RDP until I write my own
  • Dear Imgui for the GUI