OK I did a bit of investigating to help assist with DAI and Windows 8.1 issues. To start with, I downloaded the latest 3Dmigoto from the blog (release version 99.25), to see if I could shader hunt. It turns out the game will crash, just like the DAI released fix, back to the desktop.
So I downloaded the prior 3Dmigoto version (release 99.2), and found that the game does start. However, I'm not sure if the shader hunting is working correctly. I don't seem to see any changes when cycling the keys.
I've attached the direct3d log file for both versions (compared using WinMerge).
https://dl.dropboxusercontent.com/u/101506129/DAI.htm
OK I did a bit of investigating to help assist with DAI and Windows 8.1 issues. To start with, I downloaded the latest 3Dmigoto from the blog (release version 99.25), to see if I could shader hunt. It turns out the game will crash, just like the DAI released fix, back to the desktop.
So I downloaded the prior 3Dmigoto version (release 99.2), and found that the game does start. However, I'm not sure if the shader hunting is working correctly. I don't seem to see any changes when cycling the keys.
Also, connected to the GIT repository with Visual Studio 2013, per instructions. While I was able to open browse the source files, the following alert did come up:
Project 'D3D_Shaders' could not be loaded because this edition of Visual C++ does not support classic style native application or managed projects.
Project 'cmd_Decompiler' could not be loaded because this edition of Visual C++ does not support classic style native application or managed projects.
Also, connected to the GIT repository with Visual Studio 2013, per instructions. While I was able to open browse the source files, the following alert did come up:
Project 'D3D_Shaders' could not be loaded because this edition of Visual C++ does not support classic style native application or managed projects.
Project 'cmd_Decompiler' could not be loaded because this edition of Visual C++ does not support classic style native application or managed projects.
Windows 10, Geforce GTX 1080 x2 (SLI), Haswell Core i7, 8GB DDR3 2133Mhz memory, 65" LG 4k 3DTV
Good, thanks for taking a look.
The 99.2 version won't work here because the d3d11.dll is disabled because of a stupid change that NVidia made for GameWorks games. They specifically bypass proxyDLLs, and thus detach the d3d11.dll wrapper as soon as nvapi is called.
I found this out originally in WatchDogs where we couldn't get it to work. I've since made a change to add the MainHook.cpp class which hooks the LoadLibrary call so that I can force it to load properly. This works on and is necessary on several games, including WatchDogs, Lords of the Fallen, Dragon Age and Shadow of Mordor.
So the reason it did not crash is because no shaders were replaced and the fix wasn't running.
The 99.25 version is the best version to use. It includes the hooks, and also has numerous Decompiler fixes just for DA.
I would recommend starting with a game that you know works, just to get a feel for 3Dmigoto and a known good case. Jumping into DA right off is the deep end of the pool, but of course is fine too.
Didn't know about those project errors, interesting that 2013 (Express I presume) removed support for console apps. Nice.
You can ignore those errors though, neither of those projects is necessary to build. cmd_Decompiler is a WIP and is incomplete.
The 99.2 version won't work here because the d3d11.dll is disabled because of a stupid change that NVidia made for GameWorks games. They specifically bypass proxyDLLs, and thus detach the d3d11.dll wrapper as soon as nvapi is called.
I found this out originally in WatchDogs where we couldn't get it to work. I've since made a change to add the MainHook.cpp class which hooks the LoadLibrary call so that I can force it to load properly. This works on and is necessary on several games, including WatchDogs, Lords of the Fallen, Dragon Age and Shadow of Mordor.
So the reason it did not crash is because no shaders were replaced and the fix wasn't running.
The 99.25 version is the best version to use. It includes the hooks, and also has numerous Decompiler fixes just for DA.
I would recommend starting with a game that you know works, just to get a feel for 3Dmigoto and a known good case. Jumping into DA right off is the deep end of the pool, but of course is fine too.
Didn't know about those project errors, interesting that 2013 (Express I presume) removed support for console apps. Nice.
You can ignore those errors though, neither of those projects is necessary to build. cmd_Decompiler is a WIP and is incomplete.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607 Latest 3Dmigoto Release Bo3b's School for ShaderHackers
[quote="bo3b"]
They specifically bypass proxyDLLs, and thus detach the d3d11.dll wrapper as soon as nvapi is called.
I found this out originally in WatchDogs where we couldn't get it to work. I've since made a change to add the MainHook.cpp class which hooks the LoadLibrary call so that I can force it to load properly. This works on and is necessary on several games, including WatchDogs, Lords of the Fallen, Dragon Age and Shadow of Mordor.
[/quote]
Interesting... While I didn't look at the code I have a question...
(Forgive my ignorance and forgive me if I say stupid things)
But:
- Is it possible that the mechanism nvidia is using to un-hook d3d11.dll is not called only on launch but on a time basis ? (a callback on a timer ?) This might explain while the fix sometimes gets disabled (both in DAI and LOTF) Does the wrapper constantly "monitor" this and bypass the "disable" code issued by the nvidia driver ? or is it only on launch?
@Exposed123
Did you try to take the d3d11.dll from Watch Dogs 3DMigoto Release and put in DA:I ? Initially we started from that version. You should still be able to load "some" of the shaders with that version. But is interesting if is working under Windows 8.1 :)
bo3b said:
They specifically bypass proxyDLLs, and thus detach the d3d11.dll wrapper as soon as nvapi is called.
I found this out originally in WatchDogs where we couldn't get it to work. I've since made a change to add the MainHook.cpp class which hooks the LoadLibrary call so that I can force it to load properly. This works on and is necessary on several games, including WatchDogs, Lords of the Fallen, Dragon Age and Shadow of Mordor.
Interesting... While I didn't look at the code I have a question...
(Forgive my ignorance and forgive me if I say stupid things)
But:
- Is it possible that the mechanism nvidia is using to un-hook d3d11.dll is not called only on launch but on a time basis ? (a callback on a timer ?) This might explain while the fix sometimes gets disabled (both in DAI and LOTF) Does the wrapper constantly "monitor" this and bypass the "disable" code issued by the nvidia driver ? or is it only on launch?
@Exposed123
Did you try to take the d3d11.dll from Watch Dogs 3DMigoto Release and put in DA:I ? Initially we started from that version. You should still be able to load "some" of the shaders with that version. But is interesting if is working under Windows 8.1 :)
1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc
[quote="helifax"]Interesting... While I didn't look at the code I have a question...
(Forgive my ignorance and forgive me if I say stupid things)
But:
- Is it possible that the mechanism nvidia is using to un-hook d3d11.dll is not called only on launch but on a time basis ? (a callback on a timer ?) This might explain while the fix sometimes gets disabled (both in DAI and LOTF) Does the wrapper constantly "monitor" this and bypass the "disable" code issued by the nvidia driver ? or is it only on launch?
@Exposed123
Did you try to take the d3d11.dll from Watch Dogs 3DMigoto Release and put in DA:I ? Initially we started from that version. You should still be able to load "some" of the shaders with that version. But is interesting if is working under Windows 8.1 :)[/quote]
The un-hook mechanism could be used later, but it's unlikely because they'd have to unload the d3d11.dll then reload. In any case, the hook is installed at launch and always active, so if this happens it will still bypass their bypass.
For wrapper versions, the 99.25 should be a superset of the WatchDogs version. I specifically disabled the overridesettings in that version as a possible recent weakness.
helifax said:Interesting... While I didn't look at the code I have a question...
(Forgive my ignorance and forgive me if I say stupid things)
But:
- Is it possible that the mechanism nvidia is using to un-hook d3d11.dll is not called only on launch but on a time basis ? (a callback on a timer ?) This might explain while the fix sometimes gets disabled (both in DAI and LOTF) Does the wrapper constantly "monitor" this and bypass the "disable" code issued by the nvidia driver ? or is it only on launch?
@Exposed123
Did you try to take the d3d11.dll from Watch Dogs 3DMigoto Release and put in DA:I ? Initially we started from that version. You should still be able to load "some" of the shaders with that version. But is interesting if is working under Windows 8.1 :)
The un-hook mechanism could be used later, but it's unlikely because they'd have to unload the d3d11.dll then reload. In any case, the hook is installed at launch and always active, so if this happens it will still bypass their bypass.
For wrapper versions, the 99.25 should be a superset of the WatchDogs version. I specifically disabled the overridesettings in that version as a possible recent weakness.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607 Latest 3Dmigoto Release Bo3b's School for ShaderHackers
[quote="bo3b"]Good, thanks for taking a look.
The 99.2 version won't work here because the d3d11.dll is disabled because of a stupid change that NVidia made for GameWorks games. They specifically bypass proxyDLLs, and thus detach the d3d11.dll wrapper as soon as nvapi is called.
I found this out originally in WatchDogs where we couldn't get it to work. I've since made a change to add the MainHook.cpp class which hooks the LoadLibrary call so that I can force it to load properly. This works on and is necessary on several games, including WatchDogs, Lords of the Fallen, Dragon Age and Shadow of Mordor.
So the reason it did not crash is because no shaders were replaced and the fix wasn't running.
The 99.25 version is the best version to use. It includes the hooks, and also has numerous Decompiler fixes just for DA.
I would recommend starting with a game that you know works, just to get a feel for 3Dmigoto and a known good case. Jumping into DA right off is the deep end of the pool, but of course is fine too.
Didn't know about those project errors, interesting that 2013 (Express I presume) removed support for console apps. Nice.
You can ignore those errors though, neither of those projects is necessary to build. cmd_Decompiler is a WIP and is incomplete.[/quote]
Hi.
I already had Visual Studio Express 2013 installed for other projects I was working on, but I do have all the updated patches. I did also download and installed the Windows 8 SDK.
I recompiled the Dragon Age fix with no errors the first time (which still didn't work, game will not start). However, subsequent times I would get these build errors (I did not make any changes to the code).
https://dl.dropboxusercontent.com/u/101506129/Build.txt
I haven't tried Helix's suggestion yet regarding WatchDogs, but I'll go ahead and get the entire game and see if shader hunting works under Windows 8.1 with 3Dmigoto .99.25 (which DAI unfortunately doesn't).
The 99.2 version won't work here because the d3d11.dll is disabled because of a stupid change that NVidia made for GameWorks games. They specifically bypass proxyDLLs, and thus detach the d3d11.dll wrapper as soon as nvapi is called.
I found this out originally in WatchDogs where we couldn't get it to work. I've since made a change to add the MainHook.cpp class which hooks the LoadLibrary call so that I can force it to load properly. This works on and is necessary on several games, including WatchDogs, Lords of the Fallen, Dragon Age and Shadow of Mordor.
So the reason it did not crash is because no shaders were replaced and the fix wasn't running.
The 99.25 version is the best version to use. It includes the hooks, and also has numerous Decompiler fixes just for DA.
I would recommend starting with a game that you know works, just to get a feel for 3Dmigoto and a known good case. Jumping into DA right off is the deep end of the pool, but of course is fine too.
Didn't know about those project errors, interesting that 2013 (Express I presume) removed support for console apps. Nice.
You can ignore those errors though, neither of those projects is necessary to build. cmd_Decompiler is a WIP and is incomplete.
Hi.
I already had Visual Studio Express 2013 installed for other projects I was working on, but I do have all the updated patches. I did also download and installed the Windows 8 SDK.
I recompiled the Dragon Age fix with no errors the first time (which still didn't work, game will not start). However, subsequent times I would get these build errors (I did not make any changes to the code).
https://dl.dropboxusercontent.com/u/101506129/Build.txt
I haven't tried Helix's suggestion yet regarding WatchDogs, but I'll go ahead and get the entire game and see if shader hunting works under Windows 8.1 with 3Dmigoto .99.25 (which DAI unfortunately doesn't).
Windows 10, Geforce GTX 1080 x2 (SLI), Haswell Core i7, 8GB DDR3 2133Mhz memory, 65" LG 4k 3DTV
OK, I took a look at the build log, and I don't understand what's going on there. I'm using 2013, but the Pro version, which should be pretty comparable.
I put a lot of effort into getting rid of all of the warnings, so something is definitely funny there. Did you change the project before doing the build? I would expect the solution file to include all the proper settings, all the proper flags, and everything that would make it work the same as I see. That's the goal at least.
There are several projects in there that are presently skipped. It might make sense to remove them later, but I'm hesitant to make that sort of change.
I usually see those as skipped in the build, which suggests something is different. Here is my build log for that DragonAge x64 target. Build Menu->Rebuild Solution.
[code]1>------ Rebuild All started: Project: NVAPI, Configuration: DragonAge x64 ------
2>------ Rebuild All started: Project: BinaryDecompiler, Configuration: DragonAge x64 ------
3>------ Skipped Rebuild All: Project: DirectX9, Configuration: DragonAge x64 ------
3>Project not selected to build for this solution configuration
4>------ Skipped Rebuild All: Project: DirectX10, Configuration: DragonAge x64 ------
4>Project not selected to build for this solution configuration
5>------ Skipped Rebuild All: Project: DirectXGI, Configuration: DragonAge x64 ------
5>Project not selected to build for this solution configuration
6>------ Skipped Rebuild All: Project: D3DCompiler_42, Configuration: DragonAge x64 ------
6>Project not selected to build for this solution configuration
7>------ Skipped Rebuild All: Project: D3DCompiler_43, Configuration: DragonAge x64 ------
7>Project not selected to build for this solution configuration
8>------ Skipped Rebuild All: Project: D3DCompiler_46, Configuration: DragonAge x64 ------
8>Project not selected to build for this solution configuration
9>------ Skipped Rebuild All: Project: D3DCompiler_39, Configuration: DragonAge x64 ------
9>Project not selected to build for this solution configuration
10>------ Skipped Rebuild All: Project: D3DCompiler_41, Configuration: DragonAge x64 ------
10>Project not selected to build for this solution configuration
11>------ Skipped Rebuild All: Project: D3D_Shaders, Configuration: DragonAge x64 ------
11>Project not selected to build for this solution configuration
12>------ Skipped Rebuild All: Project: cmd_Decompiler, Configuration: Debug Win32 ------
12>Project not selected to build for this solution configuration
1> DirectInput.cpp
2> decode.cpp
2> reflect.cpp
1> DllMain.cpp
2> Generating Code...
1> Generating Code...
2> BinaryDecompiler.vcxproj -> C:\Users\bo3b\Documents\Code\3Dmigoto\x64\DragonAge\BinaryDecompiler.lib
1> Creating library C:\Users\bo3b\Documents\Code\3Dmigoto\x64\DragonAge\nvapi64.lib and object C:\Users\bo3b\Documents\Code\3Dmigoto\x64\DragonAge\nvapi64.exp
1> NVAPI.vcxproj -> C:\Users\bo3b\Documents\Code\3Dmigoto\x64\DragonAge\nvapi64.dll
13>------ Rebuild All started: Project: DirectX11, Configuration: DragonAge x64 ------
13> DirectInput.cpp
13> DecompileHLSL.cpp
13>..\HLSLDecompiler\DecompileHLSL.cpp(3809): warning C4101: 'reg' : unreferenced local variable
13> d3d11Wrapper.cpp
13> MainHook.cpp
13> Generating Code...
13> Creating library C:\Users\bo3b\Documents\Code\3Dmigoto\x64\DragonAge\d3d11.lib and object C:\Users\bo3b\Documents\Code\3Dmigoto\x64\DragonAge\d3d11.exp
13> DirectX11.vcxproj -> C:\Users\bo3b\Documents\Code\3Dmigoto\x64\DragonAge\d3d11.dll
13> ECHO is on.
13> C:\Users\bo3b\Documents\Code\3Dmigoto\Dependencies64\D3DCompiler_46_org.dll
13> C:\Users\bo3b\Documents\Code\3Dmigoto\Dependencies64\d3dx.ini
13> C:\Users\bo3b\Documents\Code\3Dmigoto\Dependencies64\uninstall.bat
13> 3 File(s) copied
13>
13> 7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
13> Scanning
13>
13> Creating archive DragonAge\3Dmigoto-DragonAge-Ver.zip
13>
13> Compressing d3d11.dll
13> Compressing D3DCompiler_46_org.dll
13> Compressing d3dx.ini
13> Compressing FWS\bass.dll
13> Compressing FWS\BeaEngine.dll
13> Compressing FWS\BeaEngine.dll.old
13> Compressing FWS\data\about_1.png
13> Compressing FWS\data\about_2.png
13> Compressing FWS\data\about_3.jpg
13> Compressing FWS\data\about_track.xm
13> Compressing FWS\data\b-execstep.png
13> Compressing FWS\data\b-nextstep.png
13> Compressing FWS\data\b-prevstep.png
13> Compressing FWS\data\donate_button.png
13> Compressing FWS\data\largeicon_default.png
13> Compressing FWS\data\Logo.png
13> Compressing FWS\data\lv-critical.png
13> Compressing FWS\data\lv-debug.png
13> Compressing FWS\data\lv-error.png
13> Compressing FWS\data\lv-information.png
13> Compressing FWS\data\lv-warning.png
13> Compressing FWS\data\tc-status.png
13> Compressing FWS\data\tv-avail.png
13> Compressing FWS\data\tv-downloading.png
13> Compressing FWS\data\tv-installed.png
13> Compressing FWS\data\tv-missingdep.png
13> Compressing FWS\data\tv-module.png
13> Compressing FWS\data\tv-plugin.png
13> Compressing FWS\FASM.dll
13> Compressing FWS\fasm_wrapper.exe
13> Compressing FWS\fasm_wrapper.exe.old
13> Compressing FWS\FlawlessWidescreen.exe
13> Compressing FWS\FlawlessWidescreen.exe.old
13> Compressing FWS\libcurl.dll
13> Compressing FWS\libcurl.dll.old
13> Compressing FWS\Licences\BeaEngine.txt
13> Compressing FWS\Licences\FASM.txt
13> Compressing FWS\Licences\FlawlessWidescreen.txt
13> Compressing FWS\Licences\libcurl.txt
13> Compressing FWS\Licences\Summary.txt
13> Compressing FWS\PluginCache\FWS_Plugins\GlobalDependencies\Scripts\StandardBase.lua
13> Compressing FWS\PluginCache\FWS_Plugins\GlobalDependencies\Scripts\StandardTheme.lua
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\AlienIsolation\Dependencies\Icons\LargeIcon.png
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\AlienIsolation\Dependencies\Icons\SmallIcon.png
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\AlienIsolation\Dependencies\Images\Background.jpg
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\AlienIsolation\Dependencies\Scripts\AlienIsolation.lua
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\AlienIsolation\EnviromentState.xml
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\DragonAgeInquisition\Dependencies\Icons\LargeIcon.png
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\DragonAgeInquisition\Dependencies\Icons\SmallIcon.png
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\DragonAgeInquisition\Dependencies\Images\Background.jpg
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\DragonAgeInquisition\Dependencies\Scripts\DragonAgeInquisition.lua
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\DragonAgeInquisition\EnviromentState.xml
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\MEShadowOfMordor\Dependencies\Icons\LargeIcon.png
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\MEShadowOfMordor\Dependencies\Icons\SmallIcon.png
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\MEShadowOfMordor\Dependencies\Images\Background.jpg
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\MEShadowOfMordor\Dependencies\Scripts\MEShadowOfMordor.lua
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\MEShadowOfMordor\EnviromentState.xml
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\RyseSonOfRome\Dependencies\Icons\LargeIcon.png
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\RyseSonOfRome\Dependencies\Icons\SmallIcon.png
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\RyseSonOfRome\Dependencies\Images\Background.jpg
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\RyseSonOfRome\Dependencies\Scripts\RyseSonOfRome.lua
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\RyseSonOfRome\EnviromentState.xml
13> Compressing FWS\Plugins\FWS_Plugins.fws
13> Compressing FWS\RepositoryCache\FWS_MasterRepo.xml
13> Compressing FWS\settings.xml
13> Compressing Launch FWS.lnk
13> Compressing nvapi64.dll
13> Compressing ShaderFixes\0008519b7d5838b4-ps_replace.bin
13> Compressing ShaderFixes\0008519b7d5838b4-ps_replace.txt
13> Compressing ShaderFixes\002d3a9aead314ab-ps_replace.bin
13> Compressing ShaderFixes\002d3a9aead314ab-ps_replace.txt
13> Compressing ShaderFixes\005f8f3c7bb095db-ps_replace.bin
13> Compressing ShaderFixes\005f8f3c7bb095db-ps_replace.txt
13> Compressing ShaderFixes\00689a0f509d00c9-ps_replace.bin
13> Compressing ShaderFixes\00689a0f509d00c9-ps_replace.txt
13> Compressing ShaderFixes\0096e678e7e3bf7f-ps_replace.bin
13> Compressing ShaderFixes\0096e678e7e3bf7f-ps_replace.txt
13> Compressing ShaderFixes\0097057884c5fd24-ps_replace.bin
13> Compressing ShaderFixes\0097057884c5fd24-ps_replace.txt
13> Compressing ShaderFixes\00aca2216e22ca9b-ps_replace.bin
13> Compressing ShaderFixes\00aca2216e22ca9b-ps_replace.txt
13> Compressing ShaderFixes\00afbb0e3428bb33-ps_replace.bin
13> Compressing ShaderFixes\00afbb0e3428bb33-ps_replace.txt
13> Compressing ShaderFixes\00b644646221d04c-ps_replace.bin
13> Compressing ShaderFixes\00b644646221d04c-ps_replace.txt
13> Compre
...
13> Everything is Ok
========== Rebuild All: 3 succeeded, 0 failed, 10 skipped ==========
[/code]
Digging around a little bit, I see that those warnings come about when you "Run Code Analysis on Solution". I don't think that is ever going to work here. This is all hack code, and not at all well structured, so a static code analysis is going to just go off the rails.
I haven't looked at that tool that much, but I don't even understand what it's talking about.
Let's take the first error for example:
[code]d:\users\csamb_000\source\repos\3dmigoto2\nvapi\directinput.cpp(159): warning C6328: Size mismatch: 'unsigned __int64' passed as _Param_(4) when 'int' is required in call to 'fprintf'.
...
if (LogInput) fprintf(LogFile, "Using input button #%d for action at offset 0x%x.\n",
ActionButton, ActionButton + offsetof(DIJOYSTATE2, rgbButtons));
[/code]
That line of code only has 3 parameters to the printf, so why is it complaining about a mismatch on a 4th parameter? What am I missing?
OK, I took a look at the build log, and I don't understand what's going on there. I'm using 2013, but the Pro version, which should be pretty comparable.
I put a lot of effort into getting rid of all of the warnings, so something is definitely funny there. Did you change the project before doing the build? I would expect the solution file to include all the proper settings, all the proper flags, and everything that would make it work the same as I see. That's the goal at least.
There are several projects in there that are presently skipped. It might make sense to remove them later, but I'm hesitant to make that sort of change.
I usually see those as skipped in the build, which suggests something is different. Here is my build log for that DragonAge x64 target. Build Menu->Rebuild Solution.
Digging around a little bit, I see that those warnings come about when you "Run Code Analysis on Solution". I don't think that is ever going to work here. This is all hack code, and not at all well structured, so a static code analysis is going to just go off the rails.
I haven't looked at that tool that much, but I don't even understand what it's talking about.
Let's take the first error for example:
d:\users\csamb_000\source\repos\3dmigoto2\nvapi\directinput.cpp(159): warning C6328: Size mismatch: 'unsigned __int64' passed as _Param_(4) when 'int' is required in call to 'fprintf'.
...
if (LogInput) fprintf(LogFile, "Using input button #%d for action at offset 0x%x.\n",
ActionButton, ActionButton + offsetof(DIJOYSTATE2, rgbButtons));
That line of code only has 3 parameters to the printf, so why is it complaining about a mismatch on a 4th parameter? What am I missing?
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607 Latest 3Dmigoto Release Bo3b's School for ShaderHackers
That actually might be a problem - it may or may not be truncated now (it's also an endian bug, but that's not relevant since we are only on Intel), and even if it happens to be ok it will bite the next person who adds a 5th parameter to the printf as it will look at the wrong location on the stack.
The 4th parameter is ActionButton + offsetof(DIJOYSTATE2, rgbButtons), which according to the warning is a 64bit value, but the corresponding format string is %x, which expects a 32bit unsigned integer. Change it to %llx for 64bit values or %lx if it's a pointer (that is, if the Windows API has sane pointer types).
That actually might be a problem - it may or may not be truncated now (it's also an endian bug, but that's not relevant since we are only on Intel), and even if it happens to be ok it will bite the next person who adds a 5th parameter to the printf as it will look at the wrong location on the stack.
The 4th parameter is ActionButton + offsetof(DIJOYSTATE2, rgbButtons), which according to the warning is a 64bit value, but the corresponding format string is %x, which expects a 32bit unsigned integer. Change it to %llx for 64bit values or %lx if it's a pointer (that is, if the Windows API has sane pointer types).
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
Ah right-o, thanks. And the fourth param is an expansion of offsetof, which becomes a size_t, which is defined to be int64 because of this x64 build.
If it were a pointer, I'd need to use %p instead, if you use %lx or %llx you get a different warning.
I have no idea how much credence to give these warnings. They aren't reported from the C++ compiler itself, even with warning level of 4. I tend to give the most credence to the compiler, but if they can potentially cause problems, I like to fix stuff that the tools give me. If it's just theoretical or purity oriented, this code base is not at a level where we can even pretend to worry about that.
Ah right-o, thanks. And the fourth param is an expansion of offsetof, which becomes a size_t, which is defined to be int64 because of this x64 build.
If it were a pointer, I'd need to use %p instead, if you use %lx or %llx you get a different warning.
I have no idea how much credence to give these warnings. They aren't reported from the C++ compiler itself, even with warning level of 4. I tend to give the most credence to the compiler, but if they can potentially cause problems, I like to fix stuff that the tools give me. If it's just theoretical or purity oriented, this code base is not at a level where we can even pretend to worry about that.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607 Latest 3Dmigoto Release Bo3b's School for ShaderHackers
Strictly speaking a compiler by itself won't ever warn about types passed to the printf family of functions because they take variable arguments so it can't do type checking on them.
Since printf tends to be a very common source of errors most compilers have been taught how to parse the format string to do type checking on them, but that's basically merging a static analysis tool into the compiler and is not inherently part of a C/C++ compiler. GCC certainly does this (it looks for arguments tagged with __attribute__((__format__))), but I have no idea about MS's compiler - I've been a Linux coder for the last 10 years so I'm a bit out of the loop.
Strictly speaking a compiler by itself won't ever warn about types passed to the printf family of functions because they take variable arguments so it can't do type checking on them.
Since printf tends to be a very common source of errors most compilers have been taught how to parse the format string to do type checking on them, but that's basically merging a static analysis tool into the compiler and is not inherently part of a C/C++ compiler. GCC certainly does this (it looks for arguments tagged with __attribute__((__format__))), but I have no idea about MS's compiler - I've been a Linux coder for the last 10 years so I'm a bit out of the loop.
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
That static analysis tool is pretty cool, it definitely found some legitimate bugs in the code. Found lots of noisy rubbish too, but it's really pretty good. I don't think the Microsoft C++ compiler has any type checking for printf/scanf functions.
I went through all of the warnings it shows for the DX11 project, as I'm trying to track down a multi-threaded Decompiler problem. Sometimes you get easy wins out of tools like this, but not this time. None of the legitimate warnings are actual problems.
That static analysis tool is pretty cool, it definitely found some legitimate bugs in the code. Found lots of noisy rubbish too, but it's really pretty good. I don't think the Microsoft C++ compiler has any type checking for printf/scanf functions.
I went through all of the warnings it shows for the DX11 project, as I'm trying to track down a multi-threaded Decompiler problem. Sometimes you get easy wins out of tools like this, but not this time. None of the legitimate warnings are actual problems.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607 Latest 3Dmigoto Release Bo3b's School for ShaderHackers
[quote="bo3b"]OK, I took a look at the build log, and I don't understand what's going on there. I'm using 2013, but the Pro version, which should be pretty comparable.
I put a lot of effort into getting rid of all of the warnings, so something is definitely funny there. Did you change the project before doing the build? I would expect the solution file to include all the proper settings, all the proper flags, and everything that would make it work the same as I see. That's the goal at least.
There are several projects in there that are presently skipped. It might make sense to remove them later, but I'm hesitant to make that sort of change.
I usually see those as skipped in the build, which suggests something is different. Here is my build log for that DragonAge x64 target. Build Menu->Rebuild Solution.
[code]1>------ Rebuild All started: Project: NVAPI, Configuration: DragonAge x64 ------
2>------ Rebuild All started: Project: BinaryDecompiler, Configuration: DragonAge x64 ------
3>------ Skipped Rebuild All: Project: DirectX9, Configuration: DragonAge x64 ------
3>Project not selected to build for this solution configuration
4>------ Skipped Rebuild All: Project: DirectX10, Configuration: DragonAge x64 ------
4>Project not selected to build for this solution configuration
5>------ Skipped Rebuild All: Project: DirectXGI, Configuration: DragonAge x64 ------
5>Project not selected to build for this solution configuration
6>------ Skipped Rebuild All: Project: D3DCompiler_42, Configuration: DragonAge x64 ------
6>Project not selected to build for this solution configuration
7>------ Skipped Rebuild All: Project: D3DCompiler_43, Configuration: DragonAge x64 ------
7>Project not selected to build for this solution configuration
8>------ Skipped Rebuild All: Project: D3DCompiler_46, Configuration: DragonAge x64 ------
8>Project not selected to build for this solution configuration
9>------ Skipped Rebuild All: Project: D3DCompiler_39, Configuration: DragonAge x64 ------
9>Project not selected to build for this solution configuration
10>------ Skipped Rebuild All: Project: D3DCompiler_41, Configuration: DragonAge x64 ------
10>Project not selected to build for this solution configuration
11>------ Skipped Rebuild All: Project: D3D_Shaders, Configuration: DragonAge x64 ------
11>Project not selected to build for this solution configuration
12>------ Skipped Rebuild All: Project: cmd_Decompiler, Configuration: Debug Win32 ------
12>Project not selected to build for this solution configuration
1> DirectInput.cpp
2> decode.cpp
2> reflect.cpp
1> DllMain.cpp
2> Generating Code...
1> Generating Code...
2> BinaryDecompiler.vcxproj -> C:\Users\bo3b\Documents\Code\3Dmigoto\x64\DragonAge\BinaryDecompiler.lib
1> Creating library C:\Users\bo3b\Documents\Code\3Dmigoto\x64\DragonAge\nvapi64.lib and object C:\Users\bo3b\Documents\Code\3Dmigoto\x64\DragonAge\nvapi64.exp
1> NVAPI.vcxproj -> C:\Users\bo3b\Documents\Code\3Dmigoto\x64\DragonAge\nvapi64.dll
13>------ Rebuild All started: Project: DirectX11, Configuration: DragonAge x64 ------
13> DirectInput.cpp
13> DecompileHLSL.cpp
13>..\HLSLDecompiler\DecompileHLSL.cpp(3809): warning C4101: 'reg' : unreferenced local variable
13> d3d11Wrapper.cpp
13> MainHook.cpp
13> Generating Code...
13> Creating library C:\Users\bo3b\Documents\Code\3Dmigoto\x64\DragonAge\d3d11.lib and object C:\Users\bo3b\Documents\Code\3Dmigoto\x64\DragonAge\d3d11.exp
13> DirectX11.vcxproj -> C:\Users\bo3b\Documents\Code\3Dmigoto\x64\DragonAge\d3d11.dll
13> ECHO is on.
13> C:\Users\bo3b\Documents\Code\3Dmigoto\Dependencies64\D3DCompiler_46_org.dll
13> C:\Users\bo3b\Documents\Code\3Dmigoto\Dependencies64\d3dx.ini
13> C:\Users\bo3b\Documents\Code\3Dmigoto\Dependencies64\uninstall.bat
13> 3 File(s) copied
13>
13> 7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
13> Scanning
13>
13> Creating archive DragonAge\3Dmigoto-DragonAge-Ver.zip
13>
13> Compressing d3d11.dll
13> Compressing D3DCompiler_46_org.dll
13> Compressing d3dx.ini
13> Compressing FWS\bass.dll
13> Compressing FWS\BeaEngine.dll
13> Compressing FWS\BeaEngine.dll.old
13> Compressing FWS\data\about_1.png
13> Compressing FWS\data\about_2.png
13> Compressing FWS\data\about_3.jpg
13> Compressing FWS\data\about_track.xm
13> Compressing FWS\data\b-execstep.png
13> Compressing FWS\data\b-nextstep.png
13> Compressing FWS\data\b-prevstep.png
13> Compressing FWS\data\donate_button.png
13> Compressing FWS\data\largeicon_default.png
13> Compressing FWS\data\Logo.png
13> Compressing FWS\data\lv-critical.png
13> Compressing FWS\data\lv-debug.png
13> Compressing FWS\data\lv-error.png
13> Compressing FWS\data\lv-information.png
13> Compressing FWS\data\lv-warning.png
13> Compressing FWS\data\tc-status.png
13> Compressing FWS\data\tv-avail.png
13> Compressing FWS\data\tv-downloading.png
13> Compressing FWS\data\tv-installed.png
13> Compressing FWS\data\tv-missingdep.png
13> Compressing FWS\data\tv-module.png
13> Compressing FWS\data\tv-plugin.png
13> Compressing FWS\FASM.dll
13> Compressing FWS\fasm_wrapper.exe
13> Compressing FWS\fasm_wrapper.exe.old
13> Compressing FWS\FlawlessWidescreen.exe
13> Compressing FWS\FlawlessWidescreen.exe.old
13> Compressing FWS\libcurl.dll
13> Compressing FWS\libcurl.dll.old
13> Compressing FWS\Licences\BeaEngine.txt
13> Compressing FWS\Licences\FASM.txt
13> Compressing FWS\Licences\FlawlessWidescreen.txt
13> Compressing FWS\Licences\libcurl.txt
13> Compressing FWS\Licences\Summary.txt
13> Compressing FWS\PluginCache\FWS_Plugins\GlobalDependencies\Scripts\StandardBase.lua
13> Compressing FWS\PluginCache\FWS_Plugins\GlobalDependencies\Scripts\StandardTheme.lua
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\AlienIsolation\Dependencies\Icons\LargeIcon.png
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\AlienIsolation\Dependencies\Icons\SmallIcon.png
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\AlienIsolation\Dependencies\Images\Background.jpg
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\AlienIsolation\Dependencies\Scripts\AlienIsolation.lua
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\AlienIsolation\EnviromentState.xml
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\DragonAgeInquisition\Dependencies\Icons\LargeIcon.png
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\DragonAgeInquisition\Dependencies\Icons\SmallIcon.png
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\DragonAgeInquisition\Dependencies\Images\Background.jpg
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\DragonAgeInquisition\Dependencies\Scripts\DragonAgeInquisition.lua
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\DragonAgeInquisition\EnviromentState.xml
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\MEShadowOfMordor\Dependencies\Icons\LargeIcon.png
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\MEShadowOfMordor\Dependencies\Icons\SmallIcon.png
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\MEShadowOfMordor\Dependencies\Images\Background.jpg
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\MEShadowOfMordor\Dependencies\Scripts\MEShadowOfMordor.lua
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\MEShadowOfMordor\EnviromentState.xml
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\RyseSonOfRome\Dependencies\Icons\LargeIcon.png
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\RyseSonOfRome\Dependencies\Icons\SmallIcon.png
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\RyseSonOfRome\Dependencies\Images\Background.jpg
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\RyseSonOfRome\Dependencies\Scripts\RyseSonOfRome.lua
13> Compressing FWS\PluginCache\FWS_Plugins\Modules\RyseSonOfRome\EnviromentState.xml
13> Compressing FWS\Plugins\FWS_Plugins.fws
13> Compressing FWS\RepositoryCache\FWS_MasterRepo.xml
13> Compressing FWS\settings.xml
13> Compressing Launch FWS.lnk
13> Compressing nvapi64.dll
13> Compressing ShaderFixes\0008519b7d5838b4-ps_replace.bin
13> Compressing ShaderFixes\0008519b7d5838b4-ps_replace.txt
13> Compressing ShaderFixes\002d3a9aead314ab-ps_replace.bin
13> Compressing ShaderFixes\002d3a9aead314ab-ps_replace.txt
13> Compressing ShaderFixes\005f8f3c7bb095db-ps_replace.bin
13> Compressing ShaderFixes\005f8f3c7bb095db-ps_replace.txt
13> Compressing ShaderFixes\00689a0f509d00c9-ps_replace.bin
13> Compressing ShaderFixes\00689a0f509d00c9-ps_replace.txt
13> Compressing ShaderFixes\0096e678e7e3bf7f-ps_replace.bin
13> Compressing ShaderFixes\0096e678e7e3bf7f-ps_replace.txt
13> Compressing ShaderFixes\0097057884c5fd24-ps_replace.bin
13> Compressing ShaderFixes\0097057884c5fd24-ps_replace.txt
13> Compressing ShaderFixes\00aca2216e22ca9b-ps_replace.bin
13> Compressing ShaderFixes\00aca2216e22ca9b-ps_replace.txt
13> Compressing ShaderFixes\00afbb0e3428bb33-ps_replace.bin
13> Compressing ShaderFixes\00afbb0e3428bb33-ps_replace.txt
13> Compressing ShaderFixes\00b644646221d04c-ps_replace.bin
13> Compressing ShaderFixes\00b644646221d04c-ps_replace.txt
13> Compre
...
13> Everything is Ok
========== Rebuild All: 3 succeeded, 0 failed, 10 skipped ==========
[/code]
Digging around a little bit, I see that those warnings come about when you "Run Code Analysis on Solution". I don't think that is ever going to work here. This is all hack code, and not at all well structured, so a static code analysis is going to just go off the rails.
I haven't looked at that tool that much, but I don't even understand what it's talking about.
Let's take the first error for example:
[code]d:\users\csamb_000\source\repos\3dmigoto2\nvapi\directinput.cpp(159): warning C6328: Size mismatch: 'unsigned __int64' passed as _Param_(4) when 'int' is required in call to 'fprintf'.
...
if (LogInput) fprintf(LogFile, "Using input button #%d for action at offset 0x%x.\n",
ActionButton, ActionButton + offsetof(DIJOYSTATE2, rgbButtons));
[/code]
That line of code only has 3 parameters to the printf, so why is it complaining about a mismatch on a 4th parameter? What am I missing?
[/quote]
I ran the Code Analysis tool to see if it would find something worth investigating. None of the alerts found affected the final build though, as everything was successful. Here's the output from a straight build. It complained about an unreferenced local variable, but otherwise it ran fine.
https://dl.dropboxusercontent.com/u/101506129/VS_log.txt
I couldn't find anything in the source code, from a debugging point of view, that would cause a Windows 8.1 error. To look further into the source code, I will need a better understanding of the APIs and DLL's involved, which will probably take some time to learn.
I did install Windows 7 on an old drive I had laying around and got DAI to work in 3D on my primary gaming PC. I compared the logfiles of the successful run (Win7), to the failed run (Win 8.1), using the same v5 patch.
For the most part, the successful run was able to load a huge amount of shaders, while the failed run inexplicably stopped right before "updating stereo parameter texture."
I've attached the log files for both, compared using winmerge. This file is pretty big (160mb), it might take your browser a minute or two to load completely.
https://dl.dropboxusercontent.com/u/101506129/dxlog.htm
bo3b said:OK, I took a look at the build log, and I don't understand what's going on there. I'm using 2013, but the Pro version, which should be pretty comparable.
I put a lot of effort into getting rid of all of the warnings, so something is definitely funny there. Did you change the project before doing the build? I would expect the solution file to include all the proper settings, all the proper flags, and everything that would make it work the same as I see. That's the goal at least.
There are several projects in there that are presently skipped. It might make sense to remove them later, but I'm hesitant to make that sort of change.
I usually see those as skipped in the build, which suggests something is different. Here is my build log for that DragonAge x64 target. Build Menu->Rebuild Solution.
Digging around a little bit, I see that those warnings come about when you "Run Code Analysis on Solution". I don't think that is ever going to work here. This is all hack code, and not at all well structured, so a static code analysis is going to just go off the rails.
I haven't looked at that tool that much, but I don't even understand what it's talking about.
Let's take the first error for example:
d:\users\csamb_000\source\repos\3dmigoto2\nvapi\directinput.cpp(159): warning C6328: Size mismatch: 'unsigned __int64' passed as _Param_(4) when 'int' is required in call to 'fprintf'.
...
if (LogInput) fprintf(LogFile, "Using input button #%d for action at offset 0x%x.\n",
ActionButton, ActionButton + offsetof(DIJOYSTATE2, rgbButtons));
That line of code only has 3 parameters to the printf, so why is it complaining about a mismatch on a 4th parameter? What am I missing?
I ran the Code Analysis tool to see if it would find something worth investigating. None of the alerts found affected the final build though, as everything was successful. Here's the output from a straight build. It complained about an unreferenced local variable, but otherwise it ran fine.
https://dl.dropboxusercontent.com/u/101506129/VS_log.txt
I couldn't find anything in the source code, from a debugging point of view, that would cause a Windows 8.1 error. To look further into the source code, I will need a better understanding of the APIs and DLL's involved, which will probably take some time to learn.
I did install Windows 7 on an old drive I had laying around and got DAI to work in 3D on my primary gaming PC. I compared the logfiles of the successful run (Win7), to the failed run (Win 8.1), using the same v5 patch.
For the most part, the successful run was able to load a huge amount of shaders, while the failed run inexplicably stopped right before "updating stereo parameter texture."
Yes, this is consistent with the logs I looked at before. Other people shared their 8.1 logs. I've looked at the logs a lot of course, and I don't see anything that different about the 8.1 case.
Most importantly, we can see that 3Dmigoto is running pretty smoothly here. It's loading shaders, it's attached them and overridden the original game shaders. It creates textures properly. Everything seems to be working correctly until it crashes.
This is why I think this is not a bug in 3Dmigoto, but rather a bug in the game that 3Dmigoto makes more common. Keep in mind that the game itself crashes periodically whether the tool is installed or not.
As noted, I already have put in 100s of hours of debugging for the 8.1 case, so it presently works smoothly on 9 out of 10 games. But if you find some amateur mistake that I made, I'm happy to fix it.
Yes, this is consistent with the logs I looked at before. Other people shared their 8.1 logs. I've looked at the logs a lot of course, and I don't see anything that different about the 8.1 case.
Most importantly, we can see that 3Dmigoto is running pretty smoothly here. It's loading shaders, it's attached them and overridden the original game shaders. It creates textures properly. Everything seems to be working correctly until it crashes.
This is why I think this is not a bug in 3Dmigoto, but rather a bug in the game that 3Dmigoto makes more common. Keep in mind that the game itself crashes periodically whether the tool is installed or not.
As noted, I already have put in 100s of hours of debugging for the 8.1 case, so it presently works smoothly on 9 out of 10 games. But if you find some amateur mistake that I made, I'm happy to fix it.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607 Latest 3Dmigoto Release Bo3b's School for ShaderHackers
What I would recommend to people testing this on Win8.1:
- Build the wrapper in Debug Mode.
- In VS set the external process exe as the game's exe
- Copy the DLL +PDB next to the exe.
- Start the game from VS (by hitting the debug button).
- Play until it crashes. It will either:
- Crash in the wrapper and you will see where
- Crash in the game and you get the ASM location + instructions
- Will simply quit to desktop without any warnings.
This way you will know WHO and WHERE is crashing;))
Just my idea of how I would start looking at this:)
What I would recommend to people testing this on Win8.1:
- Build the wrapper in Debug Mode.
- In VS set the external process exe as the game's exe
- Copy the DLL +PDB next to the exe.
- Start the game from VS (by hitting the debug button).
- Play until it crashes. It will either:
- Crash in the wrapper and you will see where
- Crash in the game and you get the ASM location + instructions
- Will simply quit to desktop without any warnings.
This way you will know WHO and WHERE is crashing;))
Just my idea of how I would start looking at this:)
1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc
So I downloaded the prior 3Dmigoto version (release 99.2), and found that the game does start. However, I'm not sure if the shader hunting is working correctly. I don't seem to see any changes when cycling the keys.
I've attached the direct3d log file for both versions (compared using WinMerge).
https://dl.dropboxusercontent.com/u/101506129/DAI.htm
Windows 10, Geforce GTX 1080 x2 (SLI), Haswell Core i7, 8GB DDR3 2133Mhz memory, 65" LG 4k 3DTV
Project 'D3D_Shaders' could not be loaded because this edition of Visual C++ does not support classic style native application or managed projects.
Project 'cmd_Decompiler' could not be loaded because this edition of Visual C++ does not support classic style native application or managed projects.
Windows 10, Geforce GTX 1080 x2 (SLI), Haswell Core i7, 8GB DDR3 2133Mhz memory, 65" LG 4k 3DTV
The 99.2 version won't work here because the d3d11.dll is disabled because of a stupid change that NVidia made for GameWorks games. They specifically bypass proxyDLLs, and thus detach the d3d11.dll wrapper as soon as nvapi is called.
I found this out originally in WatchDogs where we couldn't get it to work. I've since made a change to add the MainHook.cpp class which hooks the LoadLibrary call so that I can force it to load properly. This works on and is necessary on several games, including WatchDogs, Lords of the Fallen, Dragon Age and Shadow of Mordor.
So the reason it did not crash is because no shaders were replaced and the fix wasn't running.
The 99.25 version is the best version to use. It includes the hooks, and also has numerous Decompiler fixes just for DA.
I would recommend starting with a game that you know works, just to get a feel for 3Dmigoto and a known good case. Jumping into DA right off is the deep end of the pool, but of course is fine too.
Didn't know about those project errors, interesting that 2013 (Express I presume) removed support for console apps. Nice.
You can ignore those errors though, neither of those projects is necessary to build. cmd_Decompiler is a WIP and is incomplete.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers
Interesting... While I didn't look at the code I have a question...
(Forgive my ignorance and forgive me if I say stupid things)
But:
- Is it possible that the mechanism nvidia is using to un-hook d3d11.dll is not called only on launch but on a time basis ? (a callback on a timer ?) This might explain while the fix sometimes gets disabled (both in DAI and LOTF) Does the wrapper constantly "monitor" this and bypass the "disable" code issued by the nvidia driver ? or is it only on launch?
@Exposed123
Did you try to take the d3d11.dll from Watch Dogs 3DMigoto Release and put in DA:I ? Initially we started from that version. You should still be able to load "some" of the shaders with that version. But is interesting if is working under Windows 8.1 :)
1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc
My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com
(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)
The un-hook mechanism could be used later, but it's unlikely because they'd have to unload the d3d11.dll then reload. In any case, the hook is installed at launch and always active, so if this happens it will still bypass their bypass.
For wrapper versions, the 99.25 should be a superset of the WatchDogs version. I specifically disabled the overridesettings in that version as a possible recent weakness.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers
Hi.
I already had Visual Studio Express 2013 installed for other projects I was working on, but I do have all the updated patches. I did also download and installed the Windows 8 SDK.
I recompiled the Dragon Age fix with no errors the first time (which still didn't work, game will not start). However, subsequent times I would get these build errors (I did not make any changes to the code).
https://dl.dropboxusercontent.com/u/101506129/Build.txt
I haven't tried Helix's suggestion yet regarding WatchDogs, but I'll go ahead and get the entire game and see if shader hunting works under Windows 8.1 with 3Dmigoto .99.25 (which DAI unfortunately doesn't).
Windows 10, Geforce GTX 1080 x2 (SLI), Haswell Core i7, 8GB DDR3 2133Mhz memory, 65" LG 4k 3DTV
I put a lot of effort into getting rid of all of the warnings, so something is definitely funny there. Did you change the project before doing the build? I would expect the solution file to include all the proper settings, all the proper flags, and everything that would make it work the same as I see. That's the goal at least.
There are several projects in there that are presently skipped. It might make sense to remove them later, but I'm hesitant to make that sort of change.
I usually see those as skipped in the build, which suggests something is different. Here is my build log for that DragonAge x64 target. Build Menu->Rebuild Solution.
Digging around a little bit, I see that those warnings come about when you "Run Code Analysis on Solution". I don't think that is ever going to work here. This is all hack code, and not at all well structured, so a static code analysis is going to just go off the rails.
I haven't looked at that tool that much, but I don't even understand what it's talking about.
Let's take the first error for example:
That line of code only has 3 parameters to the printf, so why is it complaining about a mismatch on a 4th parameter? What am I missing?
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers
The 4th parameter is ActionButton + offsetof(DIJOYSTATE2, rgbButtons), which according to the warning is a 64bit value, but the corresponding format string is %x, which expects a 32bit unsigned integer. Change it to %llx for 64bit values or %lx if it's a pointer (that is, if the Windows API has sane pointer types).
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD
Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword
1. LogFile
2. String text
3. ActionButton
4. ActionButton + joyoffset
If it were a pointer, I'd need to use %p instead, if you use %lx or %llx you get a different warning.
I have no idea how much credence to give these warnings. They aren't reported from the C++ compiler itself, even with warning level of 4. I tend to give the most credence to the compiler, but if they can potentially cause problems, I like to fix stuff that the tools give me. If it's just theoretical or purity oriented, this code base is not at a level where we can even pretend to worry about that.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers
Since printf tends to be a very common source of errors most compilers have been taught how to parse the format string to do type checking on them, but that's basically merging a static analysis tool into the compiler and is not inherently part of a C/C++ compiler. GCC certainly does this (it looks for arguments tagged with __attribute__((__format__))), but I have no idea about MS's compiler - I've been a Linux coder for the last 10 years so I'm a bit out of the loop.
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD
Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword
I went through all of the warnings it shows for the DX11 project, as I'm trying to track down a multi-threaded Decompiler problem. Sometimes you get easy wins out of tools like this, but not this time. None of the legitimate warnings are actual problems.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers
I ran the Code Analysis tool to see if it would find something worth investigating. None of the alerts found affected the final build though, as everything was successful. Here's the output from a straight build. It complained about an unreferenced local variable, but otherwise it ran fine.
https://dl.dropboxusercontent.com/u/101506129/VS_log.txt
I couldn't find anything in the source code, from a debugging point of view, that would cause a Windows 8.1 error. To look further into the source code, I will need a better understanding of the APIs and DLL's involved, which will probably take some time to learn.
I did install Windows 7 on an old drive I had laying around and got DAI to work in 3D on my primary gaming PC. I compared the logfiles of the successful run (Win7), to the failed run (Win 8.1), using the same v5 patch.
For the most part, the successful run was able to load a huge amount of shaders, while the failed run inexplicably stopped right before "updating stereo parameter texture."
I've attached the log files for both, compared using winmerge. This file is pretty big (160mb), it might take your browser a minute or two to load completely.
https://dl.dropboxusercontent.com/u/101506129/dxlog.htm
Windows 10, Geforce GTX 1080 x2 (SLI), Haswell Core i7, 8GB DDR3 2133Mhz memory, 65" LG 4k 3DTV
Most importantly, we can see that 3Dmigoto is running pretty smoothly here. It's loading shaders, it's attached them and overridden the original game shaders. It creates textures properly. Everything seems to be working correctly until it crashes.
This is why I think this is not a bug in 3Dmigoto, but rather a bug in the game that 3Dmigoto makes more common. Keep in mind that the game itself crashes periodically whether the tool is installed or not.
As noted, I already have put in 100s of hours of debugging for the 8.1 case, so it presently works smoothly on 9 out of 10 games. But if you find some amateur mistake that I made, I'm happy to fix it.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers
- Build the wrapper in Debug Mode.
- In VS set the external process exe as the game's exe
- Copy the DLL +PDB next to the exe.
- Start the game from VS (by hitting the debug button).
- Play until it crashes. It will either:
- Crash in the wrapper and you will see where
- Crash in the game and you get the ASM location + instructions
- Will simply quit to desktop without any warnings.
This way you will know WHO and WHERE is crashing;))
Just my idea of how I would start looking at this:)
1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc
My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com
(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)