Difference between revisions of "GUS Music in Dosbox"

From UFOpaedia
Jump to navigation Jump to search
(Fixed minor typo from last edit.)
(→‎Setting up UFO/TFTD to use the GUS: added reference to sb16)
Line 106: Line 106:
 
| colspan = "2"| Step 2
 
| colspan = "2"| Step 2
 
|-
 
|-
|The first card you set will be for sound effect output. Typical selections include the '''Soundblaster''' (8-bit mono) or '''Soundblaster Pro''' (16-bit stereo)  
+
|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:<br>
 
You will be asked to set the Port, IRQ and DMA. Dosbox normally uses the following settings:<br>
Line 144: Line 144:
  
  
Repeat the above steps as needed if you need to adjust or revert your sound card settings. Your games will now be configured to use the GUS.  
+
Repeat the above steps as needed if you need to adjust or revert your sound card settings. Your games will now be configured to use the GUS.
 
 
  
 
== Running SETUP.EXE through Dosbox ==  
 
== Running SETUP.EXE through Dosbox ==  

Revision as of 04:14, 12 March 2017

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 the quality of the music.

For an example of the GUS in action, see:

TFTD



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 files.

For more history on this sound card you can refer to the Gravis Ultrasound article on Wikipedia.

Dosbox and GUS

Dosbox, which the Dos versions of X-COM UFO and Terror From the Deep depend on to run on modern computers, has the ability to emulate a variety of sound cards, including the Gravis Ultra Sound.

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 usually result in silence. Some Dos games may provide their own sounds patches, however X-COM UFO and TFTD do not.

Setting up Dosbox with the GUS patches

Step 1

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:

http://www.dosgames.com/forum/about10574.html

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 GUS 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.


Step 2
Unpack the compressed file. Note that is in RAR format. If you are unable to unpack this format, you may want to obtain a file compression utility that supports RAR archives such as 7-Zip.

Once the file is unpacked you will get two folders:

ULTRASND411
ULTRASNDPPL161

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 that you think sounds best. ULTRASND411 is the stock patch and may prove to be more stable.

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.

Step 3
Store these two folders somewhere easy to access.
  • The easiest solution is to use the same folder that Dosbox will be mounting as its virtual C: drive. This could either be a combined folder where all your Dos games are stored, such as DOSGAMES\, or in the game folder itself. Note that if you store the patches in the game folder that you will want to make copies of the patches for each game.
  • If stored outside of the virtual C: drive, you will have to instruct Dosbox to mount a new virtual drive just for them. This can be achieved by altering the Dosbox .conf file and adding a mount command in the [autoexec] section to create a new virtual drive.

For instructions on how to do this, refer to the Dosbox documentation or the MOUNT article on the official Dosbox wiki.


Step 4
The next step is to alter Dosbox's configuration file to enable its 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 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

  • Alter the line gus=false to gus=true if it isn't already set.
  • Alter ultradir=C:\ULTRASND to point to the directory or virtual drive where you can find the patches.

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

Now that Dosbox is set up to use the GUS, you will now have to set up UFO/TFTD to use it as well.


Step 1
Go to the game directory and run SETUP.EXE. When it loads, you will be asked to configure the sound cards that will play the sound effects and the music. Use the cursor keys and enter to navigate through the options, and the escape key to back out of any screen.


Gus setup1.png
Step 2
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:

Port:220
IRQ : 7
DMA : 1

Alternatively you can also choose the Ultrasound / Gravis Ultrasound for this step, which will not require the above settings. Note however that the sound quality is no better than the SB Pro and it will disable the animated sequences in TFTD.


Gus setup2.png
Step 3
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 find you get 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 at the same time.


Gus setup3.png
Step 4
When asked to swap your audio, set it to NO unless your sound effects are reversed during the game. Gus setup4.png
Step 5
Finally you will need to configure the Music Board. Select Ultrasound for UFO or Gravis Ultrasound for TFTD. When you hit enter, the sound setup will close and save your settings.


Gus setup5.png


Repeat the above steps as needed if you need to adjust or revert your sound card settings. Your games 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.

  • 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 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.

Finishing up

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.

See Also