Texas Instruments SN76489 · Sega Master System · Game Gear

SN76489 Sound Lab

The Master System’s PSG, emulated latch byte by latch byte: three square waves and a noise generator, all on one write-only port at $7F. Switch the region or the chip and the clock and the noise follow.

All sound labsGame Boy · NES · Master System · Mega Drive · C64 · SNES
Region
Chip
Browsers keep audio off until you click. Effects and keys start it too.
Jump to the tracker

Output

The four channels summed, after a DC-blocking filter. On the Game Gear, left and right are shown together.

Engine idle
Mixer and analog warmth

Keyboard

Keys Z S X D C V… and Q 2 W 3 E R… play two octaves. Each channel plays one note at a time.

Register map

The eight internal registers, plus Game Gear stereo. Every change here is sent as the real port bytes: a latch byte (bit 7 set) and, for tone periods, a data byte. Type a byte into “Port $7F” to send it raw.

AddrNameBits 7…0WriteCPU readsFields
Write log · newest first

    How the chip makes sound

    click to open

    One port, eight registers

    The CPU writes bytes to port $7F. A latch byte 1 cc t dddd picks a channel cc and a register type t (0 tone, 1 volume) and writes 4 bits. A data byte 0 x dddddd writes the upper 6 bits of the latched tone register. That is all the chip understands.

    • Tone: clock / (32 × N) Hz from a 10-bit period N.
    • Volume: 4-bit attenuation, 2 dB per step; 15 is silent.
    • Noise: periodic or white, shifted at clock/512, /1024, /2048 or by tone channel 3.

    Chips and regions

    Sega (SMS, GG)TI SN76489
    Shift register16 bits, taps 0 and 315 bits, taps 0 and 1
    White noise loop57,337 steps32,767 steps
    Periodic noise16 steps15 steps
    Period 0output held highcounts as 1024
    StereoGame Gear: port $06mono

    NTSC consoles clock the PSG at 3.579545 MHz with 59.92 Hz frames; PAL at 3.546893 MHz with 49.70 Hz frames.

    No envelopes

    Unlike the Game Boy and NES, the SN76489 has no envelope, sweep or length counter. Every fade, vibrato and drum is the sound driver rewriting volume and period each frame, which is what the tracker’s instrument macros do. Holding a tone at period 0 on the Sega chip turns its volume register into a 4-bit DAC, the trick behind Master System speech and drum samples.

    Not emulated: the YM2413 FM unit of Japanese Master Systems, and the second PSG of some arcade boards.