Gravis Ultrasound Configuration Guide

Gravis Ultrasound

The Gravis Ultrasound was released at a time when Creative had its Sound Blaster Pros on the market. On the Gravis Ultrasound (GUS) the base port address has to be jumpered. The other resources are set by software. A GUS uses a IRQ and DMA for playback and another IRQ and DMA for recording. But this can be reduced as the same IRQ and DMA can be set for playback and record. The restriction is that it is no longer possible to record and play sound at the same time. Usually for games and demos this is no limitation.
Typically a GUS is used in a system paired with a Sound Blaster. So a recommended setting is a jumpered base port of 240, IRQ 7 for playback and record and DMA 7 for record and playback. (Also some DOS4GW versions have a bug with hardware using DMA greater than 7).
For installation one can choose to run the whole GUS software setup 4.11 or just copy this ready setup folder. It is a known bug that the GUS setup fails when checking for resources and reports problems specifically on DMA check. Just ignore it and go on.
To get the GUS configured the program ultrinit is run. It checks for a GUS at the port address given in the environment variable ultrasnd and reads further the desired IRQ/DMA values and sets the card accordingly. So enter at the command line:
SET ULTRASND=240,7,7,7,7
C:\ULT\ULTRINIT.EXE
The order of the values is
After entering these two lines at the command prompt there is a quick test to see if the desired resources work by using a music player like XTC-PLAY with some music file. If 'xtc-play 2nd_pm.s3m' is called it should play the song. If it freezes on loading the music file then the DMA setting it in conflict. If the player plays a few seconds then stops and you can still exit by pressing ESC the playback IRQ is in conflict. One can easily enter the two lines at the command prompt again with changed values until music playback runs.
For the final autoexec.bat init part one more line has to be added:

ULTRADIR points to the GUS software folder where ultramid.ini is as well as the MIDI sub folder with instrument samples (PAT files).

A GUS has no direct output channel like Sound Blaster cards but uses a Digital Signal Processor (GF1) that can play from the cards own RAM. The first GUS were released with 256 kB later models with 512 kB RAM. All GUS can be upgraded to 1 MB memory. This is strongly recommended as it poses a few advantages for playback quality. To replay digital audio data it must be uploaded to the cards RAM first. The GF1 is able to play up to 32 channels simultaneously. All audio data is resampled to the output playback rate using linear interpolation and mixed to stereo. Since the computing power of the GF1 is limited the output sample rate drops gradually when using more than 14 active voices:
Good players usually deactivate unused voices which means that e.g. when playing a 32 channel XM file and only 20 channels play a note at a certain moment the output sample rate will be 30870 Hz in this moment.
From performance considerations native GUS support for playback can help a 386 or 486 class system to save CPU load as a GUS mixes sound channel by its own. As example a 386DX-16 CPU is on full load when mixing 6 channels playback in 8 bit. Also a fast Pentium CPU can be brought to its knee when playing a 32 channel song with high quality FPU interpolation in software. In old games the software mixing routines are programmed for performance such that by default there won't be any interpolation. Some games offer interpolation (or oversampling) as extra option when using a fast CPU. When using a GUS this is done on the card and one may increase e.g. graphics setting instead.

For music playback the memory of the GUS is used as dynamic wavetable where instrument samples required for the current song are loaded. This is a bit different compared to other card that usually load complete soundfonts or have all instruments in a ROM. The whole sound font of the GUS is stored on hard disk and is about 6.5 MB large. The default instruments from the 4.11 package are loosely related to a Roland Sound Canvas. Here also the amount of memory equipped on the GUS plays a role. There are different profiles for loading instruments for 256 kB, 512 kB or 1024 kB GUSes in ultramid.ini. With more memory you get better quality.

The game support of a GUS is rather broad but may require a bit manual configuration work. There is a list of games with GUS support available (dated 1996).
Depending on the sound engine used in a game the steps to get it working differ.

Native support: This is the easiest case that requires just the correctly set environment variables or given resources in the games setup. Some games require 1 MB on the GUS as minimum requirement like Death Rally.

Games that use MILES with the Audio Interface Library (AIL): The MILES sound system uses with AIL version 1.x *.ADV files as sound/music drivers, with AIL 3.x the files are usually called *.DIG/*.MDI and AIL 32 bit uses DLLs. Depending on the game it is sufficient to add the files to the games folder and the game setup offers then also Gravis Ultrasound as option. If not then usually the trick is to replace another sound driver with the GUS files and choose in the games setup then the other sound card where now actually the GUS driver gets loaded. Usually this already requires to load ULTRAMID, see below.

Since the design of the MILES driver split the playback into digital for sound effects and music it is required to split the channel and memory resources of the GUS. Otherwise it may happen that the music driver uses all 32 channels leaving none for sound effects. This is accomplished by a TSR called ULTRAMID. It usually reserves two channels and 24 kB memory for playback of digital sound effects and the rest for music. It also handles dynamic loading of instruments for music playback. The tool MEGAEM also implements this functionality. The decision to use either ULTRAMID or MEGAEM depends on your memory configuration. If you use EMM386 or similar then load MEGAEM, if you use HIMEM only then load ULTRAMID. After finishing a game ULTRAMID can be unloaded with ULTRAMID -f, MEGAEM with -u.

There exist a few games that do not implement dynamic loading of instrument samples with ULTRAMID. In this case ULTRAMID can be run with -c to preload instruments to the GUS RAM. To balance volume ultramid hat the -m parameter to set volume. Some games bring their own ultramid.ini with custom instrument mappings. For games that use the AIL32 library like Sim City 2000 it is not required to load ultramid/megaem.
Games that have General Midi playback support through MPU-401 only: In this case the GUS software brings an emulator that lets the GUS appear to have a MPU-401 interface for General Midi playback. It is MEGAEM (latest 3.11). MEGAEM requires a memory manager like EMM386,QEMM386 or similar. It is called with MEGAEM -GM for General Midi or MEGAEM -MT for Roland MT-32 instrument mapping. If one likes interactive mode, MEGAEM -i can be called to get a menu. The emulator catches accesses to port 330 and plays the MIDI music through the GUS. This is even possible if there is an actual hardware General Midi device at this port as MEGAEM catches accesses before they are written to hardware. So game configuration does not need to be changed. MEGAEM uses the 1 MB card memory to store a full General Midi soundfont. As MEGAEM also implements ULTRAMID functionality and if you run a game that makes use of dynamic instrument caching MEGAEM will reload the standard 1 MB sound font after the game finishes automatically. It also features Sound Blaster emulation but I have not tested this extensivly as I usually have a Sound Blaster compatible card as well.

There exists also an older 2.x version of MEGAEM where the setup is a separate executable called MESETUP.EXE. On first run MEGAEM builds a bank file from the instrument samples. For the 1 MB GUS this is called large.bnk.
If you have a system with 64 MB memory or more then EMM386 in combination with HIMEM 3.x have a bug that prevents MEGAEM from loading. MEGAEM reports something like "Can not expand server pages". It is not a MEGAEM issue and can be fixed by either using an alternative memory manager like QEMM386 or an older HIMEM 2.x that only supports 16 MB XMS. I have not tested if other third party drivers like HIMEMX work too.

More tools:

Patches for games: Over the years gravis and third party programmers have released patches for games to add support for GUS.

SBOS (latest 3.82) is a Sound Blaster emulator using NMI functionality that runs also without EMM386 loaded.

GUSDrive II is a RAM drive in GUS RAM. When run from the command line it behaves like ULTRINIT and gives a nice output of card data. When loaded in config.sys it adds a drive. Of course one should not use the GUS for music playback at the same time. Noteable is that the GUS seems to keep memory content even after hard reset (cold boot).

There exist also replacement packages for the instruments (effectivly different sound fonts). Well known are ProPatches 3.0, ProPatches Lite 1.50, 1.6 and 1.61. There is most likely also a version of Utopia sound font for GUS. Also check out the PATCHES subfolder for more instruments.

Issue with Day of the Tentacle Talkie and SB at A220 I5 D1 in combination with GUS at 240,7,7,7,7. The iMuse driver of DoTT seems to access always additionally IRQ 7 even if IRQ 5 is set in setup. The effect is that there is speech in game but it is cut off after 1 or 2 seconds. As DoTT supports SB only for digital the fix is simply to not initialize the GUS on bootup. Remember to cold boot to clear the GUS resources. Afterwards speech through SB at IRQ5 works flawless.

Cubic Player and XTC-Player are able to load tracker music files that are larger than 1 MB. They use an algorithm to reduce the instruments sample size in this case. It is rather sophisticated and optimized to reduce quality as small as possible (for details read e.g. the cubic player manual). Cubic Player shows this in the instruments view as 8.5 bit or as an !. Of course also this has its limits and is not recommended for tracker files that largely exceed 1 MB.