Skip to content

RSDKModding/RSDKv5-Decompilation

Repository files navigation

header

A complete decompilation of Retro Engine v5 and v5Ultimate.

SUPPORT THE DEVELOPERS OF THE RETRO ENGINE

We do not own the Retro Engine in any way, shape or form, and this project would not have been possible had they not developed RSDKv5(U) in the first place. Retro Engine is currently owned by Evening Star; we highly urge you to follow & support their projects if you enjoyed this project of ours!

DO NOT USE THIS DECOMPILATION PROJECT AS A MEANS TO PIRATE SONIC MANIA (PLUS) OR ANY OTHER RSDKv5(U) GAMES.

We do not condone using this project as a means for piracy in any form. This project was made with love and care for the source material and was created for purely educational purposes.

Additional Tweaks

  • Added a built-in mod loader and API allowing to easily create and play mods with features such as save file redirection and XML asset loading, supported by all sub-versions of v5U.
  • Added a built-in shader compiler for backends/platforms that support it.
  • Added various other backends to windows aside from the usual DirectX 9 backends

If you are here for Sonic Mania:

You have the option of building RSDKv5 alongside Mania in the Sonic Mania Decompilation repo.

How to Build

This project uses CMake, a versatile building system that supports many different compilers and platforms. You can download CMake here. (Make sure to enable the feature to add CMake to the system PATH during the installation if you're on Windows!)

Get the source code

In order to clone the repository, you need to install Git, which you can get here.

Clone the repo recursively, using: git clone --recursive https://github.com/RSDKModding/RSDKv5-Decompilation

If you've already cloned the repo, run this command inside of the repository: git submodule update --init

Getting dependencies

Windows

To handle dependencies, you'll need to install Visual Studio Community (make sure to install the Desktop development with C++ package during the installation) and vcpkg (You only need to follow 1 - Set up vcpkg).

After installing those, run the following in Command Prompt (make sure to replace [vcpkg root] with the path to the vcpkg installation!):

  • [vcpkg root]/vcpkg.exe install libtheora libogg --triplet=x64-windows-static (If you're compiling a 32-bit build, replace x64-windows-static with x86-windows-static.)

Finally, follow the compilation steps below using -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static as arguments for cmake -B build.

  • Make sure to replace [vcpkg root] with the path to the vcpkg installation!
  • If you're compiling a 32-bit build, replace x64-windows-static with x86-windows-static.

Linux

Install the following dependencies: then follow the compilation steps below:

  • pacman (Arch): sudo pacman -S base-devel cmake glew glfw libtheora
  • apt (Debian/Ubuntu): sudo apt install build-essential cmake libglew-dev libglfw3-dev libtheora-dev
  • rpm (Fedora): sudo dnf install make cmake gcc glew-devel glfw-devel libtheora-devel zlib-devel
  • xbps (Void): sudo xbps-install make cmake gcc pkg-config glew-devel glfw-devel libtheora-devel zlib-devel
  • Your favorite package manager here, make a pull request (also update Mania!)

(make sure to install GL shaders!)

Switch

Setup devKitPro, then run the following:

  • (dkp-)pacman -Syuu switch-dev switch-libogg switch-libtheora switch-sdl2 switch-glad

Finally, follow the compilation steps below using -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake as arguments for cmake -B build.

(make sure to install GL shaders!)

Android

Follow the android build instructions here.

Compiling

Compiling is as simple as typing the following in the root repository directory:

cmake -B build
cmake --build build --config release

The resulting build will be located somewhere in build/ depending on your system.

The following cmake arguments are available when compiling:

  • Use these by adding -D[flag-name]=[value] to the end of the cmake -B build command. For example, to build with RETRO_DISABLE_PLUS set to on, add -DRETRO_DISABLE_PLUS=on to the command.

RSDKv5 flags

  • RETRO_REVISION: What revision to compile for. Takes an integer, defaults to 3 (RSDKv5U).
  • RETRO_DISABLE_PLUS: Whether or not to disable the Plus DLC. Takes a boolean (on/off): build with on when compiling for distribution. Defaults to off.
  • RETRO_MOD_LOADER: Enables or disables the mod loader. Takes a boolean, defaults to on.
  • RETRO_MOD_LOADER_VER: Manually sets the mod loader version. Takes an integer, defaults to the current latest version.
  • RETRO_SUBSYSTEM: Only change this if you know what you're doing. Changes the subsystem that RSDKv5 will be built for. Defaults to the most standard subsystem for the platform.

Other Platforms

Currently, the only officially supported platforms are the ones listed above.

However, since release, there have been a multitude of forks made by the community (keep in mind that many of these ports are still a WIP, and some may be out of date):

FAQ

You can find the FAQ here.

Special Thanks

  • st×tic for leading ModAPI development, porting to other platforms, general decompilation assistance, helping me fix bugs, tweaking up my sometimes sloppy code and generally being really helpful and fun to work with on this project
  • The Weigman for making v5 and v5U assets with st×tic such as the header and icons
  • Everyone in the Retro Engine Modding Server for being supportive of me and for giving me a place to show off these things that I've found

Contact:

Join the Retro Engine Modding Discord Server for any extra questions you may need to know about the decompilation or modding it.