42

The original IBM PC and later variants used an Intel 8253 or 8254 as a sound chip. Why did users add sound cards such as the Adlib or Sound Blaster. I remember voice output with programs like telephone answering programs. The sound was wimpy but I attributed most of the quality to speaker size. What was lacking with the original PC sound chip?

  • 45
    Calling the 825x "sound chips" is kind of a stretch. – Joe Feb 28 '18 at 21:05
  • 49
    The 825x made sounds. Adlib & SB made music. – TEMLIB Feb 28 '18 at 21:10
  • 31
    The 8253 wasn't a sound chip, it was a timer that had an unused channel on it, and some engineer had the bright idea to hook up that unused channel to a speaker to produce simple tones. It's kind of the musical equivalent to a recorder, it can play a small number of notes and you can only play one note at a time. – Ken Gober Feb 28 '18 at 23:23
  • 17
    And yet, if you had the right amount of chutzpah you could pull off miracles with that little buzzer. I remember my jaw dropping to the basement when I first saw [heard] "Another World" (aka "Out of This World"). It had a cinematic intro. With a sound track, and in-game audio effects. On a PC Speaker! Windows (3.1?) shipped with an unsupported optional audio driver for the PC Speaker. It was later pulled because of its severe impact in performance. Driving the speaker through the CPU at high frequency took everything the CPU could give. – Euro Micelli Mar 1 '18 at 1:57
  • 8
    I remember playing Mach 3 and it managed to get a decent sound (for that time) out of that simple chip. There is a YouTube video of the game, which has the audio track that matches my memories of that time. – agtoever Mar 1 '18 at 10:16
35

The PC speaker connected to the i8253 PIT (programmable interval timer) was only for beeping. For better sound you need to bypass the PIT and use the Speaker as an I/O port with a single on/off bit controlled by the CPU.

That way you can generate any sound (even PCM using a nasty PWM technique). The problem was that at that time the CPU was too slow, and consider that I/O operations are usually the slowest, the PWM frequency would not be too high meaning you got only a few levels of "volume" and nasty background high pitch noise. Also this technique consumes a lot of the CPU's time.

For better sound in games and apps you need:

  • A DAC
  • Low CPU consumption

Neither of which the PC Speaker is capable of (if not using only the PIT and simple square waves). There were 3 alternatives at the time:

  1. LPT DAC like COVOX

    A simple R2R bridge with diodes for blocking branching loops (which many DACs ignored at that time) connected to the 8-bit LPT port. This still needed CPU time but just a single out instruction per sample which was much much faster than maintaining PWM as a DAC for the Speaker.

    The output of the DAC was connected either to headphones or to speakers if an amplifier was used.

    Some of the newer "more advanced" LPT ports also had DMA capability so in such cases this was really cheap (anyone could bust it at home from just a few parts directly onto a Cannon 25-pin connector - not even a PCB was needed) and almost the same as using a SoundBlaster except for the MIDI polyphony... But only an 8 bit DAC was safe as the newer LPT was not fully connected.

    (Btw the "more advanced" is a joke as the older LPTs were usually much faster than the new ones, not to mention they had more bits for both input and output. Just for comparison my 386 LPT was capable of ~190KHz transfer and K6 had problems with 80KHz - so much for "advanced"...)

    Many music apps, games and demos were capable of using these DACs for sound output.

  2. external MIDI

    The game port was also compatible with the MIDI interface and could be used as a as polyphonic synthesizer if one were connected to it externally. This was not used commonly for games, as not everyone has an external MIDI device for this purpose. This was also not capable of PCM reproduction (unless workarounds were used which boils down to high CPU usage like the Speaker PWM).

    There were only a few music apps which could use this and usually only musicians used it.

  3. Sound card

    The Creative SoundBlaster is comprised of:

    • An ISA interface for interconnecting with the computer.
    • DAC+Amplifier+DMA
    • A MIDI polyphony generator (latter versions had also WAVETABLE)

    So the CPU just configures the DMA to transfer PCM samples from memory to the DAC from time to time and the sound card did the rest. So the CPU usage was very low and the CPU had time for other things like graphics, game logic and user input.

    MIDI works similar to the PIT but with much much more options and higher sound quality. SoundBlaster created their own polyphony generator. If you want to know more about it try to Google the AY-8912 chip datasheet which was used for the ZX 128k sound: it is a basic start to polyphony... and would give you an insight into how that works.

    This Sound card became the standard...

  • 2
    The claim about MIDI is a bit misleading. Of course did many games support MIDI - after all, Roland's the LAPC-1 was a MIDI device at core. – Raffzahn Mar 1 '18 at 8:21
  • 1
    @Raffzahn yes but internal not external connected by GAME Port MIDI like keyboard synthetisers. The #2 is about MIDI without soundcard .... – Spektre Mar 1 '18 at 8:21
  • 2
    LAPC-1 is a general purpose MIDI card plus an integrated MT32. It was often used to connect external MIDI synthesizers (additional MT32 or otehrs), not just keyboards. The very same games supported external instruments over seperat MIDI interfaces (not just game cards). So MIDI support was anything but rare. – Raffzahn Mar 1 '18 at 8:47
  • 3
    Somehow your last statement doesn't make sense. There is no either or of having a soudn card and having a MIDI port. And at least in my environment (Gamers at that time) it was prety standard to have soudn cards and MIDI. Either with seperate interfaces, or later on in combined cards. – Raffzahn Mar 1 '18 at 11:02
  • 4
    Actually, you didn't bypass the 8253, you used it as a one-shot PWM pulse generator. The procedure was to speed up the timer interrupt channel to the desired audio sample rate, and on each timer interrupt load the speaker channel with a count down value, which would generate a pulse of variable commanded width. Then do it again for the next sample. Also you had to count the fast interrupts, and then chain call the original ISR every nth time to replicate the original timer rate, or various parts of the system would fail to operate. – Chris Stratton Mar 1 '18 at 15:47
71

The original IBM PC and later variants used an Intel 8253 or 8254 as a sound chip.

The 8253 is a timer circuit, containing three timers able to generate timed interrupts or square-wave output with programmed frequencies. On the PC the third timer's output is, via an amplifier, connected to a simple speaker.

As said before, calling a 'simple' timer a sound chip is quite a stretch.

Since it's a digital output, no level control is available. Only on or off is possible. At best this results in rather nasty sounding square waves. There is no provision to smooth the signal (beside the inertia of the speaker membrane).

Also, the only frequencies that can be selected are those that result from dividing the base frequency (1,193,181.8 Hz) by an integer in the range of 1–65535. So even when accepting the meager signal quality, only very few notes can be played at correct frequency. Already the basic 440 Hz concert pitch will be off by .5Hz. So whatever is played using the timer will sound off pitch. Music can still sound good if a little off pitch, but only when all notes are off in the same way (*1) - which is not the case with this 'sound chip'.

Of course, there are also ways to manipulate the sound even a bit better by manually handling the output - which results in 100% CPU time usage.

Why did users add sound cards such as the Adlib or Sound Blaster.

Simply because they wanted sound - or at least music. Not just a beeper.

What was lacking with the original PC sound chip?

As said before, it's no sound chip at all. A sound chip will need programmable oscillators for different wave forms and at least some analogue ciruitry to make a smooth, more natural sound. Ofcourse, from an enginering point, the PC's use of a timer was a great improvement over the Apple II, its model and competition, as it allowed the beeping in parallel - not that this feature was used by BIOS or DOS.

Last but not least, the PC is an open system. It is made to add new/better hardware. So why shoudn't there be a real sound card? Improving the machine is a core feature of the design.


Addendum: agtoever added a comment with a great example of what was possible with the direct fiddling with the speaker. Awesome, but less than apealing when compared to even the cheapest form of soundcard, the AdLib of the same time, as used by Monkey Island. Next to zero CPU usage and crisp clear sound. Not to mention easy programming. I'd call that a huge advantage.


*1 - The average human decodes frequencies relative to each other. As a result sound is still perceived as good, even if the whole scale is shifted, as long as it's in the same direction and same percentage. Output needs to be way off to be noticed by an average listener. In contrast, if notes are off by a different margin and in different directions, even less trained listeners will notice.

  • 4
    @DavidRicherby Said frequency is the input, and it gets divided by an integer between 1 and 65535. The result is again some frequency which is output toward the speaker. As always, I'm open and wellcome a better wording, go ahead and improve it. – Raffzahn Mar 1 '18 at 10:02
  • 5
    To be petty, those would be integer divisions of, not integer dividers of, since an integer divider is an integer that you can multiply by another integer to get the original number. Blah blah blah. Separately: a lot of people would consider the AY-3-891x and SN76489 to be sound chips but each of them is also just dividing a clock input rather than running an oscillator. With multiple channels, optional LSFRs for 'noise' and 16-step volumes, and volume envelopes on the AY, so both much more advanced than the 8253, but much less than an OPL and without oscillators. – Tommy Mar 1 '18 at 15:10
  • 2
    @Jules: As a clarification, the master clock in the PC is four times the chroma rate. For best performance the 8088 should be driven by a clock with 1/3 duty cycle, so the master clock is divided by 3 to yield the system clock. Ironically, the only board which actually benefits from using a frequency related to chroma (the CGA card) operates asynchronously from the system bus, so the PC could just as well have used a 15.00Mhz crystal to yield a 5.000Mhz clock rate and 1.250Mhz peripheral clock rate. What's perhaps most interesting, though... – supercat Mar 2 '18 at 15:50
  • 1
    More important than attaining concert pitch is getting pitches a suitable interval apart. You can get a just intonation one-octave major scale (albeit with a wolf 4th re-so) by dividing the base frequency by some number to get your octave at the pitch you want, then dividing again by the following sequence: 60, 54, 48, 45, 40, 36, 32, 30 for do re ... do'. Divide by 2^k to transpose down by k octaves. – Rosie F Mar 2 '18 at 18:57
  • 2
    @supercat - Interestingly, although the 808[6/8] datasheets state that the clock needs to be 1/3 duty cycle, the actual requirement if you look at the timing restrictions is slightly different... and a 1/3 duty cycle of 5MHz gives 66.7ns, which is actually shorter than the minimum 69ns specified for the processor. Obviously this is within the range where it's almost certainly going to work - but technically it's out of spec, nonetheless. – Jules Mar 2 '18 at 19:39
24

Fundamentally, the lack of a specialized Programmable Sound Generator (PSG) or Synthesizer led to game sound effects and music on the IBM PC that were far inferior to competitors' microcomputers and game consoles.

The comparatively inexpensive Commodore 64 had a PSG known as the SID that was capable of synthesized multi-track music, game sound effects, and even crude digitized speech. Such sophisticated sound accompaniment for games wasn't possible with the PC's simple programmable interval timer. Here you can listen to SID music in your Browser.

As the popularity of PC's for gaming grew in the 1980's, the need for better sound to go with the increasingly sophisticated graphics became an impediment to the PC competing with 8-bit systems like the C64 and NES, or newer 16-bit systems from Commodore, Sega, and others. To solve this, first Ad Lib, and then Creative Labs (SoundBlaster), developed ISA cards for the PC with FM Synthesizer chips from Yamaha. Because of the vast superiority these cards offered over the simple interval timer and internal speaker of the PC, game developers quickly added support for them. Hear some sample AdLib Gold music from YouTube.

  • 2
    Strictly speaking, you can do speech with the PC speaker. I had a number of fun little programs that did so including a talking clock, several digitized songs, and the game "Tracon" where the airplane pilots spoke their checkins and orders from the tower were likewise spoken. Of course the computer could not do anything else while playing complex sounds, so the entire game would pause whenever it played a sound clip. For applications where timing was more critical an actual sound card was a definite necessity. – Perkins Mar 2 '18 at 20:52
  • @Perkins The SID lacks PCM playback too, and will bog down the CPU if you program sampled sounds. Synthesizer chips quickly evolved to include PCM playback abilities, then multi-channel PCM playback replaced the synths. Amiga got there early. – Brian H Mar 2 '18 at 21:06
  • following Brian H. link to SID Music, I invite you to try that one first as it is a good show of the SID's capabilities. "Ocean Loader 3" title: Ocean Loader 3 author: Peter Clarke released: 1987 Ocean (and there are also some incredible music in The Last Ninja, commando, etc). That chipset (and what the music coders managed to work out of them) was amazing. – Olivier Dulac Mar 5 '18 at 19:44
  • @Perkins: It's also possible to do four-voice audio out of the PC speaker. Getting quality sound with bit-banging requires at least a 6MHz 80286 (my code works even on a 4.77MHz XT, but sounds a bit rubbish). Programming the PC controller more cleverly allows four-channel wave-table synthesis even from a 4.77Mhz PC. – supercat Jul 14 '18 at 20:10
23

Here's typical audio from a PC speaker: https://youtu.be/ZLwri0J1S4E

As you can hear, it's really only designed to make beeps of various frequencies, all the same volume level. But by quickly turning the speaker on and off, you can play 1-bit PCM audio. Here's what it sounds like: https://youtu.be/HstgfH9FWV4

And because it's unbuffered, it's very CPU-intensive just to do that PCM audio, so forget about using it in a game without pausing the image.

A simple resistor ladder DAC on the parallel port produces 8-bit PCM audio, a dramatic improvement but unbuffered so still too CPU-intensive for fast action games: https://youtu.be/spOenlrSSOE#t=19m9s

When you add a buffer, it can be used in fast action games: https://youtu.be/EoGCf69QLJc

An alternative is FM synthesis to produce music and simple sound effects without using the CPU: https://youtu.be/nSXlTJLqyL0

The first SoundBlaster had both 8-bit buffered PCM audio and FM synthesis, and could also record in 8 bits.

  • is the second video Silpheed with sound blaster or speaker? – Juan Carlos Oropeza Mar 1 '18 at 14:33
  • 1
    A different platform, but check out Manic Miner on the ZX Spectrum for about as good as in-game music gets if the CPU has to toggle a 1bit device to produce audio. The PC does better by being able to generate a square wave without processor intervention but that helps to point towards the pausing the image point I think. Though it's actually pausing the audio, producing that staccato effect. – Tommy Mar 1 '18 at 15:17
  • @Juan video#1 and #2 are PC speaker, #3 is a Covox Speech Thing attached to the parallel port. – traal Mar 1 '18 at 16:18
  • @Tommy z80.i-demo.pl. Some of these are so-so, but there are some great compositions in there which easily beat Manic Miner. – wizzwizz4 Mar 4 '18 at 19:15
  • 1
    There were actually Windows 3.1 speaker drivers for audio. The one shipped with "After Dark" even tried to play audio tracks of videos... – Neil Mar 5 '18 at 13:50
15

There is another angle complementing all these answers and even the question:

The original PC was mainly designed and marketed as a boring but "reliable" business machine, building on top of 20-year-old technology on the line of CP/M hardware for lowering the production costs and being able to build machines with off-the-shelf, discrete TTL technology.

So sound and video hardware were not exactly a priority. This also had the side effect that a de facto standard with continuity in time was never established in that department. That further complicated developing software and improving those technologies.

In effect, the meager capabilities of the XT/AT in sound, video, and multitasking were more obvious when comparing it to several contemporary machines, of which notably the Commodore Amiga deserves a special mention.

As other answers correctly point out, the native technology for producing sound was not that much better than a ZX Spectrum (a largely domestic British 8-bit machine contemporary to the XT model), except for the (clever) hack of being possible to drive it with an 825x timer chip.

  • 2
    The Amiga and Archimedes lines probably pioneered the now-common PCM sampled sound. – Zac67 Mar 1 '18 at 18:32
  • 2
    The 1984 Macintosh was a consumer machine with PCM sampled sound only that predates both; a single channel at approximately 22Khz was provided by just having the video logic fetch a new sample during each horizontal sync. They promoted it as having 'four channel sound' at the time because that was the way the market spoke, but if producing tonal output it's really just the CPU sitting in a tight loop doing software mixing. – Tommy Mar 1 '18 at 19:10
  • 1
    @Tommy Absolutely! Sorry for forgetting the Mac. – Zac67 Mar 1 '18 at 20:24
  • 1
    Well I'm sure earlier computers used PCM audio somewhere — given that CDs became commercially available in 1982 then even discounting whatever you used then to master a CD, I'd be amazed if there weren't at least one arcade game with PCM hardware, or an add-in board for any of the expandable machines. What's interesting to me about the Macintosh's use of PCM is that it's there as a cost reduction, not a quality improvement. – Tommy Mar 2 '18 at 15:25
  • 2
    @Tommy: Eugene Jarvis produced an arcade-machine sound board that used a 6800 (not 68000) processor to bit-bang sound out an 8-bit DAC. The board was featured in Defender, Stargate, Robotron, etc. as well as many pinball machines, and was responsible for making many Williams' Electronics machines instantly recognizable by ear. – supercat Mar 2 '18 at 21:48
4

The IBM PC was designed to be modular. You could put in a cheap sound card or an expensive sound card or no sound card at all. You could put in a cheap video card or an expensive video card. You could add a modem card or ethernet card. Repairing the unit was often done by pulling out cards and trying different cards until the offending card was discovered and replaced. If the mother board was bad, all the cards could be moved to a different motherboard. Upgrading was as easy as adding or replacing a card and installing new drivers. The only reason modern cell phones and tables are not designed this way is issues relating to space. The original "sound chip" could only make a beep. It was used for diagnostic purposes where the number of beeps at start-up gave out diagnostic information or maybe getting the user's attention. Use of the beep sound chip in games was a cheap hack and it sounded cheap.

4

The built-in PC speaker, although a very "basic" and inexpensive part, could render sound/music/voice about as well as any portable audio device (pocket radio, mini cassette recorder/player, etc.), clock-radio, or speakerphone of the time. That is to say that mid-range such as speech could be clearly understood.

What made built-in PC sound so poor/limited was the fact that the driving signal was a simple on/off (1-bit digital), not analog (variable voltage) fed through a low pass filter (to "round off" the "square" edges of the input waveform). The upper limit of how fast things could happen was determined by the system clock, which in the original system was 4.77MHz (divided down to the 1.19 MHz clock driving the timer chip which controlled the speaker). As a result, sounds could only be crudely approximated. See page 2-22 of the reference manual (with schematics) I found here: http://www.minuszerodegrees.net/manuals/IBM_5150_Technical_Reference_6025005_AUG81.pdf

Doing a little math... the 1.19MHz clock rate limits the 1-bit audio to about 27 possible amplitude levels at 44,000 samples/sec (for about 28dB SNR and an audio frequency range up to 20kHz, assuming the CPU could keep up), or an equivalent of 6-bit audio at about 18,000 samples/sec (for about 36dB SNR and an audio frequency range up to about 8.5kHz), and so forth. A decent sound card should have equalled CD fidelity - 16bit sampling at 44k samples/sec (for about 96dB SNR and an audio frequency range up to 20kHz, on each of two channels).

Bear in mind that the only function the operating system ever offered in relation to the speaker was to make a pre-defined beep sound. It was offered via an O/S call as a simple beep, and used by the BIOS to signal to the user (via sequences of long and short beeps, sort of like Morse code) if the start-up diagnostics encountered any issues like missing keyboard, stuck keys, missing boot device, memory test failure, etc.. Essentially, the role of the speaker was simply a means to alert the user to something, and a beep does the job.

The IBM PC was designed to be a relatively inexpensive tool to run business applications - word processing, spreadsheets, databases, and such (even though a usable system cost as much as a car). Rendering speech was probably seen as a capability unattainable for the target price point, and playing music was not within the scope of the business market it was targeted to.

What IBM probably failed to anticipate is the interest the PC would attract in the home/hobby market due to the "openness" of the system (they published everything, which is what ignited the clone market). It was this spin-off clone market that revealed shortcomings in the original design, but also the extensibility to address them. However, third-party developers of hardware and software had to maintain compatibility with the base design, so true audio solutions (as well as better video, networking, extended/expanded memory etc.) had to be offered as add-on cards.

  • Over the years, I have been always divided wether the clone market was a byproduct of their technical feats or them using an off-the-shelf outdated technology and processor far simpler than their competitors 16/32 bit competitors. Not having custom designed chips certainly helped others redesigning and doing a clean room implementation of their machines. – Rui F Ribeiro Mar 5 '18 at 12:08
2

One major thing the builtin sound hardware lacked was any facility to input/record (but so did the very first IBM soundcard, which was more or less a Yamaha FB-01 on an ISA card).

  • 1
    Although this is 95% true, the original PC offered 1-bit tape input, readable via the 8255, so technically you could sample a one-bit wave from a tape for playback. Several Spectrum utilities do the same. But it always sounds much worse than PWM, relies upon a connector most clones omitted and which wasn't used at all by MS-DOS, and that connector was essentially only used for tape players so you wouldn't expect just to plug in e.g. a microphone. So I'm being pedantic. I'll bet nobody, ever, used that port to sample audio. Not even once. – Tommy Mar 2 '18 at 15:33
  • 1
    @Tommy I and many others (ab)used the parallel port for inputing sound... retrocomputing.stackexchange.com/questions/3314/… – Rui F Ribeiro Mar 2 '18 at 16:01
  • @Tommy: I never used the cassette port on the PC, but I have sampled crude speech using the cassette port on an Apple //e. – supercat Mar 2 '18 at 21:49
0

One further point is that the sound card was an easy way to add a joystick port. This was shared with the midi connector. That was one of the main reasons I bought a second hand SoundBlaster 1.5 for X-Wing.

  • The original PC had a game port on a separate expansion board. It was only after sound cards started to become popular that they were merged into the same product, along (later still) with the addition of an extra IDE adapter for attaching a CDROM drive. – Jules Mar 5 '18 at 11:56
  • @Jules that's true, but I don't think our clone did – Chris H Mar 5 '18 at 12:31

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.