Jump to content
  • entries
    628
  • comments
    1454
  • views
    1011552

Triumph!

Sign in to follow this  
ApochPiQ

163 views

They were skeptical.

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.
Sign in to follow this  


2 Comments


Recommended Comments

5 points for the skinny ones, 10 points for the medium ones, 15 points for the fat ones, and 30 if they're carrying someone smaller. Bonus 5 points for backing over them. I should really make a VIDEO game out of this. I'm upto 250 points!

Edit: Also, never listen to them. They're just mad because they tried and couldn't do it and they're sure you can!

Share this comment


Link to comment
Quote:
the glorious game would simply die, instead of ushering the user into a rapturously delightful realm of mayhem and mischief.


Oh man, I love your writing Apoch. [grin]

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!