Create your own
Lesson illustration

SN76489 PSG: Specs and Limits

Hello! Welcome back to our course on Sega's Japanese composers.

In our last lesson, we took a deep dive into the Yamaha YM2612, the powerful FM synthesis chip that defined the complex, dynamic sound of the Sega Genesis. We saw how its system of operators and algorithms allowed for a vast sonic palette.

Today, we turn our attention to the YM2612's partner, the Texas Instruments SN76489. This chip, a Programmable Sound Generator (PSG), is much simpler and older than the YM2612, yet it played a crucial role in the Genesis soundscape. Our learning outcome for this lesson is to explain the specifications and limitations of the Texas Instruments SN76489 PSG chip. We'll explore its architecture, how it's programmed, and why it was included in the Genesis at all.

1. A Relic from an Earlier Era

The SN76489 was already a veteran piece of hardware by the time the Genesis was released in 1988. It was the main sound chip in Sega's previous console, the Master System, as well as many other home computers and arcade machines of the early 80s. Its inclusion in the Genesis was primarily for backward compatibility with Master System games. However, composers quickly found ways to use its distinct, raw sound to complement the YM2612.

To get a feel for the chip's fundamental capabilities and its sonic character, let's start with a video that compares it to the more advanced FM synthesis available on the Japanese Master System.

My bad. The Sega Master System doesn’t have FM sound.

This video from retrobits, 'My bad. The Sega Master System doesn’t have FM sound.', provides an excellent overview of the SN76489's basic features and limitations.

Please watch from 01:55 to 03:43. The segment details the chip's core components: three square wave channels and one noise channel. Pay attention to the commentary on its technological origins and how it compares to other chips of its time.

As the video highlights, the SN76489 is fundamentally a simple chip. Its sound is generated by:

  • Three square wave generators
  • One noise generator

This is a world away from the YM2612's six channels of 4-operator FM synthesis. Let's dig into the technical specifications to understand exactly what this architecture entails.

2. The SN76489 Architecture: A Technical Deep Dive

Given your preference for original sources, the best place to start is the manufacturer's datasheet. It provides the ground truth for the chip's operation.

TEXAS INSTRUMENTS SN76489AN Datasheet

This is the original datasheet for the SN76489AN from Texas Instruments. It contains the complete technical specifications for the chip.

First, look at the 'BLOCK DIAGRAM' (Figure 4) on the final page to get a high-level overview of the chip's structure. Then, read the 'OPERATION' section on the first page (part 1). This section describes the tone generators, noise generator, and output stage. Pay close attention to the frequency calculation formula.

The datasheet gives us the precise details. Let's break them down.

Tone Generators

The chip has three identical tone generators.

  • Waveform: Each produces only a square wave. The duty cycle is fixed at 50%. This is the most significant limitation in terms of timbral variety.
  • Frequency Control: The frequency is controlled by a 10-bit number (), which sets a counter. The output frequency () is derived from the input clock (), which for the Genesis is typically ~3.58 MHz (the NTSC colorburst frequency). The formula is: The 10-bit register () allows for values from 1 to 1023. A value of 0 or 1 produces a constant DC output. The lowest audible frequency is around 110 Hz (), and the highest is well into the ultrasonic range.

Noise Generator

The fourth channel is dedicated to noise.

  • Source: The noise is generated by a Linear Feedback Shift Register (LFSR).
  • Modes: It has two primary modes, controlled by a 'feedback' bit:
    1. White Noise: The LFSR feedback creates a pseudo-random sequence, resulting in a static-like sound ideal for percussion (snares, cymbals) and effects (explosions).
    2. "Periodic" Noise: The LFSR feedback is simplified, causing the register's contents to loop. This produces a low-pitched, harmonically rich tone rather than random noise.
  • Frequency/Rate: The rate at which the LFSR is clocked can be set to one of three fixed divisions of the main clock, or it can be slaved to the output of the third tone generator, allowing for pitched noise effects.

Attenuation (Volume)

Each of the four channels has an independent 4-bit volume control.

  • This provides 16 volume levels.
  • The control is for attenuation, so 0000 is maximum volume and 1111 is silence.
  • The steps are logarithmic, corresponding to approximately -2dB per step. This provides a more perceptually linear change in volume compared to a linear scale.
  • A crucial limitation is the complete lack of an envelope generator. Any change in volume, such as an attack or decay, must be handled by the CPU sending new attenuation values over time.

3. Programming the Chip

Controlling the SN76489 involves writing a series of bytes to a single port. The structure of these bytes determines which channel and which parameter is being updated. A practical demonstration makes this clear.

SN76489 Digital Sound Generator Programming via Arduino

The video 'SN76489 Digital Sound Generator Programming via Arduino' by Anas Kuzechie provides a clear, step-by-step guide on how to format the data bytes to control the chip's functions.

Watch from 00:58 to 05:44. The video explains the byte structure for setting tone frequency, programming the noise generator, and controlling volume. Focus on how the bits within a byte are assigned to select a channel, a register type (tone, volume, noise), and the data value itself.

To formalize what the video shows, the system uses a latched register. You first send a "latch byte" and then, if needed, a "data byte".

  • Latch Byte (First bit is 1): %1ccTdddd

    • cc: Channel select (00-10 for tones 1-3, 11 for noise).
    • T: Type select (0 for Tone/Noise register, 1 for Volume register).
    • dddd: The 4 least significant bits of data.
  • Data Byte (First bit is 0): %0-DDDDDD

    • DDDDDD: The 6 most significant bits of data.

Here's how it works in practice:

  • To set a channel's volume: You only need to send a single latch byte. The T bit is 1, and the dddd bits contain the 4-bit volume value.
  • To set a channel's tone frequency: This requires two bytes.
    1. You send a latch byte with T=0. The dddd bits contain the lower 4 bits of the 10-bit frequency value. This latches the target register.
    2. You then send a data byte. The DDDDDD bits contain the upper 6 bits of the 10-bit frequency value.

This two-step process for frequency updates and the single-step for volume is a core part of the chip's interface. For a more exhaustive explanation of this process, including edge cases, the smspower.org wiki is an invaluable resource. I recommend reading the "SN76489 register writes" section on the "SN76489 - Development" page (Resource ID 0926f, part 4) if you're curious about the finer details.

4. Hearing the Limitations and Strengths

Now that we understand the technical specs, let's hear how they translate into actual music and sound effects. The simplicity of the PSG is both its biggest weakness and, in some ways, a strength.

My bad. The Sega Master System doesn’t have FM sound.

Let's return to the retrobits video. The following sections provide direct A/B comparisons of game soundtracks using only the PSG versus using the PSG with an FM chip. This is a perfect way to isolate the PSG's contribution.

Watch the comparisons for 'Out Run' (05:17 - 07:45), 'Double Dragon' (10:16 - 11:30), and 'Rampage' (16:57 - 17:59). Listen for the character of the PSG. Note the creator's comments on how the PSG's sound effects are often more 'pronounced' or 'crunchy' than their FM counterparts.

As you can hear, the PSG's sound is thin and "buzzy" compared to the richer textures of FM synthesis. However, for percussive hits and simple sound effects, its raw, sharp attack can be very effective. In the context of the Genesis, composers used the three PSG tone channels to:

  • Add simple melodic layers or arpeggios without using a valuable YM2612 channel.
  • Create deep, simple sub-bass lines that sat underneath more complex FM sounds.
  • Produce classic "chiptune" sound effects.

The PSG's noise channel was arguably its most important feature for Genesis composers, providing a cheap and easy way to create snares, hi-hats, and other percussive sounds that would otherwise require using the YM2612's precious channel 6 DAC.

Conclusion

We have now examined the "other half" of the Genesis sound hardware, the Texas Instruments SN76489. While primitive compared to its FM-based partner, it was an essential part of the console's overall sound.

Key Takeaways:

  • Specifications: The SN76489 is a Programmable Sound Generator with 3 square wave channels and 1 noise channel.
  • Control: Each channel has a 4-bit (16-step) logarithmic volume control. Tone channels have a 10-bit frequency resolution. The noise channel can produce white or periodic noise at several fixed or variable rates.
  • Programming: The chip is controlled by writing structured bytes that latch a target register (channel and parameter) and then send data to it.
  • Limitations: Its primary limitations are the simple square-wave-only timbre and the lack of any hardware envelope generators, requiring the CPU to perform all volume changes manually.
  • Role in Genesis: It was used to supplement the YM2612 by providing extra voices for simple tones and, most importantly, a dedicated and efficient noise source for percussion and sound effects.

We have now covered the two main tone-generating systems in the Genesis: the YM2612 for FM synthesis and the SN76489 for basic pulse and noise waves. There is one more crucial piece of the puzzle: sample playback.

In the next lesson, we will focus on the function and common applications of the YM2612's special sixth channel for DAC sample playback. This was the key to hearing drums, voices, and other "realistic" sounds in Genesis games.

Can't find a good explanation? Sign up and we'll make it for you

Sign up