Lyall / MGSHDFix

A fix that adds custom resolutions, ultrawide support and much more to the Metal Gear Solid Master Collection.
MIT License
376 stars 8 forks source link

Adds support for MG1 / MG2 #12

Closed ShizCalev closed 8 months ago

ShizCalev commented 8 months ago

Closes #7

So it turns out MG1 / MG2 just use a modified version of MGS3 that's designed to launch directly into the games (hence why MGS3's save menu is present, and the logos are all the same.)

All functionality that applies to MGS3 works correctly without any modification needed (with the exception of skipping the intro logos, which fails on pattern scan.)

16:9 - 2560x1440

File verbosity level: 9
date       time         ( uptime  ) [ thread name/id ]                   file:line     v| 
2023-10-28 20:57:47.645 (   0.000s) [        F95F1D8E]             loguru.cpp:841   INFO| Logging to 'MGSHDFix.log', mode: 'w', verbosity: 9
2023-10-28 20:57:47.645 (   0.000s) [Main            ]            dllmain.cpp:237   INFO| MGSHDFix v0.6 loaded
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:271   INFO| Config Parse: iInjectionDelay: 500ms
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:272   INFO| Config Parse: bCustomResolution: 1
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:273   INFO| Config Parse: iCustomResX: 0
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:274   INFO| Config Parse: iCustomResY: 0
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:275   INFO| Config Parse: bWindowedMode: 1
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:276   INFO| Config Parse: bBorderlessMode: 1
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:277   INFO| Config Parse: bSkipIntroLogos: 1
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:278   INFO| Config Parse: bDisableCursor: 1
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:279   INFO| Config Parse: bMouseSensitivity: 0
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:280   INFO| Config Parse: fMouseSensitivity: 0.00
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:281   INFO| Config Parse: bAspectFix: 1
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:289   INFO| Config Parse: Borderless mode enabled.
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:314   INFO| Custom Resolution: fNewAspect: 1.7778
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:315   INFO| Custom Resolution: fAspectMultiplier: 1.0000
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:316   INFO| Custom Resolution: fHUDWidth: 2560.0000
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:317   INFO| Custom Resolution: fHUDOffset: 0.0000
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:324   INFO| Config Parse: Aspect ratio is native, disabling ultrawide fixes.
2023-10-28 20:57:47.646 (   0.001s) [Main            ]            dllmain.cpp:337   INFO| Game Name: METAL GEAR.exe
2023-10-28 20:57:47.646 (   0.002s) [Main            ]            dllmain.cpp:338   INFO| Game Path: G:\Steam\steamapps\common\MG and MG2\METAL GEAR.exe
2023-10-28 20:57:47.646 (   0.002s) [Main            ]            dllmain.cpp:350   INFO| Detected game is: Metal Gear / Metal Gear 2 (MSX)
2023-10-28 20:57:47.647 (   0.002s) [Main            ]            dllmain.cpp:363   INFO| MG/MG2 | MGS 2 | MGS 3: Custom Resolution: Address is 0x7ff6e189b0e3
2023-10-28 20:57:47.647 (   0.002s) [Main            ]            dllmain.cpp:369   INFO| MG/MG2 | MGS 2 | MGS 3: Custom Resolution: New Custom Resolution = 2560x1440
2023-10-28 20:57:47.647 (   0.003s) [Main            ]            dllmain.cpp:384   INFO| MG/MG2 | MGS 2 | MGS 3: Framebuffer 1: Address is 0x7ff6e18b57de
2023-10-28 20:57:47.647 (   0.003s) [Main            ]            dllmain.cpp:387   INFO| MG/MG2 | MGS 2 | MGS 3: Framebuffer 1: Patched instruction.
2023-10-28 20:57:47.648 (   0.004s) [Main            ]            dllmain.cpp:384   INFO| MG/MG2 | MGS 2 | MGS 3: Framebuffer 2: Address is 0x7ff6e18b583f
2023-10-28 20:57:47.648 (   0.004s) [Main            ]            dllmain.cpp:387   INFO| MG/MG2 | MGS 2 | MGS 3: Framebuffer 2: Patched instruction.
2023-10-28 20:57:47.649 (   0.004s) [Main            ]            dllmain.cpp:403   INFO| MG/MG2 | MGS 2 | MGS 3: Window Mode: Address is 0x7ff6e18b5aaf
2023-10-28 20:57:47.649 (   0.004s) [Main            ]            dllmain.cpp:406   INFO| MG/MG2 | MGS 2 | MGS 3: Window Mode: Patched instruction.
2023-10-28 20:57:47.650 (   0.005s) [Main            ]            dllmain.cpp:444   INFO| MG/MG2 | MGS 3: Borderless: Hook length is 17 bytes
2023-10-28 20:57:47.650 (   0.005s) [Main            ]            dllmain.cpp:445   INFO| MG/MG2 | MGS 3: Borderless: Hook address is 0x7ff6e18b58b5
2023-10-28 20:57:48.164 (   0.519s) [Main            ]            dllmain.cpp:660   INFO| MG/MG2 | MGS 2 | MGS 3: Mouse Cursor: Address is 0x7ff6e18b8cc4
2023-10-28 20:57:48.164 (   0.519s) [Main            ]            dllmain.cpp:663   INFO| MG/MG2 | MGS 2 | MGS 3: Mouse Cursor: Patched instruction.

2023-10-28_20-58-24-METAL_GEAR-METAL_GEAR_2_SOLID_SNAKE

17:9 - 4096x2160

File verbosity level: 9
date       time         ( uptime  ) [ thread name/id ]                   file:line     v| 
2023-10-28 21:11:53.985 (   0.000s) [        CBB8F5EA]             loguru.cpp:841   INFO| Logging to 'MGSHDFix.log', mode: 'w', verbosity: 9
2023-10-28 21:11:53.986 (   0.000s) [Main            ]            dllmain.cpp:237   INFO| MGSHDFix v0.6 loaded
2023-10-28 21:11:53.986 (   0.001s) [Main            ]            dllmain.cpp:271   INFO| Config Parse: iInjectionDelay: 500ms
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:272   INFO| Config Parse: bCustomResolution: 1
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:273   INFO| Config Parse: iCustomResX: 0
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:274   INFO| Config Parse: iCustomResY: 0
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:275   INFO| Config Parse: bWindowedMode: 1
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:276   INFO| Config Parse: bBorderlessMode: 1
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:277   INFO| Config Parse: bSkipIntroLogos: 1
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:278   INFO| Config Parse: bDisableCursor: 1
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:279   INFO| Config Parse: bMouseSensitivity: 0
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:280   INFO| Config Parse: fMouseSensitivity: 0.00
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:281   INFO| Config Parse: bAspectFix: 1
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:289   INFO| Config Parse: Borderless mode enabled.
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:314   INFO| Custom Resolution: fNewAspect: 1.8963
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:315   INFO| Custom Resolution: fAspectMultiplier: 1.0667
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:316   INFO| Custom Resolution: fHUDWidth: 3840.0000
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:317   INFO| Custom Resolution: fHUDOffset: 128.0000
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:337   INFO| Game Name: METAL GEAR.exe
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:338   INFO| Game Path: G:\Steam\steamapps\common\MG and MG2\METAL GEAR.exe
2023-10-28 21:11:53.987 (   0.001s) [Main            ]            dllmain.cpp:350   INFO| Detected game is: Metal Gear / Metal Gear 2 (MSX)
2023-10-28 21:11:53.987 (   0.002s) [Main            ]            dllmain.cpp:363   INFO| MG/MG2 | MGS 2 | MGS 3: Custom Resolution: Address is 0x7ff6e189b0e3
2023-10-28 21:11:53.987 (   0.002s) [Main            ]            dllmain.cpp:369   INFO| MG/MG2 | MGS 2 | MGS 3: Custom Resolution: New Custom Resolution = 4096x2160
2023-10-28 21:11:53.988 (   0.003s) [Main            ]            dllmain.cpp:384   INFO| MG/MG2 | MGS 2 | MGS 3: Framebuffer 1: Address is 0x7ff6e18b57de
2023-10-28 21:11:53.988 (   0.003s) [Main            ]            dllmain.cpp:387   INFO| MG/MG2 | MGS 2 | MGS 3: Framebuffer 1: Patched instruction.
2023-10-28 21:11:53.989 (   0.004s) [Main            ]            dllmain.cpp:384   INFO| MG/MG2 | MGS 2 | MGS 3: Framebuffer 2: Address is 0x7ff6e18b583f
2023-10-28 21:11:53.989 (   0.004s) [Main            ]            dllmain.cpp:387   INFO| MG/MG2 | MGS 2 | MGS 3: Framebuffer 2: Patched instruction.
2023-10-28 21:11:53.990 (   0.004s) [Main            ]            dllmain.cpp:403   INFO| MG/MG2 | MGS 2 | MGS 3: Window Mode: Address is 0x7ff6e18b5aaf
2023-10-28 21:11:53.990 (   0.004s) [Main            ]            dllmain.cpp:406   INFO| MG/MG2 | MGS 2 | MGS 3: Window Mode: Patched instruction.
2023-10-28 21:11:53.991 (   0.005s) [Main            ]            dllmain.cpp:444   INFO| MG/MG2 | MGS 3: Borderless: Hook length is 17 bytes
2023-10-28 21:11:53.991 (   0.005s) [Main            ]            dllmain.cpp:445   INFO| MG/MG2 | MGS 3: Borderless: Hook address is 0x7ff6e18b58b5
2023-10-28 21:11:54.502 (   0.517s) [Main            ]            dllmain.cpp:522   INFO| MG/MG2 | MGS 3: Aspect Ratio: Hook length is 15 bytes
2023-10-28 21:11:54.502 (   0.517s) [Main            ]            dllmain.cpp:523   INFO| MG/MG2 | MGS 3: Aspect Ratio: Hook address is 0x7ff6e1895e8c
2023-10-28 21:11:54.504 (   0.519s) [Main            ]            dllmain.cpp:660   INFO| MG/MG2 | MGS 2 | MGS 3: Mouse Cursor: Address is 0x7ff6e18b8cc4
2023-10-28 21:11:54.504 (   0.519s) [Main            ]            dllmain.cpp:663   INFO| MG/MG2 | MGS 2 | MGS 3: Mouse Cursor: Patched instruction.

image

emoose commented 8 months ago

(with the exception of skipping the intro logos, which fails on pattern scan.)

Hm, looks like MG1/2 does include the same intro logo code as MGS2/3 but seems it's going unused there and some other thing is handling the intro logos instead (eg. you can remove the whole Misc\splashscreen\_win folder and screens will still appear..), haven't been able to find how MG1/2 are handling it yet.