# Sonic 1 & 2 (2013) Decompilation

> Built from commit 3effc4a043e0 on 2026-11-24. The current build: https://abdess.github.io/retrobios/version.json

Source: https://abdess.github.io/retrobios/emulators/sonic2013/

Sonic 1 & 2 (2013) Decompilation emulates Sonic the Hedgehog (2013) and Sonic the Hedgehog 2 (2013). It reads 2 files, 2 of them required: without a required file it does not start games. A required file is needed only by the machines that use it. Each file below cites the line of source code that reads it.

**About this profile**

| Detail | Value |
|---|---|
| Type | standalone |
| Classification | Game engine |
| Source | [https://github.com/RSDKModding/RSDKv4-Decompilation](https://github.com/RSDKModding/RSDKv4-Decompilation) |
| Version | 1.3.3, stated in [`CMakeLists.txt`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/CMakeLists.txt) |
| Revision | [RSDKModding/RSDKv4-Decompilation@a7f5195e21fd](https://github.com/RSDKModding/RSDKv4-Decompilation/commit/a7f5195e21fdad7b75e4587e249013feeea9e6f3) |
| Run by | [Batocera](https://abdess.github.io/retrobios/platforms/batocera/), [KNULLI](https://abdess.github.io/retrobios/platforms/knulli/), [RetroBat](https://abdess.github.io/retrobios/platforms/retrobat/) |
| Profiled | 2026-10-04 |
| Profile | [YAML](https://github.com/Abdess/retrobios/blob/main/emulators/sonic2013.yml), [JSON](https://abdess.github.io/retrobios/api/v1/emulators/sonic2013.json) |
| Cores | sonicretro |
| Systems | Sonic the Hedgehog (2013), Sonic the Hedgehog 2 (2013) |

**Install this emulator's files**

With Batocera, RetroBat or KNULLI: the installer finds Batocera, RetroBat or KNULLI and its BIOS folder, then downloads only the files Sonic 1 & 2 (2013) Decompilation reads there and checks each one.

**Windows:**

Open Start. Type **PowerShell**, press Enter. Click Copy. Right-click to paste. Press Enter.

PowerShell

```
&([scriptblock]::Create((irm https://abdess.github.io/retrobios/i.ps1))) --emulator sonic2013
```

**On the device:**

Open a terminal on the device. Or connect from a computer with SSH, a terminal over the network. Paste the line. Press Enter.

Terminal

```
curl -fsSL https://abdess.github.io/retrobios/i | sh -s -- --emulator sonic2013
```

**Technical notes**

Shared Retro Engine v4 decompilation driving the 2013 Christian Whitehead mobile ports of Sonic the Hedgehog and Sonic the Hedgehog 2. One binary per build. The game identity is derived from the GameConfig.bin inside the loaded data pack (gameWindowText "Sonic 1" or "Sonic 2"). ref: [`RSDKv4/RetroEngine.cpp:423`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/RetroEngine.cpp#L423), [`RSDKv4/ModAPI.cpp:428`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/ModAPI.cpp#L428)

CheckRSDKFile opens the data pack and compares its first six bytes to the "RSDKvB" signature. There is no checksum test. The engine falls back to a loose Data/ + Bytecode/ tree if the pack is absent. When GameConfig.bin cannot be loaded either way it writes a usage.txt that asks for a pack named Engine.dataFile[0] (default "Data.rsdk"). ref: [`RSDKv4/Reader.cpp:25-102`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/Reader.cpp#L25-L102), [`RSDKv4/RetroEngine.cpp:296-331`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/RetroEngine.cpp#L296-L331), [`RSDKv4/Userdata.cpp:251-263`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/Userdata.cpp#L251-L263), [`RSDKv4/RetroEngine.cpp:483-520`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/RetroEngine.cpp#L483-L520)

Up to four packs can be mounted (DataFile, DataFile2..4 in the Dev section of settings.ini), and the extras default to Data2.rsdk, Data3.rsdk, Data4.rsdk once declared. ref: [`RSDKv4/Reader.hpp:38`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/Reader.hpp#L38), [`RSDKv4/RetroEngine.cpp:324-331`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/RetroEngine.cpp#L324-L331), [`RSDKv4/Userdata.cpp:396-408`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/Userdata.cpp#L396-L408)

## Files

**2 files**: 2 required, 0 optional.

By kind: 2 game data.

In this collection: 0 in repo and 2 missing.

## Game data

### `Data.rsdk` required for Sonic the Hedgehog (2013) missing game data

- System: Sonic the Hedgehog (2013)
- Sonic the Hedgehog (2013) assets. Shipped with the official Sonic Origins release and the delisted iOS/Android apps. The engine checks the six-byte signature only. Content identity is read from the embedded GameConfig.bin, not the pack hash.

**Source**

- Source: [`RSDKv4/Userdata.cpp:251-252`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/Userdata.cpp#L251-L252) (default name), [`RSDKv4/Userdata.cpp:396-397`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/Userdata.cpp#L396-L397) (Dev:DataFile), [`RSDKv4/RetroEngine.cpp:316-321`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/RetroEngine.cpp#L316-L321) (CheckRSDKFile call), [`RSDKv4/Reader.cpp:38-46`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/Reader.cpp#L38-L46) (signature check)

### `Data.rsdk` required for Sonic the Hedgehog 2 (2013) missing game data

- System: Sonic the Hedgehog 2 (2013)
- Sonic the Hedgehog 2 (2013) assets. Shipped with the official Sonic Origins release and the delisted iOS/Android apps. Same default file name as Sonic 1. Dev:DataFile in settings.ini names another.

**Source**

- Source: [`RSDKv4/Userdata.cpp:251-252`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/Userdata.cpp#L251-L252) (default name), [`RSDKv4/Userdata.cpp:396-397`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/Userdata.cpp#L396-L397) (Dev:DataFile), [`RSDKv4/RetroEngine.cpp:316-321`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/RetroEngine.cpp#L316-L321) (CheckRSDKFile call), [`RSDKv4/Reader.cpp:38-46`](https://github.com/RSDKModding/RSDKv4-Decompilation/blob/a7f5195e21fdad7b75e4587e249013feeea9e6f3/RSDKv4/Reader.cpp#L38-L46) (signature check)

## Next steps

- [Get the files](https://abdess.github.io/retrobios/which-pack/), for the setup in use
- [Every system](https://abdess.github.io/retrobios/systems/), and the files each one needs
- [When a game does not start](https://abdess.github.io/retrobios/wiki/troubleshooting/)

Data as of 24 November 2026.
