ASM Assembler
Last major update was in july 2015. Not sure when I added code to fix float converting in MS broken disassembly. I think it was around the same time. I used a pretty massive list of games to cover all the new instructions in CS, DS and HS shaders along with better coverage of VS and PS shaders. DX11 games: f:\SteamApps\common\Alien Isolation f:\SteamApps\common\Aliens vs Predator f:\Ubisoft\Related Designs\ANNO 2070 F:\Glyph\Games\ArcheAge f:\SteamApps\common\Arma 3 f:\SteamApps\common\Assassin's Creed 3 f:\Ubisoft\Ubisoft Game Launcher\games\Assassin's Creed Liberation HD f:\Ubisoft\Ubisoft Game Launcher\games\Assassin's Creed IV Black Flag Asia f:\Ubisoft\Ubisoft Game Launcher\games\Assassin's Creed Unity f:\SteamApps\common\assettocorsa f:\SteamApps\common\Batman Arkham City GOTY\Binaries\Win32 f:\SteamApps\common\Batman Arkham Origins\SinglePlayer\Binaries\Win32 f:\SteamApps\common\Batman Arkham Knight\Binaries\Win64 f:\Origin Games\Battlefield 3 f:\Origin Games\Battlefield 4 f:\Origin Games\Battlefield Bad Company 2 f:\SteamApps\common\BioShock Infinite\Binaries\Win32 f:\SteamApps\common\Call of Duty Black Ops II f:\SteamApps\common\Call of Duty Ghosts f:\SteamApps\common\Sid Meier's Civilization V f:\SteamApps\common\Sid Meier's Civilization Beyond Earth f:\SteamApps\common\Company of Heroes 2 f:\Origin Games\Crysis 2 f:\Origin Games\Crysis 3\Bin32 f:\SteamApps\common\Dark Souls II Scholar of the First Sin\Game f:\SteamApps\common\Deus Ex - Human Revolution f:\SteamApps\common\Deus Ex Human Revolution Director's Cut f:\SteamApps\common\DiRT 3 f:\SteamApps\common\DiRT 3 Complete Edition f:\SteamApps\common\DiRT Rally f:\SteamApps\common\DiRT Showdown f:\Origin Games\dragon Age Inquisition f:\SteamApps\common\Dungeons and Dragons Online f:\SteamApps\common\Dying Light f:\SteamApps\common\F.E.A.R. 3 f:\Ubisoft\Ubisoft Game Launcher\games\Far Cry 3 f:\Ubisoft\Far Cry 3 Blood Dragon\bin f:\Ubisoft\Ubisoft Game Launcher\games\Far Cry 4\bin f:\Origin Games\FIFA 15 DEMO f:\SteamApps\common\Grand Theft Auto V f:\SteamApps\common\grid 2 f:\SteamApps\common\GRID Autosport f:\SteamApps\common\Hitman Absolution f:\SteamApps\common\HOMEFRONT\Binaries f:\SteamApps\common\L.A.Noire f:\SteamApps\common\Lords Of The Fallen f:\SteamApps\common\Lost Planet 2 f:\SteamApps\common\Max Payne 3\Max Payne 3 f:\Origin Games\Medal of Honor\MP f:\Origin Games\Medal of Honor Warfighter f:\SteamApps\common\Metro 2033 f:\SteamApps\common\Metro 2033 Redux f:\SteamApps\common\Metro Last Light f:\SteamApps\common\Metro Last Light Redux f:\SteamApps\common\ShadowOfMordor\x64 f:\SteamApps\common\MK10\Binaries\Retail f:\SteamApps\common\Murdered Soul Suspect\Binaries\Win64 f:\SteamApps\common\Cryptic Studios\Neverwinter\Live f:\SteamApps\common\Oil Rush\bin f:\SteamApps\common\pCars f:\SteamApps\common\red faction armageddon f:\SteamApps\common\Red Faction Guerrilla f:\SteamApps\common\Rise of Nations f:\SteamApps\common\Ryse Son of Rome\Bin64 f:\SteamApps\common\Saints Row the Third f:\SteamApps\common\Saints Row IV f:\SteamApps\common\SleepingDogs f:\SteamApps\common\SleepingDogsDefinitiveEdition f:\SteamApps\common\Project Silverado f:\SteamApps\common\strikesuitzero\pc\main\Binary f:\SteamApps\common\SSZ Directors Cut\pc\main\Binary f:\SteamApps\common\Star Trek Online\Star Trek Online\Live f:\SteamApps\common\Lord of the Rings Online f:\Games\The Secret World f:\GOG Games\The Witcher 3 Wild Hunt\bin\x64 f:\SteamApps\common\Thief\Binaries2\Win64 f:\Origin Games\Titanfall f:\Ubisoft\Tom Clancy's H.A.W.X. 2 f:\SteamApps\common\Tomb Raider f:\SteamApps\common\Total War Rome II f:\SteamApps\common\Total War SHOGUN 2 f:\SteamApps\common\ToyboxTurbos f:\SteamApps\common\TrialsPC\datapack f:\SteamApps\common\Trials Fusion\datapack f:\Ubisoft\Ubisoft Game Launcher\games\Watch_Dogs\bin f:\Games\World of Warcraft f:\SteamApps\common\Tom Clancy's Splinter Cell Blacklist f:\SteamApps\common\The Bureau\Binaries\Win32 f:\SteamApps\common\War of the Roses f:\SteamApps\common\Shadow Warrior\dx11 DX10 games: f:\SteamApps\common\Age of Conan f:\Ubisoft\Related Designs\ANNO 1404 - Gold Edition f:\SteamApps\common\Assassins Creed f:\SteamApps\common\Bioshock\Builds\Release f:\SteamApps\common\BioShock 2\SP\Builds\Binaries f:\SteamApps\common\BioShock 2\MP\Builds\Binaries f:\SteamApps\common\Devil May Cry 4 f:\steamapps\common\Special Edition f:\SteamApps\common\Far Cry 2\bin f:\Ubisoft\James Cameron's AVATAR - THE GAME f:\SteamApps\common\Just Cause 2 f:\SteamApps\common\lost planet extreme condition f:\SteamApps\common\Stormrise It was probably not a complete list and just all the games I owned at the time. The assembler is not very fast so iterating over this amount of games took some time. A few weeks if I remember correctly. A lot of the work had already been done for VS and PS beforehand. DarkStarSword recently improved input/output signatures for adding inputs and outputs to shaders without really touching the assembler itself. The assembler only cares about the code block and copies the rest of the shaderinfo from the input shader. By changing the signatures of the input shader the code is inserted into a modified shader shell and finally the correct hash is calculated as normal. I believe I managed to get good code coverage back in july 2015 which means the assembler is pretty solid. I did all the work from scratch but have more recently seen that there is significant documentation of the ASM language within the driver SDK for windows. The simplest way forward is just fixing the assembler if any new instructions are encountered. One problem is that as the current assembler is constructed you get no error for incorrect instructions and it can silently throw away bad code. Other stuff like how it handles comments could be more user friendly. I believe we are tracking problems with the assembler at the moment. Usually you can code around the problem issues. Right now it kind of expect the code to follow the machine formatting of MS disassembler perfectly. Extra operators are ignored. Tabs are not accepted as whitespace. Comments need to start at the beginning of a line. I've probably forgotten a few more issues. Most importantly it is doing it's job. Most recently it handled Rise of Tomb Raider without any change I'm aware of except maybe DarkStarSwords great contribution. My work is clearly important but on a day to day part of the project I usually produce a burst of code and then go into hiatus until I'm needed again. I don't own all the newer releases so the current code has not been tested against all new games but it appears that it doesn't have to. Last update was really major and had a huge number of new instructions that was only inside compute, domain and hull shaders. And yet again thank you to all the shader hacker out there. Ulf Jälmbrant AKA FLUgan
Last major update was in july 2015.
Not sure when I added code to fix float converting in MS broken disassembly.
I think it was around the same time.

I used a pretty massive list of games to cover all the new instructions in CS, DS and HS shaders along with better coverage of VS and PS shaders.

DX11 games:
f:\SteamApps\common\Alien Isolation
f:\SteamApps\common\Aliens vs Predator
f:\Ubisoft\Related Designs\ANNO 2070
F:\Glyph\Games\ArcheAge
f:\SteamApps\common\Arma 3
f:\SteamApps\common\Assassin's Creed 3
f:\Ubisoft\Ubisoft Game Launcher\games\Assassin's Creed Liberation HD
f:\Ubisoft\Ubisoft Game Launcher\games\Assassin's Creed IV Black Flag Asia
f:\Ubisoft\Ubisoft Game Launcher\games\Assassin's Creed Unity
f:\SteamApps\common\assettocorsa
f:\SteamApps\common\Batman Arkham City GOTY\Binaries\Win32
f:\SteamApps\common\Batman Arkham Origins\SinglePlayer\Binaries\Win32
f:\SteamApps\common\Batman Arkham Knight\Binaries\Win64
f:\Origin Games\Battlefield 3
f:\Origin Games\Battlefield 4
f:\Origin Games\Battlefield Bad Company 2
f:\SteamApps\common\BioShock Infinite\Binaries\Win32
f:\SteamApps\common\Call of Duty Black Ops II
f:\SteamApps\common\Call of Duty Ghosts
f:\SteamApps\common\Sid Meier's Civilization V
f:\SteamApps\common\Sid Meier's Civilization Beyond Earth
f:\SteamApps\common\Company of Heroes 2
f:\Origin Games\Crysis 2
f:\Origin Games\Crysis 3\Bin32
f:\SteamApps\common\Dark Souls II Scholar of the First Sin\Game
f:\SteamApps\common\Deus Ex - Human Revolution
f:\SteamApps\common\Deus Ex Human Revolution Director's Cut
f:\SteamApps\common\DiRT 3
f:\SteamApps\common\DiRT 3 Complete Edition
f:\SteamApps\common\DiRT Rally
f:\SteamApps\common\DiRT Showdown
f:\Origin Games\dragon Age Inquisition
f:\SteamApps\common\Dungeons and Dragons Online
f:\SteamApps\common\Dying Light
f:\SteamApps\common\F.E.A.R. 3
f:\Ubisoft\Ubisoft Game Launcher\games\Far Cry 3
f:\Ubisoft\Far Cry 3 Blood Dragon\bin
f:\Ubisoft\Ubisoft Game Launcher\games\Far Cry 4\bin
f:\Origin Games\FIFA 15 DEMO
f:\SteamApps\common\Grand Theft Auto V
f:\SteamApps\common\grid 2
f:\SteamApps\common\GRID Autosport
f:\SteamApps\common\Hitman Absolution
f:\SteamApps\common\HOMEFRONT\Binaries
f:\SteamApps\common\L.A.Noire
f:\SteamApps\common\Lords Of The Fallen
f:\SteamApps\common\Lost Planet 2
f:\SteamApps\common\Max Payne 3\Max Payne 3
f:\Origin Games\Medal of Honor\MP
f:\Origin Games\Medal of Honor Warfighter
f:\SteamApps\common\Metro 2033
f:\SteamApps\common\Metro 2033 Redux
f:\SteamApps\common\Metro Last Light
f:\SteamApps\common\Metro Last Light Redux
f:\SteamApps\common\ShadowOfMordor\x64
f:\SteamApps\common\MK10\Binaries\Retail
f:\SteamApps\common\Murdered Soul Suspect\Binaries\Win64
f:\SteamApps\common\Cryptic Studios\Neverwinter\Live
f:\SteamApps\common\Oil Rush\bin
f:\SteamApps\common\pCars
f:\SteamApps\common\red faction armageddon
f:\SteamApps\common\Red Faction Guerrilla
f:\SteamApps\common\Rise of Nations
f:\SteamApps\common\Ryse Son of Rome\Bin64
f:\SteamApps\common\Saints Row the Third
f:\SteamApps\common\Saints Row IV
f:\SteamApps\common\SleepingDogs
f:\SteamApps\common\SleepingDogsDefinitiveEdition
f:\SteamApps\common\Project Silverado
f:\SteamApps\common\strikesuitzero\pc\main\Binary
f:\SteamApps\common\SSZ Directors Cut\pc\main\Binary
f:\SteamApps\common\Star Trek Online\Star Trek Online\Live
f:\SteamApps\common\Lord of the Rings Online
f:\Games\The Secret World
f:\GOG Games\The Witcher 3 Wild Hunt\bin\x64
f:\SteamApps\common\Thief\Binaries2\Win64
f:\Origin Games\Titanfall
f:\Ubisoft\Tom Clancy's H.A.W.X. 2
f:\SteamApps\common\Tomb Raider
f:\SteamApps\common\Total War Rome II
f:\SteamApps\common\Total War SHOGUN 2
f:\SteamApps\common\ToyboxTurbos
f:\SteamApps\common\TrialsPC\datapack
f:\SteamApps\common\Trials Fusion\datapack
f:\Ubisoft\Ubisoft Game Launcher\games\Watch_Dogs\bin
f:\Games\World of Warcraft
f:\SteamApps\common\Tom Clancy's Splinter Cell Blacklist
f:\SteamApps\common\The Bureau\Binaries\Win32
f:\SteamApps\common\War of the Roses
f:\SteamApps\common\Shadow Warrior\dx11

DX10 games:
f:\SteamApps\common\Age of Conan
f:\Ubisoft\Related Designs\ANNO 1404 - Gold Edition
f:\SteamApps\common\Assassins Creed
f:\SteamApps\common\Bioshock\Builds\Release
f:\SteamApps\common\BioShock 2\SP\Builds\Binaries
f:\SteamApps\common\BioShock 2\MP\Builds\Binaries
f:\SteamApps\common\Devil May Cry 4
f:\steamapps\common\Special Edition
f:\SteamApps\common\Far Cry 2\bin
f:\Ubisoft\James Cameron's AVATAR - THE GAME
f:\SteamApps\common\Just Cause 2
f:\SteamApps\common\lost planet extreme condition
f:\SteamApps\common\Stormrise

It was probably not a complete list and just all the games I owned at the time.
The assembler is not very fast so iterating over this amount of games took some time.
A few weeks if I remember correctly. A lot of the work had already been done for VS and PS beforehand.

DarkStarSword recently improved input/output signatures for adding inputs and outputs to shaders without really touching the assembler itself. The assembler only cares about the code block and copies the rest of the shaderinfo from the input shader. By changing the signatures of the input shader the code is inserted into a modified shader shell and finally the correct hash is calculated as normal.

I believe I managed to get good code coverage back in july 2015 which means the assembler is pretty solid.

I did all the work from scratch but have more recently seen that there is significant documentation of the ASM language within the driver SDK for windows. The simplest way forward is just fixing the assembler if any new instructions are encountered.

One problem is that as the current assembler is constructed you get no error for incorrect instructions and it can silently throw away bad code.
Other stuff like how it handles comments could be more user friendly.

I believe we are tracking problems with the assembler at the moment.
Usually you can code around the problem issues.
Right now it kind of expect the code to follow the machine formatting of MS disassembler perfectly.
Extra operators are ignored.
Tabs are not accepted as whitespace.
Comments need to start at the beginning of a line.

I've probably forgotten a few more issues.

Most importantly it is doing it's job.

Most recently it handled Rise of Tomb Raider without any change I'm aware of except maybe DarkStarSwords great contribution.

My work is clearly important but on a day to day part of the project I usually produce a burst of code and then go into hiatus until I'm needed again. I don't own all the newer releases so the current code has not been tested against all new games but it appears that it doesn't have to.

Last update was really major and had a huge number of new instructions that was only inside compute, domain and hull shaders.

And yet again thank you to all the shader hacker out there.
Ulf Jälmbrant
AKA FLUgan

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

#1
Posted 03/16/2016 08:47 PM   
Scroll To Top