Skip to content
Screenshot from the video game (own work).
Screenshot from the video game (own work). Image by Jordan Mechner, via Wikimedia Commons (CC BY-SA 4.0).

ClownMDEmu

EMULATOR DATABASE

ClownMDEmu

ClownMDEmu is an open-source, libretro-core-oriented Sega Mega Drive / Genesis emulator with optional Sega CD support via its libretro frontend. The project emphasises portability, minimalism, and an integer-only C89 codebase; it is provided as a re-usable emulation core intended to be run inside frontends such as RetroArch or Clownacy's standalone frontend.

6.0 / 10

Sega MD/CD

Download Tutorials & guides

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

Genesis
SYSTEM SPOTLIGHTGenesisArtwork from the Retro Replay system database

About ClownMDEmu

ClownMDEmu was developed to be a lightweight, portable, and self-contained Mega Drive / Genesis emulation core that emphasises clean, integer-only C code, no dynamic allocation, and a small dependency surface. The core is designed so frontends handle platform specifics, audio mixing and display, while the core focuses on emulation primitives and exposing low-level audio/video outputs for flexibility.

Use ClownMDEmu when you want a small, actively maintained libretro core that is easy to build and integrate, or when you want a core that exposes low-level audio/video for frontends to handle mixing and resampling. It is a practical choice for RetroArch users who prefer a modern alternative to older MD/Genesis cores and for developers who want a portable emulation backend.

Supported systems and capabilities

Libretro core availability: Windows, Linux, macOS. These builds run through RetroArch or another compatible Libretro frontend.

The people behind ClownMDEmu / history

ClownMDEmu is developed publicly by the author(s) under the Clownacy organisation on GitHub. The project provides a standalone frontend and a libretro frontend; the repository for the emulation core documents design decisions (C89, integer-only arithmetic, no global state, custom 68000 and YM2612 implementations) and a build process using CMake with git submodules. The libretro distribution and documentation show the core as an available libretro core for Sega MD/CD in the core list. Releases for the libretro frontend are published on the project's GitHub releases page and the project has an active issue tracker and changelog in its repositories.

Screenshots

Screenshot from the video game (own work).
Screenshot from the video game (own work). Image by Jordan Mechner, via Wikimedia Commons (CC BY-SA 4.0).
Sonic the Hedgehog gameplay on Sega Genesis
Gameplay from Sonic the Hedgehog on Sega Genesis.

Tutorials & guides

ClownMDEmu setup guide (click to expand)

Setup note: This setup guide covers using ClownMDEmu as a libretro core in RetroArch and building the core from source. It also covers practical Sega CD setup notes (BIOS and image formats). Follow the steps that match your platform and skill level.

  1. Option A — Quick install via RetroArch (recommended): 1) Start RetroArch and go to Online Updater -> Core Updater. 2) Look for 'Sega - MD/CD (ClownMDEmu)' (or 'ClownMDEmu') and download the core. 3) Put your Sega CD BIOS files into RetroArch's system folder if you plan to run CD titles (see BIOS step). 4) Load the core: Main Menu -> Load Core -> select the ClownMDEmu core. 5) Load content: Main Menu -> Load Content -> navigate to your cartridge ROM (.bin/.smd/.gen/.md) or CD image (.cue/.iso/.chd). For Sega CD games use the .cue sheet approach or CHD images when possible; use the core settings menu (Core Options / Load CD Image) if present to select disc images.
  2. Option B — Download prebuilt libretro core: 1) Open the clownmdemu-libretro GitHub releases page and download the release artifact that matches your platform/RetroArch core format (e.g. .so/.dll/.dylib). 2) Place the core binary in RetroArch's cores folder, then open RetroArch and load it (Main Menu -> Load Core -> Select File). 3) Configure system/BIOS folder path in RetroArch's Settings -> Directory -> System/BIOS and place required BIOS files there (see BIOS step).
  3. Option C — Build from source (libretro core): 1) Clone the libretro frontend repository: git clone --recursive https://github.com/Clownacy/clownmdemu-libretro.git (the core repo uses submodules; use --recursive or run git submodule update --init). 2) Follow the repository's README build instructions; the core and frontend are designed to build with CMake. 3) Ensure required submodules are present (use git submodule update --init --recursive) and select the correct target for your platform (Windows, Linux, macOS, Android). 4) After building, copy the produced libretro core file into your frontend's cores folder and proceed to load content in RetroArch or another libretro frontend.
  4. Sega CD BIOS files — required for accurate CD emulation: Many Sega CD games require the official Sega CD BIOS files placed in your frontend's system/BIOS folder for correct booting. Common BIOS filenames used by libretro-based setups are bios_CD_U.bin (US NTSC), bios_CD_E.bin (Europe/PAL), and bios_CD_J.bin (Japan). The BIOS files are not distributed with ClownMDEmu; you must obtain them from your own legally-owned hardware. After placing BIOS files, verify in RetroArch's Core Information (Main Menu -> Information -> Core Information) that the firmware entries show as Present before attempting to boot CD content.
  5. Loading CD content (format and tips): Use a .cue file that points to one or more .bin files, an ISO, or CHD (compressed disc) images. If using .cue/.bin pairs, ensure the cue path references are correct and that all referenced bins are together with the cue. Some frontends offer 'Load Disc' or a 'Load CD Image' core option — use it if present. If you see 'failed to load content', double-check BIOS presence, image format, and that you loaded the core before loading the content.
  6. Core options and troubleshooting: Open the RetroArch Quick Menu (while a core is loaded) to access Core Options for ClownMDEmu if available. Use the core's debug or logging outputs when building from source or running the standalone frontend to diagnose missing firmware or image parsing issues. If CD audio or FMV appears desync'd, try a CHD image or check the frontend's audio latency settings. For feature gaps consult the core's TODO and issue tracker on the project's GitHub.

Software reminder: ClownMDEmu is licensed under AGPLv3; the core does not include commercial game ROMs, CD images, or console BIOS files. Obtain BIOS and game images only from media you legally own.

Android availability

Use ClownMDEmu on Android

An Android ARM64 Libretro build exists for ClownMDEmu. Run the core through RetroArch for Android; the standalone desktop download and Android core may have different menus and features.

Emulates: Sega CD.

Verified Android core build ↗ · Browse all Android emulators →

Android availability: install this emulator as a RetroArch core through RetroArch’s Core Downloader. This listing includes the core version.

Additional information

What ClownMDEmu supports

  • RetroArch (libretro frontends) on PC
  • RetroArch on Android
  • RetroArch on iOS (where libretro builds are supported)
  • Standalone frontend (desktop builds from clownmdemu-frontend)

READMEs & documentation

ClownMDEmu official project README
# Overview

This is ClownMDEmu, a Sega Mega Drive (a.k.a. Sega Genesis) emulator.

Some standard features of the Mega Drive are currently unemulated (see
`TODO.md` for more information).

This repository contains ClownMDEmu's emulation core. It is intended to be
self-contained and highly-portable.


# Frontends

To actually run software with ClownMDEmu, a frontend is needed.
Currently there are two official frontends:
- The standalone frontend, which includes a variety of debugging menus:
  https://github.com/Clownacy/clownmdemu-frontend
- The libretro frontend, for use with libretro implementations such as
  RetroArch and clownlibretro:
  https://github.com/Clownacy/clownmdemu-libretro


# Design

The emulation core's code adheres to the following principles, emphasising
minimalism and portability:

- Use C89. This is required in order to support as many compilers as possible.
  Ideally, the code should be valid C++ as well, in order to support both C and
  C++ compilers.

- Use integer-only logic. The Sega Mega Drive/Sega Genesis had no support for
  floating point types. Therefore, emulating it should not require floating
  point types. Additionally, floating point types are prone to rounding error
  and other precision issues, so I do not trust them. I am also concerned about
  their performance compared to integers, especially on lower-end hardware.

  - There is one exception to this rule: functions relating to generating
    'constant' data. The reasoning for this is that platforms with poor
    floating-point support can have this data be computed at build-time and
    embedded into the executable.

- Do not use dynamic memory. Memory allocation is slow, will cause memory leaks
  when not correctly freed, and can cause software to fail mid-execution when
  memory is exhausted, which is more effort to account for than it is worth.

- Use no global state. All state should be kept in a struct which functions
  access through a pointer, allowing for such things as simple fast save-state
  support as well as the possibility of running multiple instances of the
  emulator at once. Note that the state must not contain pointers, so that it
  is relocatable and position-independent. Likewise, the state must not depend
  on outside state, so that it is useable across multiple executions of the
  emulator.

- Operate within the guarantees of the C standard: no undefined behaviour and
  no implementation-defined behaviour.

  - Do not depend on integer type sizes. 'char', 'short', 'int', and 'long' may
    be different sizes on different platforms, so do not rely on their ability
    to hold (or not hold) values larger than their standard capacities:
    - -127 to 127 for 'signed char'.
    - 0 to 255 for 'unsigned char'.
    - -32767 to 32767 for 'short' and 'int'.
    - 0 to 65535 for 'unsigned short' and 'unsigned int'.
    - -2147483647 to 2147483647 for 'long'.
    - 0 to 4294967295 for 'unsigned long'.

  - Do not assume that 'char' is always signed by default; it is not. For
    instance, it is unsigned by default on ARM CPUs.

  - Do not rely on C language extensions.

  - Do not rely on endianness. Code should work correctly on both little-endian
    and big-endian CPUs.

  - Do not rely on signed number representation. That is to say, do not assume
    that negative numbers are represented in binary as two's complement.

- Use original code. No emulation components should be taken from other
  emulators or libraries. For example, rather than use something like
  [Musashi](https://github.com/kstenerud/Musashi), the 68000 emulation core is
  custom. Likewise, a custom YM2612 emulation core is used instead of
  [Nuked-OPN2](https://github.com/nukeykt/Nuked-OPN2).

The emulation core is implemented as a library, with all platform-specific logic
being relegated to a separate frontend program.

ClownMDEmu attempts to balance correctness with performance, acting as a more
high-level emulator than accuracy-focussed alternatives may.

The core exposes a relatively low-level interface: audio from the FM and PSG
are output separately at their native sample rates, and video is output a
single scanline at a time in its native indexed format. This is to give the
frontend the most flexibility in how it can process the data for delivery to
the user. For instance, if the platform can play multiple separate audio
streams at once, then the frontend can skip the expensive steps of audio
resampling and mixing.


# Compiling

ClownMDEmu can be built using CMake, however it should not be hard to make the
core use a different build system if necessary as its build process is not
complicated.

Be aware that this repo uses Git submodules; use `git submodule update --init`
to pull in these submodules before compiling.


# Licence

ClownMDEmu is free software, licensed under the AGPLv3 (or any later version).
See `LICENCE.txt` for more information.
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 ClownMDEmu

    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