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 sdl2
# Install dependencies (Debian/Ubuntu)
sudo apt-get install meson ninja-build libgtk-4-dev libadwaita-1-dev libsdl2-dev
# Configure and build
meson setup build -Dui-backend=gtk4 -Dz80-backend=cmz80
meson compile -C build
# Run
./build/src/app/generator-gtk4 [rom-file.bin]# Minimal dependencies
sudo pacman -S meson ninja sdl2 # Arch
sudo apt-get install meson ninja-build libsdl2-dev # Debian/Ubuntu
# Build console version
meson setup build -Dui-backend=console -Dz80-backend=cmz80
meson compile -C build
# Run
./build/src/app/generator-console [rom-file.bin]gtk4- Modern GTK4/libadwaita interface (recommended, default)console- SDL2-based lightweight interface
cmz80- Portable C implementation (works everywhere, default)raze- x86 assembly (faster, requires nasm, x86/x86_64 only)
# GTK4 with portable Z80 (recommended)
meson setup build -Dui-backend=gtk4 -Dz80-backend=cmz80
# Console with portable Z80 (lightweight)
meson setup build -Dui-backend=console -Dz80-backend=cmz80
# GTK4 with fast x86 Z80 (requires nasm)
meson setup build -Dui-backend=gtk4 -Dz80-backend=raze
# Release build (optimized)
meson setup build --buildtype=release -Dui-backend=gtk4 -Dz80-backend=cmz80- Meson >= 0.60.0
- Ninja build system
- GCC >= 13 or Clang >= 16 (C23 support required)
- SDL2 >= 2.0.0
- GTK4 >= 4.10.0
- libadwaita >= 1.4.0
- libjpeg - for JPEG screenshot support
- nasm - required for RAZE Z80 emulator (x86 only)
# 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: Choice of portable C (cmz80) or optimized x86 assembly (raze)
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.
