This decompilation makes use of GNU GCC, GNU Binutils targeting MIPS, and various Linux tools typically provided by the base-devel
(or similar) package. For Windows users, these can be installed through MSYS2 and its package manager. The exception to this is Binutils with a MIPS target, which is not provided by the MSYS2 package repository and instead must be compiled and installed manually.
The MSYS2 installer can be found here. It is not important where you install it to.
Once installed, open the MSYS2 terminal. The rest of this guide will be done from this terminal and within the MSYS2 drive.
First, update preinstalled packages and the local package index (this can be skipped if already up to date):
pacman -Syu
Next, install both GCC and the base-devel
package:
pacman -S base-devel gcc
As mentioned above, the MSYS2 package repository does not provide a build of Binutils that targets MIPS, so we'll compile it manually.
First, download the latest version of Binutils and extract it. You can find the builds here.
# Example (replace this with the latest version!)
wget "https://ftp.gnu.org/gnu/binutils/binutils-2.43.1.tar.gz"
tar -xvzf binutils-2.43.1.tar.gz
cd binutils-2.43.1
Next, configure the build to target mips-linux-gnu
by running the following within the extracted directory:
./configure --target mips-linux-gnu --disable-multilib
Now it can be built:
# Set the value of j to the number of logical processors your
# cpu has. This is an example for a 16-core processor. Running with
# -j will run the build multithreaded and save a lot of time.
make -j16
Finally, install the built executables. This will make each program available under the MSYS2 /usr/bin
directory with a prefix of mips-linux-gnu
(e.g. mips-linux-gnu-ld.exe
).
make install
The decomp project will not detect your MSYS2 installation and instead assumes that all programs installed above are available on your path. This can be done by simply adding the MSYS2 /usr/bin
directory to your Windows PATH environment variable. The exact directory path will depend on where you installed MSYS2 to, but the default will be at C:\msys64\usr\bin
.
That's everything that must be installed through MSYS2 to run this decomp on Windows! Feel free to delete the downloaded Binutils archive and extracted directory the build was ran from, they are no longer needed.