You can install c-of-time on macOS using the following methods. The steps detailed in this guide were tested on macOS Sonoma (14.2).
- Method 1: Homebrew (recommended)
- Method 2: Downloading the toolchain from ARM
- Other methods (advanced)
Homebrew is a package manager for macOS that allows you to install the required tools with a few commands. This is the recommended method for installing c-of-time on macOS.
- Open the Terminal app. You can find it in the Launchpad in the "Other" folder.
- Install the command line tools for Xcode by running
xcode-select --install
in the terminal. Confirm the installation by clicking "Install" in the popup window. - Once the installation is finished, you can proceed with installing Homebrew. Refer to the section "Install Homebrew" of the Homebrew website for instructions (you will have to execute a command in the terminal). After the installation is finished, make sure to follow the instructions printed by Homebrew to add the Homebrew directory to your
PATH
environment variable. - Install the ARM toolchain by running
brew install --cask gcc-arm-embedded
in the terminal. You will need to enter your password during the installation. - Install Python dependencies:
pip3 install pyyaml ndspy
- Navigate to the directory where you want to install c-of-time. You can use
cd
to change the directory andls
to list the contents of the current directory. For example, if you want to install c-of-time to/Users/YourName/Documents/c-of-time
, runcd /Users/YourName/Documents
.- Note: You can also use the Finder to navigate to the directory where you want to install c-of-time. Right-click the name of the directory, hold the Option key and select "Copy [directory name] as Pathname". Then, run
cd
in the terminal and paste the path by pressing Command+V.
- Note: You can also use the Finder to navigate to the directory where you want to install c-of-time. Right-click the name of the directory, hold the Option key and select "Copy [directory name] as Pathname". Then, run
- Download this repository by running
git clone --recursive https://github.com/SkyTemple/c-of-time.git
in the terminal. c-of-time will be downloaded in a folder calledc-of-time
inside the current directory. - Enter the
c-of-time
directory withcd c-of-time
. - Copy the ROM you have prepared into the
c-of-time
directory and rename it torom.nds
.- US ROM offsets are used by default. If you're using a EU or JP ROM, change the
REGION
variable inMakefile
toEU
orJP
accordingly.
- US ROM offsets are used by default. If you're using a EU or JP ROM, change the
- Run
make headers
to add aliases and documentation comments to headers for increased compatibility. - Run
make patch
to build the project. The output ROM will be saved asout.nds
by default.
If you are encountering errors with armips, try the following:
- Navigate to the folder
c-of-time/bin/armips
in Finder - Right-click
armips-mac-arm64
if you're on Apple Silicon orarmips-mac-x64
if you're on an Intel-based Mac, click "Open" and confirm
You can install c-of-time on macOS by downloading the toolchain from ARM's website. This method is slightly more involved, but it's more lightweight and doesn't require you to install Homebrew.
- Open the Terminal app. You can find it in the Launchpad in the "Other" folder.
- Install the command line tools for Xcode by running
xcode-select --install
in the terminal. Confirm the installation by clicking "Install" in the popup window. - Once the installation is finished, you can proceed with downloading the toolchain. Download the latest version of the toolchain from ARM's website.
- If you're using an Apple Silicon Mac, download the "Apple Silicon hosted" version. Otherwise, use the "x86_64 hosted" version.
- You will need the "AArch32 bare-metal target" version, not the "AArch64 bare-metal target" version.
- Download and open the
.pkg
file. Follow the instructions in the installer.
- Run the command
export VERSION=
in the terminal, followed by the version number of the toolchain you just installed. This version number should match the folder name of the toolchain in/Applications/ArmGNUToolchain
. For example, if you installed version 13.2.rel1, runexport VERSION=13.2.rel1
. Then, runecho 'export PATH="/Applications/ArmGNUToolchain/$VERSION/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
to add the toolchain to yourPATH
environment variable.- If you're using another shell than zsh (the default on macOS), replace
~/.zshrc
with the path to your shell's configuration file. For example, if you're using bash, replace~/.zshrc
with~/.bashrc
.
- If you're using another shell than zsh (the default on macOS), replace
- You can now continue with the steps 5-9 of the Homebrew method above.
- devkitpro provides a macOS installer for a custom toolchain. Follow the instructions on their website to install it and make sure to add the toolchain to your
PATH
environment variable.