The Hidden Speech Synthesizer Inside Yamaha FM Chips
In November 1987, Atari Games put a new cabinet on arcade floors. Before you dropped a coin, Xybots greeted you with explosions and a cold robotic voice: “The human has been neutralized.” Then: “Intruder alert.”
A talking cabinet was nothing new, you might think. But open the Xybots sound hardware and there is no speech chip. The sound board Atari used could carry one (a Texas Instruments TMS5220), and on Xybots that chip is simply not there. The only sound generator left is a single Yamaha YM2151, the FM music chip Atari had first used in Marble Madness.
So who was talking?
The answer starts eight years earlier, in a Japanese telephone laboratory, and ends up hidden in Yamaha datasheets under three letters: CSM. This is the story of CSM mode, the speech synthesizer that Yamaha built into its FM chips, the handful of programmers who dared to use it, and the questions about it that are still open today.
The voice with no speech chip
Here is what we know for sure about Xybots. In MAME, the reference arcade emulator, the game has its own driver, and it uses Atari’s JSA I sound board. That board normally supports three chips: a YM2151 for music, a POKEY for effects and a TMS5220 for speech. For Xybots, the driver explicitly removes the POKEY and the TMS5220. What remains is one YM2151 and a 6502 processor to drive it.
The man behind the trick was Earl Vickers, an audio engineer and programmer at Atari from 1982 to 1988. His résumé describes it in one line: he “wrote software to produce speech using Composite Sine Modeling synthesis with Yamaha FM chips, eliminating the cost of a separate speech chip.” He has called Xybots one of his proudest moments: “I figured out a way to create robotic speech using a Yamaha FM synthesis chip (normally used for music), which saved the cost of a separate speech chip.”
Brad Fuller, a central figure in Atari’s audio department, backs this up. In a 2003 interview with the Japanese chiptune historian hally, Fuller explained that Vickers was the one who discovered the YM2151 and arranged Atari’s licence to use it. Then he added that Vickers had even written a program that made the YM2151 synthesize speech.
“Composite Sine Modeling” is not a phrase Vickers made up. It points straight back to Japan.
A Yamaha YM2151 (OPM), here on Yamaha’s SFG-01 board. Xybots used the same chip. Photo: Yaca2671, CC BY-SA 3.0, via Wikimedia Commons.
Born in a telephone lab: NTT, 1979
In 1979, two researchers at NTT, Shigeki Sagayama and Fumitada Itakura, proposed a new way to describe speech. Instead of modelling the human vocal tract as a complex filter, they described a short slice of speech as a sum of a few sine waves, each with its own frequency and strength. They called it the composite sinusoidal model, CSM for short. The model’s sines are chosen so that the speech signal and the model share the same low-order autocorrelation, and Sagayama showed that the model’s frequencies are equivalent to Line Spectrum Pair frequencies. (Line Spectrum Pairs are another idea from Itakura, and in Sagayama’s words they are used “in almost all mobile phones”.)
The first papers appeared in Japanese in 1979, including one with a very telling title: “A simple speech synthesis method using composite sinusoids.” An English version, “A composite sinusoidal model applied to spectral analysis of speech”, followed in 1981 in Electronics and Communications in Japan.
Why sines? Sagayama’s own university lecture slides spell out the motivation. The popular all-pole filters of the time (the LPC and PARCOR family) needed long word lengths, around 24 bits, suffered from amplitude-control problems and demanded careful quantization. A handful of sine waves placed on the formants, the resonant peaks that make an “ah” sound different from an “ee”, was robust, cheap to compute and easy to control. In other words, ideal for a small, inexpensive chip.
And a chip is exactly where it went. On his contributions page, Sagayama writes that CSM was “applied to Yamaha’s best selling sound IC”, and that “the CSM Speech Synthesis patent earned best among all NTT patents for several years.” His awards list backs this up: Japanese patent No. 01226666, “Speech synthesis device”, received NTT’s top patent implementation award in 1988, 1991 and 1994, and the 1991 Invention Prize of the Japan Institute of Invention and Innovation for “the invention of the composite sinusoidal speech synthesis method”.
Formants are the bright bands that make each vowel sound different. CSM rebuilds them with a few sines. Spectrogram: Morito kyo, CC BY-SA 4.0, via Wikimedia Commons.
How a music chip learns to talk
A Yamaha FM chip is, at heart, a bank of sine-wave oscillators (operators) with envelopes. Normally they modulate each other to make bells, basses and brass. CSM mode simply asks: what if we leave the sines pure and use them as formants?
The trick is in the timer. FM chips have a built-in Timer A, normally used to tell the CPU when to play the next note. In CSM mode, every time Timer A overflows, the chip automatically keys on a group of operators all at once. That gives you two controls:
The Timer A rate becomes the pitch of the voice. Each overflow restarts the sines, like the pulses of the vocal cords.
The sine frequencies and levels become the formants. Software rewrites them every few milliseconds to move from one sound to the next.
That makes CSM a tiny source-filter speech synthesizer built out of music hardware. The MSX-AUDIO system shows the idea clearly. Its BIOS includes a ready-made CSM player whose data format stores a “pitch” value written to timer 1 and an “interval” (the frame length) written to timer 2, plus a level and a note for each channel. On the Mega Drive, the YM2612 programmer Aly James summed up the timer’s role neatly: the Timer A re-triggering “can act as a pitch shifter for a fixed formant.”
Yamaha did not hide the feature. Its 1987 LSI catalog advertises that the YM3526 can generate “the human voice (synthesized from compound sinocidal waves method, CSM)”, and that one of the YM2203’s three FM voices “can be set to human voice mode”. The datasheets put it in one line each. The YM3526 sheet says “Composite Sinusoidal Modeling is possible.” The YM2151 sheet says that setting the CSM bit “enables you to enter a key-on in all sound source slots when Timer A generates an overflow.”
In CSM mode, each Timer A overflow keys on the operators (the pitch), while software changes the sine frequencies every frame (the formants). Schematic.
Japan first: Silpheed’s talking villain (1986)
The first famous use of CSM speech was not in an arcade, but on a Japanese home computer. Game Arts released Silpheed for the NEC PC-8801mkIISR on 5 December 1986, and “CSM mode speech synthesis” was one of the technical features it advertised, next to its fast 3D graphics.
An NEC PC-8801. Silpheed ran on the later PC-8801mkIISR of the same family. Photo: phreakindee, CC0, via Wikimedia Commons.
At the start of the game, the villain Xacalite speaks to you. According to a detailed Japanese retrospective, the voice was built by analysing speech into formants and spreading it across the four operators of the OPN’s third FM channel. The same review recalls an episode in which this speech routine alone took three months of programming, notes that the result is harder to understand than the beeper speech other games used, and says that no other maker adopted the method. Game Arts’ reason, according to the reviewer, was data size: CSM voice data is tiny compared with sampled audio.
A Japanese PC-88 programmer who later tried to recreate the effect described these voices perfectly: they sound like someone “talking with their face in a washbasin.” He also noticed that Silpheed’s voice routine seems to write a different Timer A value on every cycle.
Less than a year later, an Atari cabinet in California was saying “Intruder alert” with the same family of tricks. We found no source linking the two teams, so as far as we can tell they got there on their own.
Xybots: what we still don’t know
This is where honesty matters. We know Xybots talks through its YM2151, and we know its author called the method Composite Sine Modeling. What we cannot yet prove is whether Vickers flipped the chip’s own CSM switch.
The YM2151 does have one: bit 7 of register $14. When it is set, every Timer A overflow keys on all eight channels, which means all 32 operators at once. That is far more sines than the four you get on an OPN chip. But a programmer can also skip the switch completely. As the PC-88 programmer pointed out, any FM chip that can output pure sines on several channels can produce sine-wave speech by keying them from software. CSM mode only saves some work.
We looked for evidence. The public VGM rip of Xybots (the format that logs every register write to the sound chip) contains only the music and the coin jingles. We parsed all nine files, and there is not a single write of the CSM bit, or to Timer A at all. That tells us nothing about the speech, because the speech simply isn’t in the pack.
So the question stays open: hardware CSM, or software sines? How many sines did Vickers use? If you have ever logged the YM2151 registers during Xybots’ “Intruder alert”, we would love to hear from you.
Which Yamaha chips can talk?
CSM was not limited to one chip. We checked datasheets and the most accurate open-source emulators (ymfm by Aaron Giles, used by MAME, and the Nuked cores, which are built from photographs of the real silicon). Here is the picture:
The YM3812 (OPL2), the chip of the AdLib and Sound Blaster, still has the CSM bit. Photo: phreakindee, CC0, via Wikimedia Commons.
Chip
Family
CSM
Register
What Timer A triggers
YM3526
OPL
Yes
$08, bit 7
all 9 channels
Y8950
MSX-AUDIO
Yes
$08, bit 7
all channels (its BIOS has a CSM player)
YM3812
OPL2
Yes
$08, bit 7
all 9 channels
YMF262
OPL3
No
$08 has no CSM bit
none
YM2151
OPM
Yes
$14, bit 7
all 8 channels (32 operators)
YM2203
OPN
Yes
$27, bits 7-6
channel 3 (4 operators)
YM2608
OPNA
Yes
$27, bits 7-6
channel 3
YM2612 / YM3438
OPN2 (Mega Drive / Genesis)
Yes
$27, bits 7-6
channel 3
YMF288
OPN3 (1995)
Removed
masked
none
Two results surprised us. First, the arcade chip is the loudest talker of the family: the YM2151 keys every operator it has, eight times the four sines of the Mega Drive’s YM2612. That is the chip inside our DAFM Arcade, the same one that spoke in Xybots. If you want to know how it differs from the Mega Drive chip in general, we compared them in YM2151 vs YM2612.
Second, the YMF262 (OPL3) has no CSM at all. Its register $08 keeps only the NTS bit, and the CSM bit that sat next to it on the YM3526 and YM3812 is gone. The chip behind so much 90s PC game music (we wrote about it in The Yamaha YMF262) had lost its voice. That makes our DAFM Blaster the only synth in our range without a CSM mode. With 18 two-operator channels, though, it could still play sine-wave speech the hard way, from software.
How many operators one Timer A overflow keys in CSM mode, by chip.
Manuals vs silicon: is it 01 or 10?
There is a small mystery hiding in the OPN chips. On the YM2203, YM2608 and YM2612, channel 3’s mode is set by the top two bits of register $27. Yamaha’s YM2608 application manual says 01 selects CSM and 10 selects the “effect sound” mode (each operator gets its own frequency, but there is no automatic key-on).
The emulators built from the real silicon say the opposite. Nuked-OPN2, derived from a die shot of the YM3438, enables CSM when the mode is 10. So does ymfm, and Plutiedev’s YM2612 register guide lists 01 as “special” and 10 as CSM. A programmer who logged the register writes of real FM-7 games found them setting 10 for CSM, and concluded that the 01 in most YM2203 datasheets “should be an error.” Even modern tools are not consistent: one recent open-source CSM converter uses 0x40 for OPN in one place and describes 0x80 as CSM mode in another.
The evidence points to 10, but we would rather hear it from the chips themselves. Does a real YM2612 behave exactly like a real YM3438 here? (They already differ in other ways, as we showed in YM2612 vs YM3438.) We may test both on real hardware in a future post. If you already have, tell us what you found.
A YM2612 die shot. Photos like this are how emulator authors read the real logic. Photo: Seanriddle, CC BY-SA 4.0, via Wikimedia Commons.
Why CSM faded away
If Yamaha shipped a speech synthesizer inside its FM chips, why did so few games use it? A few clues come from the people who tried.
It is hard to make intelligible. The Silpheed review calls the result harder to understand than beeper speech. On the Mega Drive, after building a WAV-to-CSM loader, Aly James found the output “not particularly intelligible with only 4 sine waves.” Another developer in the same Mega Drive forum thread put it bluntly: “4 sines is kinda little for anything beyond basic vowels.”
It is a lot of work. Three months for Silpheed’s voice routine, by one account. On the PC-88, Timer A cannot run slower than about 108 Hz, so the programmer who recreated it had to drop CSM mode and drive the sines manually from another interrupt.
Samples got cheaper. The YM2608, released in 1986, already added ADPCM playback for recorded voice, right next to its CSM mode.
Yamaha eventually let it go. The OPL3 has no CSM bit, and the 1995 YMF288 removed it from the OPNA design.
The YMF262 (OPL3): more voices, but no CSM bit. Photo: ViscousFlow, CC BY 4.0, via Wikimedia Commons.
Today: hackers bring it back
CSM never quite died. In 2013 Aly James wrote a test ROM that drives the YM2612’s CSM mode on a real Mega Drive, and built the effect into his FMDrive plugin. He found something unexpected along the way: because Timer A has 10-bit resolution, it can play musical pitches, while the four sine frequencies behave like a formant filter. The result, in his words, is a “filtered sound” that is “impossible to produce with FM alone.” Speech became an instrument.
He also cleared up a myth. The famous Mega Drive Bad Apple!! demo was believed to use CSM for its vocals, but its register log shows special mode with Timer A doing nothing, an effect that “sounds almost the same.”
Today you don’t need a lab to experiment:
Furnace, the open-source chiptune tracker, supports CSM on the YM2612 with a dedicated “CSM Timer” channel.
yas-sim’s Python notebooks convert audio into CSM data and play it back as YM2203 register writes.
ymfm-py includes an example that turns a WAV file into a VGM that uses true hardware CSM on the YM2151, YM2203, YM2608 and the OPL chips.
If you want to understand why running this on real chips rather than an emulator matters to us, we explained our view in real Yamaha FM chip vs emulation.
From a telephone lab to the Mega Drive.
The chip that could talk
Forty-odd years after Sagayama and Itakura wrote down a sum of sine waves, their idea is still sitting inside every YM2151, YM2612 and YM3812 that powers on. Most of those chips never said a word. A few did: a self-proclaimed emperor of space on a Japanese home computer in 1986, and a robot announcing “Intruder alert” from an Atari cabinet in 1987.
We still don’t know exactly how that robot spoke. If you can help close the gap (a register log, an old Atari note, a memory from the arcade), our family-run workshop would love to hear from you. And if you want to hold the chip that spoke in Xybots in your own hands, it is inside the DAFM Arcade, played through MIDI like any other synth. (Both DAFM synths carry CSM-capable chips: the YM2151 in the Arcade and the YM2612 or YM3438 in the Genesis. They play them as regular FM synths; CSM mode is not implemented in their firmware.)
The DAFM Arcade is built around the YM2151, the chip that spoke in Xybots.
S. Sagayama and F. Itakura, “A composite sinusoidal model applied to spectral analysis of speech”, Electronics and Communications in Japan, vol. 64, no. 2, 1981. https://doi.org/10.1002/ecja.4410640202
Este sitio web utiliza cookies propias y de terceros para el correcto funcionamiento, análisis de la navegación y visualización por parte del usuario. Si continúa navegando, entenderemos que acepta su uso.
Se recomienda al usuario que lea atentamente esta Política de Cookies para informarse sobre el uso responsable que la página web hace de ellas y sobre las opciones que el usuario tiene para configurar su navegador y gestionarlas. Leer política de cookies
Cookies necesarias
Las cookies necesarias son absolutamente esenciales para que el sitio web funcione correctamente. Esta categoría solo incluye cookies que garantizan funcionalidades básicas y características de seguridad del sitio web. Estas cookies no almacenan ninguna información personal.
Las cookies necesarias que se utilizan en esta web son:
_PHPSESSID: Esta Cookie es usada por el lenguaje de encriptado PHP para permitir que las variables de sesión sean guardadas en el servidor web. Esta cookie es esencial para el funcionamiento del sitio web.
cmoove_gdpr_popup: Cookie técnica y necesaria que contiene el valor de si se ha aceptado la política de cookies.
mfn-builder: Esta cookie técnica y necesaria es usada por el tema de la web para cargar los contenidos de manera estructurada.
Si desactivas estas cookies no podremos guardar tus preferencias. Esto significa que cada vez que visites esta web tendrás que activar o desactivar las cookies de nuevo.
Cookies no necesarias
Cualquier cookie que no sea particularmente necesaria para que el sitio web funcione y se use específicamente para recopilar datos personales del usuario a través de análisis, anuncios y otros contenidos integrados se denominan cookies no necesarias. Es obligatorio obtener el consentimiento del usuario antes de ejecutar estas cookies en su sitio web.
Las cookies no necesarias que se utilizan en esta web son:
_ga: se utiliza para distinguir los usuarios que acceden al sitio web.
_ga_*: se utiliza para generar datos estadísticos acerca de cómo utiliza el usuario el sitio web.
¡Por favor, activa primero las cookies estrictamente necesarias para que podamos guardar tus preferencias!