Skip to content

genmddj V0.1

Choose a tag to compare

@little-scale little-scale released this 30 Jun 11:51

genmddj V0.1 — first release

An LSDJ-inspired music tracker for the Sega Mega Drive / Genesis, driving the YM2612
FM synth (6 × 4-operator FM + an 8-bit PCM DAC) and the SN76489 PSG (3 squares + noise),
written in 68000 + Z80 assembly. It's a sibling to SMSGGDJ, the author's Master System /
Game Gear tracker.

This is the first public build. It's playable end-to-end on real hardware and in emulation —
write phrases, chain them, arrange a song, design FM voices, sequence samples, and save to the
cartridge. It's also still under active development, so there are rough edges and a couple
of known issues (below).


Download & run

  • genmddj-v0.1.bin (2 MB) — the ROM. Build 9f4a283.
  • Flashcart: drop it on a Mega EverDrive (or similar) SD card and run it.
  • Emulator: open it in genesis_plus_gx (Bannister / RetroArch), BlastEm, Mednafen, Kega
    Fusion, etc.
  • Nothing loads or plays until you ask. The build version + git hash are on the boot splash
    and on the OPTIONS screen (VER), so you can always tell which build you're running.
  • Tested on real Sega Genesis, Mega Drive, and Nomad, plus emulation. Save/load is
    hardware-verified on a real cartridge with a battery.

Start here: see MANUAL.md
for the full guide. Quick version: write a PHRASE (B-tap to drop notes), list phrases in a
CHAIN, place chains across the ten SONG columns, press Start.


The ten voices

  • F1–F6 — six YM2612 FM voices. F6 doubles as the host for PCM samples and wavetables.
  • S1–S3 — three SN76489 PSG square voices.
  • NO — the PSG noise voice.

What's in this build

Engine & UI

  • The 68000 runs the song, the editor, and the per-tick sequencer; it diffs the chip-register
    state and pushes only the changes to the Z80, which is the sole sound-chip servant and feeds
    the PCM DAC off the YM2612's Timer A.
  • The full screen set: SONG · CHAIN · PHRASE · INSTR · FM-LFO · TABLE · WAVE · GROOVE · ECHO ·
    PROJECT · OPTIONS · FILES
    , navigated with a context-following screen map.
  • The 3-button modifier control scheme (A / B / C / Start) — no simultaneous-press timing.
  • Copy / paste / clone (OPTIONS CLONE SLIM/DEEP depth), block select, and note AUDITION
    (prelisten as you enter notes; default on).

Instruments — six types

  • FM — a full YM2612 four-operator voice, edited on a dedicated on-console editor (ALGO/FB,
    the chip LFO + per-channel AMS/FMS, PAN, and a 4-operator grid) with a live algorithm diagram,
    audition, and live patch editing (tweak a voice while the song plays).
  • KIT — sample drum kits on the DAC; the note picks the pad. Ships with 808, 909, C78, 606
    and two SP0256-AL2 speech kits, baked with per-sample normalise → gain → tanh conditioning.
  • WAVE — 16 drawable wavetables on the DAC.
  • TONE / NOISE — the PSG voices (square + white/periodic noise, incl. pitched periodic-noise bass).
  • PERC — YM2612 CH3 special-mode percussion (F3's four operators tuned independently for metallic / inharmonic perc; hardware-verified).
  • A factory bank (32 instruments) seeds every new song; LOAD copies, SAVE-TO-BANK stashes to a
    cross-song SRAM library.

Sequencing

  • The complete A–Z command set (arp, slide, bend, finetune, retrigger with decay, pan, FM
    brightness/algo/LFO, tables, hop, iteration/probability variation, tempo/groove/wait, …).
  • Grooves are the clock (swing/timing); tables are a per-instrument macro sequencer
    (volume / transpose-arp / command columns); ECHO is a tempo-synced delay.
  • LIVE mode — the SONG grid becomes a quantized clip launcher.
  • SONG playbackStart plays the whole song from the top; C+B plays the cursor's
    contiguous block (from its top) and loops it, so gaps in a column act as separately-loopable sections.

Save / sync

  • Save / load to cartridge SRAM — an RLE-compressed directory of up to 32 named songs, with a
    FILES browser, in-list rename, and PURGE (drop unused phrases/chains before saving).
  • DE-9 sync over controller port 2: OUT / PULSE / IN / IN24. OUT↔IN is one clock per row
    (two-Mega-Drive tested); cross-syncs with SMSGGDJ; IN24 follows a 24-PPQN source incl.
    the Ableton Link bridge.
  • DAC declick (hardware-verified) so drum hits don't pop.

Companion tools (user-tools/, browser-based)

No install — open the HTML files. Highlights:

  • Instrument patcher — edit the 32 FM patches with a register-level OPN2 audition; import/
    export .gmi / .tfi / .vgi / Ableton Operator .adv; rip patches from a VGM game log.
  • als2genmddj — Ableton .als & Standard MIDI .mid.gmdj (and back), plus MML ⇄ .gmdj.
  • palette + font patchers, kit/sample patcher, wave editor, save tool, SRAM
    bank editor
    , EverDrive de/re-interleaver.

Known issues & caveats (first release — read me)

  • Still in progress: the DAC sample feed-rate ceiling (~6–7 kHz today; higher rates pitch
    down), a couple of sync refinements (PULSE master-drive, genmddj↔SMSGGDJ cross-sync, a
    residual ≤1-frame lag), and general polish are ongoing.
  • Held-FM note vs DAC (under investigation): an FM instrument set to HLD = $F (infinite
    hold) can be re-articulated on each drum hit in the emulator. It's traced to the per-beat
    68k→Z80 bus grab disturbing the YM render; whether it happens on real silicon is an open
    check (the chip is clocked independently of the bus grab, so it should be clean). Workaround:
    give that instrument any HLD other than $F.
  • MIDI note-input sync is built on the console side but hidden (the ESP32-S3 wire is pending).
  • Emulator vs hardware: YM2612 / Z80 / DAC behaviour can diverge from silicon — when in doubt,
    trust real hardware.

Credits

genmddj is by little-scale (Sebastian Tomczak), creator of GenMDM and SMSGGDJ — a Mega Drive
port of SMSGGDJ. Built with vasm (68k) + a Z80 driver blob and a Python build toolchain.


Build 9f4a283 · V0.1