Difference between revisions of "GUS Music in Dosbox"

From UFOpaedia
Jump to navigation Jump to search
m
m
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 make the midi music in the dos versions of UFO/TFTD sing with the help of Dosbox's ''Gravis Ultrasound'' emulation.   
 +
 
 +
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 samples of real world sounds for its instruments. This allows for a richer sound in the playback of MIDI music.  
  
 
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.  
 
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.  
  
== GUS Patches ==
+
== 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.
 +
 
 +
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==
  
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. 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 where to 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.
 +
|- {{stdTable Sub_Heading}}
 +
| colspan = "2" | Step 2
 +
|-
 +
| Unpack the compressed file. Note it is in RAR format. If you unable to unpack this format, you may want also obtain a file compression utility that supports RAR archives such as [[http://sourceforge.net/projects/sevenzip/?source=pdlp 7-Zip]]. 
 +
 
 +
Once the file is unpacked you will get two folders: '''ULTRASND411''' and '''ULTRASNDPPL161'''. These are two sets of GUS patches. Pick one to use.  
  
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.  
+
The difference between the two patches is in how some of the instruments sound. You may want to experiment with the two patches and find the one that you think sounds best.  
  
== Setting up Dosbox with the GUS patches==
+
'''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 game folder itself. Note that if you store the patches in the game folders directly that you'll 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 specifically for them. 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 just for them. For instructions on how to do this, refer to the Dosbox documentation.
 +
 
 +
 
 +
|- {{stdTable Sub_Heading}}
 +
| colspan = "2" | 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.
 +
 
 +
If you have version of the game that has the game 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 for a Dosbox folder in the game folder.
  
* Unpack the patches and you should get two folders: '''ULTRASND411''' and '''ULTRASNDPPL161'''. Pick one to use, either will work fine. The difference will be in the sound of some instruments.
+
In the Dosbox .conf file, go to the '''<nowiki>[GUS]</nowiki>''' heading
** 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 the line '''gus=false''' to '''gus=true''' if it isn't already set.  
:* 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.  
+
*Alter '''ultradir=C:\ULTRASND''' to point to the directory where you can find the patches.  
  
* When editing the Dosbox .conf file, go to the '''<nowiki>[GUS]</nowiki>''' heading
+
'''TIP:''' You can also use the '''SET''' command to manually set this environment variable from the Dosbox command line interface. This is a way to quickly switch between the two different 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==
Line 45: Line 87:
  
  
 +
{| {{stdTable}} border="1" cellpadding="16">
 +
|- {{stdTable Sub_Heading}}
 +
| colspan = "2" | Step 1
 +
|-
 +
| Run '''SETUP.EXE'''. When it loads, you will be asked to separately configure the sound cards that will play the sound effects and the music. Use the cursor keys and enter to navigate through the options.
 +
 +
 +
| Width ="20%" | TODO: Screencaps here
 +
|- {{stdTable Sub_Heading}}
 +
| colspan = "2"| Step 2
 +
|-
 +
|The first card you be asked to set will be for sound output. Pick either: '''Soundblaster''' (8-bit mono), '''Soundblaster Pro''' (16-bit stereo) or '''Ultrasound''' / '''Gravis Ultrasound'''.
 +
 +
For Soundblasters, you will need the Port, IRQ and DMA to be set. Dosbox normally defaults to Port:'''220''', IRQ: '''7''', DMA: '''1'''.
 +
 +
 +
|
 +
|- {{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 find you get very loud gunshots or screams during the alien turn, you may want to reduce the number of channels to 4 or less. The loudness is caused by many instances of the same sound effect being played simultaneously.
 +
 +
 +
|
 +
|- {{stdTable Sub_Heading}}
 +
| colspan = "2" | Step 4
 +
|-
 +
| When asked to swap your audio, set it to NO unless your sound effects are reversed.
 +
 +
 +
|
 +
|- {{stdTable Sub_Heading}}
 +
| colspan = "2"| 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.
  
* Run SETUP.EXE. When it loads, you will be asked to set the sound card for both the sound effects and music output. Use the cursor keys an enter key to navigate through the options.
 
  
* The first card to set up is the sound output. Set it to either '''Soundblaster''' (8-bit mono), '''Soundblaster Pro''' (16-bit stereo) or even select the '''Ultrasound''' / ''Gravis Ultrasound'''. For Soundblasters, you will need the port, IRQ and DMA to be set. Dosbox normally uses Port:220, IRQ: 7, DMA: 1.
+
|
** Next you will be asked to set the max number of channels. This refers to how many sound effects can play at the same time. If you find you get very loud bursts of gun fire sounds during the alien turn, set this to a lower setting such as 4. The loudness is caused by lots of instances of the same sound effect being played at the same time.
+
|}
** If asked to swap your audio, set it to NO unless your sound effects are reversed.
 
  
* You will now get to the Choose Music Board screen. Select '''Ultrasound''' / '''Gravis Ultrasound'''. When you hit enter, SETUP.EXE will close and save your settings.
 
  
Now when you launch the game, it will run with the new settings. If not, go back into the sound setup and make further adjustments as needed.  
+
Repeat the above steps as needed if you need to adjust or revert your sound card settings.  
  
  
Line 61: Line 137:
 
'''SETUP.EXE''' will very likely not be able to run natively on modern operating systems. To bypass this, you can run it 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.  
  
For those that mainly use Dosbox through its command line console, just go to your UFO/TFTD directory and run SETUP directly.
+
* For those that mainly use Dosbox through its command line console, just go to your UFO/TFTD directory and run SETUP directly.
 +
* For [[XcomUtil]] users, the latest version provides access to the sound setup from its menu when you launch the game with '''runxcom.bat'''.
 +
*For The Steam and similar packages that have set up the games to run the game through Dosbox transparently will need to make some temporary alterations to the .conf file. The rest of this section explains how to do this.  
  
If your version is all set up to run the game through Dosbox transparently,  such as the Steam version, you will need to make some temporary alterations to the .conf file.
+
----
  
 
Go to your .conf file's <nowiki>[autoexec]</nowiki> section.  
 
Go to your .conf file's <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. For those that have set up the .conf file to use XCOMUTIL, this will be '''runxcom.bat'''. The last line will have '''Exit'''.  
+
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'''.  
  
 
We need to alter these line slightly so that the .conf file launches the sound setup or the command line console instead.  
 
We need to alter these line slightly so that the .conf file launches the sound setup or the command line console instead.  
Line 79: Line 157:
 
== Finishing up ==  
 
== 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 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 improved audio instruments.
+
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.  
 
Note that if you have any other Dos games that can take advantage of the GUS, you can adapt the procedures mentioned above.  

Revision as of 09:28, 21 August 2013

This page explains how to make the midi music in the dos versions of UFO/TFTD sing with the help of Dosbox's Gravis Ultrasound emulation.

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 samples of real world sounds for its instruments. This allows for a richer sound in the playback of MIDI music.

For more information on this sound card and its eventual demise 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. Refer to huggybaby2's Ready-To-Use Ultrasnd folders:

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

The first post will point you where to 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 it is in RAR format. If you unable to unpack this format, you may want also obtain a file compression utility that supports RAR archives such as [7-Zip].

Once the file is unpacked you will get two folders: ULTRASND411 and ULTRASNDPPL161. These are two sets of GUS patches. Pick one to use.

The difference between the two patches is in how some of the instruments sound. You may want to experiment with the two patches and find the one that you think sounds best.

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 game folder itself. Note that if you store the patches in the game folders directly that you'll 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 specifically 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 just for them. For instructions on how to do this, refer to the Dosbox documentation.


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.

If you have version of the game that has the game 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 for a Dosbox folder in the game 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 where you can find the patches.

TIP: You can also use the SET command to manually set this environment variable from the Dosbox command line interface. This is a way to quickly switch between the two different patches without leaving the Dosbox session.

Setting up UFO/TFTD to use the GUS

TODO

  • Screenshots!

Now that Dosbox is set up to use the GUS, the last step before you can make use of it is to set up UFO/TFTD to use it. To do this, you need to run the SETUP.EXE file in the game directory to access the game's sound card settings.


Step 1
Run SETUP.EXE. When it loads, you will be asked to separately configure the sound cards that will play the sound effects and the music. Use the cursor keys and enter to navigate through the options.


TODO: Screencaps here
Step 2
The first card you be asked to set will be for sound output. Pick either: Soundblaster (8-bit mono), Soundblaster Pro (16-bit stereo) or Ultrasound / Gravis Ultrasound.

For Soundblasters, you will need the Port, IRQ and DMA to be set. Dosbox normally defaults to Port:220, IRQ: 7, DMA: 1.


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, you may want to reduce the number of channels to 4 or less. The loudness is caused by many instances of the same sound effect being played simultaneously.


Step 4
When asked to swap your audio, set it to NO unless your sound effects are reversed.


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.



Repeat the above steps as needed if you need to adjust or revert your sound card settings.


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.

  • For those that mainly use Dosbox through its command line console, just go to your UFO/TFTD directory and run SETUP directly.
  • For XcomUtil users, the latest version provides access to the sound setup from its menu when you launch the game with runxcom.bat.
  • For The Steam and similar packages that have set up the games to run the game through Dosbox transparently will need to make some temporary alterations to the .conf file. The rest of this section explains how to do this.

Go to your .conf file's [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.

We need to alter these line 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 now will load the sound setup instead of the game. When you are done, go back into the .conf file, delete or even REM out the line to run the setup and remove the REM from the line that runs the game and save.

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.