I Believe it's time to share my progress so far.
The wrapper dll is currently only dumping every pixel/vertex shader passing by.
Because this is dx9+ all shaders are binary compiled when being dumped.
I've been working on primarily disassembling the shaders back to readable form.
It's a huge task even without considering assembling it back to binary afterwards.
In addition to my own code I'm trying to figure out why MS D3Ddisaasemble fails for some files but works for others.
http://sdrv.ms/1aDpLcm
Some DX11 games like Dirt 3 bypasses the wrapper and the only way I could get it to load was to actually replace/rearrange the d3d11.dll in my windows folder. There are probably better ways to hook dx11. I managed to get DX HR Director's Cut to crash to desktop and the wrapper is far from tested with every dx11 game. (Mostly with AC4).
Is there any semi-official list of dx11 games and I'm not talking about just the new crop of dx11 only games.
The wrapper dll is currently only dumping every pixel/vertex shader passing by.
Because this is dx9+ all shaders are binary compiled when being dumped.
I've been working on primarily disassembling the shaders back to readable form.
It's a huge task even without considering assembling it back to binary afterwards.
In addition to my own code I'm trying to figure out why MS D3Ddisaasemble fails for some files but works for others.
Some DX11 games like Dirt 3 bypasses the wrapper and the only way I could get it to load was to actually replace/rearrange the d3d11.dll in my windows folder. There are probably better ways to hook dx11. I managed to get DX HR Director's Cut to crash to desktop and the wrapper is far from tested with every dx11 game. (Mostly with AC4).
Is there any semi-official list of dx11 games and I'm not talking about just the new crop of dx11 only games.
Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?
Finally some more progress:
I managed to use D3DDissassemble to disassemble 100% of the shaders I dumped from Anno 2070.
Unfortunatelly there is no D3Dreassemble but this is a big step forward.
Unless I'm mistaken most shader modifications involve rewriting the shader (mostly to remove broken effects) or inserting instructions within the shader. Dissassembly brings human readable shaders and should also make fixing using lua scripts a possibility.
One caveat is that Helix mentioned that D3DDissassemble produces flawed results. As his comment was a bit sparse I don't know how significant it is. I'm still in the early phases of deciding when, where and how to best replace shaders.
I managed to use D3DDissassemble to disassemble 100% of the shaders I dumped from Anno 2070.
Unfortunatelly there is no D3Dreassemble but this is a big step forward.
Unless I'm mistaken most shader modifications involve rewriting the shader (mostly to remove broken effects) or inserting instructions within the shader. Dissassembly brings human readable shaders and should also make fixing using lua scripts a possibility.
One caveat is that Helix mentioned that D3DDissassemble produces flawed results. As his comment was a bit sparse I don't know how significant it is. I'm still in the early phases of deciding when, where and how to best replace shaders.
Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?
[quote="Flugan"]Finally some more progress:
I managed to use D3DDissassemble to disassemble 100% of the shaders I dumped from Anno 2070.
Unfortunatelly there is no D3Dreassemble but this is a big step forward.
Unless I'm mistaken most shader modifications involve rewriting the shader (mostly to remove broken effects) or inserting instructions within the shader. Dissassembly brings human readable shaders and should also make fixing using lua scripts a possibility.
One caveat is that Helix mentioned that D3DDissassemble produces flawed results. As his comment was a bit sparse I don't know how significant it is. I'm still in the early phases of deciding when, where and how to best replace shaders.[/quote]Really good progress. Getting them to assembly is a great step.
Patching them by hand with a text editor is how most fixes have been done for HelixMod.
As you note, getting that patched assembly re-assembled is a tricky spot for DX11/SM5.
The two example wrappers we've seen for Helix and Chiri used two different approaches.
Helix keeps it all in assembly, and wrote his own assembler. Microsoft dropped support for assembling. They still disassemble, but as you've noted there is no longer an assembler for DX11.
Chiri took the alternate path of decompiling the assembler back to HLSL. That allowed him to use the built in D3DCompileFromFile.
Both paths are hard, but doable. I googled for quite a bit, and I do not think a HLSL decompiler is available. Similarly, I cannot find any assembler that supports SM5.
I'm not sure what path is better. It probably depends upon your experience with different tools. Best of luck to you however you decide.
I managed to use D3DDissassemble to disassemble 100% of the shaders I dumped from Anno 2070.
Unfortunatelly there is no D3Dreassemble but this is a big step forward.
Unless I'm mistaken most shader modifications involve rewriting the shader (mostly to remove broken effects) or inserting instructions within the shader. Dissassembly brings human readable shaders and should also make fixing using lua scripts a possibility.
One caveat is that Helix mentioned that D3DDissassemble produces flawed results. As his comment was a bit sparse I don't know how significant it is. I'm still in the early phases of deciding when, where and how to best replace shaders.
Really good progress. Getting them to assembly is a great step.
Patching them by hand with a text editor is how most fixes have been done for HelixMod.
As you note, getting that patched assembly re-assembled is a tricky spot for DX11/SM5.
The two example wrappers we've seen for Helix and Chiri used two different approaches.
Helix keeps it all in assembly, and wrote his own assembler. Microsoft dropped support for assembling. They still disassemble, but as you've noted there is no longer an assembler for DX11.
Chiri took the alternate path of decompiling the assembler back to HLSL. That allowed him to use the built in D3DCompileFromFile.
Both paths are hard, but doable. I googled for quite a bit, and I do not think a HLSL decompiler is available. Similarly, I cannot find any assembler that supports SM5.
I'm not sure what path is better. It probably depends upon your experience with different tools. Best of luck to you however you decide.
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'm in the process of Writing assembly code.
One issue that has cropped up when comparing the assembled code exactly against the original binary code is that the value of floats changes while doing conversion to and from base 2 and 10 resulting in slightly different values due to rounding twice.
One issue that has cropped up when comparing the assembled code exactly against the original binary code is that the value of floats changes while doing conversion to and from base 2 and 10 resulting in slightly different values due to rounding twice.
Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?
Flugan, massive respect for the effort you're putting in.
Unfortunately, like most of the others, I'm not a coder so can't offer direct input.
I hope you learn loads and get some satisfaction out of what you're doing :-)
Flugan, massive respect for the effort you're putting in.
Unfortunately, like most of the others, I'm not a coder so can't offer direct input.
I hope you learn loads and get some satisfaction out of what you're doing :-)
GTX 1070 SLI, I7-6700k ~ 4.4Ghz, 3x BenQ XL2420T, BenQ TK800, LG 55EG960V (3D OLED), Samsung 850 EVO SSD, Crucial M4 SSD, 3D vision kit, Xpand x104 glasses, Corsair HX1000i, Win 10 pro 64/Win 7 64https://www.3dmark.com/fs/9529310
Progress on assembling is going well.
out of 22971 unique instruction dumped from AC4 22887 is currently handled.
As soon as AC4 has 100% coverage I will dump more games and increase coverage further.
As a non-coder, I tried clenching my fists really really hard and making a proud face of respect towards the computer screen, but it didn't seem to help much...if at all.
Good luck Flugan. Hope your "enjoying the journey, not just the destination" too, as they say.
As a non-coder, I tried clenching my fists really really hard and making a proud face of respect towards the computer screen, but it didn't seem to help much...if at all.
Good luck Flugan. Hope your "enjoying the journey, not just the destination" too, as they say.
So assuming all the instructions get dumped from AC4, then what's the next step? I assume it means figuring out how to modify them to fix issues and the re-assemble them. Sorry for the stupid question.
So assuming all the instructions get dumped from AC4, then what's the next step? I assume it means figuring out how to modify them to fix issues and the re-assemble them. Sorry for the stupid question.
1080 GTX 8GB SLI | I7-4770K@4.5GHz | 16GB RAM | Win10x64
Asus ROG Swift PG278Q | 3D Vision 2
Project Flugan has now reached alpha stage.
Current features:
*Dumping all the binary shaders the game tries to load
*Dumping dx10-11
*Using the MS disassembler function to convert binary to text.
*Written a validating assembler to make sure the assembler
reproduce the original binary with the exception of rounding errors for numbers.
*Integrated lua which allows shaders to be modified many at once
*My wrapper is currently a minimalistic hook so a lot of work would be required to
see what shaders are applied where.
Fixing a game is hard especially when your Tools are limited to a probably incomplete shader dump.
Is there any way to leverage tridef profiles? When I look at them I only see a binary mess.
I'm looking for alpha testers with shader experience to guide the beta version in the right direction. There are probably lots of must have's that don't exists yet.
Current features:
*Dumping all the binary shaders the game tries to load
*Dumping dx10-11
*Using the MS disassembler function to convert binary to text.
*Written a validating assembler to make sure the assembler
reproduce the original binary with the exception of rounding errors for numbers.
*Integrated lua which allows shaders to be modified many at once
*My wrapper is currently a minimalistic hook so a lot of work would be required to
see what shaders are applied where.
Fixing a game is hard especially when your Tools are limited to a probably incomplete shader dump.
Is there any way to leverage tridef profiles? When I look at them I only see a binary mess.
I'm looking for alpha testers with shader experience to guide the beta version in the right direction. There are probably lots of must have's that don't exists yet.
Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?
The wrapper dll is currently only dumping every pixel/vertex shader passing by.
Because this is dx9+ all shaders are binary compiled when being dumped.
I've been working on primarily disassembling the shaders back to readable form.
It's a huge task even without considering assembling it back to binary afterwards.
In addition to my own code I'm trying to figure out why MS D3Ddisaasemble fails for some files but works for others.
http://sdrv.ms/1aDpLcm
Some DX11 games like Dirt 3 bypasses the wrapper and the only way I could get it to load was to actually replace/rearrange the d3d11.dll in my windows folder. There are probably better ways to hook dx11. I managed to get DX HR Director's Cut to crash to desktop and the wrapper is far from tested with every dx11 game. (Mostly with AC4).
Is there any semi-official list of dx11 games and I'm not talking about just the new crop of dx11 only games.
Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?
donations: ulfjalmbrant@hotmail.com
https://en.wikipedia.org/wiki/List_of_games_with_DirectX_11_support
I managed to use D3DDissassemble to disassemble 100% of the shaders I dumped from Anno 2070.
Unfortunatelly there is no D3Dreassemble but this is a big step forward.
Unless I'm mistaken most shader modifications involve rewriting the shader (mostly to remove broken effects) or inserting instructions within the shader. Dissassembly brings human readable shaders and should also make fixing using lua scripts a possibility.
One caveat is that Helix mentioned that D3DDissassemble produces flawed results. As his comment was a bit sparse I don't know how significant it is. I'm still in the early phases of deciding when, where and how to best replace shaders.
Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?
donations: ulfjalmbrant@hotmail.com
100% of dumped shaders from AC4 dissassembled successfully
Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?
donations: ulfjalmbrant@hotmail.com
https://steamcommunity.com/profiles/76561198014296177/
Patching them by hand with a text editor is how most fixes have been done for HelixMod.
As you note, getting that patched assembly re-assembled is a tricky spot for DX11/SM5.
The two example wrappers we've seen for Helix and Chiri used two different approaches.
Helix keeps it all in assembly, and wrote his own assembler. Microsoft dropped support for assembling. They still disassemble, but as you've noted there is no longer an assembler for DX11.
Chiri took the alternate path of decompiling the assembler back to HLSL. That allowed him to use the built in D3DCompileFromFile.
Both paths are hard, but doable. I googled for quite a bit, and I do not think a HLSL decompiler is available. Similarly, I cannot find any assembler that supports SM5.
I'm not sure what path is better. It probably depends upon your experience with different tools. Best of luck to you however you decide.
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
Best of luck
One issue that has cropped up when comparing the assembled code exactly against the original binary code is that the value of floats changes while doing conversion to and from base 2 and 10 resulting in slightly different values due to rounding twice.
Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?
donations: ulfjalmbrant@hotmail.com
Unfortunately, like most of the others, I'm not a coder so can't offer direct input.
I hope you learn loads and get some satisfaction out of what you're doing :-)
GTX 1070 SLI, I7-6700k ~ 4.4Ghz, 3x BenQ XL2420T, BenQ TK800, LG 55EG960V (3D OLED), Samsung 850 EVO SSD, Crucial M4 SSD, 3D vision kit, Xpand x104 glasses, Corsair HX1000i, Win 10 pro 64/Win 7 64https://www.3dmark.com/fs/9529310
out of 22971 unique instruction dumped from AC4 22887 is currently handled.
As soon as AC4 has 100% coverage I will dump more games and increase coverage further.
Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?
donations: ulfjalmbrant@hotmail.com
Good luck Flugan. Hope your "enjoying the journey, not just the destination" too, as they say.
46" Samsung ES7500 3DTV (checkerboard, high FOV as desktop monitor, highly recommend!) - Metro 2033 3D PNG screens - Metro LL filter realism mod - Flugan's Deus Ex:HR Depth changers - Nvidia tech support online form - Nvidia support: 1-800-797-6530
1080 GTX 8GB SLI | I7-4770K@4.5GHz | 16GB RAM | Win10x64
Asus ROG Swift PG278Q | 3D Vision 2
Current features:
*Dumping all the binary shaders the game tries to load
*Dumping dx10-11
*Using the MS disassembler function to convert binary to text.
*Written a validating assembler to make sure the assembler
reproduce the original binary with the exception of rounding errors for numbers.
*Integrated lua which allows shaders to be modified many at once
*My wrapper is currently a minimalistic hook so a lot of work would be required to
see what shaders are applied where.
Fixing a game is hard especially when your Tools are limited to a probably incomplete shader dump.
Is there any way to leverage tridef profiles? When I look at them I only see a binary mess.
I'm looking for alpha testers with shader experience to guide the beta version in the right direction. There are probably lots of must have's that don't exists yet.
Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?
donations: ulfjalmbrant@hotmail.com