Skip to content

Instantly share code, notes, and snippets.

@MarioMastr
Last active June 13, 2026 11:34
Show Gist options
  • Select an option

  • Save MarioMastr/76c19a10e8917fcc4dacea44d0dc1b39 to your computer and use it in GitHub Desktop.

Select an option

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 macOS (not featuring pictures).

How to build RSDKv5:

Step 0:

The prerequisites you will need are having Xcode, the Xcode command line tools, Homebrew, and CMake. The command line tools can be installed by running xcode-select --install after installing Xcode itself, and CMake can be installed through Homebrew by running brew install cmake.

Step 1:

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

There is currently a new version of the modding API being worked on, so if you are an aspiring modder and want to tinker around with them before they're ready, add -b modapi-v3 to the command before the --recursive.

The resulting folder will be found as Sonic-Mania-Decompilation in whatever working directory you were in when running the command.

Step 2:

Go into the RSDKv5 dependency ($(pwd)/Sonic-Mania-Decompilation/dependencies/RSDKv5).

My fork is built to be modular, having several experimental features other than macOS compatibility (mac branch) if you would like that. The sdl3 branch adds SDL3 support, and the steam branch adds Steam support. You can add these through git branch $branch_name origin/$branch_name and merge them through git merge --squash --no-commit $branch1 $branch2 $branchx. (example: git branch mac origin/mac && git branch sdl3 origin/sdl3 && git merge --squash --no-commit mac sdl3)

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. If you're running Sonic Mania, v5 is the recommended choice. If you're using the modapi-v3 branch, v5 is the ONLY choice.

Step 3:

Install libogg, libtheora, and SDL2 through Homebrew.

brew install libogg theora sdl2

Step 4:

Run the command cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo && cmake --build build. The resulting app should be placed in build/dependencies/RSDKv5.

Step 5:

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

Step 6:

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!

Additional details:

If you want mods, you need to:

  1. Run the app at least once.
  2. Open Settings.ini and add devMenu=y to it under [Game].
  3. Create a folder named mods.
  4. Go here 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.

If you are experiencing any issues, comment on this gist and I'll try to get around to them when I can.

@FernandoAntonio

Copy link
Copy Markdown

Excellent tutorial, thank you for making this!

@CHUCKECHEESETubeYT

Copy link
Copy Markdown

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
Copy Markdown

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

@adoobly

adoobly commented Apr 18, 2025

Copy link
Copy Markdown

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

meowinqq commented May 27, 2025

Copy link
Copy Markdown

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
Copy Markdown
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.

@BizMasterJ

Copy link
Copy Markdown

when I try to build it with the final step it says
"CMake Error at build/_deps/libogg-src/cmake/CheckSizes.cmake:22 (message):
No 16 bit type found on this platform!
Call Stack (most recent call first):
build/_deps/libogg-src/CMakeLists.txt:69 (include)"

@ratonatoilet-blip

Copy link
Copy Markdown

Is there a way to run SonLvl RSDK on Mac OS? To make level edits on Mac OS

@MarioMastr

Copy link
Copy Markdown
Author

Is there a way to run SonLvl RSDK on Mac OS? To make level edits on Mac OS

You might be able to get it to work with Wine, but it is a lot more compatible for you to use RetroED 2 for your level editing needs.

@MasterThomas15

Copy link
Copy Markdown

It doesnt allow me to use Plus, all the things are on Pre Plus, plus the dev menu option isnt in settings.ini plus Plus, plus going into the dev menu which is auto enabled for some reason gives a stage select, but you cant enable plus, and going into plus levels doesnt work, but you can go into angel island by pressing the angel island encore plus cutscene, which works, but Mighty and Ray from plus are sonic from preplus plus plus Plus plus preplus Plus plus Plus preplus!

@MasterThomas15

Copy link
Copy Markdown

PLUS!

It doesnt allow me to use Plus, all the things are on Pre Plus, plus the dev menu option isnt in settings.ini plus Plus, plus going into the dev menu which is auto enabled for some reason gives a stage select, but you cant enable plus, and going into plus levels doesnt work, but you can go into angel island by pressing the angel island encore plus cutscene, which works, but Mighty and Ray from plus are sonic from preplus plus plus Plus plus preplus Plus plus Plus preplus!

@Macbook-Pro-12

Copy link
Copy Markdown

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

Do it yourself :)

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