Thief 1/2 & SShock 2: DDFix and Enhanced Resolution Patch - discussion - by bikerdude
Timeslip on 1/4/2008 at 08:20
1.2.7 is up. Hopefully it'll fix the crash on exit problem. The GUI also recognises thief.exe now, so there's no need to rename it when playing thief 1.
Hiatus on 1/4/2008 at 08:31
Timeslip
thank you for the new version of ddfix :)
Quote Posted by Timeslip
I'm going to give up on it unless I find a way to link the mipmaps together by tomorrow.
please don't give up on this too soon/easily - as it's very important for Thief/SS2 community to open up the possibility of using hi-res/32-bit
world textures (I don't have to say of the implications of this ;)). Fingers crossed you find the solution to mipmap problem. And what do you mean by "thief handles all mipmaps manually" - that it does not use DirectX for this or sth else?
satanfripp on 1/4/2008 at 10:44
Great work Timeslip:thumb:
inselaffe on 1/4/2008 at 14:18
Quote Posted by sNeaksieGarrett
Oh, sorry.:o Fixed.
@ Simplex:
Odd, thief will run in 1280x1024, but not a LOWER resolution of 1280 x 800. :confused:
I tried 1280x1024, but it made the game lag
Hmm 1280*1024 works fine for me and my computer is quite old - what kind of lag do you mean? Weird.
Timeslip on 1/4/2008 at 17:09
I've got it working. :D
I just need to add something to the GUI to let it modify pcx's to tell ddfix that the texture has been replaced, and then I can release. Should be done in a couple of hours.
Edit: (
http://timeslip.chorrol.com/temp/ddfixBeta.7z) done. New textures need to be in A8R8G8B8 format. Only .pcx's at least 16x16 in size can be replaced. New textures go in \res\ddfix so that they don't get in the way of anything else. The alpha channel is ignored for the moment. Because of the way thief handles mipmaps, replacing a texture with something of much higher dimensions will result in aliasing.
Edit2: Quick and mostly pointless (
http://img358.imageshack.us/img358/3102/83184637hg2.png) screenshot. (700k, because compressing it to jpg would kinda have defeated the point. :p)
Quote Posted by Hiatus
And what do you mean by "thief handles all mipmaps manually" - that it does not use DirectX for this or sth else?
Normally, all mipmaps are contained in a single texture interface, and when the texture is used the graphics driver itself decides on which mipmap to use depending on the distance of the pixel. (In fact, it generally does a linear interpolation between two, so you don't get a sudden switchover where the level changes.) Thief uses a separate interface for each texture, and doesn't do anything that would let me match them up like blting from one to the next down the whole chain, or even creating them all at the same time.
Luckly I found a bit of the level loading code that does the initial file loading that I could hijack. Unfortunately, this mean that the new textures get stuck in system memory. (They do get cleared from video mem correctly, at least,)
Also:
Quote Posted by Hiatus
...as it's very important for Thief/SS2 community...
Since it's dependent on the location of some code in the thief 2 exe, it's not going to work with SS2 or thief 1.
Hiatus on 1/4/2008 at 17:41
Timeslip
great news you got it working :)! Too bad I don't have .NET Framework installed ATM, so can't test this new GUI really (maybe will install the framework later, but I generally hate installing it). Which .dll's from .NET are needed to get GUI running (will mscoree.dll alone put in same dir suffice)?
Quote:
Unfortunately, this mean that the new textures get stuck in system memory. (They do get cleared from video mem correctly, at least,)
may it have any performance/stability implications (that textures get stuck in sys mem)? No way to purge them from there after thet get copied to vid mem (I presume) and are not needed any more? Am I right to think they get purged from sys mem on T2 exit (or level change)?
Quote:
Since it's dependent on the location of some code in the thief 2 exe, it's not going to work with SS2 or thief 1.
how can we help you to make it work with T1/TG/SS2 :p? You got T1 copy but no SS2/TG AFAIR. I assume you would need whole games installed, not merely .exe's from them?
EDIT: mscoree.dll put in same dir does NOT suffice :( - will have to install whole framework (will 2.0 SP1 be ok?).
Timeslip on 1/4/2008 at 18:01
Quote Posted by Hiatus
great news you got it working :)! Too bad I don't have .NET Framework installed ATM, so can't test this new GUI really (maybe will install the framework later, but I generally hate installing it). Which .dll's from .NET are needed to get GUI running (will mscoree.dll alone put in same dir suffice)?
I've never known a .NET program to run with just mscoree. If you want to try it, ddfixgui also uses System.dll, System.Drawing.dll and System.Windows.Forms.dll. If you don't want to install .NET you'd be better off with (
http://www.mono-project.com/Main_Page) mono than trying to do some sort of manual job.
Edit: Yes, v2.0 will do. That's what I compiled against, so that or anything newer will work.
If you can spare some time with a hex editor, you can do it manually. Open up the .pcx you want to modify, and starting from byte 128 replace the contents with 1,2,3,4,1,2,3,4,38, [the numbers from 1 to 37],4,4,6,9,38, then the string of the replacement file path without the \res\ddfix\ or .pcx bits. (replace each letter with it's position in the alphebet, '\' becomes 27 and the numbers 0 to 9 are 38 to 37. Then add a 38 on the end.
Quote Posted by Hiatus
may it have any performance/stability implications (that textures get stuck in sys mem)? No way to purge them from there after thet get copied to vid mem (I presume) and are not needed any more? Am I right to think they get purged from sys mem on T2 exit (or level change)?
Only stability implications would be if your ram completely filled up. Textures stay in system mem until T2 is quit, when really they should be cleared at the end of each level. If memory usage really gets to be a problem, you might need to quit and restart the game at the end of each level before starting the next. (To get that bad on my system, you'd need around 1500 textures each 512x512 in size. On a computer the same age as thief, it might be a bit more of a problem.)
Quote Posted by Hiatus
how can we help you to make it work with T1/TG/SS2 :-P? You got T1 copy but no SS2/TG AFAIR. I assume you would need whole games installed, not merely .exe's from them?
Anyone who knows their way around ida could presumably find the equivelents of the bits that I've hooked in the other exes.
Hiatus on 1/4/2008 at 18:08
when I try to run ddfixGUI.exe in T2 dir, I get: "Error. ddfix doesn't seem to be installed properly" and it exits. I got ddfix.dll and ddfix.ini in place.
EDIT: ok now, missed ddfixGUI.dll :p.
EDIT2: noticed small/cosmetic omission in beta ddfixGUI.exe - it does not add this line to ddfix.ini it generates (this line you added in 1.27 I think):
;Thief 2 players with corrupted in game text should use '2' and '0x0000'
also, GUI adds an empty line at the end of ddfix.ini whereas the file you ship in manual version does not have it (another cosmetic issue but files: generated by GUI/shipped are not identical this way).
Timeslip on 1/4/2008 at 18:12
Quote Posted by Hiatus
when I try to run ddfixGUI.exe in T2 dir, I get: "Error. ddfix doesn't seem to be installed properly" and it exits. I got ddfix.dll and ddfix.ini in place.
Ah. Sorry, I forgot to include another file that the GUI uses but isn't needed for the manual version. I've reuploaded it with the missing file. (And also the default ddfix.ini, in case anyone is downloading without having ussed ddfix at all already.)
Edit: You spotted it before I did. :erg:
Hiatus on 1/4/2008 at 18:26
Quote:
starting from byte 128
you mean offset 80 (right after all these 00 00's)?
could you explain what changing these bytes do?
EDIT: I don't get it: in 'new file path' I enter blabla, GUI says: <thief2_full_path>\res\ddfix\blabla.tga does not exist. Continue anyway? why .tga? Then I point it to some .pcx, it patches it (says done), and pcx gets destroyed (contents). What's going on? What .tga should I have - is it hi-res replacement for patched .pcx? Btw, terrain/world texture .pcx's are stored in fam.crf (renamed .zip) in \res, not standalone files AFAIK.
EDIT2: got to re-read your previous posts *carefully* to understand the whole thing properly - it's not that easy :p...