Skip to content

sandopolis

EMULATOR DATABASE

sandopolis

Sandopolis is an open source, portable multi-system Sega emulator implemented largely in Zig. It targets Genesis/Mega Drive, Sega CD, Master System, Game Gear, and SG-1000 with desktop, Libretro, and WebAssembly/Web frontend builds.

6.0 / 10

Master System

Download Tutorials & guides

Sign in to download. Files are hosted by the emulator project.

SEGA Master System
SYSTEM SPOTLIGHTSEGA Master SystemArtwork from the Retro Replay system database

About sandopolis

Sandopolis aims to be a portable, configurable, and accurate Sega emulator that can be built on any platform supported by Zig. It provides desktop binaries, a Libretro core, and a WebAssembly build so it can run in browsers or as a Docker-hosted web instance.

Users who want a modern, source-first Sega emulator with a Web build and Libretro core, and developers who prefer a Zig-based codebase to explore or extend.

Supported systems and capabilities

  • Sega Genesis / Mega Drive
  • Sega CD (requires user-supplied BIOS files)
  • Sega Master System
  • Sega Game Gear
  • Sega SG-1000
  • Libretro core (shared library) for RetroArch and other libretro frontends

The people behind sandopolis / history

The project is developed openly on GitHub by the pixel-clover account. Development is active and the repository shows a sequence of alpha pre-releases (v0.1.0-alpha.*) with ongoing commits and recent activity. The README and release notes describe incremental alpha releases adding Master System and Game Gear support, SG-1000 support, and web/VR-related features. The project is explicitly early-stage and the author asks users to expect bugs and breaking changes.

Screenshots

Alex Kidd in Miracle World gameplay on Master System
Gameplay from Alex Kidd in Miracle World on Master System. Image from the Retro Replay media library.

Tutorials & guides

sandopolis setup guide (click to expand)

This setup guide shows how to run Sandopolis for Master System / Game Gear content using (A) a pre-built desktop binary, (B) the web build, or (C) building from source. It also explains where BIOS files are required and how to supply them.

  1. A. Download and run a pre-built desktop binary 1) Visit the project's GitHub Releases page and download the appropriate archive for your platform. 2) Extract the archive and run the sandopolis executable. 3) From the GUI open a .sms or .gg file (supported extensions include .sms, .gg, .sg, .bin) or drag-and-drop a ROM into the window. 4) Use the Settings or Help screens to configure keyboard/gamepad mappings and save directories. Note: Sega CD titles require BIOS files and will not run without them; Master System and Game Gear do not need BIOS files.
  2. B. Run Sandopolis in your web browser (WebAssembly) 1) Open the Sandopolis web frontend hosted at the project's GitHub Pages site. 2) Either drag-and-drop a supported ROM file into the page or use the file selector. 3) For Sega CD content you must upload the required BIOS files via the Settings menu; the web frontend stores them in the browser. 4) For local self-hosting, run the official Docker image: docker run -d -p 8085:80 --rm ghcr.io/pixel-clover/sandopolis-web:latest and open http://localhost:8085.
  3. C. Build from source (desktop and libretro builds) 1) Clone the repository: git clone --depth=1 https://github.com/pixel-clover/sandopolis.git && cd sandopolis. If you plan to run tests or need test ROMs, clone with --recursive and install git-lfs. 2) Install Zig (the project was developed and tested with Zig 0.17.0). 3) Build: zig build -Doptimize=fast. The built binaries appear under zig-out/bin/. 4) The project uses SDL3 for its desktop frontend (via zsdl); ensure SDL3 dev libraries are available on your system. 5) For a Libretro core build, follow the repository's libretro build instructions and place any required Sega CD BIOS files into your frontend's system directory.
  4. D. BIOS and legal notes Sega CD requires BIOS files for CD playback. Sandopolis does not include them. For desktop builds place BIOS files in a bios directory beside the emulator config file (sandopolis.cfg). For Libretro builds put BIOS files in the frontend/system directory. For the web build upload the BIOS files once through the Settings menu. Do not expect commercial BIOS or game files to be included in releases.
  5. E. Running Master System / Game Gear ROMs Supported ROM extensions include .sms and .gg for Master System and Game Gear. The emulator supports Game Gear 12-bit CRAM and viewport cropping. For best results, use verified dumps and consult the emulator's logging output for mapper or timing-related issues reported by the program.
  6. F. Troubleshooting and reporting bugs If you encounter issues, consult the project's Issues page on GitHub and include: the sandopolis --version output, the ROM filename and checksum, steps to reproduce, and any logs. The README and AGENTS.md describe internal test targets and reference implementations used for validation.

READMEs & documentation

sandopolis official project README
<div align="center">
  <picture>
    <img alt="Sandopolis Logo" src="logo.svg" height="25%" width="25%">
  </picture>
<br>

<h2>Sandopolis</h2>

[![Tests](https://img.shields.io/github/actions/workflow/status/pixel-clover/sandopolis/tests.yml?label=tests&style=flat&labelColor=282c34&logo=github)](https://github.com/pixel-clover/sandopolis/actions/workflows/tests.yml)
[![License](https://img.shields.io/badge/license-MIT-007ec6?style=flat&labelColor=282c34&logo=open-source-initiative)](https://github.com/pixel-clover/sandopolis/blob/main/LICENSE)
[![Zig](https://img.shields.io/badge/zig-0.17-F7A41D?style=flat&labelColor=282c34&logo=zig)](https://ziglang.org/download/)
[![Release](https://img.shields.io/github/release/pixel-clover/sandopolis.svg?label=release&style=flat&labelColor=282c34&logo=github)](https://github.com/pixel-clover/sandopolis/releases/latest)
[![Play Online](https://img.shields.io/badge/play%20online-browser-507ec6?style=flat&labelColor=282c34&logo=webassembly)](https://pixel-clover.github.io/sandopolis/)
[![Docker](https://img.shields.io/badge/docker-ghcr.io-507ec6?style=flat&labelColor=282c34&logo=docker)](https://github.com/orgs/pixel-clover/packages/container/package/sandopolis-web)
<br>
[![Systems](https://img.shields.io/badge/systems-Genesis%20%7C%20Master%20System%20%7C%20Game%20Gear%20%7C%20SG--1000%20%7C%20Sega%20CD-002776?style=flat&labelColor=282c34)](https://github.com/pixel-clover/sandopolis)
[![Platforms](https://img.shields.io/badge/platforms-Desktop%20%7C%20Web%20%7C%20Libretro%20%7C%20VR-44cc11?style=flat&labelColor=282c34)](https://github.com/pixel-clover/sandopolis)

A portable multi-system Sega emulator

</div>

---

**Download the latest desktop version of Sandopolis from [here](https://github.com/pixel-clover/sandopolis/releases)
or [try Sandopolis in your web browser](https://pixel-clover.github.io/sandopolis/).**

Footage of Sandopolis running a few games:

<div align="center">

<table>
  <tr>
    <td align="center"><img alt="SK demo" src="docs/assets/gif/003_sk_optimized.gif" width="200%"><br>Sonic & Knuckles</td>
    <td align="center"><img alt="ROS demo" src="docs/assets/gif/002_ros_optimized.gif" width="200%"><br>The Revenge of Shinobi</td>
  </tr>
  <tr>
    <td align="center"><img alt="GA2 demo" src="docs/assets/gif/001_ga2_optimized.gif" width="200%"><br>Golden Axe II</td>
    <td align="center"><img alt="SOR demo" src="docs/assets/gif/004_sor_optimized.gif" width="200%"><br>Streets of Rage</td>
  </tr>
</table>

</div>

### Key Features

- Accurate Sega Genesis/Mega Drive, Sega CD, Master System, Game Gear, and SG-1000 emulation
- Very portable; can be built and run on any platform that Zig supports
- Very configurable, including gameplay input, frontend hotkeys, and rendering settings
- Has a permissive license that allows commercial use

See [ROADMAP.md](ROADMAP.md) for the list of implemented and planned features.

> [!IMPORTANT]
> This project is still in early development, so compatibility is not perfect.
> Bugs and breaking changes are also expected.
> Please use the [issues page](https://github.com/pixel-clover/sandopolis/issues) to report bugs or request features.

---

### Quickstart

#### Download the Latest Release

##### A. Desktop

You can download the latest pre-built binaries from the project's [release page](https://github.com/pixel-clover/sandopolis/releases).

##### B. Web

You can download and use the latest pre-built Docker image for the web version of Sandopolis from the
[GHCR](https://github.com/orgs/pixel-clover/packages/container/package/sandopolis-web):

```bash
docker run -d -p 8085:80 --rm ghcr.io/pixel-clover/sandopolis-web:latest
```

Then open http://localhost:8085 in your browser.

#### Build Sandopolis from Source

Alternatively, you can build the emulator from source by following the steps below.

##### 1. Clone the repository

```bash
git clone --depth=1 https://github.com/pixel-clover/sandopolis.git
cd sandopolis
```

> [!NOTE]
> If you want to run the tests and develop Sandopolis further, you may want to clone the repository with
> `git clone --recursive https://github.com/pixel-clover/sandopolis.git`.
> Note that you also need to have `git-lfs` installed to download some of the files like test ROMs.

##### 2. Build the Sandopolis Binary

```bash
# This can take some time
zig build -Doptimize=fast
```

If the build is successful, you can find the built binary at `zig-out/bin/`.

> [!NOTE]
> To build from source, you mainly need to have Zig and Git installed.
> The current version of the emulator is developed and tested using Zig 0.17.0.

#### Run the Emulator

Run the `sandopolis` binary to start the emulator GUI:

```bash
sandopolis
```

<div align="center">
<img alt="Sandopolis Screenshot" src="docs/assets/img/main_window_v0.1.0-alpha.5.png" width="100%">
</div>

Run `sandopolis --help` to see the list of available command-line options.

Example output:

```
A portable multi-system Sega emulator for Genesis, Sega CD, Master System, Game Gear, and SG-1000

Usage:
  sandopolis [flags] [rom_file]

Arguments:
  rom_file  Path to a ROM file (.bin, .md, .smd, .gen, .sms, .gg, .sg), a .zip archive containing one, or a Sega CD disc image (.cue, .iso) (optional)

Flags:
  -h, --help            Shows help information for this command [Bool] (default: false)
      --audio-mode      Audio render mode: normal, ym-only, psg-only, unfiltered-mix [String] (default: "")
      --audio-queue-ms  Audio queue budget in milliseconds (40-150) before backlog recovery [String] (default: "")
      --renderer        SDL render driver override (e.g. software, opengl) [String] (default: "")
      --config          Path to the unified config file (default: SANDOPOLIS_CONFIG, platform app data, or ./sandopolis.cfg) [String] (default: "")
      --pal             Force PAL/50Hz timing and version bits [Bool] (default: false)
      --ntsc            Force NTSC/60Hz timing and version bits [Bool] (default: false)
      --version         Print version information and exit [Bool] (default: false)
```

---

> [!IMPORTANT]
> Sandopolis boots Sega CD games either from a pair of `.cue` and `.bin` files, or a single `.iso` file.
> Note that Sega CD needs a few BIOS files (normally `segacd.bios_us`/`segacd.bios_eu`/`segacd.bios_jp`, or `bios_CD_U.bin`/`bios_CD_E.bin`/
`bios_CD_J.bin` files) that are not included in this project.
> Place the BIOS files per build in the locations mentioned below:
>
> - For the desktop build, put the files in the `bios` directory beside the config file (`sandopolis.cfg`).
> - For the Libretro build, place the files in the frontend's system directory.
> - For Sandopolis web, upload the BIOS files through the `Settings` menu. You need to do it only one time normally, and the files will be kept in the
    browser you're using.

---

### Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to make a contribution.

### License

This project is licensed under the MIT License (see [LICENSE](LICENSE)).

### Acknowledgements

* The logo is from [SVG Repo](https://www.svgrepo.com/svg/519365/sonic-runners) with some modifications.
* This project uses material from the following projects and resources:
    * [Minish](https://github.com/CogitatorTech/minish) framework for property-based testing
    * [Chilli](https://github.com/CogitatorTech/chilli) framework for CLI parsing and handling
    * [Rocket 68](https://github.com/habedi/rocket68) for the main CPU (Motorola 68000) emulation
    * [jgz80](https://github.com/carmiker/jgz80) for the Z80 chip emulation
    * [SDL3](https://www.libsdl.org/) for the emulator frontend (rendering and input; via [zsdl](https://github.com/zig-gamedev/zsdl)
      and [SDL](https://github.com/castholm/SDL))
    * [stb](https://github.com/nothings/stb/blob/master/stb_truetype.h) for the TrueType font rendering
    * [JetBrains Mono](https://github.com/JetBrains/JetBrainsMono) for the monospace font used in the frontend
    * [Test ROMs](https://techdocs.exodusemulator.com/Console/SegaMegaDrive/Software.html#test-roms) for testing
    * [Libretro overlays](https://github.com/libretro/common-overlays) for the frontend overlays

#### Reference Implementations

Sandopolis implementation logic was checked with the following implementations for finding errors and verifying correctness:

* [Genesis-Plus-GX](https://github.com/ekeeke/Genesis-Plus-GX)
* [Nuked-OPN2](https://github.com/nukeykt/Nuked-OPN2)
* [clownmdemu-core](https://github.com/Clownacy/clownmdemu-core)
* [kiwi](https://github.com/drx/kiwi)
* [jgenesis](https://github.com/jsgroth/jgenesis/tree/master/backend/genesis-core)
Download original README

Original project README source

Release log

Selected releases and changes, with coverage from our weekly emulation roundup.

Sources & further reading

FROM THE COMMUNITY

Player reviews

0 reviews
6.0/ 10

Overall rating

Provisional site rating and approved member scores, each counted once.

Starting site scores are provisional editorial scores. Established mainstream projects receive a higher starting score; other imported entries begin at a neutral 6/10 pending individual review. Member scores change the average after approval.

Your take on sandopolis

Spam has been overwhelming. To help us approve your review, sign up and introduce yourself in the Introductions forum so we know you’re not a bot.

Sign in with your Retro Replay account to rate this project and share your experience.

Sign in to review