Sunday, July 8, 2012

The Gravis Ultrasound and DOS Games

A commonly held belief that the Gravis Ultrasound's primary utility was for playing DOS demos.  Indeed, that was the software for which it was best known, but many, many DOS games supported it as well.  For some games, it is the ideal method to use for sound playback.  For others that advertise "support", getting them to run is a frustrating exercise.

The Gravis Ultrasound was released in 1992 and offered 16-bit digital audio output capabilities.  Unlike the Sound Blaster 16, which can only handle a stereo (2-channel) digital audio stream in hardware, the Gravis can handle up to 32 digital audio streams/voices and mix them to stereo audio output.  At 32 voices, it can output at 19 kHz, but at 14 voices it can manage 44.1kHz.  See here for the frequency/voice range : http://www.ninjacode.org/gf1/tech.html  It can also support up to 1MB of RAM on the card to store digital sound samples/patches, usually for MIDI or Tracker MOD-style music.  The original Ultrasound came with 256KB or 512KB of RAM, but the Ultrasound MAX, ACE and most of the clones come with 512KB on board. The more RAM, the better quality patches can be loaded onto the card.  

To upgrade your Ultrasound, you will need 4 (if your board has 512KB) or 6 (if your board has 256KB) 256K x 4, 80+ns FPM 20-pin DIP DRAMs.  If you have an Ultrasound with a single socket, you will need one 256K x 16 80+ns FPM 40-pin SOJ DRAM.  It is important to note that a 256Kx16 chip holds the same amount of data as a 512Kx8 chip, only the organization is different.  

The original Ultrasound came with a speed-adjustable gameport and support for emulated MPU-401 with Mega-Em.  It had a dual row of pin headers to attach a daughterboard that allowed for 16-bit recording capabilities.  The daughterboard includes a Crystal CS4321 codec, which is virtually identical to the Analog Devices AD1848 codec used in the Windows Sound System cards.  This chip also added an alternative method of 16-bit digital playback.  Revisions prior to 3.7 do not have an onboard mixer chip.  The Ultrasound MAX is like a nearly-fully upgraded GUS, with the daughterboard functionality and support for 3 proprietary CD-ROM interfaces (Sony, Mitsumi & Panasonic).  When a game states it supports the Ultrasound MAX, it really means that it is using the CS4321 codec for digital audio processing or Sound Blaster emulation instead of the native Ultrasound hardware.  It is really using a Windows Sound System driver, just directing the output to different ports.  

The card I have is the Gravis Ultrasound Audio Card Enhancer (ACE), v1.0.  This is a stripped down card designed to work with a Sound Blaster.  It has the no midi/gameport, no recording capabilities, and no CD-ROM/IDE interfaces.  It has a particular feature unique and valuable to the card, the ability to disable the Adlib ports.  This should help games which have difficulties with an Ultrasound and a Sound Blaster due to their Adlib autodetect routines.  The v1.0 version of the card has a drawback in that it outputs reverse stereo, requiring a cable fix.  Card version v1.1 fixes this bug, but the jumper layout is not as well-designed.    Whoever laid out the ACE had the foresight to allow you to change the I/O port jumper without having to remove the card from its slot!

The ACE is a great card, but it does have a gotcha that I did not know about until recently.  While it has no gameport, the card's two main chips are essentially the same as found on a full-featured pre 3.73 GUS, and the chips implement a gameport interface.  This creates a bus conflict if there is another gameport in the system and PC compatibles tend not to work properly when there are bus conflicts.  The version of ULTRINIT.EXE that comes with the standard driver installation packages, including and up to v4.11, does not disable the joystick properly using ULTRINIT -dj.  You will need to use ULTRINIT v2.26a, found here : http://www.gravisultrasound.com/utilities.htm to properly disable the gameport interface in the GUS ACE's chips and correct the problem.  

Regarding the RAM sampling, Creative would not come out with a competing card until the next year, when it released the AWE32.  The AWE32 came with 512KB of sample RAM, but had SIMM slots to upgrade the RAM to 28MB.  Gravis and AMD came out with a compatible successor to the Ultrasound, the Ultrasound PnP, in 1995.  The PnP supports up to 16MB of sample RAM and can handle 32 voices @ 44.1kHz.  It really was a Windows 9x card and its uniqueness was lost in the wake of DirectSound and DirectSound3D.  The PNP is probably 100% compatible with all GUS supporting games.  To make it work with games from Epic MegaGames supporting the GUS, run the prepgame.exe utility in each game's directory to patch it to work with the PNP.  Games like Battle Arena Toshinden and Angel Devoid: Face of the Enemy setup programs may not work with the PNP for MIDI.  

Enough about the hardware, onto the games!  The Ultrasound used the same basic method of audio reproduction as the Commodore Amiga's Paula chip, so the transition on ports from the Amiga was a very smooth one.  21st Century Entertainment's ported Pinball Dreams, Pinball Fantasies, Pinball Dreams II, Pinball Illusions, Pinball World and Pinball Mania, all with GUS support.  Epic MegaGames also produced a fine native-DOS pinball series that took great advantage of the GUS, with Epic Pinball, Silverball and Extreme Pinball.   Epic also used the card to great effect in Zone 66, Jazz Jackrabbit and One Must Fall 2097.  Star Control II was a true-DOS game that demonstrated the card's great potential early in its market life.  

For vintage system builders, even if you do not like PC pinball games or demos, the GUS can still have a major influence in your 386 or 486 system.  The output sound quality of the card is better than many Creative cards at the time, especially the noisy early Sound Blaster 16s.  Perhaps just as important, it is much easier to reconfigure than the Sound Blasters.  All the Sound Blasters, until the arrival of the AWE32 and 2nd Gen 16s, were configured solely by jumpers.  I/O port ranges, DMA, IRQ, Joystick and MIDI enable were all set by jumpers.  All UltraSounds prior to the PnP only set its I/O port range via jumper, and the MAX has jumpers for the CD-ROM interfaces.  Since the I/O is perhaps the least frequently changed hardware setting (most GUS users use 240 if they are not emulating a Sound Blaster), this is not a big problem.  

An overlooked factor in the GUS's favor is that it can improve performance in games.  Games like Star Control 2 can play up to eight sound effects at a time.  If you had a Sound Blaster, the game would have to process and mix those effects to stereo output in software, but a GUS does it in hardware.  All the games mentioned in the previous three paragraphs will also play digital music and sound effects on a Sound Blaster.  However, because the GUS is far more efficient than the SB at mixing digital sound channels, the GUS will often playback in higher quality (16-bit vs. 8-bit) or a higher sample rate (44,100 vs. 22,050 or 11,025kHz) or both compared with a Sound Blaster.  In fact, while Epic Pinball will play 16-bit music with a GUS on a 386, you need a Pentium to get the close to the same quality on a Sound Blaster 16.  Games like Epic Pinball and Star Control II will always sound objectively better when their music is played back on an Ultrasound compared to a Sound Blaster.

Unlike the Sound Blaster, which will generally work fine with only a SET BLASTER statement in your AUTOEXEC.BAT, the GUS does require installation of its basic software package to work properly with most games.  You can find the software here : http://www.gravisultrasound.com/index.htm.  On a real card, it may be preferable to set different IRQs for GUS and MIDI and moreso for recording and playback DMA.  16-bit DMA channels are preferable to 8-bit DMAs, but if your motherboard has faulty high DMAs, then you will have to use a low DMA.  High DMAs are seldom used.  The installation program will add the appropriate lines to AUTOEXEC.BAT.  Note that games using early versions of the DOS4/GW extender have difficulties with 16-bit DMA channels.  In this case you should replace the version that came with the game with a later version or DOS/32.

According to the g-list, at least 156 games support the GUS natively.  A few games use AIL drivers, which require loading the UltraMID TSR program from the Ultrasound software.  UltraMID takes quite a bit of conventional RAM, but can be loaded in upper memory.  Other games will require loading Mega-Em or S-BOS.  However, Gravis was criticized for putting out false and misleading information about game support, so that list may not be 100% accurate.  

Mega-Em is a software program found in the Ultrasound software package that emulates a Roland MT-32/LAPC-I or SC-55/SCC-1 and or the digital audio output processing capabilities of a basic Sound Blaster 1.5 or 2.0 (Type 1 or Type 3).  It is designed to load in EMS and requires a memory manager like EMM386.EXE to be loaded.  It does not work with many titles using a protected-mode DOS extender (Wing Commander : Privateer) or games that refuse to run with an EMS manager installed (Ultima 7).  If expanded memory is enabled, then it will not take up conventional memory.  It does not emulate the FM capabilities of a Sound Blaster or Adlib card.  Roland SC-55 is the default Roland emulation, Roland MT-32 is the alternate.  Roland or Sound Blaster can be turned off.  
Mega-Em is not a perfect substitute for either the MT-32/LAPC-I or the SC-55/SCC-1.  Even assuming the emulated MT-32's built-in patches sound true, the software will not process system specific parameters, reverb or custom patches.  Games utilizing the reverb and chorus features of the SC-55 (Ultima 8) won't sound too great.  It is unknown if Mega Em supports all the drum sets or the extended patches of an SC-55.  Finally, the SC-55 devotes 3MB to its patches (+1MB for the MT-32's patches) compared to the 1MB of the Ultrasound, so the MIDI music may not sound as good.  Mega-Em will not emulate Roland devices in games using protected mode using a Gravis Ultrasound card lower than a version 3.xx.  It its latest version it should emulate enough of an intelligent MPU-401 interface to allow most games requiring said interface to work properly (except for Legend Entertainment's notorious adventures)

Only the truly desperate should have to and contend with SBOS.  SBOS is a Sound Blaster/Adlib emulator.  I have heard that its FM Synthesis emulation is not up to par with the real thing.  SBOS can be loaded high, but does not need an EMS manager to run.  This means you will have to use SBOS with Ultima 7 or Comanche : Maximum Overkill.  Unfortunately, SBOS requires your motherboard to have a working Non-Maskable Interrupt (NMI).  NMI is used in an AT compatible machine to inform the CPU of memory parity errors, but is used by SBOS to communicate with the Ultrasound without interfering with games.  (The Sound Blaster AWE32 also uses NMI in its AWEUTIL program to emulate a Roland MT-32 or a generic General MIDI synthesizer using the EMU800 hardware and on-board RAM).  Some motherboards in the 486 category and later do not have a working NMI.  Although the software only supports mono FM cards like the Adlib and pre-Sound Blaster Pros, it will by default output the voices in stereo.  

For my own personal experience with a GUS ACE on my 486 DOS Gaming PC, it did not matter that I had set the recording and playback DMAs to the same value, since the card cannot record anything anyway.  All that using separate DMAs will do is to allow full duplex recording and playback.  With a single DMA, you can only do one or the other.  However, Epic Pinball refused to play back music and sound effects properly unless I set different GUS and MIDI IRQs.  DOOM would not play sound with the GUS ACE unless I set the bus speed to 7.159MHz in the BIOS, but the bus speed must be set to 6.6MHz to eliminate all stuttering.

The last release of the driver software, 4.11, included version 3.11 of Mega-Em, which effectively combined the functions of UltraMID, Mega-Em and S-BOS into one program.  

1 comment:

Michael Huth said...

Usually it saves resources if all IRQs and DMAs are set to the same resource, I usually use 240,7,7,7,7. The reason is that the typical usage scenario is playback only, so mixing 8 bit and 16 bit dma is not relevant and also full duplex operation is not relevant.

The second point is that the MegaEm part is more complex as stated here. Newer versions of MegaEm are more compatible, there has been a major rewrite of the code from version 2.x to 3.x. MegaEm also includes the UltraMID API.

The 1 MB for all instrument is only valid if the game uses General Midi and MegaEm is used as emulation engine.
There are certain more efficient variations using the RAM with the UltraMID API. So games can load on startup the instrument patches used. This increases quality already a lot, since for songs usually only a few instruments of the full General Midi set are used. This was formerly done using the Loadpats tool with a corresponding ini file (SC2000 with AIL32 f.e.). Some games load instrument patches for each song on demand, which is even more efficient. You can see this behaviour also due to the fact that MegaEm reloads the 1 MB memory bank image after the game quits automatically if the game utilized the GUS memory itself.

There is more, but this would exceed this comment ;)

Elianda