The Covox years

I have covered various early sound solutions from the DOS/8088 era recently, including AdLib, Sound Blaster, PCjr/Tandy’s SN76489 chip, and the trusty old PC speaker itself. One device that has yet to be mentioned however, is the Covox Speech Thing.

It is a remarkably simple and elegant device. Trixter has made a very nice video showing you the Covox Speech Thing, and the included speakers:

So it is basically an 8-bit DAC that plugs into the printer port of a PC (or in theory other computers with a compatible printer port). The DAC is of the ‘resistor ladder‘ type, which is interesting, because a resistor ladder is a passive device. It does not require a power source at all. The analog signal coming from the DAC is not very powerful though, so there is an amplifier integrated into the speakers. You can also run the output into a regular amplifier or recording equipment or such, but the output is not ‘line-level’, it is closer to ‘microphone-level’, so you may want to use a small pre-amplifier between the Covox and your other equipment.

So how does one program sound on a Covox? Well, it is very similar to outputting samples via PWM on the PC speaker, or outputting 4-bit samples by adjusting the volume register on the SN76489. That is, there is no DMA, buffering or timing inside the device whatsoever. The CPU has to write each sample at the exact time that it should be output, so you will either be using a timer interrupt running at the sampling frequency, or a cycle-counted inner loop which outputs a sample at every N CPU cycles. So this means that the sound quality is at least partly related to the replay code being used: the more accurate the timing is, the less temporal jitter the resulting analog signal will have.

So, such a simple device, with so few components (the real Covox has only one component inside, it uses a resistor ladder in a DIP package), and relying so much on the CPU, how good can this sound really? Well, my initial expectations were not that high. Somewhere in the early 90s, before I had my first sound card, I found the schematics for building your own Covox-compatible device. As said, it’s just a simple resistor ladder, so it can be built with just a few components. Various PC demos, trackers and MOD players included Covox support, and schematics. There were (and still are) also various cheap clones of the Covox available.

The one I built was very minimal, and I didn’t use resistors with extremely low tolerance. It produced sound, and it wasn’t that bad, but it wasn’t that great either. Not ever having heard any other Covox, either the real thing or a clone, I had no idea what it should sound like, and given the low cost and simplicity of the device, I figured it was nice that it produced any recognizable sound at all.

Fast forward to a few months ago, when there was talk of building a Covox clone on the Vogons forum. User ‘dreamblaster’ had made a clone, and the recordings he made sounded quite impressive to me. Way better than what I remember from my own attempt back in the day. But then Trixter came round, and said the real Covox sounded even better. And as you can hear at the end of the video above, he is right: as far as 8-bit DACs go, the Covox sounds excellent. It is crisp and noise-free, and actually sounds better than early Sound Blasters if you ask me (they are quite noisy and have very aggressive low-pass filtering to reduce aliasing, presumably because they were mostly expecting people to use them with samples of 11 kHz or less). You would never guess that this great sound quality would come from just a simple passive device hanging off the printer port of a PC.

So we set off to investigate the Covox futher, and try to get to the bottom of  its design, aiming to make a ‘perfect’ clone. I made a simple application to stream samples from disk to the printer port (basically a small adaptation of the streaming player for PC speaker that I showed here), so we could play back any kind of music. Trixter then selected a number of audio samples, and we did comparisons between the Covox clones and the real thing.

One thing that stood out was that the Covox DAC had a very linear response, where the clones had a much more limited dynamic range. Aside from that, the clones also produced a much louder signal.

The first thing where various clones go wrong, is that there are various ways to construct a resistor ladder. Which type of ladder is the ‘correct’ one for Covox? Luckily, Covox patented their design, and that meant that they had to include the schematic of their resistor pack DAC as well:

us4812847-3So this tells us what the circuit should look like for an exact clone. The patent further explains what values should be used for the different parts:

Nominal resistor values are 200K ohms each for resistors R1 through R8, 100K ohms for R9 through R15, and 15K ohms for R16.

Capacitor C1 has a value of about 0.005 microfarads, yielding a low-pass filter bandwidth of about 3000 hertz.

NB: The part of the schematic on the right, with registers R30-R37, are part of an example printer circuit with pull-up resistors, to show how the Covox could work when it was used in combination with a printer connected to its pass-through printer port. They are not part of the Covox itself. There are also two related schematics in the patent, one with the pull-up resistors added to the pass-through port on the Covox itself, and another with active buffer amplifiers. The only variations of Covox Speech Things that we’ve seen all use the most simple schematic, with only the resistor ladder and the pass-through port without pull-up resistors.

To make sure however, we did some measurements on the real Covox to try and verify if the actual unit was exactly like the patent or not. It would appear that indeed, the ladder is as designed, with 100k and 200k resistors. We are not entirely sure of the 15k ‘load’ resistor though. The measurements seem to indicate that it is probably closer to a 25k resistor. This resistor is used to bring the signal down from the initial +5v TTL levels of the printer port to about ~1v (measured), which would be an acceptable ‘line level’ input for audio equipment (when connected to an actual device, the impedance of the device will pull it down a bit further, the effective maximum amplitude should be around +0.350v in practice).

It appears that many clones did not clone the Covox exactly. Possibly to reduce cost by choosing a simpler design to reduce the amount of parts, and possibly to avoid the patent. The result however is that they generally sound considerably worse than the real thing (and in fact, perhaps because of this, Covox may have inadvertently gotten a reputation for a low-quality solution, because most people would use clones that didn’t sound very good, and not many people were aware of just how good the real Covox sounded. I certainly fall into that category, as I said above). For example, there is a schematic included in the readme-file that comes with Triton’s Crystal Dream demo:

TritonCovoxSchematic

As you can see, it is a simplified circuit and not really a ‘ladder’ as such. It uses less components, but is also less accurate. One interesting characteristic of a resistor ladder is that you can build it from batches of the same resistor values (especially considering the fact that you only need R and 2R values, and 2R can be constructed from two R resistors in series). If you buy resistors in a batch, then their tolerance in absolute sense will be as advertised (you can buy them eg with 5% tolerance, 1% tolerance or 0.1% tolerance). However, the relative tolerance of the resistors in the same batch is likely much smaller. And in the case of a resistor ladder, the relative tolerance is more important than the absolute tolerance.

Since this schematic uses resistors of various values, it cannot exploit the advantage of resistors in the same batch. Also, the values of these resistors do not correspond with the values in the real Covox circuit. Aside from that, the load resistor is missing, and they chose a different value for the capacitor.

Another popular one came with Mark J. Cox’ Modplay:

ModplayCovoxSchematic

This schematic at least appears to be closer to the Covox, although not entirely the same. Again, the resistor and capacitor values are different from the Covox.

In general, what happens is that the response of the DAC is nowhere near linear. We’ve found that the clones tend to have much higher output levels than the real Covox, but espescially the dynamic range is far worse. You hear that especially when there is a fade-out in music: the actual level doesn’t drop off very much, and as a result, the 8-bit quantization noise becomes very obvious, and the sound is perceived as ‘grainy’ and low-quality. The real Covox gets a very linear response, so it sounds about as good as you can expect from an 8-bit DAC.

Our aim was to make one that sounds as close to the real thing as possible, or possibly even better. The end-result is the CVX4, which you can find here: http://www.serdashop.com/CVX4

It has a number of dip-switches so you can fine-tune the filtering and output level to suit your taste. This of course includes a setting that is completely true to the original Covox. Be sure to check out the example videos and reviews that are posted on the shop page. You can hear just how good it sounds. I will post one video here, which uses CvxPlay to demonstrate a number of samples selected by Trixter, which we used to compare the real Covox with the CVX4, and fine-tune the design:

If you are looking for a Covox clone for your retro gaming/demo/tracker PC, then look no further, the CVX4 is as good as it gets!

Advertisements
This entry was posted in Hardware news, Oldskool/retro programming and tagged , , , , , , , , , , , , , , , . Bookmark the permalink.

2 Responses to The Covox years

  1. Pingback: CVX4 – Parallel Port 8-Bit DAC Covox Speech Thing Clone « Adafruit Industries – Makers, hackers, artists, designers and engineers!

  2. Pingback: CVX4 – Parallel Port 8-Bit DAC Covox Speech Thing Clone | RadberryPi.Tech

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s