Saturn-Recomp: Static Recompilation Conquers the Sega Saturn—From Deep Fear to 10-Player Saturn Bomberman

The Sega Saturn’s Byzantine dual-CPU architecture has finally yielded to static recompilation. Callum Jenkins’ saturn-recomp translates SH-2 machine code into native C++—powering native PC ports of Deep Fear, Virtual Hydlide, and 10-player Saturn Bomberman.

Saturn-Recomp: Static Recompilation Conquers the Sega Saturn—From Deep Fear to 10-Player Saturn Bomberman

In the annals of retro video game engineering, no console enjoys a reputation as fierce, enigmatic, and notoriously difficult to emulate as the Sega Saturn. With its tangled labyrinth of eight asymmetric processors, twin 32-bit RISC CPUs, two independent video display chips rendering non-standard geometry, and custom signal processors, the Saturn defeated developers in the 1990s and has challenged emulator authors ever since. But the modern static recompilation renaissance has arrived at Sega's formidable fortress—and conquered it.

Enter saturn-recomp, an open-source static recompilation toolchain developed by Callum Jenkins, evolving from the foundational work of Samuele Voltan's saturnkit. By reading raw disc images, disassembling SuperH (SH-2) machine code ahead of time, emitting native C++, and linking against an exhaustive C++ hardware runtime, saturn-recomp translates whole Saturn games into native desktop applications. And its flagship showcase is nothing short of legendary: pc-saturnbomberman, bringing Hudson Soft's definitive 10-player party masterpiece natively to PC with multi-multitap input, frame interpolation, and automated regression testing.


The Silicon Monster: Why the Sega Saturn Broke Developers and Emulators

When Sega launched the Saturn in Japan in late 1994, it was an engineering marvel designed to overpower anything on the market. But rather than building around a single unified architecture, Sega combined multiple specialized coprocessors across disparate memory buses:

The original Sega Saturn motherboard showing twin SH-2 CPUs, VDP1, VDP2, and SCU chips
The Sega Saturn mainboard: An asymmetric battlefield of dual SH-2 CPUs, VDP1 and VDP2 graphics processors, custom SCU DSP, and a dedicated 68000 sound subsystem.
  • Dual Hitachi SH-2 RISC Processors: A Master and a Slave SH-2 clocked at 28.6 MHz, sharing the same 32-bit system bus and Work RAM without cache coherency protocols. Writing synchronized multi-threaded code in 1995 required agonizing assembly hand-tuning.
  • VDP1 (Video Display Processor 1): Responsible for sprites and 3D polygons. Uniquely, the Saturn did not draw hardware triangles; VDP1 calculated and rendered distorted quadrilaterals, sprites, and poly-lines into dual framebuffers.
  • VDP2 (Video Display Processor 2): The crown jewel of 2D engineering. VDP2 managed five simultaneous scrolling background planes, two rotating 3D background surfaces, high-resolution interlaced display modes, window clipping, and complex per-pixel color calculation.
  • The SCU (System Control Unit): Managed system interrupts and high-speed DMA across three priority levels, housing an onboard Digital Signal Processor (DSP) capable of geometry transformations.
  • Dedicated Sound Subsystem: A separate Motorola 68EC000 sound CPU controlling the SCSP (Saturn Custom Sound Processor), a Yamaha YMF292 audio engine pumping out 32 channels of PCM/FM audio.
  • The CD Block: Driven by an autonomous Hitachi SH-1 microcontroller running proprietary optical drive firmware.

Because these processors ran in tight lockstep, traditional emulators (like SSF, Beetle Saturn, or YabaSanshiro) demand massive host CPU single-thread throughput to synchronize memory accesses and prevent deadlocks. Static recompilation cuts this Gordian knot by analyzing code flow ahead of time and translating CPU logic into optimized native C++ instructions.


The Architectural Triad: The Design of saturn-recomp

Following the proven architecture pioneered by landmark projects like N64Recomp and Zelda64Recomp, Callum Jenkins split the recompilation pipeline into a clean, decoupled three-tier hierarchy:

ARCHITECTURE // SATURN-RECOMP SYSTEM TOPOLOGY

saturn-recomp/
├── src/saturnrecomp/         # Pre-build Python Toolchain (uv / editable)
│   ├── disc.py               # ISO 9660, Mode 1/2, CD-ROM XA, CD-DA track ingest
│   ├── sh2.py                # SH-2 disassembler, base detection & census
│   ├── hw.py                 # Memory bus decoder (Work RAM, VRAM, SCU, SMPC)
│   └── recomp/               # Ahead-of-Time AST analyzer & C++ codegen
├── runtime/                  # High-Performance C++ Hardware Runtime
│   ├── include/saturn/       # Recompiled ABI & Game Layer Hooks
│   └── src/
│       ├── core/             # HLE BIOS, SCU DMA/interrupts, Slave SH-2 coroutine
│       ├── video/            # Software VDP1 quad rasterizer & VDP2 planes
│       ├── sound/            # 68000 CPU & Yamaha SCSP 32-channel DSP
│       ├── machine/          # SMPC real-time clock, backup RAM, multitaps
│       └── host/             # Native SDL3 windowing, audio & input pump
└── game/ (submodule)         # Target Game Repository (game.toml + seeds)

Key technical innovations within saturn-recomp include:

  1. Agnostic SH-2 Translation: The recompiler converts guest SH-2 opcodes into C++ without game-specific assumptions, handling delayed branches, register windows, and literal-pool constants.
  2. Cooperative Slave Scheduling: The Slave SH-2 CPU is executed as a cooperative coroutine alongside the Master CPU, eliminating race conditions while preserving the exact interrupt-dispatch timing expected by Sega's libraries.
  3. Hybrid Video Emulation: VDP1 software rasterization supports pixel-perfect Mednafen rasterization rules via SATURN_VDP1_GPL=ON (or clean-room Sega manual specifications for MIT builds), while VDP2 planes, window masks, and color calculations are rendered in a modern SDL3 pipeline.
  4. Smooth Field Interpolation (--interp): Because many Saturn titles rendered at variable frame rates (often 20 or 30 FPS internally), the runtime can interpolate field transforms between game frames, providing butter-smooth camera pans and animation on modern 60 Hz, 120 Hz, or 240 Hz monitors.

The Crowning Achievement: 10-Player Saturn Bomberman on PC

Nowhere is the power of saturn-recomp more evident than in its flagship implementation: Saturn Bomberman (USA). Released in 1996, Saturn Bomberman is widely regarded by competitive gamers as the finest multiplayer game ever created. Its centerpiece was the sprawling 10-player wide arena, which originally required two physical Sega Saturn multitaps and ten wired controllers.

Saturn Bomberman running natively on PC in the 10-player battle mode arena
Saturn Bomberman's iconic 10-Player Battle Arena running natively on PC via saturn-recomp. All ten players, power-ups, and perimeter bombers run smoothly without slowdown.

Bringing Saturn Bomberman natively to PC required Jenkins to conquer several complex subsystems:

  • Coroutines via Setjmp/Longjmp (--tasks): Saturn Bomberman managed internal entity threads using custom cooperative task-switching routines. saturn-recomp exposes dedicated hook points to intercept and preserve these task boundaries across native compilation units.
  • Dual Virtual Multitap Support (--multitap 2): The PC runtime simulates two SMPC multitaps, providing seamless USB gamepad mapping for players 1 through 12 across both virtual ports. Modern controllers map dynamically on connection, retaining assignments even if disconnected and reconnected mid-match.
  • 8-Bit VDP1 Framebuffer & VDP2 Special Priority: In 10-player mode, the game switches to a specialized wide high-resolution viewport, combining 8-bit paletted sprite rendering with intricate VDP2 priority windows and per-character color blending.
  • Real-Time SMPC Clock (--clock): Features like the in-game calendar, timed events, and slot-machine mechanics read directly from the host system's time.
Saturn Bomberman single-player story mode running natively on PC
Story Mode stage exploration running natively at a locked 60 VBlanks per second with authentic audio synthesis and zero emulation overhead.

Beyond Bomberman: Deep Fear and the Saturn Library

Saturn Bomberman is not alone. The saturn-recomp ecosystem has already demonstrated remarkable versatility across multiple distinct development styles and genres:

Deep Fear running natively on PC showing John Mayor in the underwater facility
Deep Fear running on PC via saturn-recomp. The recompiler successfully maps GCC jump tables and SGL graphic library handlers from Sega's underwater survival horror classic.
  • Deep Fear (1998): Sega's cinematic survival horror masterpiece. Written with GCC and Sega Graphic Library (SGL), Deep Fear required the recompiler to master GCC computed switch tables, mova jump pointers, SCU DSP disassembler execution, and complex per-interrupt SCU mask switching.
  • Virtual Hydlide (1995): The pioneering procedural action-RPG that served as the foundational proving ground for the initial SH-2 decoder, VDP1/VDP2 software rasterizer, and audio subsystems.
  • X JAPAN Virtual Shock 001 (1995): An interactive multimedia concert title that validated Mode 1 / CD-ROM XA interleaved streaming and CD-DA Redbook audio track synchronization.

Automated Testing & Headless Agent Bots

Perhaps the most forward-looking feature of saturn-recomp is its developer tooling. Jenkins built an automated test harness (saturnrecomp.agent) that can launch games headlessly, pause execution at exact VBlank boundaries, inject pad inputs, read/write Work RAM, and capture frame buffers:

PYTHON // HEADLESS AGENT VERIFICATION SCRIPT

from saturnrecomp import agent

# Launch headless Saturn Bomberman test bot
with agent.start("build/recomp-build/saturn", ["--cue", "GAME.cue", "--headless"], "build/run/bot") as run:
    run.step(1900)             # Advance to title screen VBlank
    run.pad("START")           # Press Start
    run.step(10)
    run.pad("")                # Release
    work_ram = run.read(0x06000000, 64)   # Verify memory state
    run.frame().save_png("build/run/bot/now.png")   # Pixel-perfect frame comparison

Because the Saturn hardware clock pauses completely during agent steps, every scripted playthrough is 100% deterministic. In pc-saturnbomberman, an automated test suite replays nine complete game routes (including a full 10-player battle match) and compares every frame against known reference images. If a single sprite or background pixel desynchronizes, the regression test fails immediately.


How to Build and Play

Both saturn-recomp and pc-saturnbomberman are open-source. In strict adherence to preservation ethics, no copyrighted game assets or BIOS files are distributed in the repositories: players provide their own legally dumped Redump .cue/.bin disc images.

BUILD QUICKSTART // LINUX (CLANG + SDL3)

# 1. Clone the Saturn Bomberman PC repository
git clone --recursive https://github.com/callumjenkins/pc-saturnbomberman.git
cd pc-saturnbomberman

# 2. Place your Saturn Bomberman (USA) (1S) Redump dump in iso/
# 3. Synchronize Python virtual environment & compile toolchain
uv sync

# 4. Verify environment dependencies & disc SHA-1 hashes
uv run bomberman doctor
uv run bomberman prepare

# 5. Recompile SH-2 binary to C++ and launch native window
uv run bomberman play --launcher

The launcher allows players to configure window scaling, video filters, and controller bindings before firing up the game. Linux is currently the primary supported build target, with Windows and macOS builds actively progressing through phase 5 of the project roadmap.


A Watershed Moment for Sega Saturn Preservation

For thirty years, the Sega Saturn has stood as an intimidating monolith in computing history—a console revered for its arcade library and 2D mastery, yet forever constrained by hardware that few developers could tame and fewer emulators could run with ease. By dismantling the Saturn's complex silicon piece by piece and translating it into clean, maintainable C++, Callum Jenkins and the contributors of saturn-recomp have unlocked a whole new era of game preservation.

The gates to the Saturn have been breached. Grab your controllers, gather nine of your closest friends, and get ready to experience Saturn Bomberman the way it was always meant to be played: pure, native, and indestructible.