They've always been skeptical.
Deep down inside, some part of me is unable to blame them. After all, they made a compelling case.
But now I have proven them wrong.
That's right, ladies and gentlemen.
They are all wrong.
Spending hours learning how to reverse engineer Win32 software was not a waste of time, as so many would have led me to believe. As a matter of fact, I am here to tell you today that I have used my skills for Good.
Not just any good, mind you, but Good - perhaps even the Greatest Good.
I speak, of course, of getting old games to run on new OSes.
Yes, ladies and gentlemen, boys and girls - I have successfully figured out why Grand Theft Auto 2 would run on certain machines, and not others. Why, with all those frustratingly obscure little messages about not having the right version of DirectX, the glorious game would simply die, instead of ushering the user into a rapturously delightful realm of mayhem and mischief.
It took about an hour with OllyDBG and my copy of Reversing. I started by running the game until the "Incorrect DirectX version" message appeared, then pausing the process in OllyDBG, and walking back up the call stack. I then walked through the code by hand several times, tracing out exactly how events transpired to reach this particular error. Locating the actual DX initialization code was fairly easy; but it took a fair bit of painstaking number-juggling in hex to figure out exactly where things started to go pear-shaped. I traced it down to a call to LoadLibrary followed by a call to CoCreateEx, which is of course part of COM. Thanks to OllyDBG's handy string-location features, it was pretty clear that the barfing was due to a single file not being loaded correctly.
Before I kill myself (and you) with all this melodrama, here's the dirt: it comes down to a certain DirectX DLL file that is present when installing old versions of DX, but is no longer present in DX9. This file is DMUSIC.DLL. So if your machine, like mine, came stock with DX9 and no older versions of DX, you will not have this file. Downloading DMUSIC.DLL from the web, putting it in your GTA2 folder, and running REGSVR32 on it will fix the problem.
My next project is to get my copy of the original Deadlock to work; it runs without sound when told it is on an NT OS, and runs with sound under Win9x/ME but then promptly freezes after a few seconds of play. I've narrowed it down to some kind of infinite loop going on, but that'll take a lot more effort to really crack I think. I'll play with it later.
For now, I go now to enjoy the luscious fruits of my labor, and run over lots of pedestrians.