BinarySearchEngine for use with Helix Mod Debug
  1 / 2    
Ever since bo3b first mentioned doing a binary search in the Helixmod thread, I've been toying with the idea of, and since toying with the process of creating a script that would do so ... it's been a long hard process going from a concept ... to something that works ... to something that works effectively and almost seemlessly with(in) the Helixmod. And since that point it's continued evolving, in thought, on paper, and in its code ... on almost a daily basis. There's still features and functions I want to implement but I also want to give the Helixmodding community a go at it as well, so keep in mind it's in it's early stages and technically this is a bit more than just a binary search engine and it's hopefully going to be a part of a bigger project I'm working on ... What you need: BinarySearchEngine: (Updated 12.02.13 auto-refresh) [s]https://www.dropbox.com/s/iq1pgyykhk9fsek/_BinarySearchEngine.exe[/s] Latest Helix Mod Debug dll: http://helixmod.wikispot.org/oldvers Shader Dump: run the game using the Debug dll with a DX9settings.ini with the following in it ... [quote][General] DumpAll = True[/quote] Mana84's Shader Conversion Tool:(Optional, if you're using the Advanced Options to convert the presently found Vertex Shader, must be named renamed to _ShaderConverter.exe in order to work properly) http://helixmod.blogspot.com/2013/05/vs11vs20-vs30-converter.html What it is/what it does:: It's a CMD line script and an AHK script rolled into one. The AHK script sends keystrokes to the shell script while in-game, this script 'sorts' through Shader lots to find a single shader. Say you have 5000 Shaders, the first lot will disable 2500 Shaders, if it's disabled in that lot, it's halved again to 2500 or if it's not it switches to the other half and halves that lot to 1250 and so on until it narrows it down to 1. How to use it: First run the game with the Helixmod Debug and a DX9settings.ini with DumpAll set to true. This creates the Dump folder from which this works off of, now exit the game and run _BinarySearchEngine.exe from the directory the Dump folder is located in, it will unpack the AHK 'control' script and run it as well. On the first run in a DIR you'll be prompted to "Start Binary Search on [P]ixel or [V]ertex Shaders". (On later runs that weren't exited from the BSE menu (flagged files still exist) it will ask you whether or not to continue a search. Yes, continues, No, deletes temporary files and the ShaderOverride folder and starts a new search ... on runs with a ShaderOverride already present or that were exited from the BSE menu properly it will ask you if you want to set the Shaders to read-only so you can continue searching against other shaders while keeping the present ShaderOverride.) I prefer to start the game while on the Pixel or Vertex choice menu because once P or V is chosen it will disable 1/2 of the Shaders, which can make it hard to traverse menus and such, just make sure to start BSE before running the game again ... and after dumping the shaders. So start the game get to the point you want to search for say a HUD, press P or V while in game and the keystroke will be sent to the BSE via the AHK script. Wait for the beep signaling it's finished and then it will automatically refresh the Shaders in-game. (this can take a few seconds with 5000+ Shaders or happen almost instantly with 100s of Shaders ... it all depends on the size of the present lot.) Now from here it's a matter or answering Y,N or U to whether the Shader was DISABLED in the lot, Yes, No, or Unknown ... more on Unknown later. Say the Shader was DISABLED in the lot you press Y, wait for the beep and then for the Shaders to refresh ... and if it was still ENABLED press N and then wait, keep doing this until the Shader is either found or not found, when this happens you will hear 2 beeps after you pressed Y,N or U ... at this point pressing Y,N, or U will be accompanied by a shrill beep. From here you can either Alt-Tab out of the game to use the Advanced Options or Exit or you can start another search without leaving the games by pressing Ctrl+Shift+S (On other menus this is used to do a QuickSave ... crazy I know :) ... more on that later) In the Advanced Options menu you can Enable or Disable the Shader, Convert the Shader using Mana84's Conversion Tool (It will open the file afterwards so you can remove any extra .s that might be present from the Conversion), Open the Shader to Edit, or Add a Comment to the Shader (Do that last because Enabling or Disabling the Shader will overwrite the Comment atm) and Exit back to the "Shader Found" Menu. About answering Unknown (U) ... when disabling this many Shaders at once I've found that sometimes one of them might interfere with being able to see the game, freeze the game or some other unsightly thing. When this happens press U and all the Shaders will be dumped into a TMP file and the search will continue on the other Shaders and come back to those after, during this process if ever the last Shader is Unknown it will add a Comment of //Unknown to it and remove it from the equation. About QuickSave and QuickLoad (Ctrl+Shift+S, Ctrl+Shift+L) ... At almost every Choice Menu you can Save or Load, a previous Save during the present search ... so if you hit a point and you're unsure just do a QuickSave and you be able to do a QuickLoad up until Found Menu. (There's a little issue with this I have to work out, if a shader (or more) was marked 'unknown' after the QuickSave it will get thrown back into the 'equation' but won't actually be part of it, so it may throw it off ... already have a way to fix it I just have to implement it (forgot this last update ... oops)) 'Blind User Interface' Keys: Ctrl+Tab=Suspend AHK Script (beeps on suspend/resume) P = Pixel Shader V = Vertex Shader Y = Yes N = No U = Unknown Ctrl_Shift+E = Enable/Disable at 'Found' Menu ('double-beep') Ctrl+Shift+S = QuickSave or Search Again at Found/Not Found Menu Ctrl+Shift+L = QuickLoad Notes: Now it creates a 'ShaderSource' Folder from the shader Dump, cleans and formats CRCs, and works off of it, if you need to update the Dump for any reason you'll have to delete the ShaderSource folder for it to recreate it again from the Shader Dump. It's using the basic code outlined in the 'How To Guide' BUT you can use your own code, it looks for _InjectPixel.txt and/or _InjectVertex.txt if they exist it will use what ever code you put in there as the disable code ... pretty sick if I do say so myself. :)
Ever since bo3b first mentioned doing a binary search in the Helixmod thread, I've been toying with the idea of, and since toying with the process of creating a script that would do so ... it's been a long hard process going from a concept ... to something that works ... to something that works effectively and almost seemlessly with(in) the Helixmod. And since that point it's continued evolving, in thought, on paper, and in its code ... on almost a daily basis. There's still features and functions I want to implement but I also want to give the Helixmodding community a go at it as well, so keep in mind it's in it's early stages and technically this is a bit more than just a binary search engine and it's hopefully going to be a part of a bigger project I'm working on ...

What you need:
BinarySearchEngine: (Updated 12.02.13 auto-refresh)
https://www.dropbox.com/s/iq1pgyykhk9fsek/_BinarySearchEngine.exe

Latest Helix Mod Debug dll:
http://helixmod.wikispot.org/oldvers

Shader Dump:
run the game using the Debug dll with a DX9settings.ini with the following in it ...

[General]
DumpAll = True

Mana84's Shader Conversion Tool:(Optional, if you're using the Advanced Options to convert the presently found Vertex Shader, must be named renamed to _ShaderConverter.exe in order to work properly)
http://helixmod.blogspot.com/2013/05/vs11vs20-vs30-converter.html

What it is/what it does::
It's a CMD line script and an AHK script rolled into one. The AHK script sends keystrokes to the shell script while in-game, this script 'sorts' through Shader lots to find a single shader. Say you have 5000 Shaders, the first lot will disable 2500 Shaders, if it's disabled in that lot, it's halved again to 2500 or if it's not it switches to the other half and halves that lot to 1250 and so on until it narrows it down to 1.

How to use it:
First run the game with the Helixmod Debug and a DX9settings.ini with DumpAll set to true. This creates the Dump folder from which this works off of, now exit the game and run _BinarySearchEngine.exe from the directory the Dump folder is located in, it will unpack the AHK 'control' script and run it as well.

On the first run in a DIR you'll be prompted to "Start Binary Search on [P]ixel or [V]ertex Shaders".
(On later runs that weren't exited from the BSE menu (flagged files still exist) it will ask you whether or not to continue a search. Yes, continues, No, deletes temporary files and the ShaderOverride folder and starts a new search ... on runs with a ShaderOverride already present or that were exited from the BSE menu properly it will ask you if you want to set the Shaders to read-only so you can continue searching against other shaders while keeping the present ShaderOverride.)

I prefer to start the game while on the Pixel or Vertex choice menu because once P or V is chosen it will disable 1/2 of the Shaders, which can make it hard to traverse menus and such, just make sure to start BSE before running the game again ... and after dumping the shaders.

So start the game get to the point you want to search for say a HUD, press P or V while in game and the keystroke will be sent to the BSE via the AHK script. Wait for the beep signaling it's finished and then it will automatically refresh the Shaders in-game. (this can take a few seconds with 5000+ Shaders or happen almost instantly with 100s of Shaders ... it all depends on the size of the present lot.)

Now from here it's a matter or answering Y,N or U to whether the Shader was DISABLED in the lot, Yes, No, or Unknown ... more on Unknown later.

Say the Shader was DISABLED in the lot you press Y, wait for the beep and then for the Shaders to refresh ... and if it was still ENABLED press N and then wait, keep doing this until the Shader is either found or not found, when this happens you will hear 2 beeps after you pressed Y,N or U ... at this point pressing Y,N, or U will be accompanied by a shrill beep. From here you can either Alt-Tab out of the game to use the Advanced Options or Exit or you can start another search without leaving the games by pressing Ctrl+Shift+S (On other menus this is used to do a QuickSave ... crazy I know :) ... more on that later)

In the Advanced Options menu you can Enable or Disable the Shader, Convert the Shader using Mana84's Conversion Tool (It will open the file afterwards so you can remove any extra .s that might be present from the Conversion), Open the Shader to Edit, or Add a Comment to the Shader (Do that last because Enabling or Disabling the Shader will overwrite the Comment atm) and Exit back to the "Shader Found" Menu.

About answering Unknown (U) ... when disabling this many Shaders at once I've found that sometimes one of them might interfere with being able to see the game, freeze the game or some other unsightly thing. When this happens press U and all the Shaders will be dumped into a TMP file and the search will continue on the other Shaders and come back to those after, during this process if ever the last Shader is Unknown it will add a Comment of //Unknown to it and remove it from the equation.

About QuickSave and QuickLoad (Ctrl+Shift+S, Ctrl+Shift+L) ... At almost every Choice Menu you can Save or Load, a previous Save during the present search ... so if you hit a point and you're unsure just do a QuickSave and you be able to do a QuickLoad up until Found Menu. (There's a little issue with this I have to work out, if a shader (or more) was marked 'unknown' after the QuickSave it will get thrown back into the 'equation' but won't actually be part of it, so it may throw it off ... already have a way to fix it I just have to implement it (forgot this last update ... oops))

'Blind User Interface' Keys:
Ctrl+Tab=Suspend AHK Script (beeps on suspend/resume)
P = Pixel Shader
V = Vertex Shader
Y = Yes
N = No
U = Unknown
Ctrl_Shift+E = Enable/Disable at 'Found' Menu ('double-beep')
Ctrl+Shift+S = QuickSave or Search Again at Found/Not Found Menu
Ctrl+Shift+L = QuickLoad

Notes:
Now it creates a 'ShaderSource' Folder from the shader Dump, cleans and formats CRCs, and works off of it, if you need to update the Dump for any reason you'll have to delete the ShaderSource folder for it to recreate it again from the Shader Dump.

It's using the basic code outlined in the 'How To Guide' BUT you can use your own code, it looks for _InjectPixel.txt and/or _InjectVertex.txt if they exist it will use what ever code you put in there as the disable code ... pretty sick if I do say so myself. :)
#1
Posted 09/05/2013 01:37 AM   
Other utilities ... SingleShaders2Override: [s]https://www.amazon.com/clouddrive/share?s=CNt1aYi-R84nN3zfWlyq78[/s] [edit]moved/rewrote, it's now part of ShaderDump2Source(_sd2s_lite.bat)... topic:[url]https://forums.geforce.com/default/topic/610391/[/url] latest version:[url]https://forums.geforce.com/default/topic/610391/3d-vision/shaderdump2source-updateoverrideengine-updated-05-05-16-/post/4872628/#4872628[/url][/edit] [quote]I whipped up a little utility that takes all the work out of copy, pasting, renaming, etc. of dealing with the 'single' shaders when you manually dump them using the debug. You run it from the same location as the dll it searches for the 'Dumps' folder, gets the filenames from the 'SingleShaders' folder, fixes the filenames for use (removes extra characters and adds zeros if necessary), and then creates the ShaderOverride injecting the disable code all automatically. :)[/quote]
Other utilities ...

SingleShaders2Override:
https://www.amazon.com/clouddrive/share?s=CNt1aYi-R84nN3zfWlyq78

[edit]moved/rewrote, it's now part of ShaderDump2Source(_sd2s_lite.bat)...

topic:https://forums.geforce.com/default/topic/610391/

latest version:https://forums.geforce.com/default/topic/610391/3d-vision/shaderdump2source-updateoverrideengine-updated-05-05-16-/post/4872628/#4872628[/edit]

I whipped up a little utility that takes all the work out of copy, pasting, renaming, etc. of dealing with the 'single' shaders when you manually dump them using the debug. You run it from the same location as the dll it searches for the 'Dumps' folder, gets the filenames from the 'SingleShaders' folder, fixes the filenames for use (removes extra characters and adds zeros if necessary), and then creates the ShaderOverride injecting the disable code all automatically. :)
#2
Posted 09/05/2013 01:37 AM   
Wow. I've only tried this while attempting to fix L4D2's water, but that sounds like an incredibly useful tool, especially when there's a lot of shaders to work with. Really nice job.
Wow. I've only tried this while attempting to fix L4D2's water, but that sounds like an incredibly useful tool, especially when there's a lot of shaders to work with. Really nice job.

#3
Posted 09/05/2013 04:19 AM   
Thanks. I think it is and then some but I'm only starting to mess with 'fixing' things. I tried it on Viking: Battle for Asgard for the hell of it, I know there's already a fix, and found the sky Shader in well under a min ... maybe even under half a min ... with it. So far there's only one game that it (the newest version) didn't work with, coincidentally it's the first game I was making it on ... Mini Ninjas the game crashes when all the Shaders are in Override folder ... so the earlier version I was working on still works with Mini Ninjas but you can't refresh in-game with that one, which means you have to exit and restart the game between 'lots' ... I may go back and try to clean up that version also if need be.
Thanks. I think it is and then some but I'm only starting to mess with 'fixing' things. I tried it on Viking: Battle for Asgard for the hell of it, I know there's already a fix, and found the sky Shader in well under a min ... maybe even under half a min ... with it. So far there's only one game that it (the newest version) didn't work with, coincidentally it's the first game I was making it on ... Mini Ninjas the game crashes when all the Shaders are in Override folder ... so the earlier version I was working on still works with Mini Ninjas but you can't refresh in-game with that one, which means you have to exit and restart the game between 'lots' ... I may go back and try to clean up that version also if need be.
#4
Posted 09/05/2013 01:10 PM   
Nice work, it sounds like this will be what was needed to find that odd elusive shader that's not playing nice.
Nice work, it sounds like this will be what was needed to find that odd elusive shader that's not playing nice.

#5
Posted 09/05/2013 01:50 PM   
Thanks, it'll find just about anything ... although it helps to know what you're looking for in the first place, be it Pixel Shader or Vertex Shader and how it/they behave/s when disabled. I was just messing around with Viking but I able to get it to the point where Skarin was completely gone/disabled in no time, of course this affected other models in the game but it was a fun lil experiment nonetheless. And when you're done and exit it properly all that's left is a folder with all the found Shaders, 'Unknown' & Found ... eventually I want to add the function to 'finalize' the Override, removing the Unknown Shaders and automatically, or as close to automatic as seems appropriate, zip up the ShaderOverride for release.
Thanks, it'll find just about anything ... although it helps to know what you're looking for in the first place, be it Pixel Shader or Vertex Shader and how it/they behave/s when disabled. I was just messing around with Viking but I able to get it to the point where Skarin was completely gone/disabled in no time, of course this affected other models in the game but it was a fun lil experiment nonetheless.

And when you're done and exit it properly all that's left is a folder with all the found Shaders, 'Unknown' & Found ... eventually I want to add the function to 'finalize' the Override, removing the Unknown Shaders and automatically, or as close to automatic as seems appropriate, zip up the ShaderOverride for release.
#6
Posted 09/05/2013 04:39 PM   
This is awesome! Trying to find shaders in a large game is impossibly time consuming. When next I'm hunting shaders, I will definitely give this a try. Did you find it to have any problems for shaders that might impact the whole screen? I had spoken with Chiri about this, and he was concerned that you might lose track of the shader you are interested in, if a whole screen shader was blacked out as well.
This is awesome! Trying to find shaders in a large game is impossibly time consuming. When next I'm hunting shaders, I will definitely give this a try.

Did you find it to have any problems for shaders that might impact the whole screen? I had spoken with Chiri about this, and he was concerned that you might lose track of the shader you are interested in, if a whole screen shader was blacked out as well.

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

#7
Posted 09/07/2013 07:23 AM   
Thanks bo3b, if it wasn't for reading your comments in the Helixmod thread I wouldn't have even started messing around with the Binary Search part of this and I probably wouldn't have even thought to add a way for the user to use their own 'disable' code (_InjectVertex.txt and/or _InjectPixel.txt). I've messed around with most of the other 'parts' on some level before but let's face it without the Binary Search they alone wouldn't have been nearly as impressive. Lol. :) That might be the 'Unknown' Shader(s) I was talking about ... the Shaders that 'block your view' when disabled, like I said it helps to know 'what' you're looking for. Unfortunately at this point I don't know enough about the process and the Shaders so I'm just going by what I either think or what I figure out along the way. As it stands now when you choose U(nknown) it dumps the lot the Unknown Shader was in(or adds to it) and then switches to 1/2 of the other lot, this is more efficient if the Shader you're looking for wasn't with the Unknown Shader but not if it was with or was actually the Shader, that said if you never actually find the Shader by choosing Y(es) you most likely will have found and 'marked' it as Unknown. It takes a bit longer but as long as you make the right choice(s) every time it will find them, mark them as Unknown and take them out of the equation if you're looking for other Shaders ... in it's state right now this will effectively find(enable,disable,convert,open, and comment) [u]multiple[/u] Shaders using a(or multiple) binary search(es) and when exited through the Menu leave you with a folder with just the Shaders you found and the Unknown Shaders. This is in it's early stages, there's lots of other things I'd like to and am currently working on adding in but any feedback would be greatly appreciated, if you think it should do a certain thing or work a certain way don't hesitate to let me know ... I'm working on adding a few things, a 'keyword' search on the Shaders, 'auto' packing the finished ShaderOverride with 7zip, etc. when I get more time, like I said this is just one part of a bigger project that I hope the community will find useful.
Thanks bo3b, if it wasn't for reading your comments in the Helixmod thread I wouldn't have even started messing around with the Binary Search part of this and I probably wouldn't have even thought to add a way for the user to use their own 'disable' code (_InjectVertex.txt and/or _InjectPixel.txt). I've messed around with most of the other 'parts' on some level before but let's face it without the Binary Search they alone wouldn't have been nearly as impressive. Lol. :)

That might be the 'Unknown' Shader(s) I was talking about ... the Shaders that 'block your view' when disabled, like I said it helps to know 'what' you're looking for. Unfortunately at this point I don't know enough about the process and the Shaders so I'm just going by what I either think or what I figure out along the way.

As it stands now when you choose U(nknown) it dumps the lot the Unknown Shader was in(or adds to it) and then switches to 1/2 of the other lot, this is more efficient if the Shader you're looking for wasn't with the Unknown Shader but not if it was with or was actually the Shader, that said if you never actually find the Shader by choosing Y(es) you most likely will have found and 'marked' it as Unknown. It takes a bit longer but as long as you make the right choice(s) every time it will find them, mark them as Unknown and take them out of the equation if you're looking for other Shaders ... in it's state right now this will effectively find(enable,disable,convert,open, and comment) multiple Shaders using a(or multiple) binary search(es) and when exited through the Menu leave you with a folder with just the Shaders you found and the Unknown Shaders.

This is in it's early stages, there's lots of other things I'd like to and am currently working on adding in but any feedback would be greatly appreciated, if you think it should do a certain thing or work a certain way don't hesitate to let me know ... I'm working on adding a few things, a 'keyword' search on the Shaders, 'auto' packing the finished ShaderOverride with 7zip, etc. when I get more time, like I said this is just one part of a bigger project that I hope the community will find useful.
#8
Posted 09/07/2013 02:32 PM   
[quote="TsaebehT"]I'm just going by what I either think or what I figure out along the way. This is in it's early stages, there's lots of other things I'd like to and am currently working on adding in but any feedback would be greatly appreciated, if you think it should do a certain thing or work a certain way don't hesitate to let me know ... I'm working on adding a few things, a 'keyword' search on the Shaders, 'auto' packing the finished ShaderOverride with 7zip, etc. when I get more time, like I said this is just one part of a bigger project that I hope the community will find useful.[/quote] Pretty impressive imo. It's too bad all of these great minds we have in these forums do not live in the same neighborhood. I'd imagine a lot could be accomplished with a few pizzas and some cold ones. Or warm ones, depending on your countries preference.
TsaebehT said:I'm just going by what I either think or what I figure out along the way.


This is in it's early stages, there's lots of other things I'd like to and am currently working on adding in but any feedback would be greatly appreciated, if you think it should do a certain thing or work a certain way don't hesitate to let me know ... I'm working on adding a few things, a 'keyword' search on the Shaders, 'auto' packing the finished ShaderOverride with 7zip, etc. when I get more time, like I said this is just one part of a bigger project that I hope the community will find useful.


Pretty impressive imo. It's too bad all of these great minds we have in these forums do not live in the same neighborhood. I'd imagine a lot could be accomplished with a few pizzas and some cold ones. Or warm ones, depending on your countries preference.

#9
Posted 09/08/2013 06:14 PM   
I ran into an issue with the latest Debug dll (130906 - 2013/09/06) that wasn't present in the one I was using when working on this (130305), when using DumpAll with the latest dll it dumps Pixel Shaders in the CRC32_3A7E9FDB_48.txt format and Vertex Shaders in the 1D20536A.txt format. So I wrote another utility to rename/fix the filenames to the necessary 1D20536A.txt format for use with this. [url]https://forums.geforce.com/default/topic/610391/3d-vision/cleancrcsengine-shader-file-renamer-/[/url] edit: [s]I'm close to finishing up a release that fixes a few things and adds some other stuff so I took down the link until I finish it ... so far I've fixed a bug where you'd have to choose Yes twice instead of once to the found Shader, added the CRC fix directly to BSE, cleaned up/streamlined a lot of the functions, added the ability to enable/disable the Shader at the found menu as well adding a comment, and a few other minor tweaks here and there.[/s] edit: Updated to the latest version ... instead of renaming the DX9Settings.ini, or even bothering to set DumpAll to false ... I just have it create a 'ShaderSource' copy of the Dump, fix and format the CRCs and then work off of that instead of the Dump ... there may be an issue with the QS/QL if Unknown Shaders are found after doing a QS, I already thought of a way to fix this I just have to write it in.
I ran into an issue with the latest Debug dll (130906 - 2013/09/06) that wasn't present in the one I was using when working on this (130305), when using DumpAll with the latest dll it dumps Pixel Shaders in the CRC32_3A7E9FDB_48.txt format and Vertex Shaders in the 1D20536A.txt format. So I wrote another utility to rename/fix the filenames to the necessary 1D20536A.txt format for use with this.

https://forums.geforce.com/default/topic/610391/3d-vision/cleancrcsengine-shader-file-renamer-/

edit:
I'm close to finishing up a release that fixes a few things and adds some other stuff so I took down the link until I finish it ... so far I've fixed a bug where you'd have to choose Yes twice instead of once to the found Shader, added the CRC fix directly to BSE, cleaned up/streamlined a lot of the functions, added the ability to enable/disable the Shader at the found menu as well adding a comment, and a few other minor tweaks here and there.

edit:
Updated to the latest version ... instead of renaming the DX9Settings.ini, or even bothering to set DumpAll to false ... I just have it create a 'ShaderSource' copy of the Dump, fix and format the CRCs and then work off of that instead of the Dump ... there may be an issue with the QS/QL if Unknown Shaders are found after doing a QS, I already thought of a way to fix this I just have to write it in.
#10
Posted 09/19/2013 12:58 PM   
Got a chance to try it out, and I really, really like the idea. But, I ran into a snag that I wanted to ask about. I don't have much experience with AHK, so I'm not sure if I'm doing something wrong. Trying it on the game The Ball. When I run against that game, I have to alt-tab out for each menu choice. It doesn't seem to pick up the keys while I'm in game. From your description it seems like you are expecting it to pick up the keys in-game. I saw that you also picked up the game for $1.49 (:->), so maybe give it a try and see if it is working for you. Thanks.
Got a chance to try it out, and I really, really like the idea.

But, I ran into a snag that I wanted to ask about. I don't have much experience with AHK, so I'm not sure if I'm doing something wrong.

Trying it on the game The Ball. When I run against that game, I have to alt-tab out for each menu choice. It doesn't seem to pick up the keys while I'm in game. From your description it seems like you are expecting it to pick up the keys in-game.

I saw that you also picked up the game for $1.49 (:->), so maybe give it a try and see if it is working for you. Thanks.

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

#11
Posted 11/24/2013 12:22 PM   
Coffee and installing ... :) I'll edit this post when I try it out, originally I had it lock out the keys so they wouldn't be sent to the games but then it wouldn't work at all with Bionic Commando ... kinda like it seems like it's doing with you. edit: Ugh, This is one of those games that puts the Dumps directory a few folders up ... I couldn't get a usable dump out of it using the latest dll, they were just folders with no files ... but the AHK script was working fine in-game, just there were no files copied so there was nothing to work off of but it was sending the keystrokes to the BSE and it was 'beeping back' in response ... the only other time I had an issue with the AHK script was when I had another Windows Explorer window open with the same title, BinarySearchEngine, it was sending the keystrokes to it instead. Can you check if the AHK script is working? The icon is in the task bar, should be a green 'H' or 'S' if it's suspended ... just hit Ctrl+Tab to toggle between the states, that should tell you if it's working or not, I think. I made and tested everything under a Win7 x64 environment, not sure if it matters or not. edit: I got it fully working, dumps and all, with the 3/13 release of the dll ... It's been awhile since I used it on that many Shaders, you really have to be patient with 5000+ Shaders :) ... that's why I put the 'beeps' in there ... so you know when it's done so you know when you can refresh, there were some 'unknown' ... 'unruly' or whatever you want to call them Shaders in there also, have to keep an eye out for them ... I usually move the view around a bit, at least, after every lot.
Coffee and installing ... :)

I'll edit this post when I try it out, originally I had it lock out the keys so they wouldn't be sent to the games but then it wouldn't work at all with Bionic Commando ... kinda like it seems like it's doing with you.

edit: Ugh, This is one of those games that puts the Dumps directory a few folders up ... I couldn't get a usable dump out of it using the latest dll, they were just folders with no files ... but the AHK script was working fine in-game, just there were no files copied so there was nothing to work off of but it was sending the keystrokes to the BSE and it was 'beeping back' in response ... the only other time I had an issue with the AHK script was when I had another Windows Explorer window open with the same title, BinarySearchEngine, it was sending the keystrokes to it instead.

Can you check if the AHK script is working? The icon is in the task bar, should be a green 'H' or 'S' if it's suspended ... just hit Ctrl+Tab to toggle between the states, that should tell you if it's working or not, I think.

I made and tested everything under a Win7 x64 environment, not sure if it matters or not.

edit: I got it fully working, dumps and all, with the 3/13 release of the dll ... It's been awhile since I used it on that many Shaders, you really have to be patient with 5000+ Shaders :) ... that's why I put the 'beeps' in there ... so you know when it's done so you know when you can refresh, there were some 'unknown' ... 'unruly' or whatever you want to call them Shaders in there also, have to keep an eye out for them ... I usually move the view around a bit, at least, after every lot.
#12
Posted 11/24/2013 01:54 PM   
OK, good, glad to know it can work here. I'm pretty much using the same setup. Win7 x64. 3/13 debug DLL. It was definitely doing the sort and replace function when I was switching out, I could see the screen change each time. AHK seemed to be running correctly, I saw it in the tray with H no S when I'd alt-tab out of game. I also would hear the beeps, when I'd switch out, hit Y/N and switch back. I put BSE into the "C:\Program Files (x86)\Steam\SteamApps\common\The Ball\Binaries\Win32" directory, where TheBall.exe and Dumps are. ShaderOverride and ShaderSource both show up there. I think sending U, Y, N to the game is probably OK, and I can remap them out of the way in any case. Pretty sure they don't do anything in game. So having it locked out is unnecessary I think. I do see the Dumps folder two levels up, but it's empty there. The one at Win32 is full of shaders. Anything else to try? Thanks. (Possibly related: in my DX9Settings.ini, I have GetCurDirAtLoad=true) Edit: See AHK with H in tray, looking at menu seems like it is working. Ctrl-Tab makes him suspend, but does not un-suspend. Possibly of note, I have two monitors connected.
OK, good, glad to know it can work here.

I'm pretty much using the same setup. Win7 x64. 3/13 debug DLL.

It was definitely doing the sort and replace function when I was switching out, I could see the screen change each time. AHK seemed to be running correctly, I saw it in the tray with H no S when I'd alt-tab out of game. I also would hear the beeps, when I'd switch out, hit Y/N and switch back.

I put BSE into the "C:\Program Files (x86)\Steam\SteamApps\common\The Ball\Binaries\Win32" directory, where TheBall.exe and Dumps are. ShaderOverride and ShaderSource both show up there.


I think sending U, Y, N to the game is probably OK, and I can remap them out of the way in any case. Pretty sure they don't do anything in game. So having it locked out is unnecessary I think. I do see the Dumps folder two levels up, but it's empty there. The one at Win32 is full of shaders.

Anything else to try? Thanks.

(Possibly related: in my DX9Settings.ini, I have GetCurDirAtLoad=true)

Edit: See AHK with H in tray, looking at menu seems like it is working. Ctrl-Tab makes him suspend, but does not un-suspend.

Possibly of note, I have two monitors connected.

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

#13
Posted 11/25/2013 12:08 AM   
OK, more things I tried. Not a two monitor problem, I disabled one, and same. AHK is in the tray, and has an H. When I'm in-game, if I hit Ctrl-Tab, I don't hear a beep, but if I alt-tab out right then, I see AHK has gone to S for suspended. Main BSE window is titled: "Administrator: BinarySearchEngine" in case that is not right. When I'm in Explorer, at the Win32 window, both BSE and AHK setup, and press P or V, the event goes to the front window, and not to BSE. If BSE is on top, V works to go to next menu. Not sure. Seems like AHK is not forwarding events to BSE. Edit: Found it. With UAC set to zero, my CMD windows open as Administrator: windows. The name is thus wrong, and AHK can't find the window to send events to. UAC level 1 makes it work. (I turn UAC off, because when programming it's a real nuisance.)
OK, more things I tried. Not a two monitor problem, I disabled one, and same.

AHK is in the tray, and has an H. When I'm in-game, if I hit Ctrl-Tab, I don't hear a beep, but if I alt-tab out right then, I see AHK has gone to S for suspended.

Main BSE window is titled: "Administrator: BinarySearchEngine" in case that is not right.

When I'm in Explorer, at the Win32 window, both BSE and AHK setup, and press P or V, the event goes to the front window, and not to BSE. If BSE is on top, V works to go to next menu.


Not sure. Seems like AHK is not forwarding events to BSE.

Edit: Found it. With UAC set to zero, my CMD windows open as Administrator: windows. The name is thus wrong, and AHK can't find the window to send events to. UAC level 1 makes it work.

(I turn UAC off, because when programming it's a real nuisance.)

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

#14
Posted 11/25/2013 03:06 AM   
Glad you got it working, good catch btw ... I think I can fix the AHK script by adding an IfWinExist / IfWinNotExist using the title Administrator: BinarySearchEngine so you don't have to change any settings, I just hope that's the only variant and there aren't others like 'User: BinarySearchEngine'. There's a setting to change the SetTitleMatchMode but as far as I can see the modes are either match the beginning, match anywhere, or match exact ... and we'd need a match end ... I know rambling, I'll see what I can do. :) I've been working on another utility, an 'Override Analysis Engine' it's a utility I wanted to make to compare an already made ShaderOverride to the original Source Shaders to see how it was fixed and in turn hopefully learn something from it. It works off a Dump/ShaderSource and a ShaderOverride, and at first it opened them, with a slight delay between them, so you can see them side by side. Then I came up with a way to use Notepad++ as the way of opening them, if it's installed it creates and opens a session with the Source Shader in the left pane and the Fixed Shader in the right one, I also have it scan the DX9Settings.ini, if it exists, for the Shaders CRC and if it finds it, it also opens that as well. Originally it was going to be a read only thing but I'm currently working on a way to use it in-game so you can see the Shader Disabled, Enabled, or Fixed in-game ... so you can 'find' them if you don't know what you're actually looking for ... wasn't even thinking about it last night, would have worked perfectly to find which Shader also disabled that lava! :) edit: Updated the AHK script with an IfWinNotExist to change the SetTitleMatchMode to the 'match anywhere' in title setting, since it's run directly from BSE it should find it, last window used with 'BinarySearchEngine' in the name should be the first window found. I'm tweaking a few other things on BSE atm, so for now here's a link for just the AHK script. You can set the file attributes to read-only so BSE won't be able to delete it when it exits. This update is only necessary for anyone having the same issue that bo3b was, where the AHK script wasn't sending the keystrokes to it properly. [s][url]https://www.dropbox.com/s/quui4x5agbu0qm2/_BinarySearchEngineAHK.exe[/url][/s]
Glad you got it working, good catch btw ... I think I can fix the AHK script by adding an IfWinExist / IfWinNotExist using the title Administrator: BinarySearchEngine so you don't have to change any settings, I just hope that's the only variant and there aren't others like 'User: BinarySearchEngine'. There's a setting to change the SetTitleMatchMode but as far as I can see the modes are either match the beginning, match anywhere, or match exact ... and we'd need a match end ... I know rambling, I'll see what I can do. :)

I've been working on another utility, an 'Override Analysis Engine' it's a utility I wanted to make to compare an already made ShaderOverride to the original Source Shaders to see how it was fixed and in turn hopefully learn something from it. It works off a Dump/ShaderSource and a ShaderOverride, and at first it opened them, with a slight delay between them, so you can see them side by side. Then I came up with a way to use Notepad++ as the way of opening them, if it's installed it creates and opens a session with the Source Shader in the left pane and the Fixed Shader in the right one, I also have it scan the DX9Settings.ini, if it exists, for the Shaders CRC and if it finds it, it also opens that as well.

Originally it was going to be a read only thing but I'm currently working on a way to use it in-game so you can see the Shader Disabled, Enabled, or Fixed in-game ... so you can 'find' them if you don't know what you're actually looking for ... wasn't even thinking about it last night, would have worked perfectly to find which Shader also disabled that lava! :)

edit:
Updated the AHK script with an IfWinNotExist to change the SetTitleMatchMode to the 'match anywhere' in title setting, since it's run directly from BSE it should find it, last window used with 'BinarySearchEngine' in the name should be the first window found. I'm tweaking a few other things on BSE atm, so for now here's a link for just the AHK script. You can set the file attributes to read-only so BSE won't be able to delete it when it exits. This update is only necessary for anyone having the same issue that bo3b was, where the AHK script wasn't sending the keystrokes to it properly.

https://www.dropbox.com/s/quui4x5agbu0qm2/_BinarySearchEngineAHK.exe
#15
Posted 11/25/2013 03:05 PM   
  1 / 2    
Scroll To Top