An interactive course · Genesis Plus GX & BlastEm

How the Genesis made sound.

We start from the very beginning — what a sound signal even is — assuming you know nothing about synthesis. Once the vocabulary is solid we meet the Sega Genesis' two sound chips: Yamaha's four-operator FM synthesiser, the YM2612, and the little PSG that beeps under it. Sixteen modules, each with a live synthesiser so you can hear every idea, not just read it. No game audio ships with this page; every sound is generated in your browser.

Begin Part I
Part I

Sound from zero

This first part is pure fundamentals — nothing about any specific chip yet. It's the toolkit that every synthesiser is built from, whether that's a modular wall of cables, a phone, or the Yamaha chip we'll meet in Part II. We build the vocabulary one word at a time — wave, pitch, harmonic, modulation, envelope, noise — and you can play and see each idea with a synthesised tone. The star of the whole course, FM synthesis, lives right here in Module 04; everything in Parts II and III is these six ideas wired into silicon.

Modules 01–06Difficulty Absolute beginnerLabs 6 interactive
Module 01 · Part I

What sound is — waves & samples

GoalUnderstand, from scratch, what a sound physically is, and how a chip turns a wave into something you can hear.

Let's start with what sound physically is. When something vibrates — a guitar string, your vocal cords, a speaker cone — it pushes and pulls on the surrounding air, creating tiny, fast changes in air pressure. Those pressure changes ripple outward as a wave and reach your eardrum, which vibrates in step. That's all sound is: a wobble in air pressure over time.

A synthesiser's job is to generate that wobble electrically — a voltage (or, in a chip, a stream of numbers) that swings up and down many thousands of times per second, which a speaker then turns back into moving air. How far the wave swings from its resting point is its amplitude — that's loudness. How many times it repeats per second is its frequency, measured in hertz (Hz): 440 Hz means 440 complete cycles every second. Higher frequency = higher pitch.

Analogy · A skipping rope

Wiggle one end of a rope and a wave travels along it. Wiggle faster and the waves bunch up — higher frequency, higher pitch. Wiggle harder and the wave gets taller — bigger amplitude, louder. Frequency and amplitude are the only two things a single tone really has; everything else is the wave's shape.

And shape is what makes one sound different from another. Play a flute and a trumpet at the same pitch and they still sound different because their pressure waves have different shapes. That shape is the waveform, and the character it gives — reedy, bright, hollow, harsh — is the timbre (say “TAM-ber”). A few shapes are so basic they have names, and every synthesiser starts from them:

  • Sine — the purest possible tone, a single smooth frequency with no extra colour. A tuning fork or a gentle whistle. This one shape is the seed of all FM synthesis (Module 04).
  • Square and saw(tooth) — jagged shapes that are secretly a sine plus a stack of higher tones piled on top. Bright and buzzy — the classic Genesis PSG “bleep.”
  • Triangle — in between: a little richer than a sine, but still mellow.
  • Noise — every frequency at once, no pitch at all. Your “shh” sound: wind, static, a hi-hat, an explosion.

Play with the scope below: switch the shape, sweep the frequency slider, and watch the trace change while you listen. The moving line is an oscilloscope — it draws amplitude (up/down) against time (left/right), so you're literally seeing the wave.

Signal lab — waveforms on a scopeWeb Audio · live
Key takeaways
  • Sound is a pressure wave; a synth generates that wave electrically and a speaker turns it back into air.
  • A tone has two numbers: amplitude (loudness) and frequency (pitch, in Hz).
  • Waveform shape = harmonic content = timbre — why a flute ≠ a trumpet ≠ a square wave.
  • The sine is the seed FM builds everything from; the square is the PSG's signature.
Module 02 · Part I

Pitch, octaves & the tempered scale

GoalTurn raw frequencies into musical notes: what an octave is, why twelve semitones, and how a chip stores a pitch.

Module 01 measured pitch as a plain frequency in hertz. Music organises those frequencies into notes, and the organising trick is beautifully simple: double the frequency and you get the same note, one octave higher. 220 Hz, 440 Hz and 880 Hz are all the note “A” — our ears hear a doubling as “the same, but higher.” That's why frequency feels multiplicative, not additive: each octave up is a ×2.

Western music slices each octave into twelve equal steps called semitones. “Equal” here means equal ratios, not equal hertz: each semitone multiplies the frequency by the twelfth root of two (about 1.0595). Do that twelve times and you've multiplied by 2 — exactly one octave. This scheme is called equal temperament, and it's why a tune sounds right whether you start it high or low.

Analogy · A ruler that stretches

On a piano the low notes are spaced far apart in hertz and the high notes are crammed together — yet they feel evenly spaced. Pitch is like a ruler whose marks get wider as you go up, because each step is a multiply, not an add. An octave is always ×2, no matter where on the ruler you stand.

A sound chip doesn't think in hertz at all. It holds a frequency number that sets how fast an internal counter advances; a bigger number plays a higher note. On the Genesis' FM chip that value is an 11-bit F-number plus a 3-bit block (octave), so a driver picks a note by looking up its F-number and octave in a table — the same twelve ratios you just met, pre-computed. Play the keyboard below: each key is one semitone, and the whole thing is just those ratios turned into tones.

Keyboard — one octave of equal temperamentWeb Audio · live
Click or tap the keys. Each white/black key is one semitone — a ×1.0595 step in frequency.
Key takeaways
  • An octave is a frequency doubling; the same note, higher.
  • Twelve equal semitones per octave, each a ×1.0595 ratio — equal temperament.
  • A chip stores pitch as a frequency number (FM: an F-number + octave block), not hertz.
Module 03 · Part I

Additive synthesis & harmonics

GoalSee that every sound is a stack of pure sine waves, and build a tone by hand from its harmonics — the idea FM will turn on its head.

In Module 01 we said a square or saw is “secretly a sine plus higher tones.” That wasn't a metaphor. The mathematician Fourier proved a remarkable fact: any sound, however complex, is just a sum of pure sine waves at different frequencies and volumes. Pull any tone apart and you always find sines; add the right sines together and you can build any waveform. Building sound by stacking sines is called additive synthesis.

For a musical note the sines aren't random. They sit at whole-number multiples of the lowest one: if the fundamental (the pitch you hear) is 220 Hz, the stack sits at 440, 660, 880 Hz and so on. Those multiples are the harmonics, and their pattern is the timbre. A saw contains every harmonic fading gently; a square contains only the odd ones (1×, 3×, 5×…), which gives it that hollow, clarinet-ish honk.

Analogy · A recipe

A finished cake tastes of everything at once. The recipe lists the ingredients — two eggs, a cup of flour. The spectrum is a sound's recipe: how much of each harmonic went in. Change the amounts and you change the flavour — the timbre — without changing the note.

The catch with pure additive synthesis is cost: a rich, evolving tone can need dozens of sines, each with its own volume changing over time. That's a lot of oscillators. This is exactly the problem FM synthesis (next module) solves so cleverly — it manufactures a whole forest of harmonics from just two oscillators. But first, feel additive synthesis directly. Drag the harmonic sliders below to mix your own tone; the scope shows the wave you're building and the spectrum shows your recipe.

Additive lab — stack the harmonics yourselfWeb Audio · live
Slider 1 = fundamental · 2–8 = harmonics. Watch the wave and its recipe change together.
Key takeaways
  • Any sound is a sum of pure sine waves (Fourier's idea).
  • For a note those sines are the harmonics: whole-number multiples of the fundamental.
  • The pattern and strength of harmonics is the timbre; the spectrum is a sound's recipe.
  • Additive synthesis is powerful but expensive — which is exactly why FM was invented.
Module 04 · Part I

FM synthesis — the big idea

GoalUnderstand the trick at the heart of the whole Genesis sound: use one oscillator to wobble another's pitch, and get a fountain of harmonics for free.

Here is the idea that defines this course. Take two sine oscillators. Call one the carrier — it's the one you actually hear. Call the other the modulator. Now, instead of letting the carrier play a steady pitch, use the modulator's output to wobble the carrier's frequency up and down, very fast. That's it. That's frequency modulationFM synthesis, discovered by John Chowning at Stanford and licensed to Yamaha, who put it in the chip inside your Genesis.

Why is that powerful? Because when you wobble a sine's pitch fast enough, the ear stops hearing “wobble” and starts hearing new harmonics — a rich, buzzy, metallic spectrum that a plain sine never had. Two oscillators do the work that additive synthesis (Module 03) needed dozens for. Two numbers steer the whole sound:

Ratio
The modulator's frequency divided by the carrier's. A whole-number ratio (2:1, 3:1) gives harmonic, musical tones; a non-integer ratio (2.4:1) gives clangy, bell-like, or noisy metallic sounds.
Index
How hard the modulator pushes — the depth of the wobble. Low index = nearly a pure sine; crank it up and more, higher harmonics appear and the tone gets brighter and buzzier.
Analogy · A singer's vibrato gone wild

A singer adding gentle vibrato wavers their pitch a few times a second — you still hear one note, just warmer. Now imagine wavering the pitch hundreds of times a second: it stops sounding like a wavering note and starts sounding like a completely new, brighter instrument. The ratio sets how fast the waver is; the index sets how wide. That runaway vibrato is FM.

Modulator a sine · sets ratio × index Carrier freq wobbled fast rich output many harmonics from just two sines
Frequency modulation. The modulator's sine bends the carrier's frequency; the depth of that bend is the index, and the pitch relationship between the two is the ratio. Out comes a spectrum full of harmonics — the entire foundation of the YM2612.

Play with the two-operator FM lab below — this is the single most important lab in the course. Drag ratio and index while it plays and watch the spectrum on the right sprout new harmonics in real time. Try ratio 1 and 2 (warm, musical), then a non-integer like 1.41 (clangy bell), and slide the index from 0 (pure sine) to full (harsh buzz). Everything the YM2612 does is this, four oscillators deep.

Two-operator FM — drag ratio & index, hear + see itWeb Audio · live
Sliders update the sound live. Whole ratios → musical · odd ratios → bells & metal.
Key takeaways
  • FM = use one oscillator (the modulator) to wobble another's pitch (the carrier), fast.
  • Fast pitch-wobble is heard as new harmonics — rich timbres from just two sines.
  • Ratio picks the harmonic character (whole = musical, odd = metallic); index picks the brightness.
  • The YM2612 is four of these oscillators (“operators”) per voice — that's Module 07.
Module 05 · Part I

Envelopes — shaping a sound over time

GoalUnderstand how a note's loudness rises, holds and fades (the ADSR envelope), and why that shape defines an instrument's character.

So far our tones just switch on at a steady volume. Real notes don't. Pluck a string and it snaps loud then rings away; bow it slowly and it swells in and holds. That shape of loudness over time is the note's envelope, and it's a huge part of why two instruments playing the same pitch sound completely different.

The classic way to describe an envelope has four stages, abbreviated ADSR:

Attack
How long the sound takes to rise from silence up to full volume when the note starts. Short = a sharp hit; long = a gentle fade-in.
Decay
After the peak, how long it takes to fall to the steady level below.
Sustain
The steady level held while the note is still down. Note this is a level (a volume), not a length of time.
Release
After the note is let go, how long it takes to fade from the sustain level back to silence.
Analogy · Two instruments, one waveform

A drum or pluck is a near-instant attack, no real sustain, a quick release — a spike that rings away. An organ or pad is a slow attack, a high held sustain, a slow release — a smooth swell. Feed both envelopes the same sawtooth and they sound like different instruments. That's the power of the envelope.

This matters enormously on the Genesis because its FM chip gives every one of the four operators its own envelope — so the brightness of an FM sound can change over the life of a note (Module 09). A piano's bright attack that mellows as it rings? That's a modulator's envelope decaying faster than the carrier's. For now, get the basic shape in your ear. Move the four sliders and watch the envelope redraw live, then play a note shaped by it. Try a percussive pluck, then a slow pad.

Envelope lab — shape a note with ADSRWeb Audio · live
Key takeaways
  • An envelope is a note's loudness shaped over time; ADSR = Attack, Decay, Sustain, Release.
  • Sustain is a level (how loud while held), not a duration.
  • Same waveform + different envelope = a different-sounding instrument.
  • On the YM2612 every operator has its own envelope, so FM timbre evolves as a note plays.
Module 06 · Part I

Noise & percussion

GoalLearn how a pitchless “shh” plus a filter and a fast envelope becomes a hi-hat or a snare — the last fundamental before we meet the chips.

Not every sound has a pitch. A hi-hat, a snare, an explosion, a rush of wind — these are noise: every frequency at once, in random proportion, with no repeating wave to latch a pitch onto. Where an oscillator makes an orderly wave, a noise source makes a chaotic one. On a spectrum it's not a few tidy bars but a solid wall.

Raw noise on its own is just static. Percussion comes from two things we already have: a filter and an envelope. A filter carves the noise into a colour — keep only the very high frequencies and it hisses like a cymbal; keep a mid band and it cracks like a snare. Then a fast envelope (near-instant attack, quick decay, no sustain) turns the steady hiss into a sharp hit.

Analogy · Sculpting from static

Start with a formless block of white noise. The filter is the chisel that carves it to a shape — bright and thin for a hat, fatter for a snare — and the envelope is how hard and fast you strike it. Same raw material, different tools, different drum.

This is doubly relevant to the Genesis, because it has two ways to make noise. The PSG (Module 11) has a dedicated noise channel — a stream of pseudo-random bits — perfect for cheap hats and zaps. And the FM chip's channel 6 can be switched into an 8-bit DAC mode (Module 10) to play back short recorded drum samples. Below, build percussion the classic way: pick a drum, sweep the filter, and hear a hat become a snare become a tom.

Percussion lab — noise + filter + a fast envelopeWeb Audio · live
Key takeaways
  • Noise is every frequency at once, with no pitch — a solid wall on a spectrum.
  • A filter colours noise (bright = hat, mid = snare) and a fast envelope makes it a hit.
  • The Genesis makes noise two ways: the PSG's noise channel and the FM chip's 8-bit DAC samples.
Part II

The Genesis sound chips

Now we put the Part I toolkit into real silicon. The Sega Genesis carries two sound chips: Yamaha's YM2612 (a.k.a. OPN2), a six-channel four-operator FM synthesiser that makes the console's signature basses, brass and bells; and Texas Instruments' little SN76489 PSG, three square waves and a noise channel carried over from the Master System. A Z80 co-processor runs the driver that pokes both. Six modules, all real hardware — every piece maps back to a fundamental you already know.

Modules 07–12Difficulty HardwareLabs 5 interactive
Module 07 · Part II

Meet the YM2612

GoalMeet the star chip — 6 FM channels, 4 operators each — and hear the kinds of sounds those operators make.

The heart of Genesis sound is the YM2612, Yamaha's FM chip (its family name is OPN2). It runs the exact FM trick from Module 04, but scaled up: it has 6 independent channels (so six notes at once), and each channel is built from 4 operators instead of two. An operator is just one sine oscillator with its own frequency ratio, output level and envelope — the carrier/modulator of Module 04, generalised.

With four operators per voice you can build far richer sounds than a single modulator/carrier pair: you can stack modulators three deep for screaming metallic leads, or run several carriers in parallel for fat, organ-like pads. Exactly how the four operators are wired — who modulates whom — is chosen from eight fixed patterns called algorithms, which is the whole of Module 08.

YM2612 · OPN2 · ~53.3 kHz Channel 1 OP1 OP2 OP3 OP4 Channel 6 / DAC OP1 OP2 OP3 DAC Σ + LFO mix & vibrato/tremolo DAC stereo L/R
The YM2612 at a glance. Six FM channels, four operators each, summed with a global LFO and clocked out through a stereo DAC at roughly 53 kHz. Channel 6 can drop its FM and become a raw 8-bit sample player (Module 10).

A few more facts worth carrying forward. Output is stereo, but only as a switch: each channel can be sent to the left, the right, or both — there's no fine panning. The chip is clocked from the main system and produces samples at roughly 53 kHz. And it has a global LFO shared by all channels for vibrato and tremolo. Press the buttons below to hear three four-operator patches the real chip is famous for — a punchy bass, a bright brass stab, and a glassy bell — all synthesised live here by the same FM maths.

Voice demo — three classic 4-operator patchesWeb Audio · live
Each is 4 operators wired by an algorithm (Module 08), each operator with its own envelope (Module 09).
Key takeaways
  • The YM2612 (OPN2) is a 6-channel, 4-operator-per-channel FM chip — the Module 04 trick, scaled up.
  • An operator = one sine oscillator with its own ratio, level and envelope.
  • Output is stereo-by-switch (L / R / both), ~53 kHz, with a global LFO for vibrato/tremolo.
  • Channel 6 can become a raw 8-bit DAC sample player.
Module 08 · Part II

Operators & the 8 algorithms

GoalLearn how the four operators can be wired together — the eight algorithms — and hear how the same operators become a bass or a bell depending on the routing.

Four operators are only useful if you can connect them. An algorithm is a fixed wiring diagram that says which operators are modulators (they bend another operator's pitch) and which are carriers (their output is actually heard). The YM2612 offers eight of them, numbered 0–7, and they run from “one long chain” to “four separate voices added together.”

The two ends of the range tell the whole story. Algorithm 0 is a single stack: OP1 modulates OP2 modulates OP3 modulates OP4, and only OP4 is heard — deep, complex, evolving timbres, perfect for basses and leads. Algorithm 7 is the opposite: all four operators are carriers, simply summed — no FM at all, just four sine waves added, which is additive synthesis (Module 03) and makes soft, organ-like or bell tones. The six algorithms in between mix stacks and parallel branches in every useful combination.

Analogy · Plumbing the same four taps

Picture four taps. You can run them in series so each feeds into the next (one powerful, complex stream), or in parallel so they all pour into the same basin (four gentle streams blending), or any mix. The algorithm is the plumbing; the operators are the taps. Same four taps, wildly different results.

One more ingredient: OP1 (and only OP1) can feed itself — its own output loops back to modulate its own input. This is feedback, and turning it up gradually pushes a clean tone toward buzz and eventually noise — a cheap way to add grit or even to fake a noise source. Pick an algorithm below: the graph redraws to show the routing (carriers glow gold), and pressing play runs a real four-operator FM voice wired exactly that way, so you can hear the difference the plumbing makes.

Algorithm picker — see the routing, hear the resultWeb Audio · live

Gold nodes are carriers (heard); red arrows are modulation. Algorithm 0 = one deep stack · Algorithm 7 = four sines added.
Key takeaways
  • An algorithm wires the 4 operators into modulators (bend pitch) and carriers (are heard).
  • The YM2612 has 8 algorithms: from one deep stack (0) to four summed sines (7, pure additive).
  • Only OP1 has feedback — self-modulation that adds grit and can approach noise.
  • Same operators, different algorithm = a completely different instrument.
Module 09 · Part II

The YM2612 envelope — AR/D1R/D2R/RR, SL & TL

GoalMeet the real chip's per-operator envelope and level controls, and hear how they make an FM tone evolve — bright attack, mellow tail.

Module 05's ADSR was the friendly version. The YM2612 uses a close cousin with Yamaha's own names, and — crucially — every operator has its own. Because a modulator's envelope controls how much it modulates over time, an operator's envelope doesn't just change volume; on a modulator it changes the whole brightness of the sound as the note evolves. A hard, bright attack that settles into a mellow tone is simply a modulator whose envelope decays faster than the carrier's.

The chip splits ADSR's “decay” into two rates and adds a level control, giving five envelope parameters plus one master level per operator:

AR — Attack Rate
How fast the operator rises to full level. High AR = an instant hit.
D1R — First Decay
The fall from the peak down to the “sustain” knee.
SL — Sustain Level
Where that first decay stops — the knee the tone settles onto.
D2R — Second Decay
A slower fall continuing while the key is held (0 = hold the sustain forever).
RR — Release Rate
How fast the tone fades once the key is let go.
TL — Total Level
The operator's overall output — its master volume (as a carrier) or modulation depth (as a modulator). This is the single most powerful timbre knob on the chip.
Analogy · Four dimmer switches with timers

Think of each operator as a lamp on its own timer-dimmer: how fast it brightens (AR), how it dims to a resting glow (D1R to SL), whether it keeps fading while held (D2R), and how it goes out when released (RR). The TL is the master brightness of each lamp. Four lamps, each on its own programme, blended by the algorithm — that's an FM patch.

The lab gives you a four-operator voice (algorithm 2 — two modulators into a carrier). The TL board sets each operator's level; drop a modulator's TL and the tone gets purer, raise it and it gets buzzier. The shared envelope sliders (AR/D1R/D2R/RR + SL) shape how the whole patch moves. Try a fast attack with a quick D1R on the modulators for a piano-like “bright then mellow,” then a slow attack for a pad that blooms.

4-operator envelope & TL boardWeb Audio · live
Key takeaways
  • The YM2612 envelope is AR, D1R, SL, D2R, RR — ADSR with the decay split in two.
  • Every operator has its own envelope, so a modulator can fade and change the timbre over time.
  • TL (Total Level) is the master knob: carrier volume, or modulator depth = brightness.
Module 10 · Part II

LFO, feedback & the DAC channel

GoalMeet the three finishing touches: the global LFO (vibrato & tremolo), feedback, and channel 6's 8-bit PCM DAC — how the Genesis got drums and speech.

Three features turn the raw FM engine into a full instrument. The first is the LFO — a Low-Frequency Oscillator, a single slow sine (a few Hz) shared by all six channels. It's too slow to hear as a pitch; instead it gently wobbles other things. Routed to pitch it's vibrato (PM, phase modulation); routed to volume it's tremolo (AM, amplitude modulation). Each channel chooses how much of each it wants.

The second is feedback from Module 08 — OP1 modulating itself — which we'll revisit in the lab as a grit control. The third is the most surprising: the DAC channel. At the flip of a register bit, channel 6 abandons FM entirely and becomes a plain 8-bit DAC: the driver writes raw sample bytes to it as fast as it can, and it plays them back directly. That's how the Genesis produced drums, sampled hits and the famous grainy speech (“SEGA!”) — at the cost of losing an FM channel and pinning the Z80 or 68000 busy feeding it.

Analogy · A synth with a cassette slot

Five of the six channels are a proper synthesiser, making tones from scratch. Channel 6 has a hidden cassette slot: flip it and instead of synthesising, it just plays back whatever recorded bytes you shove in. Cheap, grainy, and effective — the only way an FM chip gets a real recorded drum.

The lab has two halves. The LFO half takes a sustained FM brass tone and lets you dial vibrato (PM) and tremolo (AM) depth and speed — hear the tone come alive. The DAC half synthesises a short 8-bit drum sample in your browser (decaying noise + a sine thump, quantised to 8 bits like the real thing) and plays it through a simulated DAC channel.

LFO & DAC labWeb Audio · live
Key takeaways
  • The LFO is one slow shared oscillator adding vibrato (PM, pitch) and tremolo (AM, volume).
  • Feedback (OP1 self-modulation) is a grit knob — clean tone up to noise.
  • Channel 6 can become a raw 8-bit DAC that plays sample bytes directly — the Genesis' drums & speech.
  • The DAC costs an FM channel and keeps a CPU busy streaming bytes to it.
Module 11 · Part II

The SN76489 PSG — 3 squares + noise

GoalMeet the Genesis' second, humbler sound chip — three square waves and a noise channel — and hear the 8-bit voice it adds under the FM.

Alongside the mighty FM chip sits a tiny veteran: the SN76489, a Texas Instruments PSG (Programmable Sound Generator) carried straight over from the Sega Master System. It's almost comically simple next to the YM2612 — but Genesis composers used it constantly for chiptune melodies, arpeggios, sparkle and hi-hats sitting on top of the FM.

It has exactly four channels: three square-wave tone channels and one noise channel. Each tone channel has a 10-bit frequency and a 4-bit attenuation — a volume control with just 16 steps, where each step drops the level by 2 dB and step 15 is silence. That's the whole per-channel state: a pitch and one of 16 volumes. The noise channel is a LFSR (linear-feedback shift register) that can run in a “white” hiss or a “periodic” buzzy mode, and can borrow tone channel 3's pitch to tune its noise.

Analogy · A four-piece busker band

If the YM2612 is a full studio, the PSG is a busker with three kazoos and a shaker. Not much range — each kazoo does one buzzy note at one of sixteen volumes — but together, quick and rhythmic, they carry a surprisingly catchy tune. Every “bleep-bloop” you associate with 8-bit Sega is these three squares.

Build a little PSG arrangement below: three square channels (set each one's note and 4-bit volume) plus the noise channel for a hat. Press play and it arpeggiates the three tones with the noise ticking underneath — a whole chiptune backing from four of the simplest voices imaginable.

PSG lab — 3 squares + noise, 4-bit volumesWeb Audio · live
Each tone channel: a note + a 4-bit attenuation (16 steps, 2 dB each). Channel 4 is the noise hat.
Key takeaways
  • The SN76489 PSG is 3 square-tone channels + 1 noise channel, inherited from the Master System.
  • Each channel's volume is a 4-bit attenuation: 16 steps of 2 dB, step 15 = off.
  • The noise channel is an LFSR (white or periodic) and can track tone channel 3's pitch.
  • Composers layered PSG melodies, sparkle and hats over the FM.
Module 12 · Part II

The Z80 as sound driver

GoalUnderstand who actually pokes the sound chips every frame — the Z80 co-processor — and the bus handshake it shares with the 68000.

The sound chips are just registers; something has to write notes into them, in time, sixty times a second. On the Genesis that something is a whole second CPU: a Zilog Z80 running at about 3.58 MHz with its own 8 KB of RAM. It's the same chip that was the Master System's main processor — which is also how the Genesis stays backwards-compatible with Master System games.

In a Genesis game the Z80's usual job is to run the sound driver: a small program (SMPS/GEMS were the popular ones) that reads the music data, converts notes into YM2612 and PSG register writes, ticks envelopes and, when needed, spoon-feeds bytes to the DAC channel. The main 68000 just sends it high-level cues — “play track 3,” “stop” — and gets on with the game. It's the same division-of-labour idea consoles use everywhere: a dedicated processor for sound so the main CPU isn't stuck counting envelope timers.

Analogy · A conductor and an orchestra

The 68000 is a busy director who just shouts “play the boss theme!” The Z80 is the conductor who actually knows the score and cues every instrument — the YM2612's six FM voices and the PSG's four — beat by beat. The director never reads the sheet music; that's the conductor's job.

There's a catch that shapes Genesis audio programming. The Z80 and the 68000 partly share the bus to the sound hardware, so they can't both touch it at once. When the 68000 needs to reach across — to load new music, say — it asserts a Z80 bus request, waits for the Z80 to let go, does its business, then releases it. Get the timing wrong and you get stuck notes or crashes — a classic Genesis homebrew bug. Watch the handshake play out below.

68000 main CPU Z80 sound driver · 8 KB YM2612 + PSG sound chips BUSREQ BUSACK (Z80 pauses) every frame: notes → chips
Watch the Z80 drive the chips every frame — and the 68000 politely borrow the bus when it must.
Who owns the bus. Normally the Z80 streams notes into the YM2612 and PSG each frame. To reach the sound hardware itself, the 68000 raises BUSREQ, waits for the Z80 to acknowledge and pause, then accesses the chips before handing the bus back.
Key takeaways
  • A Zilog Z80 @ ~3.58 MHz with 8 KB RAM runs the sound driver (SMPS, GEMS…).
  • It converts music data into YM2612/PSG register writes and can feed the DAC — the same Z80 that was the Master System's CPU.
  • The 68000 sends high-level cues; the Z80 does the per-frame poking.
  • They share the sound bus, so the 68000 must bus-request the Z80 to pause before reaching across.
Part III

Emulating the chips

Finally: how does software on your PC stand in for that FM chip and its square-wave sidekick? We look at Nuked-OPN2 — the sample-accurate YM2612 emulation now used by serious emulators — the notorious hardware quirks that make the YM2612 so hard to get right, and how Genesis Plus GX and BlastEm mix it all back together. Four modules that connect the whole course to the settings you'll actually toggle.

Modules 13–16Difficulty EmulationLabs 2 interactive
Module 13 · Part III

Nuked-OPN2 — sample-accurate FM

GoalUnderstand the two philosophies of FM emulation, and why a die-level model like Nuked-OPN2 became the accuracy reference.

To emulate the YM2612 you face a fork in the road. You can reimplement FM from the datasheet — build operators, envelopes and algorithms in clean C and run them at the output rate. This is fast and sounds broadly right; it's how many older emulators (and the long-serving MAME “ym2612” core) worked. Or you can go the other way and model the actual chip, gate by gate.

That second path is Nuked-OPN2, by Alexey Khokholov (nukeykt). It was built by decapping a real YM3438 (the CMOS sibling of the YM2612), tracing the silicon, and reproducing the chip's internal 24-stage operator pipeline cycle by cycle. The result is sample-accurate: it doesn't just approximate the sound, it reproduces the chip's exact internal timing, its rounding, and — critically — its bugs. Genesis Plus GX and BlastEm both offer Nuked-OPN2 as their high-accuracy YM2612 core.

Analogy · A cover band vs. a master tape

A datasheet reimplementation is a tight cover band: they play the song from the sheet music, and it sounds great. Nuked-OPN2 is the original master tape — every breath, every bit of tape hiss, every accidental buzz the engineers left in. When the goal is “identical to real hardware,” only the master tape will do.

Why go to such lengths? Because the YM2612 is full of behaviour that isn't in any datasheet — quirks that games unknowingly relied on, so that a “correct” textbook implementation actually sounds wrong. The most infamous is the DAC “ladder effect,” a distortion baked into the analogue output stage that a clean digital model simply doesn't have. Reproducing quirks like that is the entire subject of the next module — and the reason die-level emulation exists.

The trade-off. Die-level accuracy isn't free: Nuked-OPN2 runs the chip's internal clock, so it costs noticeably more CPU than a datasheet core. Emulators expose it as a choice — Genesis Plus GX and BlastEm let you pick the fast core for weak hardware or the accurate Nuked core when you want the real thing. Same dial the GameCube's DSP emulation offered as LLE-vs-HLE, here for the FM chip.

Key takeaways
  • FM can be emulated from the datasheet (fast, approximate) or from the silicon (slow, exact).
  • Nuked-OPN2 models the real chip's 24-stage pipeline cycle-accurately, reproducing its timing and bugs.
  • Genesis Plus GX and BlastEm both offer Nuked-OPN2 as the high-accuracy YM2612 core.
  • Accuracy matters because games rely on undocumented quirks — the subject of Module 14.
Module 14 · Part III

The hard parts — the notorious YM2612 quirks

GoalMeet the undocumented behaviours that make the YM2612 hard to emulate — and hear the most famous one, the DAC “ladder effect.”

A textbook FM chip would be easy to emulate. The real YM2612 is a minefield of quirks, and getting them right is the difference between “sounds like a Genesis” and “sounds like a cheap FM app.” Here are the big ones.

The DAC “ladder effect”

The most famous quirk. The YM2612's output DAC is slightly non-linear right around zero: because of how its digital-to-analogue conversion is built, there's a small gap straddling the zero crossing — positive and negative values are nudged apart. On quiet or bass-heavy sounds this ladder effect adds a characteristic gritty buzz — and famously, it's louder on quieter notes. Composers wrote basslines that leaned into it. A clean digital model omits it and sounds sterile; the later surface-mount YM3438 actually fixed it, which is why some Genesis models sound subtly different.

You can hear it in the lab below: the same soft FM bass, rendered clean versus with the ladder crossover distortion modelled. Listen for the extra edge and buzz on the ladder version — that grit is the sound of a hardware bug, faithfully reproduced.

The ladder effect — clean vs. real DACWeb Audio · live
Same notes, same envelope — only the DAC's zero-crossing distortion differs.

The other traps

The busy flag
After a register write the chip raises a “busy” status bit for a fixed time. Its timing is quirky and some drivers poll it; emulators must reproduce the exact busy duration or timing-sensitive code misbehaves.
Channel-3 special mode
Channel 3 can be switched to give its four operators independent frequencies instead of one — used for sound effects and clever chords. It's a separate code path most of the chip doesn't have.
DAC + channel 6
Enabling the DAC steals channel 6's FM, and the exact moment the switch takes effect (and how the DAC and FM outputs blend during it) is subtle — a common source of clicks and pops in naive emulators.
Undocumented timing
The real chip updates operators on a rotating internal schedule (that 24-stage pipeline). Envelope rates, LFO phase and key-on timing all depend on it — which is exactly why Nuked-OPN2 models the pipeline rather than the datasheet.
Analogy · A haunted house's creaky stair

You can rebuild a house to the blueprints perfectly and it still won't feel like the original — because the original had a creaky seventh stair, a draught, a door that sticks. The YM2612's quirks are those creaks: nobody designed them in, everybody got used to them, and a faithful rebuild has to creak in all the same places.

Key takeaways
  • The DAC ladder effect is a zero-crossing distortion — grittier on quiet notes — that games leaned on; the YM3438 fixed it.
  • The busy flag's exact timing matters to some drivers.
  • Channel-3 special mode gives its four operators independent pitches.
  • Undocumented pipeline timing is why sample-accurate cores (Nuked-OPN2) model the silicon, not the datasheet.
Module 15 · Part III

PSG emulation & mixing

GoalSee how the humble PSG is emulated, and how the two chips' outputs are combined and resampled to your sound card.

The SN76489 is far easier to emulate than the FM chip, but it has its own little authenticity details. Its square waves come from simple counters, so those are trivial — the interesting parts are the volume table and the noise generator. The 4-bit attenuation isn't linear: each of the 16 steps is 2 dB, so an accurate emulator uses a lookup table of the real output voltages rather than a naive “volume ÷ 15.” Get that table wrong and PSG balance sounds off.

The noise channel is an LFSR with a specific bit width and feedback tap, and different SN76489 variants used slightly different taps — so Genesis Plus GX carries the Sega-flavoured LFSR to make the noise's exact timbre match real hardware. There's also a subtle detail where writing the volume produces a tiny DC step; some cores model it because a few tunes rely on it for click-drum effects.

Analogy · Two singers sharing one microphone

The FM chip and the PSG are two performers with very different voices, and at the end they both have to go down one wire to your speakers. The mixer is the single microphone: it has to balance the loud FM against the thin PSG, resample both to a common rate, and hand over one clean stereo stream — without either one drowning the other.

That balancing act is the mixer's job, and it's where emulators finish the audio path. The YM2612 produces samples at about 53 kHz and the PSG at a different clock; both get summed and resampled to whatever your sound card wants (usually 44.1 or 48 kHz). Emulators differ in how carefully: BlastEm is known for a low-pass reconstruction filter and band-limited output that mimics the console's own analogue tone, while the relative FM-to-PSG mixing level is a small but real balance choice each core makes. Get the resampling lazy and you re-introduce the aliasing from Part I; do it well and it sounds like the machine.

YM2612
6 FM ch + DAC · ~53 kHz
+
SN76489
3 squares + noise · volume table
Mix & filter
balance, low-pass, resample
Sound card
44.1 / 48 kHz stereo
Key takeaways
  • PSG emulation hinges on an accurate 2 dB-per-step volume table and the right LFSR noise taps.
  • Genesis Plus GX uses the Sega-flavoured LFSR so noise timbre matches hardware.
  • The FM and PSG outputs are summed, balanced, low-pass filtered and resampled to your sound card.
  • Careful resampling (e.g. BlastEm's band-limited output) avoids re-introducing Part I aliasing.
Module 16 · Part III

Try it in an emulator

GoalTurn the whole course into a few settings you can toggle and A/B in Genesis Plus GX or BlastEm.

You now have the full picture, so let's make it hands-on. Grab Genesis Plus GX (standalone or as a RetroArch core) or BlastEm, load a game, and dig into the audio options — every one maps to something you can now explain:

  • YM2612 core: Nuked-OPN2 vs. MAME/fast — the Module 13 choice. Nuked is bit-exact (and gives you the ladder effect); the fast core saves CPU. On weak hardware, pick fast.
  • “Ladder effect” / DAC distortion — Module 14. Some cores let you toggle it; on for authentic YM2612 grit, off for the cleaner YM3438 sound.
  • Low-pass / audio filter — Module 15. BlastEm's reconstruction filter softens the highs the way the real console's analogue output did.
  • PSG volume / FM-PSG balance — Module 11 & 15. If the squares sound too loud or too buried, this is the knob.

A great A/B test. Load a bass-heavy tune, then toggle the ladder effect on and off (or switch between the Nuked and fast YM2612 cores). The extra buzz that appears is Module 14's DAC quirk — a hardware bug so beloved that emulators went to die-level lengths to keep it. That one toggle is the whole of Part III, audible.

Final exam — six broken soundtracks

Six situations, straight out of how the chips really behave. You're the one at the keyboard: pick the answer that fits. Every one points back at the module that taught it.

Diagnose it — what's going on?quiz · 0 / 6
Course complete ✦
  • You can read the signal path from a pressure wave to the YM2612 to your speakers.
  • You understand FM synthesis — operators, algorithms, envelopes, feedback and the LFO.
  • You know the PSG, the Z80 driver, and how emulators like Genesis Plus GX & BlastEm reproduce it all.
  • You can explain every audio setting in a Genesis emulator — and predict what each will do.

An interactive course about the Sega Genesis / Mega Drive sound hardware. Every sound here is generated on the fly with the Web Audio API to illustrate a concept — the FM maths, the PSG's squares, the DAC's grit — so you can hear the ideas, not the games. This page contains no game audio. Technical details are grounded in the open-source emulators Genesis Plus GX, BlastEm and Nuked-OPN2.

Sega, Genesis and Mega Drive are trademarks of Sega. This is an independent, non-commercial educational project, not affiliated with or endorsed by Sega.

Now playing
Nothing playing
Web Audio · synth
no game audio