Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Found, I think, the final preshader opcodes.
I wrote a goofy program to edit a file, run it through fxc.exe /dumpbin, and diff the results to automate the search. #include <stdio.h> #include <stdlib.h> #define FNAME "test.fxc" #define OFFSET 7804 #define STARTVAL 0xA000 int main(void) { system("./fxc.exe /nologo /Tfx_2_0 /dumpbin " FNAME " >dump.txt"); int i = STARTVAL; for (i = STARTVAL; i < STARTVAL+0x100; i += 0x10) { FILE *io = fopen(FNAME, "r+b"); if (io == NULL) return 1; fseek(io, OFFSET, SEEK_SET); const unsigned short y = 0x0001; fwrite(&y, sizeof (y), 1, io); const unsigned short x = (unsigned short) i; fwrite(&x, sizeof (x), 1, io); fflush(io); fclose(io); system("./fxc.exe /nologo /Tfx_2_0 /dumpbin " FNAME " >dump2.txt"); fprintf(stderr, "0x%X ... \n", i); system("diff -u dump.txt dump2.txt 1>&2"); } return 0; }
- Loading branch information
Showing
3 changed files
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters