logo

Goal
At first sight
The schematic
The power supply
The microcontroler
The synthesiser
The ROMs
Code and memory maps
AVR cartridge
CPLD cartridge
Converting sounds
Creating the ROM
PCBs
The synthesizer

SimulationThe first circuit developed for the S&S was the TMS5100 (aka TMC0280), a voice synthesizer that uses LPC encoded data (Linear Predictive Coding). The datasheet can't seem to be found on the net, but its 8-bit brother, the TMS5220 has one.

LPC is still used nowadays for voice in applications where bandwidth is the main constraint, and can reach bitrates as low as 1.2kb/s, and thus store about 200 words in 32kB.

To achieve such a performance, the synthesizer does not use data representing the sound's wave shape (like a simple wav file), but blocks of data representing 25ms of audio frames containing only the information necessary to reproduce the voice: energy (amplitude), pitch (frequency), and parameters of a 10th order digital filter.

Information Energy (E) Repeat flag (R) Pitch (P) Filter parameters (K1~K4/K10)
Size (bits) 4 1 5 18 ou 39

Parameter K1 K2 K3 K4 K5 K6 K7 K8 K9 K10
Size (bits) 5 5 4 4 4 4 4 3 3 3

To produce sound, the synthesizer has two internal oscillators, also called "excitation sources." The first is similar to a DDS using a internal "chirp ROM" containing data produced from the voice of a person (different versions depending on the synthesizer). Read as it is, that sound resembles a "uuuh" and is used to produce voiced sounds (vowels, for example).
The second oscillator is a noise generator made of a shift register. Those who have dealt with sound generators from the early 90th will recognize the white noise channels of some chips based on this technique. This source is used to produce non-voiced sounds.

To save even more space, the information is written only if it's needed, so there are different frame sizes according to what information is necessary. The synthesizer is able to recognize the type of frame as it reads the data. It also has an internal RAM to store the last frame read, so it can be repeated if necessary (it is not read again).

  • To encode a voiced frame (pitch not equal to 0), all information is required (E, R, P and K1 ~ K10), or 49 bits.
  • To encode a non-voiced frame (pitch to 0), it's the same except only the first 4 K parameters are needed, this sums up to 28 bits.
  • To repeat the last frame, only E, R and P are necessary, or 10 bits.
  • To encode a silent frame, only 4 bits are used for the energy (E = 0).
  • To indicate the end of a word or phrase, it's the same, except E is set to 15.
Frame type Conditions Size (bits) Informations
Voiced 0<E<15, P>0, R=0 49 E, R, P, K1-K10
Non-voiced 0<E<15, P=0, R=0 28 E, R, P, K1-K4
Repeated 0<E<15, R=1 10 E, R, P
Silence E=0 4 E
End E=15 4 E

SimulationConcerning the interface, there is a 4-bit bus (CTL1 ~ 8) for bidirectional microcontroller communication, controlled by a CS signal and clock (PDC). On the other side, there is another 4-bit bus going to the ROM(s) as well as two control signals M0 and M1.

The synthesizer is also used as a clock generator with an external RC circuit, which produces the clock for the microcontroller (CPUCLK) and ROMs (ROMCLK).

The push-pull analog output is on pins 11 and 12.

The microcontroller sends 4-bit commandes to the synthesizer after setting CS high. Those codes ARE NOT those in the TMS5220 datasheet), those used in the S&S are:

  • 10: Start talking. Read the bitstream from the ROM.
  • 0: NOP. No operation, do nothing.
  • 14: Read status. At the next second pulse on PDC, bit 0 (CTL1) becomes an output and indicates whether the synthesizer is talking or not.
  • 2: Load 4 address bits in the ROMs.
  • 8: Read a bit from the ROM.
  • 4: Read 4 bits from the ROM.

Reading the ROM is done bit-by-bit with to the use of several "8" commands to load an internal 4-bit register to the synthesiez, then read this register is read in parallel with the "4" command. The use of these commands is described in the page about the ROMs.

Once playback is started, the synthesizer only stops speaking when it encounters a frame with E = 15.

footer
symbol symbol symbol symbol symbol