About this mod
Patch 1.3 gave everyone with older CPU's the infamous EXCEPTION_ILLEGAL_INSTRUCTION (0xC000001D) crash.
Since CDPR obviously isn't fixing it, at least not yet, I fixed it myself.
This time the crash occurs in the AudioKinetic sound engine and I had to patch out 33 AVX instructions in order to make the game proper again.
- Permissions and credits
- Changelogs
CDPR just announced on Twitter that they've released a hotfix for the AVX crashes! (that was quick...)
They have compiled 1.3 without AVX instructions and are releasing just Cyberpunk2077.exe. This doesn't change the build variant. (i.e. it stays 1.3)
I've asked them if they remembered to remove the compiler flag for SSE 4.2/POPCTL as well but we'll see I guess?
Anyone with a non SSE 4.2 capable XEON CPU want to test their new binary?
So if you haven't applied my patch yet then go download the official hotfix from CDPR and see if it works for you?
Official binaries should be the preferred route if you ask me, but there's a small speed increase with my patch so if your game suddenly becomes slower then you know what to do ;)
At least I was able to get you playing weeks before CDPR did!
Be well!
-------------------------------------------------------------------------------------------------------------------------------
The solution is a bit dodgy (although 100% playtested at this point!!!) but since I couldn't find one point in memory to prevent these calls I simply searched for each one of them and patched them out with nop (No OPerand, i.e "do nothing")
The patched out instructions will not affect the code in any way since I'm keeping all the register values, which is what would've happened if it was executed on an AVX capable CPU. They're just instructions to check some data and it didn't execute any differently after the patch compared to a stack trace on an AVX CPU.
I previously tried to upload a patched Cyberpunk2077.exe but it got flagged with a false positive so I've instead made a script that patches Cyberpunk2077.exe on your computer.
Just download the zip and follow the instructions.
This is a patch script that'll remove all known AVX instructions from Cyberpunk 2077 v1.3
Unpack the files into your game installation, where Cyberpunk2077.exe is located.
e.g. c:\Program Files (x86)\Steam\SteamApps\common\Cyberpunk 2077\bin\x64\ (Steam, but the patch works for GoG version as well, only different path)
When unpacked start a Windows Powershell with Administrator rights and navigate to the folder where you've got Cyberpunk2077.exe installed.
(cd c:\Program Files (x86)\Steam\SteamApps\common\Cyberpunk 2077\bin\x64\)
Then Type "powershell -ExecutionPolicy Bypass -File .\CPAVXPatcher_v1.ps1" (without quotes) and hit enter
cd c:\Program Files (x86)\Steam\SteamApps\common\Cyberpunk 2077\bin\x64\
powershell -ExecutionPolicy Bypass -File .\CPAVXPatcher_v1.ps1
Enjoy!
If you encounter an AVX crash at some stage, please upload the crashdump to the Nexus mod page as a bugreport so I don't have to recreate the same scenario on my computer. If I have your crashdump it takes ~15 minutes to update the patch script and release a new version fixing the crash you encountered!
The crashdumps are stored in C:\Users\[your username]\AppData\Local\REDEngine\ReportQueue\
Open the correct folder and upload the file Cyberpunk2077.dmp to the bugreport.
Be well!
TL;DR
Unpack CPAVXPatcher_v1.zip into your Cyberpunk 2077 installation, where Cyberpunk2077.exe is located
Start a Windows PowerShell with admin rights
Type powershell -ExecutionPolicy Bypass -File .\CPAVXPatcher_v1.ps1 and hit enter
Done!
Update:
Please note!: The included instruction in the mod file is slightly wrong, but in order to not cause any confusion by uploading a new version please be sure to follow the installation instruction here above!