Max Payne Guide

Max Payne - Windows 10 fix (widescreen fix+60fps cap) for Max Payne

Max Payne – Windows 10 fix (widescreen fix+60fps cap)

Max Payne DOES work with Windows 10 and AMD (and nVidia)

Author: Hexaae
«…for a (bit crazy 😛) friend of mine who loved this old game»

What’s this guide for?

This old game freezes/crashes on startup on some modern systems…

You’ll be able to play the very old game Max Payne also under Windows 10, and even if you have an AMD gfx card (vanilla game was ignominiously hanging on startup with AMD hardware!), fullscreen. No risky admin rights required, no 3rd party hacks, wrappers or customized d3d8.dll files required (except for unofficial WSF patch), just using Windows built-in compatibility layers fixes. The cleanest and more elegant solution for all users.

How to:
  1. download Microsoft Application Compatibility Toolkit (ACT) from
    [link]

    Windows Assessment and Deployment Kit (ADK) for Windows 10 (1903, fine also for 1909, 2004 uses a specific version)

    Don’t worry: if you select just MS ACT from last page of the installer you will download only ACT (should be less than ~10MB, not the whole ADK of 6.4GB!!)

    “Application Compatibility Tools”, select this one only

  2. once installed ACT, run the 32-bit version (to fix 32-bit apps).

Let’s now create the new fix for our EXE
  1. give a name to the DB (yellow cylinders) to be created under “Custom Databases” in the bottom left tree (I suggest “Games compatibility fixes”. In the pic I’ve used “This name will appear also in Windows uninstall panel” as a reminder on how to uninstall it). Now choose “Fix” button from top toolbar and let’s start editing our fix…
  2. compile required fields (name, vendor and EXE path) and click Next
  3. skip first list of fixes (Compatibilty Modes) clicking on Next again
  4. now let’s select the following compatibility layers flags (Compatibilty Fixes) for our fix. This is the core of our fix to the game:
    • DisableThemes
    • ForceSimpleWindow
    • HideTaskBar
    • SingleProcAffinity

  5. and finally let’s choose how to identify our EXE to which Windows will apply the compatibility layers we’ve just chosen (I suggest just “COMPANY_NAME” and “PRODUCT_NAME”… or leave selected defaults). Doesn’t matter if you change your EXE path in a future installation, Windows won’t look for the path but for these matching properties in every launched EXE with same name
  6. now click on “End” button to complete the fix
  7. click on your new DB in the left tree and “Save” it. I suggest as a good path the default:
    C:WindowsAppPatch

  8. RMB (right mouse button) on your Custom Database on the left containing the Applications fix for “Max Payne”, and choose “Install”.
    The DB with compatibility layers will be saved in your Windows system.
    Hint: See the key in the registry:

    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionAppCompatFlagsCustom

🆘 SIMPLIFIED PROCEDURE FOR NOOBS
Here is the .sdb file: [link]
You can just load it through MS ACT. Always remember to Save and Install it.

Enjoy

Now the fix is complete. You can uninstall ACT if you want, since Windows handles internally compatibility layers and does not require anything but the tool (ACT) to make and save them in the system.
For the smarter users: yes, they are the same compatibility layers the system applies when you choose for example to run an EXE in Windows 7 compatibility mode or as Admin (they are just a collection of single layers fixes grouped together under a “Compatibility Mode” you can explore with ACT too. “Windows 98” compatibility mode is a collection of over 70 shims!).

Audio fix

Download and run this patch to correct audio:
[link]

Requires in the same dir of MaxPayne.exe the original localized voice over file “x_<language>.ras” (e.g. x_italian.ras)

OR…
…simply download the audio file for your language already fixed from darkje’s Guide:
[link]

Widescreen fix + 60fps lock (September 2020)

Extract this package in MaxPayne.exe directory:
[link]

Enjoy WSF+60fps cap finally working (tested up to current NVidia driver 452.06)!
For example you can now play in 1920×1080 16:9 with correct HUD aspect ratio and in-game proportions (= no more squashed NPCs etc.).
60fps cap is a MUST or some scripts in this game will get out of sync (e.g. see the infamous Vinnie Gognitti stairs bug!).

60fps fix must be installed before you start the level: won’t work on an already bugged savegame unless you load an older save game, complete that previous level again, and load the next level where you had the bug for the “first time”.

NOTE: this package is based on WSF beta patch + dx9 wrapper from the same author[github.com] mixed together to also cap this game at 60fps!
WSF=widescreenfix

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

OPTIONAL AMD FIX:
A Uniquely Ryzen 3000 Problem – Max Payne (2001)

The True Zen 2 problem for the Max Payne game. By luigoalma.

The issue that occurred that lead games to crash at JPEGs, was none other, than an old set of maths in code.

The game’s dll at runtime start performs a check of CPU capabilities with EFLAGS to check for CPUID and the CPUID instruction itself if present. What happened on the AMD Zen 2 CPUs, was just a poor incident of maths. When the function that determines capabilities runs, after EFLAGS check, it will execute CPUID with EAX=0 right after, to get the Manufacturer ID, and the highest function parameter, and continue checking for capabilities after this point if the value of the parameter with bitwise AND 0xF was non 0. And right here, it quit trying, because the returned parameter was 0x10 for these CPUs, and the game didn’t expect anything past 0xF, this leads to read just the low nibble of the returned parameter, of which 0x10 & 0xF = 0, meaning for rlmfc.dll, no higher function parameter was existent, assumed basic CPU of unknown kind, and used basic x86 code, and perhaps due to lack of full testing without MMX present, lead to running code that was not fully functional at some point of it.

Easiest fix, and most stable that let’s the game find the cpu capabilities again:

Open hex editor of unmodified rlmfc.dll

Go to offset 0x256ED (in common editors, row 256E0, column 0D)

Replace 83 E0 0F to 90 90 90

This essentially removes the bitwise AND operation, removing false 0 value in result of it. What lead to this choice of doing that operation may been an error, or perhaps there was a problematic set of CPUs at the time that gave bad values. Whatever reason, this will remove the troublesome instruction. Sorry to disappoint those that expected a CPU bug, but this was not one.

This was a pain to research without any of these CPUs at hand and having to wait for those that could test for me certain things, but, in the end, here’s what really happened in this game.

Source:

60fps fix (old)

To lock the game at 60fps to avoid physics and cutscenes glitches (like the infamous Vinnie Gognitti stairs bug), try this profile I created for NVidia Profile Inspector[github.com]. You will probably need a new savegame too in the worst case… or try to restart from an old savegame much before the glitch…

Installation:
– run NVidia Profile Inspector
– Import this Max Payne custom profile[1drv.ms]

WARNING ⚠: NVidia Profile Inspector cap doesn’t work anymore with drivers 456.38 WHQL!

ALTERNATIVE SOLUTION
This will disable the WSF proportions patch above (switch to 1024×768 or 1280×960 for correct proportions in 16:9 with black bands), but will at least force the game to run at 60 fps:
[link]
Download, copy the d3d8.dll in the MaxPayne.exe dir and set in the ini file:
FPSLimit = 60

Widescreen fix (old)

This will correct 16:9 and 16:10 proportions:
[link]
backup link[1drv.ms] from OneDrive (in case the above isn’t working anymore).

SteamSolo.com