Skip to content

Latest commit

 

History

History
77 lines (54 loc) · 3.23 KB

File metadata and controls

77 lines (54 loc) · 3.23 KB

Building Guide

This guide will help you build the project on your local machine. The process will require you to provide the ROM of the US version of the game.

These steps cover: preparing the ROM, running the recompiler and finally building the project.

1. Clone the Superman64Recomp Repository

This project makes use of submodules so you will need to clone the repository with the --recurse-submodules flag.

git clone --recurse-submodules
# if you forgot to clone with --recurse-submodules
# cd /path/to/cloned/repo && git submodule update --init --recursive

2. Install Dependencies

Linux

For Linux the instructions for Ubuntu are provided, but you can find the equivalent packages for your preferred distro.

# For Ubuntu, simply run:
sudo apt-get install cmake ninja-build libsdl2-dev libgtk-3-dev lld llvm clang

Windows

You will need to install Visual Studio 2022. In the setup process you'll need to select the following options and tools for installation:

  • Desktop development with C++
  • C++ Clang Compiler for Windows
  • C++ CMake tools for Windows

The other tool necessary will be make which can be installe via Chocolatey:

choco install make

3. Preparing the target ROM

Superman 64 does not contain any compressed code, so no additional steps are necessary to prepare the ROM.

Simply copy the ROM to the root of the Superman64Recomp repository with this filename:

  • baserom.us.z64

4. Generating the C code

Now that you have the required files, you must build N64Recomp and run it to generate the C code to be compiled. The building instructions can be found here. That will build the executables: N64Recomp and RSPRecomp which you should copy to the root of the Superman64Recomp repository.

After that, go back to the repository root, and run the following commands:

./N64Recomp superman.us.toml
./RSPRecomp aspMain.us.toml

5. Building the Project

Finally, you can build the project! 🚀

On Windows, you can open the repository folder with Visual Studio, and you'll be able to [build / run / debug] the project from there.

If you prefer the command line or you're on a Unix platform you can build the project using CMake:

cmake -S . -B build-cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -G Ninja -DCMAKE_BUILD_TYPE=Release # or Debug if you want to debug
cmake --build build-cmake --target Superman64Recompiled -j$(nproc) --config Release # or Debug

6. Success

Voilà! You should now have a Superman64Recompiled executable in the build directory! If you used Visual Studio this will be out/build/x64-[Configuration] and if you used the provided CMake commands then this will be build-cmake. You will need to run the executable out of the root folder of this project or copy the assets folder to the build folder to run it.

Important

There are a million other things you could be doing right now rather than playing Superman 64.

Go enjoy a walk in nature. Spend time with friends and family. Play in traffic.

You don't have to do this to yourself.