Max Payne 3 PC Builder
======================

Builds a Windows PC version of Max Payne 3 from YOUR OWN Xbox 360 copy of the game. This tool contains no part
of the game: the game's code is generated on your PC from your files, and your game files are only read.

What you need
-------------
1. Your copy of Max Payne 3 for the Xbox 360, disc 1, in one of these forms:
     - a disc image (.iso) of disc 1
     - its Games on Demand package (the folder with the package file and its .data folder)
     - a folder with disc 1's files (default.xex, common.rpf, ...)
   Disc 2 is not needed.
2. Title Update 6 for Max Payne 3: the file tu00000006_00000000 (on a console it is in
   Content\0000000000000000\5454086B\000B0000), or the files of its disc001 folder.
3. Build tools (free):
     - Visual Studio 2022 or newer, or its "Build Tools", with the workloads/components
       "Desktop development with C++" and "C++ Clang tools for Windows"
       https://visualstudio.microsoft.com/visual-cpp-build-tools/
     - Python 3.10 or newer (tick "Add python.exe to PATH" when installing)
       https://www.python.org/downloads/windows/
4. About 12 GB of free space where the PC version goes, plus 8 GB of memory or more.

How to build
------------
1. Unpack this folder somewhere you can write (not Program Files).
2. Run MP3Builder.exe.
3. Pick disc 1, Title Update 6 and the folder for the PC version. Each line turns green when it is right.
4. Press Build. It takes 10 to 30 minutes: it extracts your disc, generates the game's code, compiles it and
   installs it. Press "Show details" to see what it is doing.
5. Press Play, or use the "Max Payne 3 (PC)" shortcut on your desktop.

Building again into the same folder only redoes what changed, so an update of the builder takes a few minutes.

In the game
-----------
- SETTINGS > DISPLAY has the PC's picture options (display mode, resolution, frame rate limit, V-Sync, frame
  generation, upscaling, sharpness, frame counter); SETTINGS > CONTROLS the mouse's and the button icons.
- F1 (or a pad's PS / Guide button) opens every PC setting, the key bindings included; F11 switches fullscreen.
- Keyboard and mouse, Xbox pads, DualShock 4 / DualSense and most other pads work; rumble is on.
- Frame generation: NVIDIA Smooth Motion (RTX 40 / 50) from the game's DISPLAY settings; on AMD, Fluid Motion
  Frames in the AMD Software. DLSS and FSR 2 / 3 cannot be added: the Xbox 360 game has no motion vectors.
- The settings are in mp3.toml next to mp3.exe, your saves in the user folder there.

Command line
------------
The window runs source\mp3\win\build_pc.py, which also works on its own:
  python source\mp3\win\build_pc.py check --disc <disc 1> --tu <tu00000006_00000000>
  python source\mp3\win\build_pc.py build --disc <disc 1> --tu <tu00000006_00000000> --install <folder>

Legal
-----
Unofficial and not affiliated with or endorsed by Rockstar Games or Take-Two Interactive. You need to own the game.
The port's code is GPL-3.0 (mp3-nx); the ReXGlue SDK is BSD-licensed; see the licence files in source\.
