GUS Music in Dosbox
This page explains how to configure the dos versions of UFO/TFTD to play their midi music through Dosbox's Gravis Ultrasound emulation. Though not as good as the live orchestra music of the Playstation version, it provides a big improvement in music quality.
For an example of the GUS in action, see:
What is GUS?
The Gravis Ultra Sound or GUS was a sound card produced by Advanced Gravis Computer Technology, who were best known for their Gravis PC Gamepad. One of the features of the GUS is its ability to use real world sound samples instead of digitally generated instruments. This allows for a richer quality of sound when playing midi sound.
For more history on this sound card you can refer to the Gravis Ultrasound article on Wikipedia.
Dosbox and GUS
Due to incompatibilities in licenses, Dosbox distributions do not come packaged with GUS patches by default. These need to be installed separately. Without the GUS patches any midi playback through the GUS will result in silence. Some Dos games may provide their own sound patches, however X-COM UFO and TFTD do not.
Setting up Dosbox with the GUS patches
You will first need to obtain a copy of the GUS patches to use with Dosbox. Refer to huggybaby2's Ready-To-Use Ultrasnd folders:
The first post will point you to where you can obtain the pre-compiled patches.
Note: For those concerned with the legality of obtaining the patches, the patches are available to download via the Gravis FTP site. The file obtained through the above link has the patches pre-compiled and ready to go.
|Unpack the compressed file. Note that it is in RAR format. If you are unable to unpack RAR files you may want to obtain a file compression utility that supports the format. For example: 7-Zip or The Unarchiver.
Once the file is unpacked you will get two folders:
These are two sets of GUS patches. Pick one to use.
The main difference between the patches is in how some instruments sound. You may want to experiment with the two patches and find the one you think sounds best. ULTRASND411 is the stock patch and may prove to be more stable. Also note that PPL has issues with some notes looping when they aren't supposed to; a fix for this can be found here (direct link). An example of the patches differences can be observed in this video.
Optional: Rename the folder of the patch you want to use to ULTRASND. This will allow easy swapping between the two patches by just renaming the folders rather than having to edit the Dosbox .conf file each time.
|Store these two folders somewhere easy to access.
For instructions on how to do this, refer to the Dosbox documentation or the MOUNT article on the official Dosbox wiki.
|The next step is to alter Dosbox's configuration file to enable GUS support.
For a normal Dosbox configuration you can directly edit the main Dosbox .conf file with a text editor.
If you have a version of the game that has is pre-packaged with its own copy of Dosbox, such as the Steam or GOG release, you will need to open its respective .conf file. Have a look in the game folder for a Dosbox folder.
In the Dosbox .conf file, go to the [GUS] heading
Once done, save the file.
TIP: If you use Dosbox through its command line interface, you can also use the SET command to manually set the ultradir environment variable. This is a quick way to switch between the patches without leaving the Dosbox session.
Setting up UFO/TFTD to use the GUS
With Dosbox set up to use the GUS, you will have to set up UFO/TFTD to use it as well.
|Go to the game directory and run SETUP.EXE. When it loads, you will be asked to configure the sound cards used for the sound effects and music. Use the cursor keys and enter to navigate through the options. The escape key backs out of any screen.
|The first card you set will be for sound effect output. Typical selections include the Soundblaster (8-bit mono) or Soundblaster Pro/16 (16-bit stereo)
You will be asked to set the Port, IRQ and DMA. Dosbox normally uses the following settings:
Alternatively you can also choose the Ultrasound / Gravis Ultrasound for this step, which will not require the above settings. Note however that its sound quality is no better than the SB Pro and it will disable the animated sequences in TFTD.
|You will be asked to set the max number of channels. This refers to how many sound effects can play at the same time. You can select between 1 and 8 channels.
If you are hearing very loud gunshots or screams during the alien turn, try reducing the channels to 4 or less. The loudness is caused by many instances of the same sound effect being played simultaneously.
|When asked to swap your audio, set it to NO unless your sound effects are reversed during the game.|
|Finally you will need to configure the soundcard used for music playback. Select Ultrasound for UFO or Gravis Ultrasound for TFTD. When you hit enter, the sound setup will close and save your settings.
If you need to adjust or revert your sound card settings, repeat the above steps. Your game will now be configured to use the GUS.
Running SETUP.EXE through Dosbox
SETUP.EXE will very likely not be able to run natively on modern operating systems. To bypass this, you can run it through Dosbox. You can achieve this a number of ways. For example, you can run the program from:
- Command Line: For those that mainly use Dosbox through its command line console, just go to your UFO/TFTD directory and run SETUP directly.
- XcomUtil: For XcomUtil users, the latest version provides access to the sound setup from its menu when you launch the game with runxcom.bat.
- Steam (and similar digital bundles): For the Steam and similar packages that have the games run through Dosbox transparently will need to make some temporary alterations to the .conf file. The rest of this section explains how to do this.
Open your Dosbox .conf file and go to its [autoexec] section.
The second-to-last line will typically have the command to launch the game, either ufo or ufo.bat for Enemy Unknown/UFO Defense and terror or terror.com for TFTD. The last line will have Exit.
These lines need to be altered slightly so that the .conf file launches the sound setup or the command line console instead.
Start by adding the word REM in front of the line that launches the game. REM means REMark, it turns the line into a comment and the line will have no effect when Dosbox runs it.
From here, if you would prefer to work from the command line console, REM out the exit as well and save the .conf file. Once you have run the sound setup, go back and edit .conf file again and remove the lines you REM'd out.
If you want to just launch the sound setup directly and bypass the console, REM out the line that runs the game and insert a new line before or after it and and type setup. Now save the .conf file. Launching the game will now load the sound setup instead of the game. When you are done with the sound setup, go back into the .conf file and delete or even REM out the line to run the setup. Finally remove the REM from the line that runs the game and save the file.
With everything set up, the game will now start playing midi music via GUS emulation. Enjoy the difference. Note that one negative side effect of using the GUS for midi music playback is that the game will take a few seconds longer to start than usual as it needs to load the audio patch.
Note that if you have any other Dos games that can take advantage of the GUS, you can adapt the procedures mentioned above.