CyberStorm screenshot - https://en.wikipedia.org/wiki/File:Cyberstorm_command_screen.png

Fixing Up Old (Sierra) Computer Games

Finally!  Another post going back to what I originally intended this blog for, sort of: Supporting old tech for no apparent reason… other than to get the musings out of my head or the white papers off my old floppies.

The Short of It

It is “most excellent” to announce the return of some Windows 95 games by Sierra and Dynamix to Windows 7… and Windows 8… and even Windows 10!  (Maybe Windows Vista too, but: Who cares?)

For those of you not interested in any long-windedness or boring backstory, here is the link to the current home of the patches wiki:

Click here for my complete
Sierra game install instructions and
RBXIT Win7 patches at
github.com/juanitogan/rbxit/wiki


For the nerds who just want the patch files, here are the links (but don’t ping me until you read the instructions on the wiki):

Please do not steal these game patches by hosting them on your own site.  Link here instead.  If I can’t determine how popular they might be by the traffic, then why should I make more?

Should they ever move from their current location, I will try to keep this post updated with the new location.  Hence, why I point my comments on other sites here instead of to the current locale.


Patch Issues

Issues can be reported through comments on this blog, but it would be far easier to keep track of conversations if you report issues on the RBXIT Issue page on GitHub.  Thank you.

Also, please report Windows version and 32 or 64 bit.  Copying in any error text from the DOS install window would also be helpful.


Want to help support my classic game preservation efforts?
Then please help me spread the word about my retail game:

GRITS Racing logo and two

GRITS Racing is a party game for up to 8 players that is part racecar simulator, part cartoon action.  Available on both itch.io and Steam.


The Long of It

I know I am far from being any sort of guru on fixing up old computer games… but I do enjoy my small victory here with these patches.

This quest (because Sierra likes the word “quest”) to get my copies of 3D Ultra Pinball and 3D Ultra MiniGolf working on Windows 7 started back in 2011.  It didn’t go very far other than getting Creep Night working with the help of the, aptly named, Sierra Help Pages.  Then life took over and that was that.

Recently, however, I started looking for some simple, cooperative and/or social, online games to play with friends and family.  There are surprisingly few (or none) that met my criteria, so my thoughts went back to 3D Ultra MiniGolf and its network and online capabilities (now dead — take notice WON2 and Steam).  Therefore, I took a look around for any new developments and, SURPRISE!, I found this YouTube video (from 2011, that I missed finding in 2011):

That solution to turn off the sound effects was just the clue I needed to hook me into looking into this more.  Therefore, if you like the work I’ve done here, give that video a “like” — it’s the least we can do to thank them.

So, after poking that solution a bit, I started looking deeper into things like DirectX and DirectSound.  I had just gone through fixing a sound problem with Worms Crazy Golf which requires installing DirectX 9 in addition to the current DirectX (on my very old but now Windows 10 laptop).  Thus, on that line of thought, I started collecting every version of DSOUND.DLL I could find and dropping it into the MiniGolf folder to see what happens.  In the end, that was a red herring.  All I really learned was that version 4.x of the file = no sound in MiniGolf, and 5.x+ = the usual sound/breaking.

I then tried some free slowdown utilities but go nowhere with those.  I considered trying the commercial Mo’Slo program but didn’t want to buy it without first knowing it works with MiniGolf.  So I pressed on to other ideas.  A slowdown tool was not the ultimate solution I was looking for anyhow.

My next hints came when it came to tearing apart the RBX archive files in the game.  It wasn’t hard to tell with a hex editor that these were where the sound effects were stored.  An internet search revealed another before me who had pulled these apart to harvest the sound data.  That was someone calling him/herself “The Fifth Horseman” in these posts left on these two boards:

Unfortunately, his/her “derbxer” and other files are no longer available online… so I got to start from scratch.  Those clues on what I might find in the WAX files, however, were a helpful head start.  I still had to double check it, correct it, and nail it all down, but it still helped move things along I’m sure.  So a “thank you” there as well.  The WAX header is actually 30 bytes and not 32, and I spent a ton of time testing the fields in it to make absolutely sure they were indeed abbreviatedly borrowed from WAV headers, and testing what could and could not be changed, and how.  I also discovered through much testing with SoX (Sound eXchange) — a huge “thank you” goes to that tool — that the ADPCM data is not exactly IMA format but has reversed nibbles from IMA.  The sound output is very similar either way but reversing the nibbles from IMA standard produces less fry.  Even with this correction, SoX still complains about 1 or 2 (very rarely 3) ADPCM state errors on some of the sound bites (which is far better than hundreds the other way around).  This is very mildly concerning but it does not mean the interpretation is wrong.  It could be erroneous encoding in the first place.

As much time as all that took, I spent the bulk of my time trying to find a way to manipulate the WAX header data and the ADPCM data in such a way as to make the game work without crashing.  I produced some stable intermediate results but never with the audio sounding right.  All ADPCM tests that sounded right, eventually crashed.  And the stable ones that sounded wrong were just a big tease luring me into testing a hundred combinations before calling it quits on ADPCM data.  I was hoping to find a setting that would trigger the game into just passing the ADPCM stream to DirectSound instead of decoding it itself first.  Testing shows that this is not likely programmed and the presence of the IMA ADPCM decoding tables in the EXE supports this theory.

That was all just the curious side of me indulging itself when I was fairly certain I would end up decoding the ADPCM data into PCM data and rewriting the WAX files to serve it up.  Early testing showed that this was possible, it just meant I would have to write another tool to repack the RBX files instead of just modding them.  And, then, if I wanted the old RBX files to be patchable with as-small-as-possible patch files, I would have to go to extra effort to preserve the order of the files in the original archive.  I don’t want to risk being accused of passing around unnecessary data or too much copyrighted stuff.  Ack!

So, anyway, after shaking down all my options, I had only one way forward.  I worked up the the tools better and starting putting together patches for release.  The Fifth Horseman had mentioned CyberStorm 2 and, the more I looked into the CyberStorm series, the more CyberStorm 1 looked like a game needing to be in this first release.  So, I borrowed a copy of it — and also started buying copies of that and other games to fill out my collection of games to fix.

The CyberStorm Brain Storm

After I thought I had fixed CyberStorm 1 (and even packaged it up and released it) as I was about to announce it on some boards, I then discovered that the issues most people were concerned about were not the ones related to my other work here — not the ones I was testing.  Ugh.  The bigger issue was that CyberStorm was quitting without error when attempting to save or load a game.  Not being a CyberStorm gamer, I had stupidly neglected to test all parts such as these.  Embarrassing.  Thus, I had to backpedal a bit and clarify that my first patch only fixed the in-game issues.

I then immediately launched a quest (there’s that word again) to fix the rest of the issues even though first appearances indicated it would require skills I have yet to develop in decompiling.  Still, I pressed on with whatever evidences presented themselves.  Chasing ideas until I had exhausted them.  Early indication was that the problem might be with CommonDialog and the supporting DLLs.  Basically, presuming, for some reason, the new DLLs were not backwards compatible all the way to Windows 95.  Thus, I started dropping in various DLL versions and hacking the dependencies.  Through this I was able to show that the game was making it as far as calling comdlg32.dll.  Some versions of that DLL even faulted in a loggable way.  As tempting as this was, this was still not proof that the fault was with the CommonDialog DLLs.  So, I pressed on after spending perhaps too much time testing this.  I then even toyed with the RecStudio decompiler for a bit.

What I started doing, however, was just harvesting intel from internet searches.  I started bookmarking things that looked related to old programs and CommonDialog.  I found only a few but one of them, fortunately, broke things open when I went back to examine it deeper:

Windows 10 Forums – 32 bit common dialogs not working on 64 bit os

This gave me the clue that there are other application compatibility flags that can be set in the Windows Registry that are not available through the File Properties interface.  Thus, I dug into the registry to play with the one mentioned, DISABLETHEMES, and found others in use there on other applications.  When I did a search on one of those, DWM8And16BitMitigation, I found this:

Matt’s Classic PC Game Fixes – Daytona USA Deluxe

“Hey, Matt, the classic game fixer, thank you!”  From Matt, another classic game fixer.

Matt’s Classic PC Game Fixes site led me to Microsoft’s Application Compatibility Toolkit (ACT).  (What is a bit embarrassing is that I’ve used this tool once before, 12 years ago, to fix Mobile 1 Rally Championship and I don’t remember a thing about using this tool.)  The ACT is now part of Microsoft’s Windows Assessment and Deployment Kit (ADK) (the Compatibility Administrator is the only needed part when you run the install for the whole kit — you can ignore the SQL Server requirement):

MSDN – Windows ADK for Windows 10

When running the Compatibility Administrator (32-bit) I was lucky enough to try the DisableUserCallbackException flag right away with a few other flags.  When CSTORM.EXE tested fine with popping up a file dialog, it was a little hard to believe at first that I had just stumbled upon the solution.  Anyhow, to try and bring this story to a close, I narrowed down the CSTORM.EXE compatibility settings to:

  • Mode: 256Color
  • Mode: DisableUserCallbackException   (removed in patch release 5)
  • Mode: RunAsHighest_GW   (added to patch release 3, removed in 5)
  • Fix: GetDiskFreeSpace2GB

I got curious as to why DisableUserCallbackException was working and found this/these:

Stack Overflow – How do i fix Win7 app compatibility shim with DISABLEUSERCALLBACKEXCEPTION

Thursday Night – The case of the disappearing OnLoad exception – user-mode callback exceptions in x64

I didn’t dig into all that but consider it proof enough that the error is probably in CSTORM.EXE and not CommonDialog.  This rundown was also a bit helpful:

Program Compatibility Assistant scenarios for Windows 8

This just in as well (patch release 3):

The App Compat Guy – Understanding the AdditiveRunAsHighest Flag on Windows 7

Update December 2017 (patch release 5):

After getting tired of Windows 7 reluctance with DisableUserCallbackException, and other issues with the compat shims from various users, I decided to dig into the machine code of the game to look for a non-shim fix.  After a self-taught crash course in debugging system memory (with the help of better tools that I didn’t have before) I was able to rewrite the machine code around the problem areas in CWARSDLL.DLL after a day or two.  I added tests and conditional jumps in 3 places to jump around 6 problematic instructions when they were likely to fail.  To add the extra instructions, I had to rewrite some of the code in these areas to do the same thing with fewer bytes.  This was easier to do in the places where the original Watcom C/C++ compiler failed to fully optimize the machine code; but I didn’t have that luxury everywhere.

After fixing save and load, I still had the issue that the network screen wouldn’t load for multiplayer network play.  This issue produced an error message… but not a very helpful one:

The instruction at 00000000 referenced memory at 00000000
The memory could not be read from

Click OK to terminate the application

After fiddling with the Compatibility Administrator a bit more on this one, I went back to DLL hunting.  I found that the old DirectPlay DLLs needed to be added to the appropriate system folder in Windows (the newer dp*x.dll files were not being called) and that was that.  I looked up and 4 or 5 days had gone by.  See the wiki for more on all of this.

Therefore, many thanks are owed to “iomismo” for taking the time to write the post at Windows 10 Forums that broke all this open.  Thanks are also owed to Matt for his classic gaming site, and Microsoft (yeah, well) for making some decent compatibility tools to save their reputation somewhat.

I now wonder if the Compatibility Administrator has a flag that can fix the audio algorithm errors I am circumventing with RBXIT… but that will have to wait for another day to test.  For now, I am happy that RBXIT solves just one more compatibility issue and lessens the need for Compatibility Administrator (assuming it might help, dunno).

Help Wanted

I don’t find as much time to devote to gaming as I would like (the only reason I learned programming as a kid in the first place was to write games) so I don’t know the Sierra library that well and could use help finding the games fixable by this method.  There might even be some non-Sierra/Dynamix games fixable by this method.  Basically, the likely candidates are Windows 95 games with RBX files.  Less basically, look for the following sequence of bytes in the EXE file (it is the IMA ADPCM index table — and, yes, the same sequence of 16 bytes twice in a row):

Wanted!  Have you seen this Cody code:
FF FF FF FF FF FF FF FF 02 00 04 00 06 00 08 00
FF FF FF FF FF FF FF FF 02 00 04 00 06 00 08 00

Valve’s Time-warp Division

Did I mention I am looking for a job too?  Oh, perhaps I should have mentioned that sooner.  It seems no one has use for experienced software engineers with no degree like they used to.  Bugger.  The startups want younger people — the enterprises want a degree.  I can’t fix my age so I should have finished that degree in music composition like I’ve always wanted.  I would consider a career shift into zen garden design (seriously) if I could afford to go into business for myself right now.  My ultimate dream job (today at least), if working for someone else, would be to lead a gaming company’s Time-warp Division (my own invented division).  There I would work to promote sells and fandom by creating a false legacy for their newer games that pushes them back into the 8-bit era.  Half-Life on the Nintendo NES anyone?  (I already have the Atari 2600 Half-Life game design in my head.)  Oh, yeah, Halo 2600 (for the Atari 2600) has already been done by Ed Fries (but not marketed or produced like I would).  Such a division might pay for itself if not divide itself.  Might.

Then, and only then, might I be able to also get all these other game designs out of my head.  I swear I’ve got the best 4-player game ever for the 2600 stuck in there (eat your heart out Warlords — “Them’s fightin’ words!”) right next to a fighting simulator for smart phones.  Argh.

What’s all this got to do with Sierra?  I have no idea.  There’s a connection in there somewhere with my work on fixing up these Sierra games and being useful to some video game company somewhere.  Consider this work, RBXIT, my application.  I’m just ranting now.  Here, read my white paper on mayhem in game design if you want more.


111 thoughts on “Fixing Up Old (Sierra) Computer Games

  1. Has anyone tried to get the source and assets?
    I’ve done this for one 20 year old game and it ended up back on the market today.
    Many old games are interesting to update the source and get working for new OS’s and add new features.

    Liked by 1 person

    1. I’ve considered it many times but have never bothered to try. I remember a post on a board years ago of someone asking the same thing regarding CyberStorm, but I don’t know that anyone tried then either. I decompiled some of CS1 when fixing it and have been tempted to start documenting the code and try running it back through a modern compiler, but C isn’t really my expertise and all my spare time is tied up with GRITS Racing right now. I’ve also considered launching an OpenCyberStorm project (much like Freeciv is to Civilization) but, again, the same problem: time and money.

      Like

    2. This is kind of late but IIRC in 2018 or so, Al Howe, an ex-Sierra dev, put up a huge bunch of old Sierra games source code on ebay. Ive seen the Birthright game source code on archive.org, others might be there as well.

      Like

      1. Thanks. I didn’t know about the ebay event, but someone had pointed out Birthright source and one other on archive.org (I don’t remember the other one because it wasn’t of interest). I have yet to see anything else of interest on archive.org but, maybe, someday.

        Like

  2. Time, money, prick producers and ofc back stabbing co developers that give away your code without permission leaving you with no leverage to get paid for your work but I’m sure that NEVER happens to anyone else. 😦 (and the part that’s really special is if you don’t give permission, they say, we’ll just rewrite your code)

    Like

  3. Thanks for the Cyberstorm “patch” for windows 10; had played the game 20+ years ago and had it running in Virtualbox for years. Upgraded to Windows 10 Pro a while back and just could not get it working in VB…..this fixes that problem! Thank you, it is awesome to play again.

    The only problem I still cant seem to get right is full-screening the play at a higher resolution…..change the settings in preferences but it always opens the same and setting are back to default….

    Kevin

    Liked by 1 person

    1. Cool, thanks for the comments. Regarding your issues, just gotta ask the basics. You tried checking both of these?:

      [x] Game always fills entire screen
      [x ] Use extra screen real-estate for battle terrain

      I suspect you did, so, next question. Did you follow this instruction?:

      “With all older games like this, do not copy to a Windows-controlled folder such as Program Files, copy to a DOS-like path instead such as C:\Games (short folder names, no spaces).”

      If it is not that exactly, it is probably something similar that is keeping your prefs from being saved (and/or found). Look for changes to CSTORM.SET (don’t recall for sure at the moment, but pretty sure this is where prefs are saved).

      Like

  4. This is the fix is a lifesaver for me since it used to crash every time before adding this fix, but will you do 3-D Ultra Radio Control Racers Deluxe: Traxxas Edition? the only issue I can find in this game is that you need the mount the iso to a virtual hard drive and the music is not playing when playing a course

    Liked by 1 person

    1. Hi Ziplash. Yeah, I did test RC Racers way back when and found it didn’t need a similar patch as these other games. But, yes, it could maybe benefit from an install guide like what I’ve written for the 3D Ultra Pinball series (time I don’t have at the moment). I don’t recall if it might need a no-cd crack or not, but I don’t write cracks, just patches. Besides, a crack is extremely likely to already be out there if it needs one (which it probably doesn’t — even if you were willing to risk running such a crack — cracks are popular places to put viruses). Personally, I’m happy with ISOs (cannot include audio tracks) or multi-mode CD images (can include audio tracks and other data) as needed. Again, I don’t recall if RC Racers absolutely needs a CD image to start up — but it is doubtful since just an ISO works.

      Regarding the audio and multi-mode CDs, I’ve written this guide in my wiki, presenting various options depending on the effort you care to go to: https://github.com/juanitogan/rbxit/wiki/Playing-background-music-tracks-from-Enhanced-CDs

      Like

Leave a comment