Repository navigation
Max Payne 2: The Fall of Max Payne (original Xbox) for Nintendo Switch and PC.
New in 1.0.2
- Faster frames on the Switch. The game's memory is now placed on 2 MB boundaries, so the console maps it in large blocks: about 2.9 % less work a frame (measured on a real console, alternating runs on the same scene at 1581 MHz: 8.72 ms against 8.99 ms).
guest_align = 0in the settings file turns it off. - Clocks left to your clock manager.
cpu_clockandmem_clockare now minimums: a clock that Horizon-OC, sys-clk or an overclock already runs higher is left as it is; one that drops below the setting (dock, undock, sleep) is raised; and if something keeps pulling it down, the port stops after three tries a minute and leaves it be. Before, the port set its clocks back every second whenever they differed, higher ones included, so on an overclocked console the memory clock was switched down and up again for whole sessions. If you use an overclock, please update. - No more quiet OpenGL builds. Building without devkitPro's
deko3dpackage now stops and says what to install (dkp-pacman -S deko3d), instead of silently making the OpenGL fallback, which is far less tested.-DPORT_RENDERER=glstill builds it on purpose. - Logs say which build made them: the first line now reads
build switch-1.0.2-dk(release and renderer). - Reporting a crash: the README says where each run's log is (
sdmc:/switch/MPayne2-nx/logs/mp2_NNN.logon the Switch,logs\mp2_NNN.logbeside the exe on the PC) and what to send.
Coming from 1.0.0 (switch/mp2-nx on the SD card): rename that folder to switch/MPayne2-nx, rename mp2-nx.toml in it to MPayne2-nx.toml (your settings), and put your new build, MPayne2-nx.nro, in place of mp2-nx.nro. Your saves (hdd) move with the folder. From 1.0.1, just replace MPayne2-nx.nro.
A static recompilation port: the Xbox executable is turned into C++ and compiled natively for the Switch's ARM64 and for Windows, with the Xbox libraries (Direct3D 8, DirectSound, the kernel) rewritten for each host. It is not emulation.
Source only. This release contains no game code and no game files. You need your own copy of Max Payne 2 for the original Xbox (NTSC-U,
TT-012) and build the port from it. A built NRO or exe contains the game's recompiled code: never share one.
What works
Nintendo Switch (deko3d renderer, 1280x720)
- Every level at 60 fps in handheld on a real console with the shipped settings (CPU 1581 MHz, memory 1600 MHz). A Horizon-OC profile that holds those clocks, with the handheld GPU at 460.8 MHz, carries level 19's GPU-heavy stretch (
package/TESTING.md). - Films, menus, saving and loading, chapters played through to the next, the ending and the credits.
- The port's options panel (Minus + R3, or both sticks pressed in): graphics, frame rate, controller settings and gyro aiming (off by default; Always, or While firing).
- The game's widescreen frame drawn at the full 1280x720 (
render_wide = 1);render_wide = 0gives the original 960x720 stretched picture.
PC (Windows 10/11, Vulkan)
- Every level and Dead Man Walking at 60 fps.
- Borderless full screen or a window (F11, Alt+Enter), mouse aiming and keyboard, or an Xbox-style controller, and the same options panel (F10).
Building
- Copy your disc's files and run
ferramentas/recompilar.ps1 exemplos/mp2: it makes the C++ from your owndefault.xbe. Requirements:docs/01-requisitos.md; the third-party libraries the builds use are listed inthird_party/README.md. - PC:
ferramentas\build_pc.bat exemplos\mp2, thentools/make_package_pc.ps1lays out a folder to play from (package/README-PC.txt: setup and controls). - Switch: install devkitPro's
deko3dpackage (dkp-pacman -S deko3d), then in devkitPro's msys2CMAKE_EXTRA='-DPORT_RENDERER=dk -DPYTHON_EXECUTABLE=<python.exe>' ./ferramentas/build_switch.sh exemplos/mp2, thentools/make_package.ps1lays out the SD card folder. Start it from hbmenu while holding R on an installed game (title mode, for all the memory);package/TESTING.mdhas the rest.
Packing it for your Switch
This repository builds the port (MPayne2-nx.nro); the web installer (its source is installer/ in this repository, GPL-3.0) then packs your build and your disc's files into the SD card layout, in your browser.
Known limits
- With
render_wide = 1, level 19's heaviest stretch dips to 59-60 fps in handheld for about ten seconds; withrender_wide = 0, or docked, it holds 60. - Save names show the time in UTC, as the original game does.
- The OpenGL and CPU-renderer Switch builds are fallbacks, checked in an emulator only.
Credits and licence
Built on XboxSwitchPortKit / COLD-FEAR-NX-PORT (MIT), XboxXBE-Recomp by TGP482 (MIT) and Black-Android (MIT), with toml++, Dear ImGui, glslang, SPIRV-Cross, uam and devkitPro's libraries under their own licences. The porting method follows renut-nx and the Xbox 360 ports (Renut's renderer, sa2-nx, NetherSX2_nx, battd_nx, the bejeweled3-nx / zuma ports). This repository's code is MIT-licensed (LICENSE); Max Payne 2 is not covered by it and is not included.