Difference between revisions of "GUS Music in Dosbox"

From UFOpaedia
Jump to navigation Jump to search
m
m (A few fixes and slight rewording)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Very rough page outline on how to make the midi music in dos versions of UFO/TFTD sing with the help of Dosbox's Gravis Ultrasound emulation.
+
__NOTOC__
 +
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:
 +
 
 +
TFTD
 +
* http://www.youtube.com/watch?v=GoxbuLeU6FY
 +
* http://www.youtube.com/watch?v=lQAP-0e8pmc
 +
 
 +
 
 +
__TOC__
  
Dosbox, which X-COM UFO and Terror From the Deep rely on to run their original Dos versions on modern day computers, is able to emulate the Gravis Ultra Sound. However, due to incompatibilities in licenses, does not come packaged with GUS patches by default. Attempting to play audio through GUS emulation will generally result in silence until sound patches are provided.
 
  
 
== What is GUS? ==
 
== What is GUS? ==
  
The Gravis Ultra Sound or GUS was a sound card that is able to used samples of real world sounds for its instruments, allowing for rich playback of MIDI music.  
+
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 [http://en.wikipedia.org/wiki/Gravis_Ultrasound Gravis Ultrasound] article on Wikipedia.
 +
 
 +
== Dosbox and GUS ==
 +
 
 +
Dosbox, which the Dos versions of X-COM [[X-COM|UFO]] and [[TFTD|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.  
  
For more information on this sound card and its eventual demise you can refer to the [http://en.wikipedia.org/wiki/Gravis_Ultrasound Gravis Ultrasound] article on Wikipedia.  
+
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.  
  
== GUS Patches ==
+
== Setting up Dosbox with the GUS patches==
  
Refer to huggybaby2's ready-to-use Ultrasnd folders:
+
 
 +
{| {{stdTable}} border="1" cellpadding="16">
 +
|- {{stdTable Sub_Heading}}
 +
| colspan = "2" | 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
 
http://www.dosgames.com/forum/about10574.html
  
Obtain a copy of the pre-compiled patches in the post above. Instructions on how to set it up are available there, alternately follow the instructions here.
+
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.  
 +
 
  
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 you can get through the above link has the patches pre-compiled and ready to go.  
+
|- {{stdTable Sub_Heading}}
 +
| colspan = "2" | Step 2
 +
|-
 +
| 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: [http://sourceforge.net/projects/sevenzip/?source=pdlp 7-Zip] or [http://unarchiver.c3.cx/unarchiver The Unarchiver].
  
== Setting up Dosbox with the GUS patches==
+
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 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 [http://www.vogons.org/download/file.php?id=6106 here] (direct link). An example of the patches differences can be observed in [http://www.youtube.com/watch?v=0CUHiIURR3g 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.
 +
 
 +
|- {{stdTable Sub_Heading}}
 +
| colspan = "2" | 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. If you store the patches in the game folder, you will need to make a copy 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 the patches. This can be achieved by altering the Dosbox .conf file and adding a '''mount''' command in the <nowiki>[autoexec]</nowiki> section to create a new virtual drive.
 +
 
 +
For instructions on how to do this, refer to the Dosbox documentation or the [http://www.dosbox.com/wiki/MOUNT MOUNT] article on the official Dosbox wiki.
 +
 
 +
 
 +
|- {{stdTable Sub_Heading}}
 +
| colspan = "2" | Step 4
 +
|-
 +
| 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 '''<nowiki>[GUS]</nowiki>''' heading
  
* Unpack the patches and you should get two folders: '''ULTRASND411''' and '''ULTRASNDPPL161'''. Pick one to use, either will work fine.
+
*Alter the line '''gus=false''' to '''gus=true''' if it isn't already set.  
** Optional: Keep them as they are or rename the one you want to use to '''ULTRASND'''
 
  
* Store these folders somewhere. If you have your Dos game stored in a folder, say DOSGAMES\, copy them into there. Alternately, copy them directly into the same folder as the game you want to use the patches with.
+
*Alter '''ultradir=C:\ULTRASND''' to point to the directory or virtual drive where you can find the patches.  
:* Keeping the patches in the same folder as your game means less mounting or complicated file paths, but requires that you make copies of the patches for each game.
 
:* Keeping the patches in a separate folder will require that you either keep them in the folder that Dosbox will mount as your C:, or you can get Dosbox to mount a new drive just for the patches. Either way, make sure you know what path Dosbox will need to be able to find the patches.  
 
  
* The next step is to alter Dosbox's configuration file to enable its GUS support. For a normal Dosbox configuration, you can edit the main Dosbox .conf file. If you have a special .conf file made specifically for your game or have downloaded a game from a place like Steam or GOG with the game pre-packaged with a copy of Dosbox, you will need to open its respective .conf file.  
+
Once done, save the file.  
  
* When editing the Dosbox .conf file, go to the '''<nowiki>[GUS]</nowiki>''' heading
+
'''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.
:*Alter the line '''gus=false''' to '''gus=true''' if it isn't already set.
 
:*Alter '''ultradir=C:\ULTRASND''' and point it to the directory where you can find the patches.
 
::Note: You can also use the '''SET''' command to set this environment variable from the Dosbox command line interface or enter it into the <nowiki>[autoexec]</nowiki> section at the end the .conf file.  
 
  
This will set up your copy of Dosbox to use its GUS emulation with games that support it.
+
|}
  
 
==Setting up UFO/TFTD to use the GUS==
 
==Setting up UFO/TFTD to use the GUS==
  
TODO
+
With Dosbox set up to use the GUS, you will have to set up UFO/TFTD to use it as well.
* Adjusting the music settings (with screenshots!)
+
 
* Using the Steam release? How to run the sound setup?
+
 
* Running sound setup via command line interface through Dosbox
+
{| {{stdTable}} border="1" cellpadding="16">
 +
|- {{stdTable Sub_Heading}}
 +
| colspan = "2" | Step 1
 +
|-
 +
| 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.
 +
 
 +
 
 +
| Width ="20%" | [[File:Gus setup1.png]]
 +
|- {{stdTable Sub_Heading}}
 +
| 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''' (16-bit stereo)
 +
 
 +
You will be asked to set the Port, IRQ and DMA. Dosbox normally uses the following settings:<br>
 +
::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 its sound quality is no better than the SB Pro and ''it will disable the [[Enabling cinematics (TFTD)|animated sequences]] in TFTD''.
 +
 
 +
 
 +
| [[File:Gus setup2.png]]
 +
|- {{stdTable Sub_Heading}}
 +
| colspan = "2" | 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 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.
 +
 
 +
 
 +
|[[File:Gus setup3.png]]
 +
 
 +
|- {{stdTable Sub_Heading}}
 +
| colspan = "2" | Step 4
 +
|-
 +
| When asked to swap your audio, set it to NO unless your sound effects are reversed during the game.
 +
 
 +
|[[File:Gus setup4.png]]
 +
 
 +
|- {{stdTable Sub_Heading}}
 +
| colspan = "2"| Step 5
 +
|-
 +
| 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.
 +
 
 +
 
 +
|[[File:Gus setup5.png]]
 +
|}
 +
 
 +
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 <nowiki>[autoexec]</nowiki> 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==
 +
 
 +
* [http://www.dosbox.com/ Dosbox]
  
When you launch the game, it should now start playing midi music via GUS emulation. Enjoy the difference. Note that one side effect is that the game may take a few seconds longer to start than usual as it needs to load the audio patch. A small price to pay for better music.
 
  
 
[[Category:Enemy Unknown/UFO Defense]]
 
[[Category:Enemy Unknown/UFO Defense]]
 
[[Category:TFTD]]
 
[[Category:TFTD]]

Latest revision as of 08:50, 28 June 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 music quality.

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.

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

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 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 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:

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

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. If you store the patches in the game folder, you will need to make a copy 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 the patches. 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 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

  • 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

With Dosbox set up to use the GUS, you will 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 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.


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


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


Gus setup5.png

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.

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