This repo contains a WIP decompilation of Sonic Riders Tournament Edition, which is based off of Sonic Riders (USA).
It builds the following DOL:
main.dol: sha1: 1be22a929b4d51a11dcf1bee34d45600b561ee6c
NOTE: The DOL is currently shiftable. This means you can add data anywhere you want, without it breaking the entire game.
Below are required MSYS2 terminal packages (in-depth installation is found in the instructions):
- mingw-w64-x86_64-python
- mingw-w64-x86_64-cmake
- mingw-w64-x86_64-gcc
- dkp-cmake-common-utils
Below are the packages if you're running Linux natively (they're the same except not a MingW version):
- python
- cmake
- gcc
- dkp-cmake-common-utils
- SRTE libOGC - TE source code is now compiled using a custom version of libOGC rather than the embedded Nintendo Dolphin SDK. Check the build instructions for compiling this library.
For maximum compatibility, you should install devkitPro using their graphical installer, and you should use the MSYS2 terminal included with your devkitPro installation, using the MINGW64 environment. By default, the MSYS2 terminal launches in the MSYS2 environment. To launch it in the MINGW64 environment, run mingw64.exe in your devkitPro's MSYS2 installation folder. The following instructions assume you are using the MSYS2 terminal with the proper environment.
-
Make sure your terminal is up to date. Do this via
pacman -Syu. -
Make sure you have Python installed in your environment. You can do so via
pacman -S mingw-w64-x86_64-python.- If this gives you an error saying
error: target not found, you need to add all the mingw64 repositories to your pacman. - To do this, run
nano /etc/pacman.confto open up pacman's configuration in a CLI text editor. - Add the following lines at the bottom of this file:
[mingw64] Include = /etc/pacman.d/mirrorlist.mingw64- Press
CTRL+X, thenY, thenEnterto save changes. - Run
pacman -Syuto update your changes, then try installing the package again.
- If this gives you an error saying
-
Make sure you have the correct version of cmake installed. You can do this in the terminal via
pacman -S mingw-w64-x86_64-cmake. -
Also make sure you have the following packages installed using these commands:
pacman -S mingw-w64-x86_64-gccandpacman -S dkp-cmake-common-utils. -
Last but not least, navigate to your devkitPro folder (usually at
C:\devkitPro), and go into thecmakefolder and opendkp-initialize-path.cmakewith a text editor. -
Comment out lines 3-5 using the
#symbol, so that they look like this:
#if(CMAKE_HOST_WIN32)
# message(FATAL_ERROR "CMake must be installed and launched from msys2: pacman -S cmake")
#endif()
-
Once that's done, clone the aforementioned custom libOGC library to your computer via
git cloneor any other similar way. (This step doesn't go through the MSYS2 terminal.) -
Once cloned, navigate to the cloned directory in the terminal via the
cdcommand. Then runmake cuberidersto build the library. Once it's built, make sure to note down the full absolute path to this cloned directory. You'll need it in the later steps. -
Then, clone the source code repository to your computer. (This step doesn't go through the MSYS2 terminal.)
-
Once cloned, navigate to the
toolsdirectory in the terminal using thecdcommand. Then run themakeTools.shscript via this command:./makeTools.sh. -
After that, make a new folder in the root folder of the project, where the build files will be generated in. For example, you can name the folder
build. -
Navigate into that directory using the
cdcommand again. This is where you'll need the path to the libOGC library folder mentioned in step 8. Run the following command to generate the build files, replacing/path/to/libogcwith your noted down path (NOTE: if on Windows, the path's\separators must be using/instead!):
$DEVKITPRO/devkitPPC/bin/powerpc-eabi-cmake -DCUSTOM_LIBOGC_PATH=/path/to/libogc ../
- Run
ninjain the same directory to build the DOL file (you can also runninja -j$(nproc --all)for faster build times). Themain.dolfile will be built and compiled into the same build folder you created.
You can get access to the package mirrors through this wiki page. This will allow you to install all the dependencies alongside the gamecube-dev package group to get everything running.
Depending on your Linux distro, if it's Arch based, every command using pacman will work for you. If you aren't using an Arch based distro, you'll have to substitute every pacman command below with dkp-pacman.
-
Make sure your terminal is up to date. Do this via
sudo pacman -Syu. -
Install all required dependencies, listed earlier. You can easily do this via
sudo pacman -S python gcc cmake dkp-cmake-common-utils. -
Once that's done, clone the aforementioned custom libOGC library to your computer via
git cloneor any other similar way. -
Once cloned, navigate to the cloned directory in the terminal via the
cdcommand. Then runmake cuberidersto build the library. Once it's built, make sure to note down the full absolute path to this cloned directory. You'll need it in the later steps. -
Then, clone the source code repository to your computer.
-
Once cloned, navigate to the
toolsdirectory in the terminal using thecdcommand. You'll first have to make themakeTools.shscript executable via runningchmod +x makeTools.sh. Then run themakeTools.shscript via this command:./makeTools.sh. -
After that, make a new folder in the root folder of the project, where the build files will be generated in. For example, you can name the folder
build. -
Navigate into that directory using the
cdcommand again. This is where you'll need the path to the libOGC library folder mentioned in step 4. Run the following command to generate the build files, replacing/path/to/libogcwith your noted down path:
$DEVKITPRO/devkitPPC/bin/powerpc-eabi-cmake -DCUSTOM_LIBOGC_PATH=/path/to/libogc ../
- Run
cmake --build .in the same directory to build the DOL file (you can also runcmake --build . -j$(nproc --all)for faster build times). Themain.dolfile will be built and compiled into the same build folder you created.
Contributions and PRs are welcome.