Talk Atari to Me
Revel in the glory of a talking, singing Atari 2600 with the S.A.M. 2600 voice synthesizer!
As much as anyone, I understand the urge to make old hardware do unexpected and surprising things. If a project involves retro speech synthesis, à la Speak & Spell or the voice of WOPR in WarGames, then you have got something really special. But then to choose the Atari 2600 as the platform...well, 2020 may have been a rough year, but S.A.M. 2600 has just tilted the balance in favor of good! Sound dramatic? That is because it is; a talking Atari cannot outweigh all that has happened this year, but I would bet you cannot watch S.A.M. talk and sing without cracking a smile.
Rossumur had been thinking about S.A.M. The Software Automatic Mouth software, released in 1982 for Atari, Apple, and Commodore home computers, and in a variant of the question “but can it play Doom?”, he asked “but can it run on an Atari 2600?” And the resounding answer was that yes, it definitely (partially) can.
The original S.A.M. software consists of three steps: text to phoneme, phoneme to allophone, allophone to audio. The first two steps are rules-based, and simply cannot fit into a 4KB Atari ROM. As a workaround, these steps were built into a web-based application that precomputes the allophones for a given string of text. The output is a compressed stream of phoneme/allophone/timing data that can then be included in an Atari 2600 ROM.
Even with the initial stages of the speech synthesis precomputed, there is still much difficulty as the Atari is a system with severely constrained resources. Anyone that has known the joy and pain (mostly pain) of coding for the 2600 knows that the 128 bytes of RAM and the clock cycles consumed by drawing graphics with the memoryless television interface adapter do not leave much resources for game logic. With that in mind, rossumur devised an algorithm that only uses every other scanline to generate the audio.
The S.A.M. 2600 engine requires only 33 bytes of RAM, but does need a fairly hefty 1.2KB of ROM. The remaining 2.8KB of ROM space is enough for about 2 minutes of speech, but of course any additional functionality also needs to fit in that same space. But you can extend ROM space through bank switching, and since the technique was used as early as the release of Asteroids, there is no shame in doing so for the retro purist.