Homebrew RELEASE Max Payne Mobile port/loader

fgsfds

Well-Known Member
OP
Member
Joined
Aug 28, 2018
Messages
445
Trophies
0
Age
123
XP
3,333
Country
Russia
As has been suggested in the thread, I ported the PS Vita port to the Switch.
I suppose this is more of a novelty thing or a proof-of-concept of an AArch64 .so loader, since you can just play the original Android version using Switchroot.
Github repo: /fgsfdsfgs/max_nx
Latest version: r1 (Feb 25, 2021)
Download link: Github release page

2021022501430900-DA63280140B1530CD17755515D814CFE.jpg 2021022501435200-DA63280140B1530CD17755515D814CFE.jpg 2021022501482800-DA63280140B1530CD17755515D814CFE.jpg

Features (over the mobile version):
  • 720p or 1080p screen resolution;
  • re-enabled character shadows and debris effects;
  • rebindable gamepad controls;
  • option to turn off the god damn bloom effect.

How to install:

This requires access to syscalls svcMapProcessCodeMemory, svcUnmapProcessCodeMemory and svcSetProcessMemoryPermission.
I actually have no idea what that entails for the end user except the fact that you have to be running a CFW.
I also haven't tested it on any other Switch except mine (which runs Atmosphere 0.18.1 with Mesosphere on FW 10.1.0). Good luck.

You're going to need:
* .apk file for version 1.7 (latest version at the time of writing) that includes arm64-v8a libraries;
* .obb file for version 1.6 or 1.7 (usually located at /sdcard/android/obb/com.rockstar.maxpayne/main.3.com.rockstar.maxpayne.obb).

Both files can be obtained from your phone if you have a copy of the game installed.
Both files can be opened or extracted with anything that can extract zip files.

To install:
1. Create a folder called maxpayne in the switch folder on your SD card.
2. Extract the contents of the assets folder from your .apk to /switch/maxpayne/.
3. Extract lib/arm64-v8a/libMaxPayne.so from your .apk to /switch/maxpayne/.
4. Extract the contents of the .obb file into /switch/maxpayne/. You can skip all the .msf files except for MaxPayneSoundsv2.msf and any extra languages that you want.
5. Extract the contents of the .zip file attached to the latest Github release into /switch/maxpayne/. Replace everything.

Notes:
  • The game will show an error message if it detects that anything is wrong. Please read those and check the relevant parts of your setup.
  • If the error says `Could not find symbol ...`, that likely means you have the wrong .apk. You need one for v1.7, others will not work.
  • If the game crashes on startup, double check your setup and the closed issues on Github (if any). If you can't find a solution, please post an issue with your last crash report attached.
  • The port has an extra config file, located at /switch/maxpayne/config.txt. It is created when you first run the game and allows you to tweak some internal settings. For more detailed descriptions of said settings check the wiki article.

Credits:
  • TheOfficialFloW for the method and work on the PS Vita port;
  • Rinnegatamante, Bythos, frangarcj, CBPS for help with the PS Vita port;
  • Freakler for providing the icon;
  • Switchbrew for libnx.
 
Last edited by fgsfds,

jesus96

Pinkboi
Member
Joined
Sep 2, 2015
Messages
380
Trophies
0
XP
1,235
Country
Mexico
As has been suggested in the thread, I ported the PS Vita port to the Switch.
I suppose this is more of a novelty thing or a proof-of-concept of an AArch64 .so loader, since you can just play the original Android version using Switchroot.
Github repo: /fgsfdsfgs/max_nx
Latest version: r1 (Feb 25, 2021)
Download link: Github release page

View attachment 248500 View attachment 248501 View attachment 248502

Features (over the mobile version):
  • 720p or 1080p screen resolution;
  • re-enabled character shadows and debris effects;
  • rebindable gamepad controls;
  • option to turn off the god damn bloom effect.

How to install:

This requires access to syscalls svcMapProcessCodeMemory, svcUnmapProcessCodeMemory and svcSetProcessMemoryPermission.
I actually have no idea what that entails for the end user except the fact that you have to be running a CFW.
I also haven't tested it on any other Switch except mine (which runs Atmosphere 0.18.1 with Mesosphere on FW 10.1.0). Good luck.

You're going to need:
* .apk file for version 1.7 (latest version at the time of writing) that includes arm64-v8a libraries;
* .obb file for version 1.6 or 1.7 (usually located at /sdcard/android/obb/com.rockstar.maxpayne/main.3.com.rockstar.maxpayne.obb).

Both files can be obtained from your phone if you have a copy of the game installed.
Both files can be opened or extracted with anything that can extract zip files.

To install:
1. Create a folder called maxpayne in the switch folder on your SD card.
2. Extract the contents of the assets folder from your .apk to /switch/maxpayne/.
3. Extract lib/arm64-v8a/libMaxPayne.so from your .apk to /switch/maxpayne/.
4. Extract the contents of the .obb file into /switch/maxpayne/. You can skip all the .msf files except for MaxPayneSoundsv2.msf and any extra languages that you want.
5. Extract the contents of the .zip file attached to the latest Github release into /switch/maxpayne/. Replace everything.

Notes:
  • The game will show an error message if it detects that anything is wrong. Please read those and check the relevant parts of your setup.
  • If the error says `Could not find symbol ...`, that likely means you have the wrong .apk. You need one for v1.7, others will not work.
  • If the game crashes on startup, double check your setup and the closed issues on Github (if any). If you can't find a solution, please post an issue with your last crash report attached.
  • The port has an extra config file, located at /switch/maxpayne/config.txt. It is created when you first run the game and allows you to tweak some internal settings. For more detailed descriptions of said settings check the wiki article.

Credits:
  • TheOfficialFloW for the method and work on the PS Vita port;
  • Rinnegatamante, Bythos, frangarcj, CBPS for help with the PS Vita port;
  • Freakler for providing the icon;
  • Switchbrew for libnx.

Is it possible to port GTA SA as well? Would love to see that

Also thanks for this
 

fgsfds

Well-Known Member
OP
Member
Joined
Aug 28, 2018
Messages
445
Trophies
0
Age
123
XP
3,333
Country
Russia
would it be possible to do the same with gta san andreas?

Is it possible to port GTA SA as well? Would love to see that

Also thanks for this

I could not find any evidence of a GTA SA .apk with arm64 libraries. If there is one, then it's possible. Otherwise I don't know.
Apparently AArch64 CPUs can go into AArch32 mode, but as far as I can tell that's only done on a per process basis and I have no idea if it's possible to do in userland on the Switch. Not to mention the entire toolchain is only built for AArch64.
 
  • Like
Reactions: Fadi5555

Fadi5555

Well-Known Member
Member
Joined
Jan 3, 2018
Messages
499
Trophies
0
Age
35
XP
2,393
Country
United States
Can we port Nvidia shield tv games like metal gear solid 2 on Horizon OS using this method. I’m pretty sure it uses AArch64 which is compatible with switch.

and about GTA SA can we use an iOS version in order to port it to switch? Because Of using AArch64.
 

blueballer

Member
Newcomer
Joined
Jun 5, 2020
Messages
19
Trophies
0
Age
33
XP
293
Country
Turkmenistan
Wow, thanks fgfds! With Shield games being broken due to OpenGL problems on the latest Switchroot release, is there a chance that this .so loader could get games that previously worked on Oreo (HL2 and Portal) running native?
 

fgsfds

Well-Known Member
OP
Member
Joined
Aug 28, 2018
Messages
445
Trophies
0
Age
123
XP
3,333
Country
Russia
Wow, thanks fgfds! With Shield games being broken due to OpenGL problems on the latest Switchroot release, is there a chance that this .so loader could get games that previously worked on Oreo (HL2 and Portal) running native?
As long as they have arm64 libraries it should be possible. As far as I know HL2 (and other Source games probably) doesn't though, it only has armv7a, so unless someone figures out a way to load those we're shit out of luck.
 

smf

Well-Known Member
Member
Joined
Feb 23, 2009
Messages
6,643
Trophies
2
XP
5,861
Country
United Kingdom
Apparently AArch64 CPUs can go into AArch32 mode, but as far as I can tell that's only done on a per process basis and I have no idea if it's possible to do in userland on the Switch.

You can run 32 bit executables. If you use the homebrew toolchain and libraries then they would need work.
 

fgsfds

Well-Known Member
OP
Member
Joined
Aug 28, 2018
Messages
445
Trophies
0
Age
123
XP
3,333
Country
Russia
When you copy over the data files, make sure to copy over x_spanish.ras and MaxPayneSoundsSpanishv2.msf, then just select it in the options menu in game.
 
  • Like
Reactions: Imancol

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Xdqwerty @ Xdqwerty: @AncientBoi, don't worry atleast that video is a parody +1