Metal Gear Solid V: The Phantom Pain Widescreen Patcher

User created game mods, skins, texture packs and camera tools
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by chris686 »

MGS V: Widescreen Patcher

Please read the first two posts!

The below notice is fixed in v0.21a. Assuming no major problems, v0.21a is likely the final version.
----------------------------------------------------------------------------------------------------------------------------------------------------------------

Notice!
Over 1000 views and nobody tells me there are bugs :thumbdown:

The patch (v0.2a) currently works fine with the latest version as of 11/18/2015. I recently used it myself on the latest version. However, I must have accidentally removed the pause before the command prompt exits. So the patcher will open quickly and then close. The game is most likely patched after this. Launch it from the executable to make sure.

In addition, if there is already a backup file in the game's directory, the patcher will crash without patching the executable. The solution is to either delete the backup or change the backup name in the settings file. The fixes are both trivial and I'll fix them over the weekend.

----------------------------------------------------------------------------------------------------------------------------------------------------------------

v0.21a download primary (Latest version. Recommended.)

v0.2a download primary
v0.2a alt download

v0.1a download primary
v0.1a alt download


Git repo source code (Written in C, Apache License 2.0)


----------------------------------------------------------------------------------------------------------------------------------------------------------------

What this does:

It searches for a specific hex value in the binary (executable) and replaces it with a new value calculated based on the resolution specified in the config file. This value is then replaced, and the new aspect ratio is now supported! :-)



What this doesn't do:

    1. Support 4:3 (Planned. Next feature to add) Added in v0.2a
    2. Executable backup Added in v0.2a
    2. Reverse patch modifications (Planned) No longer planned
    3. Fix marker position (Planned) No longer planned
    4. Fix anything else related to UI or FOV (Some other items planned) No longer planned


Release Notes

v0.21a
*Program now correctly pauses after patched operation is attempted.
*Program now correctly handles multiple backups.

v0.2a
*Added support for older aspect ratios including 4:3 and 5:4
*Added automatic backup of the executable
*Greatly reduced log spam.

v0.1a
*Added auto patching of aspect ratios beyond 16:9/16:10.

Instructions for usage:

    1. Unzip the package into your MGSV:TPP directory with the mgsvtpp.exe file.
    2. Executable backup can be configured in the config file. It is on by default, though you can disable it or specify a custom name. (Note, if you run the utility twice, your first backup will be overwritten. This will be fixed later.)
    3. Open MGSV_TPP_WideScreen_Patch.cfg and set the resolution you will be using to play the game and backup options if you want them.
    4. Run the executable

That should be it! Enjoy!

Known bugs

None.

Please report any you find!

Special thanks

jackfuste for answering my questions over PM and creating the original fixes. Without those fixes, I wouldn't have written this.


Status

I feel this is sufficient as-is. I'm going to work on changing this to C++ code and creating a generic, easy to use patching utility that's cross platform. A one-size-fits-all approach isn't all that beneficial, nor is a super specific implementation such as this patcher.

The config file can be modified to patch different hex values if they change, though I doubt that'll be necessary in this instance. If this patcher completely breaks, post here or on the github issue tracker and I'll fix it.
Last edited by chris686 on 09 Dec 2015, 03:01, edited 17 times in total.
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by chris686 »

If the patch doesn't work:

1. Verify you set the correct parameters in the config file.

2. Verify you have a clean exe. ie, one that's not already patched. It will not work if it's
already patched, or it may even break the executable.

3. If everything is configured correctly, I can help you. But I can only help if you:

a. Copy/paste your config file here in code tags.
b. Copy/paste the output of the utility in code tags.
Last edited by chris686 on 06 Nov 2015, 05:39, edited 1 time in total.
Drells
Posts: 4
Joined: 22 Oct 2015, 02:38

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by Drells »

Worked for me at 2560x1080! Thank you for the easy to use solution.

You may want to state in this thread that you will still need to manually change the values for markers/etc.
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by chris686 »

ikazman wrote:Hello, Chris686 . As you wrote before

chris686 wrote:The patcher will work by scanning the entire binary file and identifying 39 8E E3 EF and changing it automatically.


Well, it seems to be good plan (and it's working, thanks!), but for some reason it's not a solution for ratio 5:4 (or 4:3).
If I understand it well enough, value "39 8E E3 3F" in exe just means "my native ratio is 16:9". So, placing values exceeding ratio 16:9, we are making sure that exe supports it (that is in ordinary way - not so).
But, for example, 5:4 ratio (1280x1024) is already supported and not exceeding "native" 16:9. It means, that replacing sequence "39 8E E3 EF" with the value regarding 5:4 ("00 00 A0 3F") doesn't make big deal for exe because, well, its already included (with letterboxing, of course).
I think Jackfuste did changes not only in "39 8E E3 EF", but in something else. Or, maybe, Jackfuste did his magic with some tricky values, because when I replaced my exe with his - well - it's just works. Thank you.


Trying to keep support out of the main topic.

I'll take a look at his executable with a hex editor and see what else is changed. I've got all the code in place, so it should be a trivial fix. I wasn't aware that 1280x1024 was already "supported" natively.
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by chris686 »

Drells wrote:Worked for me at 2560x1080! Thank you for the easy to use solution.

You may want to state in this thread that you will still need to manually change the values for markers/etc.


Glad it worked! Thanks for the advice. I updated the OP. I hastily put it together last night before bed. I've also added some things I plan to implement. I'm certain there's a way to patch things like marker position, etc. permanently. Those values have to be calculated somewhere! I'd prefer not to have to rely on CheatEngine tables as running CE when playing online makes me a bit nervous. In all honesty, I haven't played the game in over a week: I'm just doing this for fun to keep my C skills up to date. I do Java all day at work, and it's not quite as fun as programming in C. I'll probably do anything new in C++, however, since manually coding seemingly everything takes forever.

On the plus side, the patch is practically instantaneous since it's written in C.
Padellus
Posts: 25
Joined: 18 Oct 2012, 09:33

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by Padellus »

IT WORKS !!! In 1280x1024!
Thank you very much, great work! :onethumb: :onethumb: :onethumb:
Last edited by Padellus on 05 Nov 2015, 12:22, edited 1 time in total.
Padellus
Posts: 25
Joined: 18 Oct 2012, 09:33

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by Padellus »

Sorry for the OT, I have a question, in the same way it would be possible to adapt to the 5: 4 also AC Unity? The game to default in 1280x1024 enlarges the image, that is stretched vertically, it should keep the proportions, zooming (or changing the fov).
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by chris686 »

Padellus wrote:Sorry for the OT, I have a question, in the same way it would be possible to adapt to the 5: 4 also AC Unity? The game to default in 1280x1024 enlarges the image, that is stretched vertically, it should keep the proportions, zooming (or changing the fov).


I'm going to give you the answer as a software developer:

Anything is possible. It's a question of time/effort and value. Adding the fix to this was trivial because I was told what values to change were, and I had the existing code in place. If I weren't supplied those, I wouldn't have added it. You're in the minority with a 5:4 or 4:3 display :-) In fact, I wouldn't have written this at all without the contributions of jackfuste (who I've been meaning to give special thanks to in the OP).

As for the answer you were expecting:
I don't own that game, but if Widescreen patches already exist, it is likely easy to implement. But I'm saying this without any knowledge about that game, so take this with a grain of salt.

FYI:
I'm looking to convert this into a nice tool that's cross platform at some point, so those doing the grunt work like jackfuste can easily make auto patch utilities for any game. It's a lot of work scanning executables with OllyDbg and IDA.

Distributing individually patched executables that are all patched the same way is not only a waste of time, it's unauthorized distribution of copyrighted works and likely to generate unwanted attention. Distributing a patch with original work? Perfectly fine. No grey areas there.
User avatar
jackfuste
Insiders
Insiders
Posts: 521
Joined: 19 Dec 2011, 16:03

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by jackfuste »

Padellus wrote:Sorry for the OT, I have a question, in the same way it would be possible to adapt to the 5: 4 also AC Unity? The game to default in 1280x1024 enlarges the image, that is stretched vertically, it should keep the proportions, zooming (or changing the fov).

AC Unity has DRM or Anti-cheat system. It prevent code modification that needed for widescreen fix.
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by chris686 »

jackfuste wrote:
Padellus wrote:Sorry for the OT, I have a question, in the same way it would be possible to adapt to the 5: 4 also AC Unity? The game to default in 1280x1024 enlarges the image, that is stretched vertically, it should keep the proportions, zooming (or changing the fov).

AC Unity has DRM or Anti-cheat system. It prevent code modification that needed for widescreen fix.


There's your answer.

Just for the sake of being contradictory, anything's possible. Whether or not it's feasible/worth the effort is a whole different story. :mrgreen:
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by chris686 »

Updated to v0.21a
User avatar
PremanKampung
Posts: 5
Joined: 23 Sep 2015, 06:59

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by PremanKampung »

So, this patch also fix marker position? and I dont need cheat engine trainer?
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by chris686 »

Unfortunately not. Talking with jackfuste, he informed me that would require cracking the game. I have no interest in that. It only patches the game to support different aspect ratios.

He's probably right, but I had originally wanted to take a stab at it anyway. I never got around to it since I decided it wasn't a worthwhile pursuit for one game and I have other, more useful projects floating around in my head.

The OP says that those things aren't fixed by this patch, but I can see how it might have been confusing. It's now updated to be more clear.
Padellus
Posts: 25
Joined: 18 Oct 2012, 09:33

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by Padellus »

ehi Chris, sorry I can ask you another question ot? There are other ways to get on the various AC image in 1280x1024 in fullscreen and not stretched? Or even a way to zoom the image, even by drivers? (I have a 270X).
I can not play no AC for this reason! :(
User avatar
anteronoid
I Donated
I Donated
Posts: 264
Joined: 10 Nov 2010, 02:58

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by anteronoid »

Padellus wrote:ehi Chris, sorry I can ask you another question ot? There are other ways to get on the various AC image in 1280x1024 in fullscreen and not stretched? Or even a way to zoom the image, even by drivers? (I have a 270X).
I can not play no AC for this reason! :(


Don't wanna be that guy, but isn't it just all easier for you to just get a widescreen monitor? It's Black Friday and you should be able to find one for a penny or two. :D
I mean this can't be the only problem you have with that monitor, its sounds really old and no new games will support it.
| i7 6850K Broadwell-e @4.2Ghz | DDR4 32GB @3200Mhz| 2x Msi 1080 X | Asus X99 Deluxe II /H110i/AX1200iw |
| 3x Dell P2314H @ 5760x1080 + Philips 43" 4K IPS BDM4350UC Monitor + Oculus Rift CV1 |
| 1*Samsung EVO 960 500GB NVMe x4 gen.3 | 2x Intel SSD SATA III Raid 0 | 2x Intel SSD SATA III Raid 0 | 2x 2TB SSHD Seagate SATA III Raid 0 |
| Logitech G810 - G502 - G240 - G27 - G940 - | TrackIR 5 Pro | Saitek RHINO X55 HOTAS | Xbox One Elite Gpad |
Asus Vulcan Pro | Asus Xonar U7 | Sony STR-DE495P External Surround Home Cinema Reciever |
Padellus
Posts: 25
Joined: 18 Oct 2012, 09:33

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by Padellus »

Change the monitor means having to change all the rest of the hardware, to play at a higher resolution.
User avatar
anteronoid
I Donated
I Donated
Posts: 264
Joined: 10 Nov 2010, 02:58

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by anteronoid »

Not really. You said you have a 270X, you could even run 3 widescreen monitors with that card.
Last edited by anteronoid on 02 Dec 2015, 13:21, edited 1 time in total.
| i7 6850K Broadwell-e @4.2Ghz | DDR4 32GB @3200Mhz| 2x Msi 1080 X | Asus X99 Deluxe II /H110i/AX1200iw |
| 3x Dell P2314H @ 5760x1080 + Philips 43" 4K IPS BDM4350UC Monitor + Oculus Rift CV1 |
| 1*Samsung EVO 960 500GB NVMe x4 gen.3 | 2x Intel SSD SATA III Raid 0 | 2x Intel SSD SATA III Raid 0 | 2x 2TB SSHD Seagate SATA III Raid 0 |
| Logitech G810 - G502 - G240 - G27 - G940 - | TrackIR 5 Pro | Saitek RHINO X55 HOTAS | Xbox One Elite Gpad |
Asus Vulcan Pro | Asus Xonar U7 | Sony STR-DE495P External Surround Home Cinema Reciever |
Padellus
Posts: 25
Joined: 18 Oct 2012, 09:33

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by Padellus »

anteronoid wrote:Not really. You said you have a I have a 270X, you could even run 3 widescreen monitors with that card.


No, I have a dual core on socket 775 with 4GB of ram, it is not good for that!
dark3zz
Posts: 10
Joined: 20 Oct 2015, 15:09

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by dark3zz »

WOW you just :rockout: :rockout: :rockout: :rockout: :rockout: :rockout:

This is actually working (your version 0.21a) with the latest game version (2th of decembre 2015) Official 1.0.6.0 patch release

Im playing 21:9 @2560x1080 on the Phillips)

Thank you alot for this !

[img=http://s22.postimg.org/6q6hw1z71/2015_12_02_00013.jpg]

[i]Ive downloaded 0.21, but there is the CFG File missing, so i went and grabbed also the 0.2 zip which includes the CFG)[/i] :cheers: :cheers:
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: Metal Gear Solid V: The Phantom Pain Widescreen Patcher

Post by chris686 »

Glad to hear it's still useful. I can't believe I missed the config. I don't even remember updating 0.21a. I write so much software between work and personal projects that it blends together, and I've literally been sick for two weeks and am only back to normal this week.

I almost missed your comment about the config file. You ought to pick a different font color next time :-) I'll update it tonight.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests