Win: Deadlock 1 Partial Audio Fix

Ask here for technical assistance with installing, running, etc. Forum related issues should be reported here, too.
User avatar
Belix
Hatchling
Hatchling
Posts: 20
Joined: Wed Jan 30, 2013 10:24 pm
Favourite Race: Tarth

Win: Deadlock 1 Partial Audio Fix

Post by Belix » Fri Feb 01, 2013 8:58 am

Greetings fellow Deadlock fans. This post will be a little lengthy; if you're just interested in playing a some Deadlock with sound and music for longer than usual, skip to the bottom paragraph...

I think most of you know this already, but at least as far back as Windows XP, the sound effects and music in Deadlock no longer work unless you run the game in Win 95 or 98 compat mode*, which unfortunately leads to the game freezing up at some point. I considered myself lucky if I could get through the menus to the actual game before it hung, and then the triumph was short-lived as a single ALT+TAB, settlement zoom or end turn report could put a quick end to it.

*(make sure that 'Disable Visual Themes' is also checked or the Save/Load menu stops working

After reluctantly playing the game with no sound or music for years, I finally decided to look into this. I learned a few interesting things and even managed to significantly reduce the game freezes with compat mode... but sadly not eliminate them entirely. I'm going to continue to look into this on and off, but I feel that for the time being I may have gotten as far as I can, so I am sharing what I've found in case someone else would like to pick up the trail.


The first thing I gained a glimpse of was why Deadlock doesn't play sound or music at all without W95/98 compat enabled. Deadlock appears to rely on WAIL32.DLL for wave output, but the file is never loaded without compat mode enabled. Whether this is because the code calling for WAIL32.DLL has problems on newer Windows, or this is an issue with WAIL32.DLL itself, I can't say for sure.

I could find virtually nothing about WAIL32.DLL online with searches, but eventually my familiarity with RAD Game Tools as the developer of the Smacker video format (which Deadlock uses) made a link jump out at me in the search from their website. This turned out to be a change log for Miles Sound System, which they acquired from Miles Design in 1995, and from the log I was able to infer that WAIL32.DLL was an early version of Miles Sound System before the file was renamed to MSS32.DLL sometime around 1996 or 1997.

Now that I was positive WAIL32.DLL was integral to Deadlock's audio output, and knew that several different versions of the file existed as per the change log, I searched around trying to find newer versions. After finding what seemed to be many older versions which crashed Deadlock, I eventually found what seemed to be a newer one included with a world war flight simulator game called Flying Corps.

Replacing Deadlock's WAIL32.DLL with the one from this game has, so far, allowed me to run it in compat mode with audio and music working, and seems to be much more stable. I can always get through the menus now, and using ALT+TAB no longer seems to freeze it. I was able to play a few very short test games, which unfortunately revealed that it will still freeze eventually. The best way to make it freeze on purpose that I've found so far is to zoom in to the territory view, then rapidly click on other territories in the minimap to switch views and cause the ambient sounds to restart repeatedly. The hang seems to be related to starting, pausing or stopping audio, be it sound effect or music.

I've been unable to find a version of WAIL32.DLL that runs without freezing eventually. Replacing it doesn't seem to make it load without compat settings enabled either, which is sad because, for all I know, playing the game with W95/98 compat may be why the audio is causing a freeze in the first place.

As a bit of a longer shot, I also tried using some of the older MSS32.DLLs that I could find by renaming them to WAIL32.DLL, but either the versions I used weren't old enough or it won't work with Deadlock, as these also produce crashes at the main menu like most of the WAIL32.DLLs I tried did.

If you're interested in furthering this discovery, you might check some of your late 1996 and early to mid 1997 Windows games for different versions of WAIL32.DLL to try. There's a big list of companies and games Miles Sound System has been used with on RAD's website here if you want to check it out, but the window for newer WAIL32.DLLs is very narrow, since Deadlock was released in mid-1996 and the change to MSS32.DLL may be less than a year afterwards, so remember to check your release dates: http://www.radgametools.com/mssgames.htm

For all I know, however, this one may be the newest version.

If anyone feels so inclined, it might be worth contacting RAD Game Tools in regards to acquiring the final version of WAIL32.DLL and/or the source code for it so that someone with programming experience could update it for legacy games.



With this version of WAIL32.DLL, for me the game seems like it would play for a reasonable amount of time before freezing now. If you really want audio and music you could just save frequently, terminate Deadlock when it hangs and simply load it back up again. With the original DLL it would freeze so fast I would never of bothered trying to play it with audio. I am attaching this DLL below. It produced significantly better results on two different Windows 7 x64 systems with entirely different hardware, so it should hopefully work for everyone else. Just drop it into your Deadlock folder. I advise renaming or copying the original WAIL32.DLL file first, just in case.

Note: I also uploaded another working WAIL32.DLL in my next post if you'd like to try that one too.

EDIT: Updated title for consistency with my other threads.
Attachments
WAIL32.DLL.zip
WAIL32.DLL from Flying Corps
(57.4 KiB) Downloaded 736 times
Last edited by Belix on Sun Feb 17, 2013 7:39 am, edited 2 times in total.

User avatar
Ubergeneral Grunt
Site Admin
Site Admin
Posts: 175
Joined: Fri Nov 19, 2010 10:20 am
Favourite Race: Tarth
Location: Perth, Western Australia
Contact:

Re: Deadlock 1 & Windows - Partial Audio Fix

Post by Ubergeneral Grunt » Fri Feb 01, 2013 1:15 pm

Thanks, I have only tried this briefly but it seems to work quite well. I will have to try this more extensively.
Belix wrote:The best way to make it freeze on purpose that I've found so far is to zoom in to the territory view, then rapidly click on other territories in the minimap to switch views and cause the ambient sounds to restart repeatedly. The hang seems to be related to starting, pausing or stopping audio, be it sound effect or music.
I tried this and Deadlock didn't crash for me, so I guess I am lucky (I only loaded up a saved game and tried this, so maybe I will have less luck after a long session).
Tarth cooks make best strudel, barbecue, bean dip, fish, cat food, smelt, piston rings, tofu and cam shafts...

User avatar
Ubergeneral Grunt
Site Admin
Site Admin
Posts: 175
Joined: Fri Nov 19, 2010 10:20 am
Favourite Race: Tarth
Location: Perth, Western Australia
Contact:

Re: Deadlock 1 & Windows - Partial Audio Fix

Post by Ubergeneral Grunt » Fri Feb 01, 2013 2:20 pm

Okay, I've had a bit more of a look at this. It's true it crashes after a while, but given that we have AUTOSAVE.SAV, this is really just a minor inconvenience rather than a huge problem, assuming it doesn't crash too often. There is also a strange issue with some territory sounds (industry, birds, etc) occasionally cutting out suddenly.

All that aside, this seems to be a pretty good fix for now.
Tarth cooks make best strudel, barbecue, bean dip, fish, cat food, smelt, piston rings, tofu and cam shafts...

User avatar
Belix
Hatchling
Hatchling
Posts: 20
Joined: Wed Jan 30, 2013 10:24 pm
Favourite Race: Tarth

Re: Deadlock 1 & Windows - Partial Audio Fix

Post by Belix » Sat Feb 02, 2013 12:55 am

Hello Grunt, thanks for giving it a try. Here's some Azarga berries as a reward; I'm glad to hear the DLL showed improvement for someone else, and not just on my own computers.
Ubergeneral Grunt wrote:I tried this and Deadlock didn't crash for me, so I guess I am lucky (I only loaded up a saved game and tried this, so maybe I will have less luck after a long session).
I was able to crash the game in about 20-30 territory switches once, but then a second attempt with about 50 clicks to switch territories didn't do it. Another test game let me get far enough to train two Laser Squads and attack an enemy colony. I thought a battle with many sounds going would make another decent test, and the battle concluded without freezing up. But I just got this working a couple days ago and haven't played with it extensively yet.


I did find one other version of WAIL32.DLL that worked similarly, but I can't tell if it is newer or older... it may be worth experimenting with also. I will attach it to this post. This one is from a 1996 game called Time Commando. Despite roughly 10kb difference in file size, it seemed to behave the same way - still an occasional freeze, but much better. If either is better than the other, or which is newer, I am uncertain yet.

I'll report back if I am able to find anything else of interest. I will also be looking into getting multiplayer working again. I last played a full working MP game in early 2010, but that was between two Windows XP systems.
Attachments
WAIL32.DLL alternate.zip
WAIL32.DLL from Time Commando
(55.8 KiB) Downloaded 655 times

User avatar
Belix
Hatchling
Hatchling
Posts: 20
Joined: Wed Jan 30, 2013 10:24 pm
Favourite Race: Tarth

Re: Win: Deadlock 1 Partial Audio Fix

Post by Belix » Sun Feb 03, 2013 11:11 pm

I just sent an e-mail to RAD Game Tools asking if they can provide the latest version of WAIL32.DLL, and if they would consider releasing the source code for it some day. I will let everyone know what their response is.

User avatar
Ubergeneral Grunt
Site Admin
Site Admin
Posts: 175
Joined: Fri Nov 19, 2010 10:20 am
Favourite Race: Tarth
Location: Perth, Western Australia
Contact:

Re: Win: Deadlock 1 Partial Audio Fix

Post by Ubergeneral Grunt » Mon Feb 04, 2013 3:20 am

I sent an email to RAD yesterday, they got back to me pretty quickly, even though it's still Sunday in the US.

Here was their response:
Sorry, that DLL predates my time at RAD - I wouldn't even know where to look for it! In general though, we can't help in such situations because often customers rebuild those dlls since we provide source code that they then modify.
So unfortunately no luck there, hopefully Belix will have more luck.
Tarth cooks make best strudel, barbecue, bean dip, fish, cat food, smelt, piston rings, tofu and cam shafts...

User avatar
Belix
Hatchling
Hatchling
Posts: 20
Joined: Wed Jan 30, 2013 10:24 pm
Favourite Race: Tarth

Re: Win: Deadlock 1 Partial Audio Fix

Post by Belix » Mon Feb 04, 2013 3:37 am

In general though, we can't help in such situations because often customers rebuild those dlls since we provide source code that they then modify.
I was wondering if that were the case. It would explain why it appeared in so many different sizes over the years, but I was hoping RAD merely updated it frequently. Hopefully Deadlock running BETTER with the DLLS from different games indicates that there were no or minimal changes. Nonetheless, that bit of information sadly suggests a full solution is much less likely.

Perhaps they will consider releasing the source code for it if they come across it, since it seems the latest version of their DLL may have been altered for various games. With the source code someone could potentially fix several of these old games having issues on Windows nowadays.

User avatar
Belix
Hatchling
Hatchling
Posts: 20
Joined: Wed Jan 30, 2013 10:24 pm
Favourite Race: Tarth

Re: Win: Deadlock 1 Partial Audio Fix

Post by Belix » Fri Feb 08, 2013 12:27 am

Dan Thompson wrote:Sorry, that was so long ago I wouldn't even know where to look. Customers rebuild the DLL themselves often as well, so it probably wouldn't help.
The entire reply; no comment about the source code. Sounds like we got a response from the same person. I can imagine how odd it must of seemed to get two requests nearly back to back out of nowhere about something so ancient. Was worth a try.

It seems, besides trying the DLLs from other random games in that time period, the only other venue to explore might be Cyberlore Studios. But with Atari holding the rights to the series, and Miles Sound System being someone else's intellectual property, I doubt they could help even if they still had any of the source of Deadlock left laying around that was used for Deadlock II's development.

Deadlock likely could easily be fixed up to work fine on newer Windows. Us fans may have the time and motivation to do the work, but the companies either can't or won't provide the tools necessary. Sad am I.

User avatar
Belix
Hatchling
Hatchling
Posts: 20
Joined: Wed Jan 30, 2013 10:24 pm
Favourite Race: Tarth

Re: Win: Deadlock 1 Partial Audio Fix

Post by Belix » Fri Feb 15, 2013 4:40 am

This evening I came across an Amazon listing for a used copy of Deadlock where the seller claimed to be able to provide a compatibility tool capable of making Deadlock run fine with full audio on Windows Vista and Windows 7. While I fear this may just be the assurance of someone who didn't actually PLAY it to make sure it was stable and just found the same Windows 95/98 compatibility settings that cause the game to freeze up, the entity in question is a store with an emphasis on older video games, so I am in the process of contacting them to see what they have to say about it. It may be a long shot, but Deadlock is worth the effort!

"I will bring more news."

User avatar
Belix
Hatchling
Hatchling
Posts: 20
Joined: Wed Jan 30, 2013 10:24 pm
Favourite Race: Tarth

Re: Win: Deadlock 1 Partial Audio Fix

Post by Belix » Sun Feb 17, 2013 7:21 am

I got a response from the seller indicating that they never had any complaints with compat issues on past sales of Deadlock, but he noted that they hadn't sold any copies of it for some time now and he temporarily pulled the listing to run some tests with it for a day or two. I asked him to let me know how it turns out.

On a slightly unrelated note, I got Windows 3.1 running in DOSBox today and was going to try Deadlock in it to see if all the audio/multiplayer issues could be settled there, but unfortunately my laptop seems to have suffered a video failure just after I got Windows 3.1 working. It was having problems on and off the past few years and seems to have finally bought the farmhouse. Talk about bad timing!

EDIT: Removed discussion of broken save/load feature by compat mode setting; See next two posts.
Last edited by Belix on Sun Feb 17, 2013 7:37 am, edited 1 time in total.

Post Reply