Nintendo 64 Development
The N64 Development Tools is a collection of tools deisgned to compile and test code for the Nintendo 64.
Building N64 Development Tools for macOS
Getting these tools working is fairly simple, at least when
following the README in the repository. However, macOS is weird.
install-deps script does actually work on macOS! Uses
brew, and downloads all the dependencies
without issue. The comment about replacing
is needed, just symlink
sed in the brew bin folder.
Configuring the package also works fine, although the recommended
/opt/n64 gave me a permission denied error late into
the process, even as root. When debugging I ultimately decided to
test in my home folder (
~/n64). Installing the toolchain also
worked fine, when going through the process initially it wasn’t
happy because I can’t follow directions and forgot to symlink
Compiling and installing the programs was the hardest part.
make, it would stop every second to say it
couldn’t find a particular function, or it couldn’t find a
specific include. Find the Makefile complaining, then specify
the includes and libraries in the appropiate places.
-I for header folders,
-L for library folders, and
-i for specific files (although if I remember correctly
this isn’t needed to fix any of the problems). These files
were downloaded with
brew, so it’s time to go exploring
through the Cellar. It’s mostly self-explanatory, make sure
the header paths line up with what’s given, and if make defines
are messed up manually specify the definition (it’s fine, I
libusb’s library name is
GCC Cross Compiling
The important tools, that being the MIPS cross compilers, oddly
enough weren’t put in the installation folder? Like, they were
thrown about in the repository and the specific build folders,
gcc-cross was found in
n64/build-gcc/gcc, and this
mips64-gcc. To add it to my path, I just
copied all the executable binaries in this folder into
/opt/n64/bin. Was there a cleaner way of doing it?
macOS headers (the one’s obtained through Xcode) are,
in fact, not universal. The headers only allow the CPUs
macOS has ever been officially released on, so PowerPC,
Intel, and ARM. To fix this, I downloaded
mips64-linux works on macOS) and add it to
the include path when compiling C code for anything using
MIPS. Probably a better way of doing this, but it works.