Sunday, July 31, 2016

Who Needs a Sound Blaster? - Deficiencies with Early Emulators

It is the accepted conventional wisdom that if you want to play DOS games from the DOS era (1988-1996) you will need some form of Sound Blaster card or compatible.  However, not everyone could afford a Sound Blaster card or felt the need to upgrade to a Sound Blaster from their Adlib or even their PC Speaker.

What was compatible with a Sound Blaster?  In the first few years of the line, not much.  Software that supported the Adlib or (sometimes) the Game Blaster were upwards compatible with the Sound Blaster, but it did not work the other way around.  Early competitors like the original Mediavision Pro Audio Spectrum and Covox Sound Master II were not compatible with the Sound Blaster outside Adlib support.  MIDI-based devices like the Roland MT-32 and Roland Sound Canvas were never Sound Blaster or even Adlib compatible.

Sound Blaster clones like the Thunderboard and the Aztech Sound Galaxy series either reverse engineered the Sound Blaster or used Creative Labs-supplied chips.  The Pro Audio Spectrum Plus/ 16/Studio contained a Thunderboard, so its compatibility with Sound Blaster 2.0 software compatibility was high.  Later cards like the Yamaha YMF-71x series also had high Sound Blaster Pro 2.0 compatibility (but would not play all Duke Nukem II ADPCM sound effects, see below).  OEMs like Dell, Compaq and Gateway often included no-name cards with Crystal or ESS chips that provided workable Sound Blaster compatibility.




But what if you did not have a Sound Blaster or Spectrum 16?  Well, you were in for some fun times.  Here are some popular ISA cards and ISA-based devices that supported some form of digital audio output but were not Sound Blaster compatible, at least without drivers :

Mediavision Pro Sonic/Pro 3-D
Windows Sound System
Roland RAP-10AT
Ensoniq Soundscape S-2000/II/Elite
Gravis Ultrasound Classic/MAX/ACE/PnP
Covox Speech Thing & Clones
Disney Sound Source

Most of these cards had some kind of Sound Blaster compatible driver, but the Roland did not and neither did the Disney.  Even though the Speech Thing is in some respects inferior to the Disney, there is a driver called Virtual Sound Blaster that works with it.

Virtual Sound Blaster 2.02 (VSB) operates like a TSR.  It requires a 386 CPU puts your system into Virtual 8086 mode so it can trap and redirect I/O reads and writes to the Sound Blaster card.  Thus it will never work with Ultima 7, Serpent Isle or Comanche.  It also has to emulate IRQs and DMAs.  While it does not require an Expanded Memory Manager, it will work with one, but only with QEMM 7.0 or higher.  It will not work with any Protected Mode games like DOOM or Sins of the Fathers : Gabriel Knight.  It won't produce digital audio in games which use the ADPCM modes like in Duke Nukem II for some sound effects.  It will work alongside an Adlib card.  Jill of the Jungle refused to load with it.  Sound quality is rather poor and quiet given the nature of the hardware being used to output digitized sound.

Until version 1,2(d), Jill of the Jungle and its two sequels required a Sound Blaster for music playback.  This was because Jill embedded Creative Labs' SBFMDRV driver in its executables.  The Creative driver is looking for a Sound Blaster, NOT an Adlib card.  There is no technical reason why an Adlib card cannot play JotJ's music, and in version 1.2(d) the music will play from an Adlib card.  However, there will be no sound effects, not even PC Speaker sound effects.  Moreover, the embedded driver in 1.2(d) treats the percussion instruments differently, so the music will sound different than in previous versions.  1.2(d) will allow digitized sounds to play on a Sound Blaster 16 correctly.

With VSB, I was only able to get Jill 1.0 partially working.  Jill 1.2(c) and 1.2(d) would crash if VSB was loaded.  Even with VSB and Jill 1.0, I was not able to get music working, only digital effects.  I suggest that the version of SBFMDRV embedded in Jill 1.0 is writing to 2x8/2x9 instead of the canonical Adlib ports of 388/389.

I tried VSB with QEMM 7.0.4, a popular version, and VSB caused my computer to reboot when I tried to load it.

I have a Gravis Ultrasound ACE, which will support the Ultrasound Mega-Em and SBOS emulators. Like VSB, Mega-Em requires Virtual 8086 mode.  Unlike VSB, it also requires an Expanded Memory Manager, but is more friendly to other EMMs like EMM386 or 386MAX.  Mega-Em only emulates the digital portion of the Sound Blaster and is intended to emulate a Sound Blaster + MT-32 or Sound Blaster + SC-55.  You can turn off the emulation of the Roland devices while leaving the Sound Blaster emulation active.  The digital sound quality is far superior to VSB.  It also does not seem to have much issue with Duke 2's ADPCM sound effects.

SBOS has the benefit of not requiring Virtual 8086 mode.  It will work on a 286 and higher CPUs so long as the NMI signal is working properly.  The AWE32's AWEUTIL MIDI emulation for the EMU-8000 also requires a working NMI.  SBOS emulates a Sound Blaster, both the digital and the FM portions.  While the Sound Blaster digital emulation is OK, the FM Synthesis sounds pretty poor.  As consolation, SBOS will remap mono FM synthesis into stereo.

Unfortunately, an issue with MegaEm and SBOS is that you cannot expect it to work alongside an Adlib card.  Even though the ACE has a jumper set to disable the Adlib ports, the software will still intercept reads and writes to the Adlib ports (388/389).  That jumper is to prevent conflicts when you are not using either emulator.  However, both MegaEm and SBOS intercept reads and writes to the Adlib port, which may be necessary for some game detection routines.  There is no option to pass these through to a real Adlib card.  If it did, it would be a real contender for the Sound Blaster Substitute award.

But let us consider the ACE with a Roland MPU-401.  Now we are truly beyond the "I can build my sound hardware myself" territory, because you can build both a Covox and an Adlib clone.   You can use SBOS or MegaEm with a real Roland MPU-401 and hence a Roland MT-32, CM-32L, LAPC-I, SCC-1 or SC-55.  MegaEm has a command line argument that allows it to coexist with a real Roland MPU-401 and you can disable its Roland MT-32 or Sound Canvas emulation.  At this point all it will emulate is the digital portion of the Sound Blaster, leaving you to use your awesome MIDI hardware for music.  Of course it still won't work for Protected Mode games, but many of those games have native Ultrasound drivers.  SBOS should not even go near the  Roland MPU-401 ports (330/331, 300/301), so it should work alongside an MPU-401.  This will allow you to hear The Guardian's speech in Ultima 7 and listen to the best quality music.  Unfortunately, the shareware revolution sounded of FM Synthesis, not LA Synthesis or PCM Sample Synthesis, so this is not an ideal solution for general DOS Sound Blaster game compatibility.

3 comments:

Jonathan said...


Excellent article, thank-you!

I had an AdLib card in the late-1990s (ca. 1997). My PC originally shipped with no sound card whatsoever, and I was very happy to find the AdLib second hand at a local flea market. It was a significant step-up from the PC speaker!

I was running Windows 3.1, and AdLib was only officially supported for music -- not sound effects. I was even more excited when I discovered "unofficial" driver software to remedy this deficiency.





blasterbeam said...

Hey there,

nice post. Just a question, are you sure AWEUTIL *emulates* a Sound Blaster?

From my knowledge and experience digital sound on AWE cards will work just fine without AWEUTIL loaded. For the FM chip though, you'll need to call AWEUTIL /S, which initializes the FM (maybe only needed for CQM, don't know about cards that come with discrete FM chips).

Other than that, you can use AWEUTIL to route MPU401 MIDI data to the EMU8K chip. For that it probably needs to stay resident and use the NMI interrupt. I am not aware of other uses of AWEUTIL.

Great Hierophant said...

No, I did not mean to refer to AWEUTIL when I wrote "It emulates a Sound Blaster, both the digital and the FM portions." The "It" refers to SBOS, but the pronoun was imprecise. This has been fixed. You are correct about the uses of AWEUTIL.