SID 8580 R5 - Golden Axe by Jeroen Tel: 

SID 6581 R4 - In Concert. Just playing a selection of great SID songs on the Speak&SID:



MIDI IN Synth Demo - Playing the SID and AY-3-8912 in parallel via a MIDI keyboard. The "synthesizer program" is running on the CPC, not the Speak&SID firmware:



Second SID Player Demo - Line Out Recording and LED "Lightshow":


First PCB Version & SID Player Demo:


CPC MIDI IN SID + AY Synthesizer - with a MIDI breakout board it turns the CPC into a powerful SID+AY MIDI IN Synthesizer: 



Breadboard Prototype - First SID BASIC Test:


Breadboard Prototype - Amstrad SSA-1 Emulation Test:



A Speech Synthesizer,  SID Soundcard, and MIDI IN SID+AY Synthesizer for the Amstrad CPC

Speak&SID plugs into the expansion port of the CPC, and is a M4-compatible expansion card. A cable or a CPC expansion board backplane (such as the Mother4X or the LambdaBoard) is recommended, and in fact required in case more than one expansion card is being used. Else, a simple 50pin IDC ribbon cable will do as well.

This CPC expansion board offers:

  1. A SpeakJet-based speech synthesizer, featuring a native SpeakJet-based mode as well as a SpeakJet-based emulation of the classic Amstrad SSA-1 speech synthesizer from 1985.
  2. A sound synthesizer utilizing the fabolous SID (Commodore 64) soundchip. Speak&SID CPC can use the original 6581, the 8580, as well as modern re-implementations of the SID chip such as SwinSID or ARMSID. To use the 6581, supply 12 V with positive center polarity over the Speak&SID power barrel jack using a stabilized low noise (preferably linear) DC power supply; for the 8580, 9 V are required. No extra PSU is needed for SwinSID or ARMSID.
  3. A general purpose multi-IO expansion, featuring a Serial Interface (UART), a SPI Interface, an I2C Interface, as well as 4 digitial general purpose input/output ports (GPIOs). The 4 rightmost LEDs of the LED Segment Bar shows the status of the 4 GPIO outputs. Notice that Speak&SID supplies pin headers for GPIO, UART, SPI, and I2C.
  4. A MIDI IN realtime SID+AY synthesizer. With a 10 $ MIDI breakout board connected to the UART pin headers, and the CPC running a machine code program, Speak&SID turns the CPC into a powerful and versatile SID and AY MIDI IN synthesizer.  

Firmware updates to the CPLD can be acomplished "in system" by using the JTAG header; the ATMega microcontroller can be updated with a ISP USB programmer such as USBtinyISP connecting to the SPI headers via Dupont cables.

Some Pictures

PCB 2 Front PCB 1 Front Breadboard 1 Breadboard 2 PCB

Some YouTube Videos

License

GPL 3

Speak&SID Hardware Overview

The main components are:

The source code for the CPLD and the ATMega are provided here, and HEX / JED firmware files as well.

CPC Speak&SID has two reset buttons: one for resetting the Speak&SID, and one for resetting the CPC.

CPC Speak&SID has two trimmers / potentiometers; the left potentiometer controls the volume / signal level of the SpeakJet chip, the other one controls the SID volume level. The signal stereo routing is determined by the 10 DIP switches, see below.

The sound comes out of the audio stereo jack. The left/right channel can be assigned individually (SpeakJet / SID). Also, a DIP switch determines whether the determined left or right channel audio is fed back into the CPC to be heard in the CPC's internal speaker.

The optional power barrel jack need center polarity, and either 12 V (SID 6581) or 9 V (SID 8580).

The LED Segment Bar visualizes the status / state of Speak&SID, see below.

Note that both the SpeakJet as well as the SID are mono audio output devices, but the can be assigned to the left and/or right channel of the stereo output signal using the DIP Switches. Do not assign both SID and SpeakJet output to one single (left or right) audio channel; use different channels. In case you would like to hear the SID (or SpeakJet) on both channels (left and right), make sure to deselect the SpeakJet (SID, respectively) first, using the DIP switches. See below.

Requirements

This project was developed using WinAVR. In addition, the AVR Programming Libraries from Elliot Williams' book "Make: AVR Programming" are being used. A copy of the library is also included in the src folder of this project.

Building and Maker Support

I am able to provide Speak&SID as a kit, or only pre-programmed components (CPLD, ATMega), or even a fully assembled version inlcuding a connection cable and/or LambdaBoard expansion board backplane. Send me a mail if you are interrested. Or, just download the sources and build it from the provided Gerbers and BOM.

To build the firmware from source, use make and the provided Makefile. The makefile template is again from Elliot Williams' "AVR Programming" book. See below (Acknowledgements).

Status LEDs

LEDs

DIP Switches

DIP12

Firmware Update / Flash

The firmware can be updated without having to remove the ATMega uC from the socket. The SPI header pins of Speak&SID can be used for updating the firmware.

I am using the USBtinyISP programmer. Just connect the progammer's SPI pins with the corresponding Speak&SID SPI pins, using DuPont cables: MOSI <-> MOSI, MISO <-> MISO, SCK <-> SCK, and GND <-> GND. Note that VCC might not be required. If your connecting to VCC, make sure to FIRST power on the CPC and Speak&SID BEFORE plugging in the USB cable into your computer, otherwise the USB port is powering the CPC. VCC should not be required for programming. With the proper connections in place and the CPC and Speak&SID up and running, use the provided make flash (entered into a <a target="_blank" rel="noopener noreferrer" href="<a target="_blank" rel="noopener noreferrer" href="<a target="_blank" rel="noopener noreferrer" href="<a target="_blank" rel="noopener noreferrer" href="http://command.com">http://command.com</a>"><a target="_blank" rel="noopener noreferrer" href="http://command.com">http://command.com</a></a>"><a target="_blank" rel="noopener noreferrer" href="<a target="_blank" rel="noopener noreferrer" href="http://command.com">http://command.com</a>"><a target="_blank" rel="noopener noreferrer" href="http://command.com">http://command.com</a></a></a>">command.com</a> shell) from the Makefile whilst holding the Speak&SID Reset button pushed down until the programming process has finished. The firmware HEX file is small, so it only takes about 20 seconds to programm the firmware.

In case you encounter problems, it might be the reset button bouncing... in that case, try a couple of times, and if that fails there is still the option to simply bridge the reset button with a cable (would require some temporary soldering or similar). Flash programming only works when the ATmega is constantly held in reset state.

Firmware Documentation

The best documentation is the ATMega source code itself.

Speak&SID main IO port is &FBEE. This is the port that is / was being used by the Amstrad SSA-1 speech synthesizer. In addition, some modes use &FBDE as a status port. The SID is mapped into IO range &FAC0 - &FADC.

In the following, a control byte or command is a sequence of at least 2 bytes starting with 255. For example, to reset Speak&SID via the reset command / control byte (command 0), send 255, 0. The different modes of Speak&SID are entered by sending various control bytes. Note that, in order to send 255 as payload data, it needs to be escaped, otherwise it would be interpreted as starting a control byte. Hence, send 255, 255 to send 255 as payload data.

In the following, the control bytes for setting the corresponding Speak&SID modes are listed:

The current SpeakJet voice can be changed / altered in a number of ways, including pitch, speed, volume, etc. Use the following control bytes: change volume (20, <value>), speed of speech (21, <value>), pitch (22, <value>), and "bend" (23, <value>). Once changed, the voice can always be tested using control byte / command 10 (test voice). Notice that the same voice is used for the SSA-1 mode (see next). The possible values for Volume, Speed of Speech, Pitch, and Bend, are documented in the SpeakJet User Manual.

Please note that you cannot simply send ASCII codes to the SpeakJet - you need to send allophones. The SpeakJet allophones are again listed in the SpeakJet User Manual. There is also a program from the maker of the SpeakJet, called the PhraseALator, which will do a text-to-allophone translation. The computed allophone codes / bytes can be sent to the SpeakJet. Note that there is also a demo program on the CPC Speak&SID disk whose allophone bytes for the produced utterance were computed using the PhraseALator.

The incoming RX messages are buffered via interrupts at all time as soon as the UART mode is enabled, and the so-far received buffer content and number of bytes in the buffer can be requested and retrieved at any time via a number of UART commands.

A number of control byte / commands determines the UART TX settings. These commands are:

See table below for baud rates
5 to 8 bits word width
No parity, odd or even parity
One or two stop bits

Command Byte Explanation
50 9600 default
51 8
52 0 (no), 1 (odd), 2 (even)
53 1, 2

The BAUD rates are:

BAUDS
2400
4800
9600 (DEFAULT)
14400
19200
28800
31250
38400
57600
76800
115200
208333
250000
312500 (MIDI)
416667
625000
1250000

In the UART / Serial Mode, the receive ring buffer can hold 128 bytes currently, but it is of course up to you to change this. In order to retrieve the number of bytes currently in the buffer that have not been read by the CPC yet, use control byte / command 40. The number of bytes is available to read from port &FBEE. Then, the next unread byte can be retrieved using control byte / command 41, again from port &FBEE. So, first ask for the number of unread bytes in the buffer using 41, and learn that there are n bytes to be read, then set up a loop which calls control byte / command 41 n times, reading n values from the input buffer from port &FBEE. See the provided BASIC example program on the CPC dsk.

The following commands / control bytes do not correspond to modes, i.e., the do not change the current mode, but are also prefixed with 255:

CPC Disk - Software

Thre are two DSK images - SPEAKSID.DSK, and SIDPLAY.DSK. The latter one contains a SID tune player with LED Lightshow, and some SID tunes. The Speak&SID CPC DSK contains a SpeakJet demo program, a demo of the Serial Interface / UART (simple terminal program), a GPIO test program, and 2 BASIC SID test programs. The biggest program on this disk is the SYNTH.BAS MAXAM assembler program that implements the MIDI IN realtime SID+AY CPC Synthesizer.

Acknowledgements

Previous SID hardware soundcards for the CPC exist. The earliest one was featured in the CPC International 08/1989 Issue. Other attemps of connecting a SID to the CPC are documented on the CPC Wiki Forum. The hardware design of Speak&SID differs in major aspects from all of these, and is not related to any previous designs in any way.