06 Apr

Tex Murphy, DOSBox, and the Gravis UltraSound 16

gus

I had just purchased my first PC after years of loving my Amiga. It was 1992, and after much pouring over the Sunday BestBuy inserts, I finally purchased. At over $3000, I received an IBM4019 laser printer, a 14″-ish monitor, and an IBM 486DX/33 PS/1 with 8MB of RAM (standard was 2 or maybe 4) and a 210MB hard drive.

Naturally, this machine was preloaded with OS/2, and didn’t come with drivers for the printer (which was part of the package). And, as was common, there was no sound card. So, back to BestBuy I go…and based upon specs alone, I purchased a Gravis UltraSound. I was a clean slate–I had no knowledge or preconceptions about the PC sound card market of the time.

I didn’t even realize how lame OS/2 2.1 was, either, I guess I had heard the name Windows, before–but OS/2 had Windows built right in! What a noob. Wing Commander II ran fine under OS/2, but there was no way I could find to get the game sound to play through my spanking new sound card. Many calls to IBM later, they finally just sent me a set of DOS/Windows reinstall disks. Finally! Things worked. Sorta.

gus_card

“Advanced Gravis taught me how to use a computer!”

They didn’t intend to…it was just that the GUS had absolutely zero native support in games. Sure it sounded far superior to the SB16 I purchased later in a fit of pique (Forgive me, Gravis!), but I wanted to play games!!! Particularly the only two I owned–Wing Commander II and, ironically enough, Martian Memorandum.

wingiitex_mm2

And to top it all off, the IBM install booted directly to Windows, and when you exited would take the machine to a bizarre DOS Shell application that would ask if you wanted to go back to Windows or maybe the DOS SHELL…which wasn’t DOS. It was some ANSI based file manager. But I stated to learn the ways of the PC world.

But, let’s use some of those fantastic MIDI patches in our DOSBox games!

dosboxlogo

To start, one will need a DOSBox install and a game. For the purpose of this posting, we will continue from my previous guide and utilize the setup for DOSBox and Under a Killing Moon (the third in the Tex Murphy series). Read the article in its full form here on the Fourth Law to catch up.

And go ahead and start downloading the GUS install diskettes.

Ok, here’s the trickiest part (not really)–unzip them all into the same folder. Let it overwrite the text file each time.

gus01

gus02

gus03

Now, we get to install the GUS software where DOSBox can get at it. Open up a command prompt, change to the directory where the files were unzipped, and execute INSTALL.EXE. Step-by-step:

  1. Start | Run | CMD <enter>
  2. CD\<path to install files>
  3. INSTALL <enter>

There is no way to use the regular installation script, since part of it will try to detect the hardware–which isn’t there. Therefore, we will use “Restore File(s)”.

gus04

Tell it to restore everything using wildcards. Type *.* for the selection. Oh, and don’t forget to mail in your UltraSound registration!

gus05

When it asks, tell it to install to the C: drive. A security warning message will probably appear, just tell it yes.

gus06

gus07

Allow it just to install to the default directory. The plan is to move it to a location that DOSBox will use as its root.

gus08

Once that is complete, exit from the install program and the command prompt. Now, in Windows, explore to C:\ULTRASND, grab the folder and move it to the root of your games directory (or where ever DOSBox maps as its C: drive). In my case, this is C:\Archives\Games.

gus09

DOSBox, meet the GUS. GUS, p0wn the DOSBox.

Now Remember: Since we are emulating more digital audio rather than just passing MIDI calls to the Windows MIDI mapper, this setup hinders the performance of DOSBox.

Open the DOSBox config file–which, if my previous guide is being followed, is called TEX_UAKM.CONF. We will first turn off the MPU-401 interface. Under the midi section, let’s change it from “intelligent” to “none”.

[midi]
mpu401=none

Make sure that the sbtype=none and the GUS emulation is turned on.

[gus]
gus=true
gusrate=22050
gusbase=240
irq1=5
irq2=5
dma1=3
dma2=3
ultradir=C:\ULTRASND

Save the config and launch it with DOSBox.

Alright! Now let’s play the classic file HIDNSEEK.MID using the UltraSound MIDI Player. I know, I know–but it still gives me goosebumps, probably only for nostalgic reasons. These sounds being produced by my 486 simply knocked me out at the time. I didn’t really think a PC could produce audio at that level. Comparing it to the other 16bit cards of the day, even the Wave Blaster SB16 daughter board, the sound quality was unbelievable.

And it was second to none for Digital Audio playback (not that it matters here–since it is only being emulated).

Try it out! From the DOSBox command prompt:

  1. CD\ULTRASND <enter>
  2. PLAYMIDI <enter>
  3. Select the MIDI directory

gus10

This is just a little DOS application for play .MID files. The General MIDI specification (GM) required 16 channels, and utilized volume levels from 0 to 127. In case anyone wonders, the volumes per channel are shown on the right, and the pitch is on the left. Escape exits, if you need it.

gus11

w00t. Now, for Tex Murphy. This actually stopped me for a little while. I simply could not get the MIDI card setup inside UAKM to detect the UltraSound. Then, something at the edge of my memory caused me to more closely examine the Tex Murphy UAKM install directory.

Sure enough! MOONGRAV.BAT…for playing Under a Killing Moon with a GRAVis card. Duh!

It simply uses an Advanced Gravis utility to preload the MIDI patches into the sound card’s on-board RAM before the game starts. It has a bunch of echo lines and a pause in it, but the meat of it are these two lines:

loadpats mem1
TEX3 %1 %2 %3 %4 %5

I don’t know why it is passing all five arguments to the EXE in the second line, but I know we will need to make some changes to this file. For one thing, we don’t want to emulate the stock GUS that shipped with only 256k of RAM, we want to emulate one that the owner has painstakingly filled up to a megabyte. And when I say “painstakingly”, I speak from experience. They didn’t just sell those SOJ modules anywhere. And also, we need to run the patched file TEX197 rather that the original TEX3 executable.

Anyway, open up MOONGRAV.BAT from your UAKM directory and edit the last two lines thusly:

loadpats mem4
TEX197 %1 %2 %3 %4 %5

And now, run MOONGRAV.BAT. It will take a second to load the patches. Tex will start, but complain that the MIDI card has not been configured.

uakm20

Just set it up as we did in the last post (I/O Port 240) and away we go.

uakm21

Tex on a GUS. Now that’s living the life!

Hope this helps! Have fun revisiting the olden days. If you really want to tweak, here’s a copy of the last version of MegaEm for GUS and the PROPATS bundle of patch replacements.

5 thoughts on “Tex Murphy, DOSBox, and the Gravis UltraSound 16

  1. I did the steps. I cannot get any music in my games that support the UltraSound. I don’t know what I’m doing wrong.

Comments are closed.