Go Back   Steam Users' Forums > Steam Game Discussions > M - P > Max Payne series > Max Payne 1 and 2

Reply
 
Thread Tools Display Modes
Old 05-01-2010, 01:45 PM   #1
MMZ>TimeLord
 
Join Date: Nov 2008
Reputation: 49
Posts: 48
Windows 7 fix for Max Payne AND Max Payne 2

Update for those that are on Windows 7. (Should also work for Vista! Please verify.)

IF you have the latest video drivers and IF you are running Windows 7 or Vista and are having problems starting either of these games or Midnight Club 2 or Manhunt, then you may be the victim of DEP and/or ASLR.

These basic instructions are telling you to hex edit the executable from steam for these games. This particular thread is directed towards Max Payne and Max Payne 2. If you don't happen to have a hex editor, the one I use is freeware and is very basic.

http://www.physics.ohio-state.edu/~prewett/hexedit/

Here are the hex changes necessary to make DEP AND ASLR disabled for Max Payne and Max Payne 2!

Based on the Manhunt patch, here are the full changes necessary for the Steam version of Max Payne and Max Payne 2.

For Max Payne: (maxpayne.exe)

At 0150... The following line of hex should be change like so.

Code:
FROM:
0000150 00 d0 4c 00 00 10 00 00 fa 37 4c 00 02 00 00 00   

TO:
0000150 00 d0 4c 00 00 10 00 00 aa 36 4c 00 02 00 2a 20
For Max Payne 2: (maxpayne2.exe)

At 0960... The following line of hex should be change like so.

Code:
FROM:
0000960 00 00 17 00 00 10 00 00 a9 f5 16 00 02 00 00 00  

TO:
0000960 00 00 17 00 00 10 00 00 59 f4 16 00 02 00 2a 20
I keep THREE versions in my game directory. For example:

maxpayne.exe
maxpayne.exe.old
maxpayne-fixed.exe

This way, if Steam updates the file or I need to verify files, I still have the original and 'fixed' version to refer to.

Last edited by MMZ>TimeLord: 05-02-2010 at 01:56 AM. Reason: Update
MMZ>TimeLord is offline  
Reply With Quote
Old 05-01-2010, 01:58 PM   #2
DarkjeThe2nd
 
Join Date: Apr 2009
Reputation: 385
Posts: 543
Exactly what problem does this fix?
DarkjeThe2nd is online now   Reply With Quote
Old 05-01-2010, 02:47 PM   #3
MMZ>TimeLord
 
Join Date: Nov 2008
Reputation: 49
Posts: 48
Quote:
Originally Posted by DarkjeThe2nd View Post
Exactly what problem does this fix?
In Windows 7 Ultimate (at least on my system) the combination of DEP AND ASLR keep the games from even starting up. They start, I get the 'please wait' mouse pointer and then ... nothing.

These changes allowed the games to run without admin permission changes or any of the other work arounds that are out there.

My extremely limited understanding is that the small changes I've made tell the Operating System NOT to try and relocate the code sections after starting them as well as telling the Operating System that this is legacy code and should NOT be subject to DEP.

Last edited by MMZ>TimeLord: 05-01-2010 at 02:50 PM.
MMZ>TimeLord is offline   Reply With Quote
Old 05-01-2010, 03:05 PM   #4
DarkjeThe2nd
 
Join Date: Apr 2009
Reputation: 385
Posts: 543
Oke, maybe you are on track of something, some people reported it working for some time and then suddenly not working, without much changes to their system, so if this fixes it... would be great!
DarkjeThe2nd is online now   Reply With Quote
Old 05-01-2010, 03:05 PM   #5
spyrochaete
 
Join Date: Feb 2007
Reputation: 369
Posts: 3,813
Did you turn your Windows security settings up or something? I have no such issues with Win7 x64.
spyrochaete is offline   Reply With Quote
Old 05-01-2010, 03:11 PM   #6
MMZ>TimeLord
 
Join Date: Nov 2008
Reputation: 49
Posts: 48
Quote:
Originally Posted by spyrochaete View Post
Did you turn your Windows security settings up or something? I have no such issues with Win7 x64.
I am using Windows 7 Ultimate 32-bit and I believe all the security settings are unchanged from fresh install. However, I have been getting all critical updates, so maybe something altered a security setting that way.

In any case, Max Payne, Max Payne 2, Midnight Club 2 and Manhunt ALL would not fire up and the Manhunt 'patch' turned a small light bulb on in my head. And I figured, what the heck, maybe it will work for the other three. And it did!

The down side was, I had to manually hex edit the files and locate the correct locations for each of those games. Midnight Club 2 already had it's location identified, but not the entire four byte change and would still not run on my system.

Last edited by MMZ>TimeLord: 05-01-2010 at 03:14 PM.
MMZ>TimeLord is offline   Reply With Quote
Old 05-01-2010, 03:20 PM   #7
DarkjeThe2nd
 
Join Date: Apr 2009
Reputation: 385
Posts: 543
If it works for you, maybe it's helpful in other cases too... so thank you for posting.

I can't test/verify it as the problem does not seem to occur in my machines, but I'm mainly on x64 and some xp ones.
DarkjeThe2nd is online now   Reply With Quote
Old 05-01-2010, 03:27 PM   #8
MMZ>TimeLord
 
Join Date: Nov 2008
Reputation: 49
Posts: 48
Quote:
Originally Posted by DarkjeThe2nd View Post
If it works for you, maybe it's helpful in other cases too... so thank you for posting.

I can't test/verify it as the problem does not seem to occur in my machines, but I'm mainly on x64 and some xp ones.
That was my main reason for posting in the first place. I was getting very frustrated with the games not starting up and all the admin privilege and compatibility mode fixes were not working at all.

That's when I stumbled upon the Manhunt patch that let it run without DEP (Data Execution Prevention) and ASLR (Address space layout randomization) interference.

I used a side-by-side hex comparison program to see the changes made by the Manhunt patch and extrapolated from there. The hard part was locating the right bytes to change.

I hope people that have problems running any of those four games under Vista or Windows 7 (32 or 64 bit) chime in with their results of trying this fix.

Cheers!
MMZ>TimeLord is offline   Reply With Quote
Old 05-01-2010, 05:13 PM   #9
raijian
 
Banned
Join Date: Aug 2008
Reputation: 8
Posts: 624
Could you explain what file im editing? OP didn't give much info on that.
raijian is offline   Reply With Quote
Old 05-01-2010, 06:46 PM   #10
MMZ>TimeLord
 
Join Date: Nov 2008
Reputation: 49
Posts: 48
Quote:
Originally Posted by raijian View Post
Could you explain what file im editing? OP didn't give much info on that.
My apologies... that would be maxpayne.exe and maxpayne2.exe respectively.

I'll update the OP.
MMZ>TimeLord is offline   Reply With Quote
Old 05-01-2010, 07:22 PM   #11
raijian
 
Banned
Join Date: Aug 2008
Reputation: 8
Posts: 624
Thanks a lot man.

I had no troubles running Max Payne 2 on Vista 32 though, I can start it and it hasn't crashed.

Not sure why o.o

Edit: It was downloading when I asked what file to edit
raijian is offline   Reply With Quote
Old 05-01-2010, 10:08 PM   #12
mathesar
 
Join Date: Nov 2004
Reputation: 15
Posts: 861
I couldnt get max payne 2 to run in win7 64bit ultimate but all I did was download the latest nvidia 197.45 drivers and it works fine now. (GTX 260 videocard).
mathesar is offline   Reply With Quote
Old 05-01-2010, 10:51 PM   #13
bobeatsjoe
 
Guest
Posts: n/a
Question

ok now i feel kinda stupid but, what am i sopposed to do here?
  Reply With Quote
Old 05-02-2010, 01:52 AM   #14
MMZ>TimeLord
 
Join Date: Nov 2008
Reputation: 49
Posts: 48
Quote:
Originally Posted by bobeatsjoe View Post
ok now i feel kinda stupid but, what am i sopposed to do here?
IF you have the latest video drivers and IF you are running Windows 7 or Vista and are having problems starting either of these games or Midnight Club 2 or Manhunt, then you may be the victim of DEP and/or ASLR.

These basic instructions are telling you to hex edit the executable from steam for these games. This particular thread is directed towards Max Payne and Max Payne 2. If you don't happen to have a hex editor, the one I use is freeware and is very basic.

http://www.physics.ohio-state.edu/~prewett/hexedit/

Hope that helps.
MMZ>TimeLord is offline   Reply With Quote
Old 05-02-2010, 01:59 AM   #15
MMZ>TimeLord
 
Join Date: Nov 2008
Reputation: 49
Posts: 48
Quote:
Originally Posted by mathesar View Post
I couldnt get max payne 2 to run in win7 64bit ultimate but all I did was download the latest nvidia 197.45 drivers and it works fine now. (GTX 260 videocard).
That was actually the first thing I tried. Grabbed the latest video drivers from nVidia myself, also 197.45.

I have a GeForce 8800 GTS and it's been fine for most games. Only the later GTA games and some of the latest games (in the last 2 years) have really started to show it's age.

Alas, it was not the drivers preventing the games from starting.
MMZ>TimeLord is offline   Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Game Discussions > M - P > Max Payne series > Max Payne 1 and 2


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -7. The time now is 11:34 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2014, All Rights Reserved.