Author Topic: UASOUND.DAT - Everything you never wanted to know...  (Read 802 times)

Offline nologgie

  • Non-resident Non-expert
  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 3465
UASOUND.DAT - Everything you never wanted to know...
« on: September 09, 2009, 04:13:36 PM »
But there are two things that might be of interest to some people, so I'll try to run through them quickly.

UAShell's Sound Registry editor overrides (and overwrites) the data created by UA's Sound.exe and stored in DISK1\CKIT.CFG (byte 2). The six values used in the CFG file can be duplicated using the following settings.
  ____MUSIC____  _EFFECTS_
  PC   Ad   Ro_  _PC   SB_   _Result_   CFG
|  Y    N    N  |  Y    N  |  PC + PC    0
|  N    Y    N  |  Y    N  |  Ad + PC    1
|  N    Y    N  |  N    Y  |  SB + SB    2
|  N    N    Y  |  Y    N  |  Ro + PC    3
|  N    N    Y  |  N    Y  |  Ro + SB    4
|  N    N    N  |  N    N  |  Silent     5
PC = PC speaker      Ad = Adlib
SB = Soundblaster   Ro = Roland
(Yes/No answers are listed left to right in the order asked.)

Note that Soundblaster music is not a listed option, but it can be obtained.

UAShell produces two types of uasound.dat files.
- The first goes to the PROGRAMS directory, and should be kept.
- The second goes to the active design directory, and should be deleted.

Well, that's it for the two somewhat interesting things. The rest is even more boring, but it's not terribly long.

As mentioned above, UAShell produces two types of uasound.dat files. The first is written to the PROGRAMS directory whenever the sound registry editor is run. The second is written into the active design directory whenever UAShell performs a diff.tbl comparison (i.e. when any CKIT edit is saved).

Either file may be modified with a text (or hex) editor. Their formats are as follows:

Each line contains one character and a return.
Y (always Y)
Y (PC Speaker Music)
Y (Adlib Music)
Y (Roland Music)
Y (always Y)
Y (PC Speaker Sound Effects)
Y (Soundblaster Sound Effects)
N (always N)

Answering Yes to all, as in the preceding example, produces PC speaker music and effects.

This file contains a single digit (0-5), followed by a return. The number correlates directly to the setting values of CKIT.CFG, byte 2.

From what I can gather from David Knott's posts, the sound registry editor should be used to define what a system is capable of playing, as opposed to a specific sound setup. The file in the design folder records the sound configuration under which the module was created. The interaction of the two should best recreate the author's aural intentions. This is great, when it works.

Unfortunately, as a search for "uasound.dat" in Module Reviews will reveal, what it often creates is a silent game. More than one contest entry has been penalized because UAShell slipped the file in without the author's knowledge.

I believe part of the problem may lie in the way the sound registry is organized. Allowing all gives PC speaker music. Allowing all but PC speaker music gives Adlib with PC speaker effects. On systems using AC97 sound chipsets (most systems built in the last 10 years), Adlib will not play under DOS or windows, and Adlib emulation through DosBox is mediocre. (If you have an Adlib sound card, your experience probably varies greatly.) The PC speaker sound effects are lousy in any case. Disabling Adlib drops down to Roland with Soundblaster effects, which works on many machines when UA is run from windows. It also usually sounds the best when run through DosBox. By this point, the configuration overlap options are quite limited, and if a match isn't found, UAShell will turn the sound off.

It was a neat idea, but I believe it has proven to be more of a problem than a solution. Fortunately, deleting uasound.dat from the design folder will fix any problems it creates.
« Last Edit: September 09, 2009, 04:17:06 PM by nologgie »
Some days it just doesn't pay to gnaw through the straps.