Skip to content

pixel-clover/sandopolis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

40 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
Sandopolis Logo

Sandopolis

Tests License Zig Version Release

A Sega Genesis/Mega Drive emulator written in Zig and C


Download the latest release from here.

Footage of Sandopolis running a few games:

SK demo
Sonic & Knuckles
ROS demo
The Revenge of Shinobi
GA2 demo
Golden Axe II
SOR demo
Streets of Rage

Key Features

  • Accurate Sega Genesis/Mega Drive 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 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 to report bugs or request features.


Quickstart

Download the Latest Release

You can download the latest pre-build binaries from the project's releases page.

Build Sandopolis from Source

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

1. Clone the repository
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
# This can take some time
zig build -Doptimize=ReleaseFast

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.15.2.

Run the Emulator

Run the sandopolis binary to start the emulator GUI:

sandopolis
Sandopolis Screenshot

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

Example output:

A Sega Genesis/Mega Drive emulator written in Zig and C
Version: 0.1.0-alpha.3

Usage:
  sandopolis [flags] [rom_file]

Arguments:
  rom_file  Path to a ROM file (.bin, .md, or .smd) (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: "normal")
      --renderer    SDL render driver override (e.g. software, opengl) [String] (default: "")
      --config      Path to config file (default: sandopolis.cfg in current directory) [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)

Contributing

See CONTRIBUTING.md for details on how to make a contribution.

License

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

Acknowledgements

  • The logo is from SVG Repo with some modifications.
  • This project uses material from the following projects and resources:
    • Minish framework for property-based testing
    • Chilli framework for CLI parsing and handling
    • Rocket 68 for the main CPU (Motorola 68000) emulation
    • jgz80 for the Z80 chip emulation
    • SDL3 for the emulator frontend (rendering and input; via zsdl and SDL)
    • stb for the TrueType font rendering
    • JetBrains Mono for the monospace font used in the frontend
    • Test ROMs

Reference Implementations

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

Other Resources

About

A Sega Genesis/Mega Drive emulator written in Zig and C ๐ŸŽฎ

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Contributors

Languages