Some time ago I realised, that to make the screenshots to go in separated folder will be very easy.
You know, the screenshots are written in the main directory, between the other files.
I have two variants for that.
Will put this here, until update my TychoSh3Patch.
So, I open sh3.exe with HexEditor and use search for text - ".bmp", and found this string: "SH3Img@%u-%u-%u_%u.%u.%u_%u.bmp"
It is in rdata section, and must be used somewhere in the code section, by it address.
I look the address of the first byte, and I go in beginning of the file and use search for hex value: ecda5100
And found it here:
I see that it is pushed there, but let's look the disassembled code for more explicit view.
I take the address for the previous byte "68" and go there in the disassembled code:
So, I see that the string is pushed, then something else is pushed, and then have call for function that will use this pushes.
Further research shows that this function is: MSVCR71.DLL!sprintf
Looking further, how this function is used in other places in the code, I see that there is no problem the string to be pointed with location.
The conclusion is that, I can very easy make the game to write the screenshots in separate folder, with change of only one byte.
I go back to the string and change this byte (address: 0011DAF2) from 40 to 5C, from @ to \
For use with TychoSh3Patch:
I go in the main game directory and I create a new folder named exactly
SH3Img.
Now, the screenshot will be written to the "SH3Img" folder, but the screenshot will not have this prefix:
SH3Img@date_hour.minutes...bmp,
but will start directly with the date, for example: 17-10-2018_18.35.42_681.bmp
But, for me is more satisfactory the folder to be named "Screenshots", so I make something else.
I see that to the end of the rdata section have some free space. So, I write there:
Screenshots\SH3Img@%u-%u-%u_%u.%u.%u_%u.bmp
Then, I take the address of the first byte: 0013A100, I go to where the string is pushed (00001A4E) and change the bytes there, from: ECDA5100 to 00A15300.
For use with TychoSh3Patch:
I go in the main game directory and I create a new folder named exactly
Screenshots.
Now, the screenshot will be written to the "Screenshots" folder.