Skip to content

Instantly share code, notes, and snippets.

@MarioMastr
Last active May 29, 2025 14:24
Show Gist options
  • Save MarioMastr/76c19a10e8917fcc4dacea44d0dc1b39 to your computer and use it in GitHub Desktop.
Save MarioMastr/76c19a10e8917fcc4dacea44d0dc1b39 to your computer and use it in GitHub Desktop.
A handy tutorial for building RSDKv5(U) and running Sonic Mania Plus or the Sonic Origins games on Mac (not featuring pictures).

Considering that I've seen no other tutorials on how to build RSDKv5(U) on macOS (and considering that a lot of people just use this tutorial instead), I've decided to take matters into my own hands and futureproof this tutorial so that I never have to worry about it again!

Notes: every time I say to "cd into *specific directory here*", that is your cue to run cd *specific directory here* in the command line.

How to build RSDKv5:

Step 1: Install Xcode and the command tools (the command tools can be installed by running this command: xcode-select --install but only after installing Xcode). If you already have them, move on to step 2.

Step 2: You need to install CMake. If you have Homebrew installed already on your Mac, you can run brew install cmake to install it, but if you don't, you can still install it by using this link (scroll down to where it says "macOS 10.13 or later"). You can then open ~/.zshrc and add alias cmake = /Applications/CMake.app/Contents/bin/cmake to a new line in order to make the rest of this tutorial works perfectly for you.

Step 3: Previously I had you clone Sappharad's fork of the Mania decompilation for you to do this. However, that hasn't been updated in a while, and I don't feel like bothering him enough to update it. Therefore, you can use my fork instead!

git clone --recursive https://github.com/MarioMastr/Sonic-Mania-Decompilation

You should find it in your user folder (Macintosh HD/Users/yourusernamehere/).

Step 4: Cd into that directory and run git submodule update --remote --init --recursive because Git is stupid and doesn't clone the repository properly.

If you want to build RSDKv5 or RSDKv5U (the version of RSDKv5 built specifically for Sonic Origins that allows you to run all the previous RSDK games (Sonic 1, 2, CD)), delve into the CMakeLists.txt and find the entry for RETRO_REVISION. Keep it to 3 if you want v5U, change it to 2 if you want v5. I recommend v5U, however.

Step 5: Run the command cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo && cmake --build build. The resulting app should be placed in the directory /Users/yourusernamehere/Sonic-Mania-Decompilation/build/dependencies/RSDKv5.

Step 6: Create a folder somewhere where you can then copy the app into.

Step 7: Obtain a Data.rsdk file of Sonic Mania Plus. I'm legally required to tell you that you should buy the game from Steam in order to access this. There's always Steam keys if you really want to save cash. Once you do, copy it into that folder.

Then simply run the app!

If you want mods, you need to:

  1. Run the app at least once.
  2. Open Settings.ini and change the devMenu entry from n to y.
  3. Create a folder named mods.
  4. Go here https://gamebanana.com/games/6045 and download all the wonderful mods you want.
  5. Add them to the mods folder.
  6. Open the game again, press escape to open the Dev Menu, scroll down to Mods, and then enable all the mods you want.

If you want to run the other RSDK games, obtain their Data.rsdk files using Sonic Origins and then follow this handy-dandy tutorial by MegAmi which should get you up and running.

@FernandoAntonio
Copy link

Excellent tutorial, thank you for making this!

@CHUCKECHEESETubeYT
Copy link

ugh please, the one step for S3&K is pathetic and useless, I'm not fallowing this tutorial if it means doing nothing for Sonic 3! add something in for Sonic 3! ok? like "for Sonic 3, all you need to do, is take the source code from mania & only take the bits necessary for Sonic 3 & Knuckles to run, as for the rest, there is a C port of the Sonic and Knuckles collection decomp you can use, link: https://notabug.org/BenoitRen/skcollectioncport/ now, take the remaining bits from that & place them inside, but first you'll need to find a way to convert the code into C++ before you can use it, after you're done, put it in & BOOM! you're all set" or you know, something similar along those lines, if you can't do that, then this tutorial is FUCKING USELESS! hmph

@Geheimagent-C
Copy link

How can i change <os_types.h> to <Ogg/os_types.h> ?

@adoobly
Copy link

adoobly commented Apr 18, 2025

Whenever I boot up the Sonic mania (RSDK5),it stays on a white screen and if i use debug menu to teleport to other levels then it is just the background

@meowinqq
Copy link

meowinqq commented May 27, 2025

thank you so much for this tutorial :')!! for me, the build consistently fails at 93% completion and spits the following errors:

ld: warning: ignoring file '../../libGame.a[3](All.c.o)': found architecture 'x86_64', required architecture 'arm64'
ld: warning: ignoring file '../../libGame.a[2](Game.c.o)': found architecture 'x86_64', required architecture 'arm64'
Undefined symbols for architecture arm64:
  "_LinkGameLogicDLL", referenced from:
      _main in main.cpp.o
ld: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [dependencies/RSDKv5/RSDKv5U.app/Contents/MacOS/RSDKv5U] Error 1
make[1]: *** [dependencies/RSDKv5/CMakeFiles/RetroEngine.dir/all] Error 2
make: *** [all] Error 2

is there any known fix for this? thank you for your time!

@MarioMastr
Copy link
Author

thank you so much for this tutorial :')!! for me, the build consistently fails at 93% completion and spits the following errors:

ld: warning: ignoring file '../../libGame.a[3](All.c.o)': found architecture 'x86_64', required architecture 'arm64'
ld: warning: ignoring file '../../libGame.a[2](Game.c.o)': found architecture 'x86_64', required architecture 'arm64'
Undefined symbols for architecture arm64:
  "_LinkGameLogicDLL", referenced from:
      _main in main.cpp.o
ld: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [dependencies/RSDKv5/RSDKv5U.app/Contents/MacOS/RSDKv5U] Error 1
make[1]: *** [dependencies/RSDKv5/CMakeFiles/RetroEngine.dir/all] Error 2
make: *** [all] Error 2

is there any known fix for this? thank you for your time!

Hello, i just updated the GitHub. Please run git pull origin master in your Mania decompilation folder to receive the update and then perform step 5 again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment