
#Max payne 2 sound fix code
This code itself is under the Unlicensed (check LICENSE.txt).Īt binary distribution, please comply with the 3rd party code license rules, and avoid distributing the patched grphmfc.dll, instead, include patch.py and needed libs. If need just the dll patching and not the extra dll, run make grphmfc_patch or python3 patch.py. Just run make for AMD error suppressed patched version, or if just want the libjpeg-turbo itself and no error suppression, make all_noamdpatch. This needs NASM, Mingw-w64's gcc, Python 3, libjpeg-turbo on lib and include paths of mingw-w64, and make. Have the game's grphmfc.dll in the in folder. At least if I do a significant change for it. This is not very polished on the applying scripts, and not really intended to be, just good to apply it and make dll ready to the let game run with new code.įor other people without the problem, this may come just as a possible little boost of speed. If a header gets corrupted, then we run to an issue. This means some missing textures, but the game SHOULD run. So in the event of a bad jpg with an okay header, will get instead replaced with white image data.

If header comes corrupted too, nothing will be done, unless we fake width and height as well.īut only data seems to cause issue, headers seem fine.Ĭorruption happens before it gets to the loader. This new code will suppress the errors, only if it manages to get header decompressed.

#Max payne 2 sound fix Patch
This patch adds a jumper to a new dll with loader code. This is caused by older CPU capability detection code failing to detect CPU and capabilities in rlmfc.dll, it fails at the lack of MMX that it can't detect correctly. The game is getting jpg data passed to the jpg loader function corrupted time to time. This is mainly a "silencer" and a passthrough for the AMD Ryzen 3rd gen people. This patch itself is no longer necessary, fix for the real issue here
