Sunday, May 21, 2023

Nibbling Around the Sound Blaster's Lunch - Digital Sound in DOS Games without a Sound Blaster

The Creative Labs Sound Blaster line of cards became the de facto DOS sound card standard in the early 1990s and carried through that dominance until the last DOS games.  The Sound Blaster offered many useful features in a single card, an FM synthesizer, a gameport, MIDI functionality but most uniquely a digital sound processor designed to process digital audio input and output with minimal CPU intervention.  Gamers saw the value in this "all-in-one" card and bought lots of Sound Blaster cards,  which required game developers to support the card and giving Creative a huge lead in the market.  Creative was naturally very protective of its technology, which was full of quirks and obscure hardware behaviors.  Eventually sound chips from other manufacturers like MediaVision, Crystal Semiconductor, Electronic Speech Systems and Yamaha were available which promised some level of direct Sound Blaster compatibility.  

Not everyone could use a Sound Blaster.  For some PC gamers, the cost of the cards was out of reach to them.  Systems with weird busses like Microchannel have few sound card options and those that are available are rare.  Laptops usually did not come with ISA expansion and PCMCIA sound cards are also rare.  Some systems just do not have enough slots for a sound card once more essential needs, like a hard drive, are added to the system.  In this case a parallel port sound solution may be your only option.  Finally there were people disgusted with Creative's monopolistic practices and refused to support the Sound Blaster ecosystem.  In this article we will give an overview of digital sound solutions which offered no hardware Sound Blaster compatibility.

A Brief Overview of the Sound Blaster's Capabilities

Before we can talk about alternative technologies, let me give a brief overview of how the Sound Blaster handles digital audio output.  The Sound Blaster contained a "Digital Sound Processor" which was an Intel 8051 microcontroller with preprogrammed firmware.  The DSP was completely independent of the Adlib and Gameport but also implemented MIDI.  The DSP is programmed by sending commands to the DSP and reading and writing data to and from the DSP.  The DSP uses a hardware interrupt request (IRQs) to signal the system it needs attention.  Its DSP can be addressed by a series of ports in the I/O address space, typically using 220-22F.  For the purposes of digital output, almost all Sound Blasters support three modes and they are summarized simplistically as follows:

  1. Direct Mode - The CPU sends digital audio samples to the DSP one byte at a time and determines the sample rate by how fast it wants to send samples to the DSP.  
  2. Single-cycle DMA Mode - The CPU points the DSP to a memory buffer up to 64KiB in size containing digitized audio samples and the DSP will use a DMA channel to access that memory directly and play the sample data back without further CPU intervention until the buffer is exhausted.  At that point the DSP will send an IRQ indicating to the CPU that the DMA transfer has ended.  This method is supported by all Sound Blasters and is most often used by Sound Blaster games due to its lowest common denominator status.
  3. Auto-initialize DMA Mode - In this mode, instead of the DSP unit stopping when it has reached the end of the memory buffer, the DMA will return back to the beginning of the buffer and play new samples copied into the buffer by the CPU in the meantime.  Interrupts are used to signal the CPU that the memory buffer is about to be exhausted which allows the CPU the opportunity to put new samples into the buffer before the DSP returns to the beginning of the buffer.  All Sound Blasters can support this mode, but the Sound Blaster v1.0 and v1.5 may require a DSP upgrade (to v2.00) to support the mode.  
The Sound Blaster v1.0 and v1.5 handled only 8-bit audio PCM samples up to 23KHz normally (except in Direct Mode) and only supported digital audio in mono.  Their DSPs had the capability of decompressing specially encoded 4-bit, 3-bit and 2-bit digital data via ADPCM in hardware to 8-bit data using the DMA modes.  

The Sound Blaster v2.0 added new High-Speed Single-Cycle and Auto-initialize DMA modes to permit a mono 8-bit sample rate at up to 44.1KHz.  The Sound Blaster Pro v1.0 and v2.0 expanded on these High Speed modes allow for stereo 8-bit digital output up to 22.050KHz or stereo separation via its mixer.  The Sound Blaster 16 offered support for 16-bit stereo digital output at 44.1KHz.  

IBM PC Speaker

Driving a PC Speaker to output samples by pulse width modulation was a well-known technique by the time the Sound Blaster was introduced in 1990.  The PC Speaker normally generates a square wave where each period of the wave is of the same length and produces rather basic sounds.  With pulse wave modulation, the PC speaker receives square waves of different length periods, leading to more complex sounds and with enough variance in the period length, digitized sounds can be approximated.  While the audio quality leaves much to be desired, the volume can be quiet (especially with piezoelectric tweeters instead of a speaker cone) and the CPU has to spend a great deal of time to send samples constantly to the speaker, the result can be quite impressive. Eventually CPUs became sufficiently powerful to allow animated and scrolling video games like Pinball Fantasies to play while the speaker is outputting samples.  

Tandy 4-voice PSG

The Texas Instruments SN76496 PSG and clones (NCR 8496 & Tandy PSSJ) found in the IBM PCjr. and Tandy 1000s can be used to output digital samples using one of the square wave channels as a carrier wave while varying the volume register constantly.  These chips never came in a generic sound card and their support is limited to those computers.  There are ten games known to me which support this method and most do not support the Sound Blaster.  While later full AT-class Tandy computers like the 1000 RSX, 2500s and Sensation! include the 4-voice PSG, they relocated the I/O ports so these games will not be compatible with those computers.

Adlib MSC

While the Adlib is generally used as an FM synthesis sound source using the OPL2 chipset, the OPL2 can also be used to approximate digitized sounds.  The way this works is similar to the PSG chips, the programmer has to time the sine wave when it is at the top of its peak and then set the frequency to 0 to "freeze" the wave and then use the volume register to express the digital sound.  Out of this World can playback digitized audio through an Adlib, but the sound quality is not as good as its Sound Blaster driver and it requires faster hardware than the Sound Blaster.  Other games supporting digital audio on the Adlib are Bill and Ted's Excellent Adventure, Wizardry VI: Bane of the Cosmic Forge, Wizardry VII: Crusaders of the Dark Savant, Dungeon Master, BattleTech : The Crescent Hawks' Revenge.  Of course the Sound Blaster can support any of these games in this way, but all but Bill & Ted support the Sound Blaster for higher quality digital output.

Roland MPU-401 + MT-32 & SC-55

The Roland MT-32 and later the SC-55 were the gold standard for PC music during the DOS era.  The MT-32 and SC-55 had sound card versions, the LAPC-I and SCC-1, respectively.  Roland later released a combo of the MPU-401/AT card with an attached SCB-55 daughterboard which had SC-55mkII capabilities. These cards did not have any capabilities beyond their ability to play music like an external module connected to an MPU-401. The Roland MPU-401 interfaces are always supported in DOS games with MIDI support and do not come with compatibility issues like the lack of an Intelligent Mode or annoyances like hanging note bugs.  The Sound Blaster originally used its own MIDI interface and only added UART MPU-401 mode support with the Sound Blaster 16.  

Most MIDI devices have patches for sound effects like gunshot, water and applause but the Roland MT-32 does not.  The Roland MT-32 had the ability to have up to 64 custom instrument patches uploaded into its memory and certain games utilized that feature to produce sound effects.  Sierra was particularly good at this, making sounds as varied as creaking doors and owls hooting.  Later MT-32 compatible modules such as the CM-32L and the LAPC-I sound card have an additional 33 sound effects which the MT-32 lacks.  At least one game, Out of this World, supported these sound effects, and only those sound effects, with the LAPC-I/CM-32L install option.

The Roland Sound Canvas devices like the SC-55 did have sound effects patches and some games did use them.  One innovation of the Sound Canvas was to allow modules to use Variation Tones for extra instruments and sounds instead of the General MIDI-compatible Capital Tones.   Might and Magic IV & V will only play the bowshot sound effect consistently on a "first generation" Sound Canvas like an SC-55 and SCC-1 but not an SC-55mkII or even an SCC-1A.  This is because a certain feature called Capital Tone Fallback was present in the SC-55 but eliminated for the SC-55mkII.  If a game calls for a variation tone and the module does not support that variation, then it will play the capital tone on an SC-55 but remain silent on the SC-55mkII.

Tandy DAC

The Tandy PSSJ DAC found in the later Tandy 1000s (TL, SL, RL, RLX, RSX), the Tandy 2500s and the Tandy Sensation! is similar to the Sound Blaster in that sample data can be fed into the DAC via IRQ & DMA.  Sound Blaster cards and the Tandy DAC will conflict if they share IRQs and DMAs.  The Tandy DAC uses IRQ7 & DMA1 and the earliest Sound Blaster used those as their defaults.  The Tandy 1000s added BIOS functions to allow for DAC input and output but some games address the DAC directly via I/O ports.  This may not work in the AT-class Tandys, such as the 1000 RSX, because they relocated the DAC's I/O ports to avoid conflicting with the 2nd DMA Controller.  XT-class Tandys locate the DAC at I/O C0-C7, AT-class Tandys locate the DAC at I/O ports 1E0-1E7.

There are a few notable drawbacks using the Tandy DAC.  Some games (Prince of Persia v1.0) may limit you to Tandy 4-voice music with this option.  The Tandy DAC was never released as a sound card for consumers to buy, so it is married to the systems in which it is found.  You cannot use the Tandy DAC for sound and built-in joystick ports of the computer at the same time because they share circuitry.  As the Tandy DAC is tied to the system mainboard, using it with games that expect a faster or significantly slower CPU than the one installed may be problematic.  

Game Blaster

The Game Blaster sound card uses a pair of Philips SAA-1099 PSGs which function similarly to the SN76496 and can be used for digital sound.  Only one game, BattleTech: The Crescent Hawks' Revenge, used this for the Game Blaster. 

Covox Speech Thing

The Covox Speech Thing was a dongle that plugged into the parallel port and produced audible sound from an R2R resistor network inside the dongle.  The CPU would send 8-bit digital audio samples instead of printer data through the parallel port.  The sound requires external amplification because the parallel port is not designed to source voltage.  The need for the CPU to constantly send sample bytes to the parallel port meant that this solution offered relatively poor performance.  Although the printer port can assert an IRQ, that was intended for the printer to signal the system it was out of paper.  There is no circuitry in a Speech Thing to assert an IRQ, which could have helped with performance.

The circuit is so simple that you can build your own Speech Thing and many people did.  These homebrew Speech Thing clones tend to sound fairly poor due to using resistors with wide variations in tolerances.  The closer in resistance the resistors are to each other, the better the sound.  There is a DOS emulator called Virtual Sound Blaster which can emulate the Sound Blaster's digital output on a Covox but its compatibility is hit and miss and it requires a 386 or better.

Covox Sound Masters &Voice Masters 

Covox released a bunch of relatively low cost audio devices in the 1980s and early 1990s other than the Speech Thing, but none of them were especially popular on the PC platform.  Of the six known ISA cards that Covox released, the only thing they had in common was they could all support direct drive DAC output like the Speech Thing, but not necessarily at the standard parallel port I/O assignments.  Three cards, the Voice Master, the Sound Master and the Sound Master II had the ability to use an IRQ and DMA to access sample data from memory with minimal CPU usage, but it is unknown how compatible these methods were across the Covox cards.  Some Covox cards came with OPL2 chips for Adlib compatibility.  More information is here.  Like the Innovation and Game Blaster, poor sales of these cards when they were available for sale makes them difficult to find today.  Game support is fairly limited.

Innovation SSI-2001

Even less successful than the Game Blaster was SSI-2001.  The SSI-2001 contained a 6581 SID sound chip like the one included in the Commodore 64.  The same principles which applied to the generation of digital audio on the C64 were applicable to the PC.  Wizardry: Bane of the Cosmic Forge, Super Jeopardy and BattleTech: The Crescent Hawks' Revenge support digitized sound on the SSI-2001.

PS/1 Audio/Joystick

The IBM PS/1 computer series had a special ISA-like connector using pin headers in its Model 2011 and 2121 for connecting the proprietary PS/1 Audio/Joystick Card.  The card has 4-voice PSG using a SN76496 clone, standard gameport with enhancements, proprietary MIDI interface and digital input and output.  The card uses a 2K FIFO buffer to process samples and can signal when the buffer is almost empty with IRQ7.  Despite its limited reach the card was supported by several dozen games.

Disney Sound Source

The Disney Sound Source is a parallel port dongle with a phone line connector which connects to an external 9v battery powered speaker.  The dongle has active components so it needs the energy supplied by the battery to work at all.  The Sound Source works similarly to a Covox Speech Thing but has a 16-byte FIFO buffer and samples audio at a fixed 7KHz sample rate.  This helps to lessen the load on the CPU because it can send 16 bytes 437.5 times per second instead of 1 byte 7,000 times per second as with a Covox Speech Thing, allowing the CPU to devote more CPU time to other tasks.  The sample rate is quite adequate for speech and sound effects, the Sound Source was rarely used for music.  More games supported the Disney Sound Source (147) than the Covox Speech Thing (59).  Two games based on Disney properties, Arachnophobia and Dick Tracy: The Crime-Solving Adventure only support the Sound Source for digital audio even though the Sound Blaster had been on the market for at least a year prior.

Pro Audio Spectrum

The original Pro Audio Spectrum from Media Vision was an early competitor to the original Sound Blaster.  Its main advantage over the Sound Blaster was the support of stereo 8-bit digital audio up to 44.1KHz and stereo FM using two OPL2 chips.  It came with a standard joystick and proprietary MIDI interface.  The digital audio and MIDI support were proprietary and even FM synthesis was inaccessible without its MYSOUND.SYS driver being loaded but once loaded it was Adlib compatible.  There would be decent support for the card and perhaps it may have been supported by games targeting later Pro Audio Spectrums.

Media Vision also marketed a clone of the Sound Blaster 1.5 called the Thunderboard.  The Thunderboard could be installed alongside the Pro Audio Spectrum to provide Sound Blaster compatibility but does not have MIDI functionality.  When Media Vision released the 16-bit capable Pro Audio Spectrum 16, it included a slightly more advanced version of the chip used in the Thunderboard for basic Sound Blaster 2.0 compatibility.  Media Vision also released the Pro Audio Spectrum Plus which had much of the capabilities of the 16 including Sound Blaster support.  The Pro Audio Spectrum 16 also added UART mode MPU-401 compatibility.  The PAS16 was well-supported in DOS games and is backwards compatible with the original Pro Audio Spectrum for digital audio.

CD Audio

When CD-ROM titles began to be released in the early 1990s for the PC-compatibles, developers had a few options to handle the massive amount of storage offered by the CD format.  They could add CD Audio tracks to the game or use the CD to store large audio and video files in container formats that had to be processed by the system and a sound card.  CD Audio could store all kinds of sounds, it was not limited just to musical pieces.  A CD-ROM drive handles the processing of Redbook CD Audio, so you did not need anything other than a pair of headphones to hear the audio.  Games like LOOM when released on CD included all their audio, voice, sound effects, music, on a single large audio track.  Games like this were the exception, the early drives had long seek times which made for pauses when a game is looking for specific sectors on the CD instead of tracks.  Some games used CD Audio for music but relied on a sound card for speech and sound effects (Warcraft II).  Other CD-ROM games relied on the sound card for everything (King's Quest V).

Adlib Gold

The Adlib Gold was Ad Lib Inc.'s answer to the Sound Blaster and supported 12-bit digital sound playback, more capable OPL3 FM synthesis, joystick and proprietary MIDI interface.  It was released in 1992 and it came too late to save Ad Lib.  Ad Lib really had not innovated since the original Adlib card back in 1987.  By the time of its the Sound Blaster 16 with its 16-bit digital audio playback and OPL3 chip was on the market.  Most games in 1992 were using 8-bit audio samples and had to specifically support the Gold for digital playback whereas all games by 1992 were supporting Sound Blaster.  The Gold is best known for its optional surround sound module, only supported in Dune and only for its FM music.

Gravis Ultrasound

The Gravis Ultrasound had digital audio capabilities superior to any Sound Blaster of the time.  Its strength was its ability to mix multiple digital samples in hardware like the Commodore Amiga.  The Sound Blaster had to mix samples in software, which took up valuable CPU time.  The Ultrasound had on-board RAM, up to 1MiB, to store sound samples.  It could output 16-bit audio and depending on how many samples were being mixed, the sampling rate could be from 44.1KHz to 19.2KHz.  Audio input was 8-bit and it had a joystick which had some ability to be adapt to higher speed CPUs.  Games which supported the card directly could sound amazing (Star Control II, Epic Pinball) or competitive with the Sound Blaster (DOOM).    

The Ultrasound has some compatibility with Sound Blaster digital audio through the use of its MegaEm and SBOS drivers, but the compatibility is based in software emulation, not hardware.  When these emulators work, digital audio should be representative of the samples.  MegaEm simulates Roland MT-32 and Sound Canvas and SBOS simulates FM Synthesis, but these simulations are fairly poor in reproducing the sound of the original devices.  

The original Ultrasound could be upgraded with a daughterboard with a CS4231 for Windows Sound System specifications and 16-bit digital audio input support. The Ultrasound MAX came with this daughterboard functionality built in.  As the MAX does not put the CS4231's ports at the same locations as the Windows Sound System card, it is not directly compatible with games supporting the Windows Sound System.  Some games have specific driver support for the MAX as a consequence.

The UltraSound Extreme added an ESS ES1688 sound chip for hardware Sound Blaster Pro and Adlib support.  The UltraSound ACE was designed to compliment a Sound Blaster card, removes the joystick port and allows you to disable its Adlib ports via a jumper.  The ACE is still fully compatible with MegaEm and SBOS.  

Windows Sound System

The Microsoft Windows Sound System was a card, as its name suggests, intended only for Windows and sold by Microsoft.  Despite this the card was supported directly by many DOS games, especially when middleware sound drivers like Miles AIL and HMI became popular in the mid-1990s.  The card was built from off-the-shelf components, namely the AD1848 or CS4231 16-bit Stereo Codec and the OPL3, so adding support could be done without too much difficulty.  Microsoft's card did not support gameport or MIDI but many of its clones did.  It supports 16-bit digital input and output in stereo at up to 48KHz using IRQ and DMA.  

Roland RAP-10/AT

The Roland RAP-10 was Roland's last ISA sound card.  It combined the General MIDI sound engine from an SC-7 with a UART-compatible MPU-401 and 16-bit digital stereo audio support at 44.1KHz.  A joystick/MIDI connector is present.  As the Sound Canvas was the PC music standard of the time and the RAP-10 gave you most of it, the card gained some popularity. Despite a special MIDI/Joystick breakout box called the MCB-10 being made available for it, a standard gameport/midi cable will work with the port.  Weirdly for such a late card, it makes no effort to be Sound Blaster or Adlib compatible, DOS games must support this card directly for digital audio.  Fortunately many mid-to-late DOS games support it thanks to middleware drivers.

Ensoniq Soundscape

Ensoniq produced a line of sound cards starting with the S-2000 in 1994.  These cards' main strength was their sophisticated General MIDI sound sources.  They also included the AD1848 for processing of digital audio.  In 1994 almost no one thought that they could get by without offering some form of Sound Blaster compatibility.  Ensoniq did not include an OPL chip and emulated OPL by instrument patches played on the General MIDI sound source.  The results were often less than impressive, and if a game supported General MIDI that would be the better option.  The Ensoniq was able to emulate the Sound Blaster's DSP via the AD1848 and software.  It also saw fairly robust direct support from mid-to-late DOS games.  

1 comment:

  1. Very nice overview!
    Though I would like to add that "Gravis Ultrasound" was the top choice of the demoscene at the time and nearly all demos and intros worked with it, but not with Sound Blaster.
    It was very expensive compared to sound blaster cards, but as pointed out...all woth it due to the sound quality!