PDA

View Full Version : Windows 7 fix for Max Payne 2


MMZ>TimeLord
05-01-2010, 01:45 PM
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.


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.


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.

DarkjeThe2nd
05-01-2010, 01:58 PM
Exactly what problem does this fix?

MMZ>TimeLord
05-01-2010, 02:47 PM
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.

DarkjeThe2nd
05-01-2010, 03:05 PM
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!

spyrochaete
05-01-2010, 03:05 PM
Did you turn your Windows security settings up or something? I have no such issues with Win7 x64.

MMZ>TimeLord
05-01-2010, 03:11 PM
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! :D

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.

DarkjeThe2nd
05-01-2010, 03:20 PM
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.

MMZ>TimeLord
05-01-2010, 03:27 PM
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!

raijian
05-01-2010, 05:13 PM
Could you explain what file im editing? OP didn't give much info on that.

MMZ>TimeLord
05-01-2010, 06:46 PM
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.

raijian
05-01-2010, 07:22 PM
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 :p

mathesar
05-01-2010, 10:08 PM
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).

bobeatsjoe
05-01-2010, 10:51 PM
ok now i feel kinda stupid but, what am i sopposed to do here?:confused:

MMZ>TimeLord
05-02-2010, 01:52 AM
ok now i feel kinda stupid but, what am i sopposed to do here?:confused:

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
05-02-2010, 01:59 AM
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.

DarkjeThe2nd
05-02-2010, 02:42 AM
I'm still confused as to why you would need this, even if I enable DEP for all applications in the advanced system settings, Max1 and 2 both run fine. So I'm thinking maybe something is up with your config?

Max1 steam-exe has both DEP and ASLR disabled by default and works fine. Max2 cd-exe has DEP enabled, but runs fine too...

http://i44.tinypic.com/21ex85c.jpg

http://i42.tinypic.com/iohlyx.jpg

I'm not saying the fix is not needed, as obviously it works for you and you are not posting it here for any other reason than just helping out. But my attempts to figure out and recreate the problem haven't been successful.

I'm not going to advice against or before this fix, but hex-editing of exe files is generally speaking a last resort option, so if you want to attempt this fix make sure you first exhausted all other options.

880753
05-06-2010, 06:58 AM
Hmmm diddnt work for me,
My issue is the same but the trigger was me updating my drivers, but I dont want to go back!

Hex Editz (http://i80.photobucket.com/albums/j188/880753/MP2.jpg)

SamSeven
05-06-2010, 04:45 PM
I'm having no luck with this and my game still doesn't work....

880753
05-06-2010, 05:08 PM
Try down grading your drivers. Avoid beta drivers.

Lennart
04-16-2011, 05:16 AM
I'm playing with Vista atm and I have following problem:

This is a little different problem, but: I'm playing MP2 on steam and i'm on the first campaing. I'm at the part where sniper starts to shoot you etc. and you escape by ledges and when I reached one window there begun cutscene where Payne said something like ''The flames that started in my apartment couldn't burn my past away but they made the shadows of my past only leap higher'' and then starts loading screen - but! Game collapses and I get error note where reads something like ''couldn't find save file''

Okay, so it gives this message:

Max Payne 2

Exception:
Invalid data read from an R_MemoryFile(''07_maxs_apartment_b.ldb)

Closing...

gentle_storm
04-18-2011, 07:47 PM
Hey, did this fix work for anyone? Or does your mouse studder, and the cutscenes have no sound.

Jackel2072
04-13-2012, 03:19 PM
well the hex edit didnt work. the line of code is different from you have displayed. to be clear im looking at 960. there is no 0960 or 00960

BBboy20
04-15-2012, 11:36 PM
I have the retail version and I'm not seeing the 0960 area.

Vodalus27
04-30-2012, 10:01 AM
I have the original boxed retail version, I know this isn't really the correct place to be posting, but I couldn't get support anywhere else for Max Payne 2.

I have run out of ideas to get the game running, which is disappointing, I love this game and it worked fine until just a few months ago.

I've tried this fix, Copying the files from the e2driver folder to the main MP2 folder, Disabling DEP And ASLR, Patched with the newest patch, installed the Direct X July 2010 Redist, tried installing it to a different location other than its default, and installing onto a secondary HD, Installed in compatibilty mode, and tried to play in compatibility mode. It still will not launch.

This is what I get in event viewer:
Log Name: Application
Source: Application Error
Date: 4/28/2012 8:10:19 PM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
Description:
Faulting application name: MaxPayne2.exe, version: 1.1.102.0, time stamp: 0x00000000
Faulting module name: MaxPayne2.exe, version: 1.1.102.0, time stamp: 0x00000000
Exception code: 0xc0000094
Fault offset: 0x0015b277
Faulting process id: 0x156c
Faulting application start time: 0x01cd25a4cda3d493
Faulting application path: C:\Program Files (x86)\Rockstar Games\Max Payne 2\MaxPayne2.exe
Faulting module path: C:\Program Files (x86)\Rockstar Games\Max Payne 2\MaxPayne2.exe
Report Id: 15ec3230-9198-11e1-8cfb-d48564178d9d
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-04-29T01:10:19.000000000Z" />
<EventRecordID>22109</EventRecordID>
<Channel>Application</Channel>
<Security />
</System>
<EventData>
<Data>MaxPayne2.exe</Data>
<Data>1.1.102.0</Data>
<Data>00000000</Data>
<Data>MaxPayne2.exe</Data>
<Data>1.1.102.0</Data>
<Data>00000000</Data>
<Data>c0000094</Data>
<Data>0015b277</Data>
<Data>156c</Data>
<Data>01cd25a4cda3d493</Data>
<Data>C:\Program Files (x86)\Rockstar Games\Max Payne 2\MaxPayne2.exe</Data>
<Data>C:\Program Files (x86)\Rockstar Games\Max Payne 2\MaxPayne2.exe</Data>
<Data>15ec3230-9198-11e1-8cfb-d48564178d9d</Data>
</EventData>
</Event>

My Specs:
Windows 7 Home Premium 64 Bit (w/ all Windows Updates)
Amd Athlon II X2 250 @ 3.0GHZ
16GB Memory
1TB HD
GeForce GTX 460 (w/ Newest Drivers)
Realtek High Def Audio (w/ Newest Drivers)
Motherboard: N-Alvorix-RS880-uATX (w/ all updates for it)

Tigerdango
05-31-2012, 07:11 AM
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.


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.


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.

Even with the hex editor provided I cannot find the strings anywhere in the exe that you say to change...?

Edit: The best I can tell that hex string doesn't even exist in maxpayne2.exe -.-;

Lostedge
04-24-2013, 11:19 AM
They have probably updated the exe files, and no such strings can not be found anymore ...