A full decompilation of Sonic CD 2011, based on the PC remake with improvements & tweaks from the mobile remakes. Ported to the Switch.
While this port can actually use OpenGL on compile for Switch, using HardwareRenderer set to true WILL cause the display to break. This port is a work in progress, and if anyone manages to fix it, please send over a pull request.
-
Without assets from the official release, this decompilation will not run.
-
You can get the official release of Sonic CD from:
You can find downloads in releases.
- Make sure your Switch can run homebrew.
- Extract the contents of the zip to the root of your SD card.
- Copy the assets to
/switch/scd2011
on your Switch's SD card. You will need the following files/folders:- help (folder, optional as How to Play is broken)
- videos (folder)
- Data.rsdk
- fonts.arc
- images.arc
- sounds.arc
- Strings.str
- Start Sonic CD via hbmenu (or whatever method you prefer).
NOTE: It is recommended to give the game full RAM access. This means you shouldn't launch hbmenu from the album applet when running this. With the latest Atmosphere build and its default config, you can hold R while starting any game to open hbmenu with full RAM access. If you have any issues make sure the game has full RAM access before reporting them; launching as an applet will not be supported.
Sections below are lifted directly from the source repository.
Even if your platform isn't supported by the official releases, you must buy or officially download it for the assets (you don't need to run the official release, you just need the game assets)
- Sharp, pixel-perfect display
- Controls are completely remappable via the settings.ini file
- The window allows windows shortcuts to be used
- Complete support for using mobile/updated scripts, allowing for features the official PC version never got to be played on PC
- Native Windows x64 version, as well as an x86 version
- The rendering backend is based off the PC version by default, so palettes are fully supported (Tidal Tempest water in particular)
- Added a built in mod loader and API allowing to easily create and play mods with features such as save file redirection and XML GameConfig data.
- There is now a settings.ini file that the game uses to load all settings, similar to Sonic Mania
- Dev menu can now be accessed from anywhere by pressing
ESC
if enabled in the config - The
F12
pause,F11
step over & fast forward debug features from Sonic Mania have all been ported and are enabled ifdevMenu
is enabled in the config - If
devMenu
is enabled in the config, pressingF9
will visualize hitboxes, andF10
will activate a palette overlay that shows the game's 8 internal palettes in real time - If
useSteamDir
is set in the config, and the user is on Windows, the game will try to load savedata from Steam'suserdata
directory (where the Steam version saves to) - Added the idle screen dimming feature from Sonic Mania Plus, as well as allowing the user to disable it or set how long it takes for the screen to dim
- Clone the repo, then follow the instructions in the dependencies readme for Windows to setup dependencies, then build via the Visual Studio solution (or just grab a prebuilt executable from the releases section.)
- Download the newest version of the MSYS2 installer from here and install it.
- Run the MINGW64 prompt (from the windows Start Menu/MSYS2 64-bit/MSYS2 MinGW 64-bit), when the program starts enter
pacman -Syuu
in the prompt and hit Enter. PressY
when it asks if you want to update packages. If it asks you to close the prompt, do so, then restart it and run the same command again. This updates the packages to their latest versions. - Now install the dependencies with the following command:
pacman -S pkg-config make git mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2 mingw-w64-x86_64-libogg mingw-w64-x86_64-libvorbis mingw-w64-x86_64-libtheora mingw-w64-x86_64-glew mingw-w64-x86_64-tinyxml2
. - Clone the repo with the following command:
git clone https://github.com/Rubberduckycooly/Sonic-CD-11-Decompilation.git
. - Go into the repo you just cloned with
cd Sonic-CD-11-Decompilation
. - Then run
make -f Makefile.msys2 CXXFLAGS=-O2 CXX=x86_64-w64-mingw32-g++ STATIC=1 -j5
.- The
CXXFLAGS
option can be removed if you do not want optimizations. - -j switch is optional, but will make building faster by running it parallel on multiple cores (8 cores would be -j9.)
- The
- Clone the repo, then follow the instructions in the dependencies readme for Windows and dependencies readme for UWP to setup dependencies, then build and deploy via the UWP Visual Studio solution.
- After install, copy your
Data.rsdk
andvideos
folder into the apps localstate folder.
- Clone the repo, follow the instructions in the dependencies readme for Mac to setup dependencies, then build via the Xcode project (or grab a prebuilt executable from the releases section.)
- A Mac build of v1.3.0 by Sappharad can be found here.
- To setup your build enviroment and library dependecies run the following commands:
- Ubuntu (Mint, Pop!_OS, etc...):
sudo apt install build-essential git libsdl2-dev libvorbis-dev libogg-dev libtheora-dev libglew-dev libtinyxml2-dev
- If you're using Debian, add
libgbm-dev
andlibdrm-dev
- If you're using Debian, add
- Fedora Linux:
sudo rpm install g++ SDL2-devel libvorbis-devel libogg-devel libtheora-devel glew-devel tinyxml2-devel
- Arch Linux:
sudo pacman -S base-devel git sdl2 libvorbis libogg libtheora glew tinyxml2
- Ubuntu (Mint, Pop!_OS, etc...):
- Clone the repo with the following command:
git clone https://github.com/Rubberduckycooly/Sonic-CD-11-Decompilation.git
. - Go into the repo you just cloned with
cd Sonic-CD-11-Decompilation
. - Run
make CXXFLAGS=-O2 -j5
.- If your distro is using gcc 8.x.x, then add the argument
LIBS=-lstdc++fs
. - The
CXXFLAGS
option can be removed if you do not want optimizations. - -j switch is optional, but will make building faster by running it parallel on multiple cores (8 cores would be -j9.)
- If your distro is using gcc 8.x.x, then add the argument
- Clone the repo, follow the instructions in the dependencies readme for iOS to setup dependencies, then build via the Xcode project
- Clone the repo, then follow the instructions in the dependencies readme for Android.
- Ensure the symbolic links in
android/app/jni
are correct. If not, fix them with the following on Windows:mklink /D src ..\..\..
mklink /D SDL ..\..\..\dependencies\android\SDL
- Open
android/
in Android Studio, install the NDK and everything else that it asks for, and build.
The Android build is currently a work-in-progress. Unless you're reporting a bug, no support will be given for this build whatsoever.
- Ensure you have Docker installed and run the script
build.sh
fromRSDKv3.vita
. If you are on Windows, WSL2 is recommended.- NOTE: You would need to copy Sonic CD game data into
ux0:data/RSDKv3
to boot the game.
- NOTE: You would need to copy Sonic CD game data into
Follow the installation instructions in the readme of each branch.
- For the Nintendo Switch, go to heyjoeway's fork.
- For the Nintendo 3DS, go to SaturnSH2x2's fork.
- A New Nintendo 3DS is required for the game to run smoothly.
Because these branches are unofficial, we can't provide support for them and they may not be up-to-date.
Currently the only supported platforms are the ones listed above, however the backend uses libogg, libvorbis, libtheora & SDL2 to power it, so the codebase is very multiplatform. If you're able to, you can clone this repo and port it to a platform not on the list.
A: Buttons like leaderboards & achievements require code to be added to support online functionality & menus (though they are saved anyways), and other buttons like the controls button on PC or privacy button on mobile have no game code and are instead hardcoded through callback. I just didnt feel like going through the effort to decompile all that, since its not really worth it.
A: Unfortunately, it's an error with the scripts. If you wanna go into TitleCards/R[X]\_TitleCard.txt
and fix it, be my guest, but the best fix is to set screenWidth
to 400, instead of 424 in the settings.ini file to match the PC version's resolution.
A: See above.
A: Try turning on VSync in settings.ini.
A: Submit an issue in the issues tab and we might fix it in the master branch. Don't expect any future releases, however.
A: Yes! I've done a decompilation of RSDKv4 (the engine version that S1/S2 run on) and it can be found here!
A: No. Sonic Mania is much bigger and requires that I'd decompile not only how the (far more complex) RSDKv5 works, but also all 600+ objects work.
- Xeeynamo: for creating the RSDK Animation editor & an early version of the script unpacker, both of which got me into RSDK modding.
- Sappharad: for making a decompilation of the Windows Phone 7 version of Sonic CD (found here) which gave me the idea & motivation to decompile the PC/IOS/Android versions.
- SuperSonic16: for creating & adding some stuff to the Sonic CD mod loader that I asked for.
- The Weigman for creating the header you see up here along with similar assets.
- 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.
Join the Retro Engine Modding Discord Server for any extra questions you may need to know about the decompilation or modding it.