3.1 KiB
Setup
This repository supports:
If you encounter any issues setting up the repo, please feel free to reach out to us on Discord.
Common
Clone the repository:
git clone https://github.com/pmret/papermario
cd papermario
Install pigment64 (our image-processing tool)
curl https://sh.rustup.rs -sSf | sh
cargo install pigment64
and make sure pigment64 is in your system path.
Unix
Install build dependencies:
./install_deps.sh
./install_compilers.sh
NOTE: On Mac, if you get an error that looks like
Error: Cannot install md5sha1sum because conflicting formulae are installed. coreutils: because both install `md5sum` and `sha1sum` binaries Please `brew unlink coreutils` before continuing.it's fine to just open
install_deps.shin a text editor, delete themd5sha1sumfrom thebrew installline, and rerun it (put it back after so you don't accidentally commit it!)
Continue onto building
WSL 2
- Install or upgrade to WSL 2 following these instructions (Ubuntu is recommended)
- Open a WSL terminal
- Run the following command:
sudo apt update && sudo apt upgrade && cd ~ - Install build dependencies:
./install_deps.sh
./install_compilers.sh
- Continue with building
If you have Visual Studio Code, you can type code . to open the repo within it.
Ctrl + J opens up a Linux terminal within VS Code.
Nix
- Install Nix
- Enable nix-command and flakes experimental features
- Clone the repository and
cdinto it - Add all baseroms to the store:
nix store add --mode flat --name papermario.us.z64 --hash-algo sha1 path/to/papermario.us.z64nix store add --mode flat --name papermario.jp.z64 --hash-algo sha1 path/to/papermario.jp.z64nix store add --mode flat --name papermario.pal.z64 --hash-algo sha1 path/to/papermario.pal.z64nix store add --mode flat --name papermario.ique.z64 --hash-algo sha1 path/to/papermario.ique.z64
- Enter a shell with
nix develop - Continue with building (ignore baserom instructions)
Building
Copy baseroms into the following places (at least 1 is required):
ver/us/baserom.z64(sha1:3837f44cda784b466c9a2d99df70d77c322b97a0)ver/jp/baserom.z64(sha1:b9cca3ff260b9ff427d981626b82f96de73586d3)ver/pal/baserom.z64(sha1:2111d39265a317414d359e35a7d971c4dfa5f9e1)ver/ique/baserom.z64(sha1:5c724685085eba796537573dd6f84aaddedc8582)
(If you're using WSL, you can enter the Linux filesystem by opening \\wsl$ in File Explorer; e.g. \\wsl$\Ubuntu\home\<your username>\papermario.)
Configure the build and extract assets from the base ROM:
./configure
Compile the game:
ninja
If you get papermario.z64: OK at the end, the build succeeded and the built rom matches the input rom!