# Sonic Mania: a game-code decompilation for the RSDKv5 engine

> Reconstructs Sonic Mania’s game code in C and builds it with the separately decompiled RSDKv5 or RSDKv5U engine for Windows, Linux, Switch and Android. Assets must come from an official Sonic Mania (Plus) release; the project adds a mod loader and can build several retail versions. Its license describes the code as mostly functionally the same as the original, not byte-matching.

- Type: Case study
- Targets: Game
- Category: Independent reconstruction cases
- Relationship: Independent reconstruction project
- Sources reviewed: 2026-10-18
- Added to the catalog: 2026-10-18
- Original resource: <https://github.com/RSDKModding/Sonic-Mania-Decompilation>
- Primary source: <https://github.com/RSDKModding/Sonic-Mania-Decompilation/blob/9dc699428420d752af9767bdb13f585ee0881bc0/README.md>
- Catalog page: <https://awesomerea.org/resources/sonic-mania-decomp-case/>
- Record JSON: <https://awesomerea.org/resources/sonic-mania-decomp-case/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/sonic-mania-decomp-case/index.md)

## Requirements & limits

- **Prerequisites:** It does not run without assets from an official Sonic Mania (Plus) release for Windows (Steam or Epic Games Store), Switch, PS4 or Xbox One; the Netflix Games version is not supported. By default it builds with the bundled RSDKv5 engine submodule at revision 3 (RSDKv5U) and game version 6, the last Steam release; with WITH_RSDK off it builds only the game code, and RETRO_DISABLE_PLUS is to be enabled for distribution builds.
- **Prerequisites:** Clone recursively, because GitHub’s source ZIPs omit the required submodules. CMake builds use Visual Studio with vcpkg (libtheora, libogg, GLEW, GLFW3, SDL2) on Windows, build tools with GLEW, GLFW and libtheora development packages on Linux, devkitPro packages for Switch, and the engine repository’s instructions for Android. GL builds need a user-made shader mod for videos and filters.
- **Scope:** The repository describes itself as a complete decompilation of Sonic Mania (2017); its license says it also contains original code and that most code is expected to be functionally the same. It adds a built-in mod loader and API and can build 1.00 (console launch), 1.03 (PC launch) and 1.06 (Plus update) variants. The reviewed commit is 15 commits after release v1.1.1 (2025-11-01).
- **Testing evidence:** CI builds Windows x86 and x64 and Linux binaries against both the RSDKv5 and RSDKv5U configurations. The project publishes no comparison with the original binaries, and its FAQ says bugs present in official releases will mostly not be fixed.
- **License:** The custom Sonic Mania Decompilation Source Code License v1 allows copying, modification and distribution only for non-commercial use, requires stating that the code is not the distributor’s, forbids distributing game assets other than unique modded ones, and binds forks to the same terms. Sega’s game and assets keep their own rights.

## Primary sources

1. <https://github.com/RSDKModding/Sonic-Mania-Decompilation/blob/9dc699428420d752af9767bdb13f585ee0881bc0/README.md>
2. <https://github.com/RSDKModding/Sonic-Mania-Decompilation/blob/9dc699428420d752af9767bdb13f585ee0881bc0/LICENSE.md>
3. <https://github.com/RSDKModding/Sonic-Mania-Decompilation/blob/9dc699428420d752af9767bdb13f585ee0881bc0/.gitmodules>
4. <https://github.com/RSDKModding/Sonic-Mania-Decompilation/blob/9dc699428420d752af9767bdb13f585ee0881bc0/.github/workflows/build.yml>
5. <https://github.com/RSDKModding/Sonic-Mania-Decompilation/releases/tag/v1.1.1>

## More in Games

- [SpaceCadetPinball: decompiled game logic adapted to SDL2](https://awesomerea.org/resources/space-cadet-pinball-case/index.md) · Case study
- [TicTacToe-AI: a bounded REA-fork reconstruction of one game method](https://awesomerea.org/resources/rea-engine-tictactoe-case/index.md) · Case study
- [UltraSunnyMoon: a partial, REA-led Pokémon Ultra Sun reconstruction](https://awesomerea.org/resources/ultrasunnymoon-rea-case/index.md) · Case study
- [vf2-decomp: differentially validated Virtua Fighter 2 recovery](https://awesomerea.org/resources/vf2-decomp-differential-recovery-case/index.md) · Case study
- [Wind Waker HD decompilation: functions verified against the recompiled Wii U game](https://awesomerea.org/resources/wind-waker-hd-decomp-case/index.md) · Case study
- [Banjo: Recompiled — an N64Recomp Banjo-Kazooie native port](https://awesomerea.org/resources/banjo-recompiled-case/index.md) · Case study

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
