Generator is a Sega Genesis (Mega Drive) emulator featuring modern UI options, high-quality upscaling, and accurate emulation.
# Install dependencies (Arch Linux)
sudo pacman -S meson ninja gtk4 libadwaita sdl3
# Install dependencies (Debian/Ubuntu)
sudo apt-get install meson ninja-build libgtk-4-dev libadwaita-1-dev libsdl3-dev
# Configure and build
meson setup build -Dui-backend=gtk4
meson compile -C build
# Run
./build/src/app/generator-gtk4 [rom-file.bin]# Minimal dependencies
sudo pacman -S meson ninja sdl3 # Arch
sudo apt-get install meson ninja-build libsdl3-dev # Debian/Ubuntu
# Build console version
meson setup build -Dui-backend=console
meson compile -C build
# Run
./build/src/app/generator-console [rom-file.bin]A generator-headless binary is built alongside either UI backend and is used
by the test/regression harness.
gtk4- Modern GTK4/libadwaita interface (recommended, default)console- SDL3-based lightweight interface
Single C++23 backend: kidoz/z80f, pulled in
automatically as a Meson subproject (subprojects/z80f.wrap) and wired
through src/cpu/z80/z80f/cpuz80-z80f.cpp. No build option to choose;
nothing to install.
# GTK4 (recommended)
meson setup build -Dui-backend=gtk4
# Console (lightweight)
meson setup build -Dui-backend=console
# Release build (optimized)
meson setup build --buildtype=release -Dui-backend=gtk4- Meson >= 0.60.0
- Ninja build system
- GCC >= 13 or Clang >= 16 (C23 support required)
- SDL3 >= 3.0.0
- GTK4 >= 4.10.0
- libadwaita >= 1.4.0
- libjpeg - for JPEG screenshot support
# Run with ROM
./build/src/app/generator-gtk4 ~/roms/sonic.bin
# Run console version
./build/src/app/generator-console ~/roms/sonic.binCtrl+O- Open ROMCtrl+L- Load StateCtrl+S- Save StateF5- ResetSpace- Pause/ResumeCtrl+Q- Quit
.bin- Raw binary ROM dumps.smd- Interleaved SMD format (auto-detected).gen- Genesis ROM files.zip- Compressed ROMs (auto-extracts)
- xBRZ Upscaling - High-quality pixel art upscaling (2x, 3x, 4x)
- Scale2x/3x/4x - Fast EPX-based upscaling algorithms
- Save States - Full save/load state support
- YM2612 + SN76496 - Accurate sound emulation
- 68000: Two-stage code generation
def68kreads instruction definitions fromdef68k.defgen68kgenerates 16 C files covering 64K instruction space
- Z80: z80f (C++23) via Meson subproject,
bridged into the C codebase by a thin
extern "C"adapter (src/cpu/z80/z80f/cpuz80-z80f.cpp).
generator/
├── include/
│ └── generator/ # Header files (shared across components)
├── src/
│ ├── core/ # Emulator core and context
│ ├── cpu/ # 68k and Z80 emulation
│ ├── audio/ # YM2612 + SN76496
│ ├── video/ # VDP and rendering helpers
│ ├── platform/ # SDL3 platform layer
│ ├── persist/ # Save states, AVI, patching
│ ├── ui/ # GTK4, console, headless
│ ├── xbrz/ # xBRZ image upscaler (C++23)
│ └── app/ # Entry point and event loop
└── meson.build # Build configuration
For convenience, a justfile is provided:
# Install just command runner
sudo pacman -S just # Arch
sudo apt-get install just # Debian/Ubuntu
# Build and run
just run-gtk4 /path/to/rom.bin
just run-console /path/to/rom.bin
# List all commands
just --listAleksandr Pavlov ckidoz@gmail.com
See AUTHORS.md for full attribution.
Generator is licensed under the GPL-2.0-or-later license. See LICENSE.
