An LSDJ-inspired music tracker for the Sega Master System and Game Gear, written in pure Z80 assembly. Make music on real hardware (via flashcart) or in an emulator, using just the D-pad and two buttons. Sound is the SN76489 PSG only — three square channels and noise — plus 4-bit PCM samples and drawn wavetables via the volume-register DAC trick, a built-in tempo-synced echo, and Game Gear stereo.
One source tree builds two ROMs:
smsggdj.sms— Master System (full screen).smsggdj.gg— Game Gear / GGDJ (handheld screen, real stereo).
Prebuilt ROMs are on the Releases page — download
smsggdj.sms / smsggdj.gg, flash to a cart or open in an emulator, no toolchain
needed.
L I T T L E - S C A L E
Needs WLA-DX (wla-z80 + wlalink) and
Python 3. make run launches the bundled Emulicious (needs Java).
make # build both: build/smsggdj.sms and build/smsggdj.gg
make run # build both, launch the SMS ROM
make run-gg # build both, launch the Game Gear ROM
make cleanBoth ROMs boot to a blank song, ready to make music. The bundled demo song is loadable any time from the PROJECT screen (DEMO — a two-press confirm).
Drop a ROM on a flashcart (Master Everdrive etc.) or open it in an emulator, and press play.
- MANUAL.md — the user guide: controls, screens, writing a song, instruments, commands, live mode, saving, sync.
- tools/patcher.html — drop a built ROM + your own sounds in a browser, tune them (trim, gain, tanh, fades), audition the exact console sound, and download a ROM with your sample bank. No toolchain.
- tools/savetool.html — unpack songs from a
.sav, assemble a cart image (pick 8/16/32 KB), or click a slot to view a song's notes, commands and instruments — in the browser.
- CLAUDE.md — build system, architecture, and the hard invariants (IRQ shadow registers, VDP write spacing, per-region tables).
- DESIGN.md — the design contract: hardware constraints, the song data model, the sound engine, the command set, the sample pool, sync, and the GGDJ build (§15). Read the relevant section before changing behaviour.
- SAVEFORMAT.md — the SRAM /
.sav/.smdjsave format. - CHANGELOG.md — what changed, per version.
- HARDWARE.md — controller-port and Game Gear EXT pinouts, sync cabling, and the EXT paddle-PCB notes.
src/ Z80 assembly (main, vdp, input, psg, engine, sample, editor)
tools/ Python build tools + the browser apps:
makefont / maketables / makedemo / makelogo (build inputs)
smsggdj_sample.py WAV/pool -> sample bank
savetool.py song/.sav manager (CLI)
patcher.html browser sample patcher
savetool.html browser song/save manager
palette.html browser UI-palette recolourer
samples/ sample sources; samples/pool.bin (if present) is the baked bank
art/ the logo art
The committed samples/pool.bin is the production sample bank (tuned in the
patcher) and is baked into every build. To build from raw recordings instead,
delete samples/pool.bin and put WAVs in samples/ — make converts them.
The pool is identical in both flavours, so one bank serves .sms and .gg.
MIT — see LICENSE. Use it, fork it, learn from it.
The bundled Emulicious emulator (tools/emulicious/, not in this repo) has its
own license.
Made by little-scale.