PDA

View Full Version : How to make Thief 1 run on a modern computer



Peter_Smith
13th Apr 2008, 19:17
EDIT again
=======

The latest version of TFix, which modifies the Thief TDP or Gold installation, may be found here:
http://www.ttlg.com/forums/showthread.php?t=134733

========
Previous Edit
========

The instructions described below were developed several years ago. These steps still work, but a much easier method, which achieves better results, is to use a user-developed program called TFix, which is described on page 2 of this thread. TFix takes care of all the problems with video, audio, multiple cores, and wide screen in one installation. You start with a fresh install of T1, run TFix, change a few configuration settings to your liking, and that is it. Further details are given on page 2. Enjoy.

Thanks to John Curran for pointing this out and providing detailed information on his web site, http://www.johnanthonycurran.com/thief.html.

=====================
Obsolete instructions below
=====================

The purpose of this thread is to list verified fixes that are necessary to make Thief 1 (The Dark Project or Gold) run on modern computers (Windows 2000 or later). Please do not use this thread to ask questions. Please start another thread for questions. If you find any errors in the following or suggested improvements, please post them here.

There are several things one generally has to do to get Thief 1 to work on a modern computer. Some depend on the type of video card you have, as noted below. Some depend on which version of the software you have.

1. Installation. Install using the normal method. A full install is recommended. Disk space is cheap these days, and you don't want to be reading files from the CD during the game.

2. Patch. Start Thief but do not start a mission (the main graphics). Escape to desktop using the Pause/Break key, and look at its icon in the task bar. If it displays a version number less than 1.33, it would be a good idea (but not necessary) to patch the installation to version 1.33, the final version of The Dark Project. Thief Gold is the final official release at 1.37, but if you do not have Gold already you cannot patch to Gold.
For original release versions, the patches can be found here:
http://www.thief-thecircle.com/media/patches/

If you have a re-released version, it may be already patched. If not, you need to get the patch from the software manufacturer, not the above link. It may be on your CD.

3. convict.osm. To get Thief 1 fan missions to run, you need to download the file convict.osm and place that file in your Thief install folder. A link to convict.osm is found in the above patches link.

4. Single processor. If you have dual or more CPUs, or if you have hyperthreading enabled, you must make Thief run on only one processor.

First test it with Process Manager. Start Thief but do not start a mission. Hit CTRL-ALT-DEL and select Process Manager. Select the Processes tab and scroll to find thief.exe. Right click on thief.exe, and set its affinity to one CPU. Then return to Thief (icon on task bar), start a mission, and play for a while. If it works, then make a backup of your EXE and make it permanent using imagecfg.
http://www.thief-thecircle.com/guides/hyperthreading/

5. Correct Nvidia driver. If you have an Nvidia video card, note that many Nvidia drivers cause an immediate crash to desktop the instant you start the main Thief graphics. You need to install one of a few drivers that are known to work with Thief 1. As of this writing, April 14, 2008, the following are known to work: 163.71, 163.75, and 169.21 WHQL.

6. safe_texture_manager bug. If you have an Nvidia video card and one of the original Thief releases, you will probably have a problem with the safe_texture_manager bug, with which you will see an error "Direct 3D Device does not accurately report texture memory usage". Unlike Thief 2 there is no line in USR.CFG to fix it. Instead, you must download a patched EXE in which this problem has already been fixed. See the section "Nvidia Driver 5x.xx Fixes" in the patches link, item 2 above.

If you have a re-release, particularly one stating that it stated to be compatible with XP, then the above patches will probably not work. If that is the case, and if you can't get past the safe_texture_manager bug, then your only solutions are to use an ATI video card or to ask for your money back from the software vendor.

7. DDFIX. After you get it working, consider installing the DDFIX patch for 32 bit rendering and no resolution switching with menus and books.
http://timeslip.chorrol.com/ddfix.html.

You will not see an obvious benefit in the rendering with Thief 1, but you can see that it is smoother if you make a screen copy and zoom closer. Its main benefit is to avoid the resolution switching.

I suggest that you try to make Thief run before applying DDFIX, because there may be other problems that need to be solved first. If you have issues making DDFIX work, there are probably solutions posted at TTLG:
http://www.ttlg.com/forums/showthread.php?t=117616

8. For some recent Nvidia cards (e.g., 8800 GT), you may have to install DDFIX before it will run.

Vista? There may be some additional things you need to do with Vista. I am not currently aware of them. Please respond with any additional fixes you find necessary and successful. I'll add useful ones to this initial post.

Re-released versions. There may be additional problems associated with re-released versions such as Sold-Out or Steam. I am not currently aware of these problems or how to fix them. Please post any additional fixes you know will work. My advice is to stick to the original release versions if you can find them.

Shadow Man
16th May 2008, 21:59
Thanks for the post. Helped me get Thief working again. Thanks

nni
19th Jun 2008, 20:13
read through this, i have some questions though. got thief gold, and i am installing it on a brand new vista system. i had it running fine (did the target altering and added the upgrades) thing is when i try the ddfix to get the enhanced graphics i get an error. it basically says DirectX 6 or higher is not installed and it will only run in windowed mode. i jsut wanted to know if anyone had a fix for this before i play it without it.

thanks!


edit, finally got it. but now videos wont work.

Peter_Smith
15th Jul 2008, 00:36
Perhaps this is a little late to do you any good, but Goldsla just posted some great stuff in the Thief 2 sticky thread (http://forums.eidosgames.com/showthread.php?p=771915#post771915) on how to make T2 work with 64 bit Vista. Getting the latest Indeo codecs to make movies play was part of it. The same advice may work with T1 / Gold as well.

Phantom914
18th Jul 2008, 00:54
My game crashes right when I start the game with the thieffixedgold, I have an nvidia geforce 6200, Single Core, Windows XP . Help me please :mad2:

goldsla
23rd Jul 2008, 22:35
My game crashes right when I start the game with the thieffixedgold, I have an nvidia geforce 6200, Single Core, Windows XP . Help me please :mad2:
I am definately no expert, and I am running vista, but this is what I did when thieffixedgold did not work for me:

1) I restored my original THIEF.exe from my saved copy
2) I installed imagecfg and patched the file to run only with a single CPU. See the single processor note, above. My batch file looks like:

imagecfg -u thief.exe
imagecfg -a 0x1 thief.exe
pause
3) I tried it out.
4) I installed the DDFIX patch for 32 bit rendering (see above) manually using hex editor NEO.
5) I tried it out.

That was all I needed. I don't know why thieffixedgold did not work, even after patching it for a single CPU. But it didn't. But imagecfg and DDFIX worked for my Thief Gold installation. If you don't have a multi-cpu problem, then this probably won't help. I am running 2 NVIDIA GeForce 8800 GTS 512 graphics cards with no problems. Good luck!

abiallan
31st Oct 2008, 17:06
hi dude....

thanks for those links and detailed information...

it ill b better if u summarized all those here...

bcoz some may missing in the links....

anyways thanks for it...

update regularly...

Stile451
21st Feb 2009, 14:39
If you can't get hardware/eax audio working you can follow the directions posted here (http://www.ttlg.com/forums/showthread.php?t=117175).

The a3d.dll found here (http://www.dll-files.com/dllindex/dll-files.shtml?a3d) worked for me. I only had software audio as an option before doing this(I have onboard audio by Realtek) but now it plays with hardware and EAX.

Captain_Blackblade
23rd Feb 2009, 04:31
Posted this in another thread, but was directed here.

I've been having this problem with Thief Gold...it starts up fine, I'm able to access the main menu and such, but when I try to start the game, it crashes. After I watch one of the intro cutscenes (With Training or Without, doesn't matter) and then click the 'Continue' button to start, the game flickers between my desktop and the game before it finally settles on a black screen. When I go to Task Manager, the game is 'Not Responding' and I'm forced to close it.

Vlad_Midnight suggested that the problem is in my processors, as I do have a dual core system. However, the game is already running in only one processor by default. After I use CTRL+ALT+DEL to check its affinity, it shows up as using 'CPU 0' only (My other choice is 'CPU 1').

What's the problem here? I've been looking forward to playing this game for days, and I can't get it to work...

Peter_Smith
23rd Feb 2009, 05:49
Please ask questions in a separate thread. This thread is for assembling information only. See the first sentence of the first post, marked in bold.

Cold0ne
15th Aug 2009, 06:59
Ok, without asking a question, how can I circumvent that. Ah, I know....

We need a more current list of compatible Nvidia drivers, I am on 180.xx version now, much newer than the last compatible one mentioned which is 169.21. Surely we don't want to go back many versions so all our newer games won't run at their best (Call of Juarez 2, Ghostbusters, Prototype, soon Wolfenstein, just to name a few). Whoever does these compatibility tests please check newer drivers and list which works, I really don't want to install 1 version at a time, backwards, until I find out which is the latest one that works. Especially when someone might already know, namely the person who figured out those previous 3 working ones listed above. Just need a link to his most current findings (I'm assuming Peter Smith was not the one who discovered those working versions, he just transcribed the text).

Peter_Smith
15th Aug 2009, 07:27
There are no compatibility testers. Eidos does not support this game anymore. We are Thief players just like you, or like you want to be. So far as I know, all modern drivers work with DDFIX.

As a matter of fact, Peter Smith did discover some drivers and went so far as to modify the INF file of one to make it work. Then he discovered an obscure Russian driver that worked. All by himself.

None of that is necessary anymore.

Cold0ne
15th Aug 2009, 10:06
Oh, I wasnt trying to dis you, actually I never meant official testers either, just the same guy who discovered that 163.21 works, etc. Actually I did find such a thread elsewhere online, relating to DDFix and newer drivers that work, and someone noted the latest 190.38 drivers work with DDfix. I tested, and it now works. My old driver was 180.XX and with DDfix it was giving me nothing but a black screen after I started a new game (engaging the actual 3D), and only way to end it was a manual shutdown (hold button 4 seconds), even pressing the power button didnt force windows to shut down and quit all applications, which usually works if a game is frozen in fullscreen mode. But anyhow yes, 190.38 is teh win, and DDfix is teh win :)

Oh yes, as well as DarkWidescreen, i was surprised to finally see a method for making old thief games proper widescreen. They recommend using FOV of 100%, I suggest choosing 90% when patching your EXE, it looks much close to the original Thief's "zoom" level. 100% feels zoomed out. Many old games modded for widescreen (such as AVP2) looked correct with 90 FOV than 100.

Anyhow the only problem left now is the water texture still moves faster than it should.

Cold0ne
15th Aug 2009, 10:33
One more note for anyone who might be having trouble running Thief on a new system. Before I attempted using any of the fix methods at the top of this thread, i tried running the Thief.exe and it crashed to desktop the moment I ran it. I have Thief Gold original CDs. Now the game should at least start up even if you haven't applied the CPU affinity fix (imagecfg), and get to the menu at least. I noticed the error message had a note "APP: lgvid.ax" so it was crashing because Indeo video codec wasnt working correctly to play the intro video.

Funny because I had already installed the codec from the Thief Gold cd (iv5play.exe). My Thief 2 CD included yet another version of the codec installer (IV5SETUP.EXE). Neither of these worked and the game still crashed on run.
What ended up working was the Indeo Codec v5.11 installer found online (Indeo_5.11.exe). Its the only one which seems to correctly install indeo codecs for Windows XP. Im assuming Vista should work too. After this, the game started up and the videos play correctly. The interesting thing about this crash is its not related at all to the video card, and unless you click on the error report for the crash you would have no idea it was being caused by missing video codecs.

bjd955
10th Nov 2009, 17:24
I'm running XP Home Edition with Nvidia Geforce 7600gs videocard. Here's what worked for me:

1. Patch the game to version 1.33
2. Download the texture error 1.33 nvidia 5xxx fix from http://www.thief-thecircle.com/media/patches/ - Don't forget to put the dowloaded 'thieffixed.exe' into the Thief game folder!
3. Leave compatibility mode unchecked. (None of the options worked for me).
4. Start the game, turn off hardware acceleration in the options menu and play the game in low resolution. The graphics are awful without hardware acceleration on, but the trick is to press escape while ingame, go to Video in the menu, turn on hardware acceleration (Hardware On) and then set resolution to 1024x768. Click Done and continue the game.
It should now be running properly with normal graphics.

The only drawback is you have to do this every time you run the game and reloading savegames may sometimes result in a crash.
This method may not work for everyone, but I can verify that it certainly does for me.

Good Luck!

Peter_Smith
11th Nov 2009, 01:54
bjd,

Those tricks with software and hardware rendering have been reported by others, but they do not always work. At one time, when adequate drivers were not available, I tried this out of desperation. I had it appear to work one time and then fail another. I ended up modifying the driver INF file instead. These tricks should not be necessary if all other steps listed in the first post are taken and recent drivers are in place. In particular, if you install DDFIX, everything should work fine and look better. DDFIX requires a pre-patched EXE that I think is available with a link at TTLG.

I'd like to know if you did everything in the list and it still failed. If so, then where did you get your Thief software?

bjd955
11th Nov 2009, 15:09
Hi Peter,

To answer your question, yes I did try all of those steps. I scoured the internet looking for a solution until I got it to work by experimentation using the method previously stated. I have the Sold Out version of Thief Dark Project which I installed from the .exe on the disk rather than the Sold Out interface. If it further helps, the nvidia drivers I am using for my Geforce 7600 gs are old, version (6.14.10) 9424 dated 19/04/2007. This is deliberate as I mainly run older games on this computer and newer drivers cause artifacting or graphic corruption on them.
I also have XP service pack 3 installed along with all O/S standard updates. If there is anything else you would like to know, I would be glad to help. I am now on level 6 of TDP and still playing!

Peter_Smith
11th Nov 2009, 18:01
I think that those old drivers are at fault, but I am surprised that DDFIX doesn't solve the problem. Have you tried that? Sold Out can also be a problem. Thief runs with new drivers and DDFIX, but that may cause problems with other games, as you say, which do not interface with DDFIX. I am afraid that you may be between a rock and a hard place. Glad you found a solution that works for you and maybe others who have the same issues.

On the other hand, there is hope for one more thing. I have some drivers that might work for you.

Around two years ago there was a period of time when Nvidia 7 series cards would not run Thief 1 at all because 6 series drivers were incompatible, and more recent drivers, at the time, caused Thief 1 to crash. That was when your software / hardware procedure became known. I modified some drivers myself by editing the INF file. That worked for a single video card, but it did not work for SLI. So then I did a search for SLI support, and I found some Russian hacked drivers, 84.56_mod2, that solved this problem for Thief 1 on 7 series cards. These drivers are further described here:

http://www.ttlg.com/forums/showthread.php?p=1620821

The key point is that 84.56_mod2 has a modified INF file that supports all 7 series cards, as far as I know. I think it would be worthwhile for you to try these and see if they work for both Thief 1 and your other older games. It is possible, but no guarantees.

Unfortunately, the link to the driver file no longer works. I have the file on my PC, but I was unable to attach it to this message -- some Eidos server error. I have uploaded a ZIP file to Rapidshare:

http://rapidshare.com/files/305588498/84.56_mod2.zip.html

I presume that you are familiar with how to safely revert to your older drivers if this does not work. If not, send me a PM.

bjd955
11th Nov 2009, 19:45
Hey thanks for the note about the drivers. What you say has struck a chord with me as I was experiencing many driver problems around 2 years ago shortly after I first bought the 7600 gs card.
I was getting a lot of corruption on games like Oblivion and Half Life 2 (those and Thief series are my favourite games) and every new driver release failed to address the problem, but I always knew that the newer nvidia drivers themselves were the cause as reverting to older ones cured it. In the end I bought an up-to-date pc running Vista to play newer games. Only Thief won't run on that.
Sometimes it is better to stick with drivers that you know to be good. I successfully downloaded the Russian drivers and I will try them and let you know how I get on. In the meantime, a thousand thanks for that!

mjb
27th Dec 2009, 02:05
Coldone or anyone - I am having this problem, do you know where I can get the exact Indeo_5.11.exe that you found? Online search has not turned up any that are downloadable and are the EXACT file you had success with.

Thanks - mb


One more note for anyone who might be having trouble running Thief on a new system. Before I attempted using any of the fix methods at the top of this thread, i tried running the Thief.exe and it crashed to desktop the moment I ran it. I have Thief Gold original CDs. Now the game should at least start up even if you haven't applied the CPU affinity fix (imagecfg), and get to the menu at least. I noticed the error message had a note "APP: lgvid.ax" so it was crashing because Indeo video codec wasnt working correctly to play the intro video.

Funny because I had already installed the codec from the Thief Gold cd (iv5play.exe). My Thief 2 CD included yet another version of the codec installer (IV5SETUP.EXE). Neither of these worked and the game still crashed on run.
What ended up working was the Indeo Codec v5.11 installer found online (Indeo_5.11.exe). Its the only one which seems to correctly install indeo codecs for Windows XP. Im assuming Vista should work too. After this, the game started up and the videos play correctly. The interesting thing about this crash is its not related at all to the video card, and unless you click on the error report for the crash you would have no idea it was being caused by missing video codecs.

goldsla
27th Dec 2009, 20:23
Try here (http://www.filewatcher.com/m/iv5setup.exe.2068266.0.0.html). I believe that any iv5setup should work for you.

kevycanavan
27th Jan 2010, 23:59
will these fixes work with windows 7
I have an Nvidia grapics card.

Not being able to raid Bafford's mansion is making me very sad :(

Peter_Smith
28th Jan 2010, 04:22
I haven't tested any of them on Windows 7, or Vista for that matter. Just XP Pro. I am just one user with one computer, not a technical support department. Do a search here for Windows 7. If it does not contain the information you need, try the Legacy Gaming Technical Help forum at TTLG. Good luck, and post back with any specific steps necessary to get it to run.

glaucobacchi
24th Sep 2010, 17:19
I run XP with Service Pack 2 and my Sold Out version of Thief TDP crashed each time it tried to play a movie. The error message mentioned LGVID.AX. I Patched to 1.33 and that failed similarly. I finally found that my problem was that I use FFDSHOW and this was somehow being invoked when movies were played. I used the FFDSHOW video decoder configuration panel and in the Direct Show Control section I added thief.exe to the text box where one can list programs for "Don't use ffdshow in:". Everything works fine now.

romeo2277
18th Apr 2011, 14:26
Many many thanks to PETER SMITH. i can now play thief gold on my pc( windows xp, core 2 duo processor) nicely.

Rockn-Roll
25th Nov 2011, 06:44
I am running Thief Gold on Windows 7 64-bit Professional SP1. My system is an Intel D580SO motherboard with an i7 Extreme x980 3.33Ghz CPU with 6GB of RAM and an nVidia GeForce GTX560 with the latest driver version 280.26. I'm using a Matrox Triple Head 2 Go with 3 widescreen monitors but unfortunately Thief TDP only runs full screen on one monitor and I haven't figured out how to get it to run windowed or a higher resolution than 1024x768, but at least it's running. One problem during installation is a message indicating that Thief cannot run on Windows NT due to a DirectX problem...and the other is the lack of privilege to make changes to the computer can cause installation to crash at some point. Here's the steps to solve these problems and get it running without any 3rd party software:

1. Insert Disk 1 (if autorun starts...just cancel out to desktop).
2. Click on Computer to open Windows Explorer and Right click on the disk and select Open.
3. Right click on the file named Setup.exe and select Create shortcut.
3a. Click Yes in popup message indicating to create it on the desktop.
3b. Close Windows Explorer.
4. Right click on the shortcut and select Properties.
4a. In the Target textbox at the end of "Setup.exe" add a space followed by "-LGNTFORCE" without the quotes. This bypasses the NT message and forces installation.
4b. Select the Compatibility tab and check Run this program as an administrator. This solves the lack of privilege problem.
4c. Click OK to save the changes.
5. Run the shortcut...installation should proceed normally...you will need to swap out the game disk (disk 2) and replace disk 1 before installation finishes properly...use the default installation folder to be safe. You can delete this shortcut after installation.
6. Browse to the installation folder and create a shortcut of the Thief executable...normally this will be "C:\ThiefG\THIEF.EXE".
6a. Right click on the executable and select Create shortcut...or hold the ALT key down and drag the shortcut icon to the desktop or where ever you want it to be.
6b. Right click on the shortcut and select Properties.
6c. Select the Compatibility tab and select Run this program as an administrator...again this solves any privilege problems.
6d. Click OK to save the changes.
7. Run the shortcut...click Yes to user account message.
8. Press CTRL-ALT-DEL and select Start Task Manager.
8a. Select the Processes tab.
8b. Click the button at the bottom which says Show processes from all users. If you don't do this then you will get a message Access Denied when attempting to set the Affinity.
8c. Right click on THIEF.EXE and select Set Affinity.
8d. Uncheck <All Processors> then check one of them, for example CPU 0.
8e. Click OK.
9. Close Task Manager and return to Thief.

I've only just started the first mission: Balfour's Manor...if I encounter any issues I'll post them here.

Peter_Smith
25th Nov 2011, 23:12
That looks like a good list, Rockn-Roll. I'm glad to add some W7 experience here. I would add one thing. Once you get it to work this way, make a backup of the EXE and then use imagecfg to make the affinity change permanent. Details are in the first post. You may have to open the CMD window as administrator to make it happen.

Rockn-Roll
26th Nov 2011, 06:19
That looks like a good list, Rockn-Roll. I'm glad to add some W7 experience here. I would add one thing. Once you get it to work this way, make a backup of the EXE and then use imagecfg to make the affinity change permanent. Details are in the first post. You may have to open the CMD window as administrator to make it happen.

Yeah...I hope it helps someone. Your suggestion to make it permanent is a good idea. However, I don't use any 3rd party software on my computers if there is any way possible to avoid it. I never know exactly what the 3rd party software is doing and I also use the same computer for software development so it needs to be clean. I built my own application instead which sets the affinity of any application to a single processor. Just to show you I'm being nice I'm publishing the code...it was just a few hours of work hunting down the proper functions. If anyone wants to create their own app then Start Up Visual Studio.net (I think any version will work OK) and create a C++ Console Application then replace the contents of the .cpp file with the following:



#include "stdafx.h"
#include <Windows.h>
#include <stdio.h>
#include <conio.h>

int _tmain(int argc, _TCHAR* argv[])
{
char c;
BOOL returnValue;

STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
DWORD_PTR CurrentProcessor;
DWORD_PTR ProcessorAffinity;
DWORD ReturnFromWait;

DWORD ErrorCode;
LPTSTR lpBuffer;

printf("Creating Process for %S\n", argv[1]);
returnValue=CreateProcess(NULL,argv[1],NULL,NULL,FALSE,0,NULL,NULL,&si,&pi);
if(returnValue)
{
CurrentProcessor=GetCurrentProcessorNumber();
ProcessorAffinity=1;
ProcessorAffinity=ProcessorAffinity << CurrentProcessor;
ReturnFromWait=WaitForInputIdle(pi.hProcess,60000);

//Get a list of all the processes in this job.
JOBOBJECT_BASIC_PROCESS_ID_LIST* ProcessesInJob;
ProcessesInJob=(JOBOBJECT_BASIC_PROCESS_ID_LIST*)LocalAlloc(LPTR,sizeof(JOBOBJECT_BASIC_PROCESS_ID_LIST)+sizeof(ULONG)*100);
returnValue=QueryInformationJobObject(NULL,JobObjectBasicProcessIdList,ProcessesInJob,sizeof(JOBOBJECT_BASIC_PROCESS_ID_LIST)+sizeof(ULONG)*100,NULL);
if(!returnValue)
{
ErrorCode=GetLastError();
ReturnFromWait=FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,NULL,ErrorCode,NULL,(LPTSTR)&lpBuffer,NULL,NULL);
printf("QueryInformationJobObject Failure!\n");
printf("%S\n",lpBuffer);
LocalFree(lpBuffer);
printf("Press Any Key to Exit\n");
c=_getch();
return 1;
}

//Get a handle for each ProcessId and set its CPU Affinity.
HANDLE ProcessHandle;
int a=1;
do
{
ProcessHandle=OpenProcess(PROCESS_SET_INFORMATION,TRUE,*(ProcessesInJob->ProcessIdList+a));
returnValue=SetProcessAffinityMask(ProcessHandle,ProcessorAffinity);
printf("ProcessIdList: %d\n",*(ProcessesInJob->ProcessIdList+a));
a++;
}while(*(ProcessesInJob->ProcessIdList+a)!=NULL || a>99);

LocalFree(ProcessesInJob);
return 0;
}
else
{
ErrorCode=GetLastError();
ReturnFromWait=FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,NULL,ErrorCode,NULL,(LPTSTR)&lpBuffer,NULL,NULL);
printf("Process Creation Failure!\n");
printf("%S\n",lpBuffer);
LocalFree(lpBuffer);
printf("Press Any Key to Exit\n");
c=_getch();
return 1;
}
}


Build the app and create a shortcut to it...change the Start In directory to the Thief directory and add the path to the Thief executable as a parameter of the shortcut Target. For example my Target textbox is:

"C:\Users\Username\Documents\Visual Studio 2008\Projects\LaunchWithCPUAffinity\Release\LaunchWithCPUAffinity.exe" "C:\ThiefG\Thief.exe"

And of course check the Run this program as an Administrator checkbox in the Compatibility tab.

This app will work with any operating system responding with a OS version greater than or equal to Windows 2000, so it should work with Vista as well as XP. I suppose I could see if I can add it to my server and make it available to anyone that is technically challenged...the executable is only 8KB. The app that Salvage wrote is 51KB...which means it's doing a lot more than setting the CPU affinity...and the instructions to use it is a bit confusing...it kinda sounds like it's hacking the executable.

Oh...I almost forgot...the app can only set the affinity of applications running on a CPU number less than 64...otherwise nothing happens. Also, the application needs to load up and present a GUI in less than 1 minute. Thus, computers that are too slow (like a 486 running at 133Mhz) or those rediculously outfitted with 64 processors have a slight chance (about .01%) that they won't get any benefit.

EDIT: OK...I just noticed that Thief 2: The Metal Age launches two processes...my app is only setting the affinity for the first one (Thief2.exe) so the second process Thief2.ICD is not being restricted to a single CPU. I'm in the process of improving my app to take this into consideration.

EDIT2: Updating my app so that it can handle all processes spawned from the process it launches is going to be delicate...it requires creating a JobObject which in turn requires populating a SecurityInformation structure which in turn requires getting the users SecurityID and possibly another step in there somewhere...not going to be easy that's for sure. But, I suppose it's good experience getting to know the JobObject and Windows Security objects in more detail.

EDIT3: :lmao: After about 5 hours of messing with a new Job Object including Security Id's and Access Controls it dawned on me that I might be able to use the JobObject created for my app by Windows...sure enough...a simple function returns all Processes in the current job...and all processes spawned by my app or any app my app spawns will be added to that job. I've updated the code. If anyone wants to host the Zip file I'll provide an executable.

Peter_Smith
26th Nov 2011, 19:52
Thanks again, Rockn-Roll. Good work. There are some other ways to set affinity that may interest you.

FYI, imagecfg is a Microsoft utility that I think is included in all versions of Windows. You can google it. Salvage only described the arguments needed to run it.

Also, one of our members MoroseTroll created a utility, FlipTIB that does the bit flipping back and forth. No source, but it works.
http://forums.eidosgames.com/showthread.php?t=108519&highlight=fliptib

There is also a way to use the CMD command "start" in Vista and W7
http://www.vistax64.com/gaming/197915-setting-processor-affinity-made-easy.html
I could not find a formal explanation of the command. The above contains examples.

Rockn-Roll
27th Nov 2011, 05:35
OK...I've done some more research. Imagecfg.exe was distributed with Windows NT 4.0. But, it doesn't look like Microsoft distributes it in any later packages since it was designed and written specifically for Windows NT 4.0. The MSDN online library claims that it was included with the Windows 2000 Server Supplement One Resource Kit CD, but I couldn't locate it on my disk (I have the MSDN Universal Subscription from 2001). It also looks like LINK.EXE which is used by developers to combine compiled code into executables used to have a parameter of /WS that was dropped from Visual Studio 2005 in favor of using Imagecfg.exe, but it also looks like that parameter was specifically /WS:AGGRESSIVE in Visual Studio 6.0 (1998) i.e. essentially prior to hyperthreading and multi-core architecture so it sounds like /WS was being tweaked in the .net environment for expanded functionality until 2005 when it was determined that this means of disabling multi-threaded application development wasn't needed and no longer functioned as originally intended (/WS:AGGRESSIVE sets some different bits in the header from the -u parameter of Imagecfg.exe). Unfortunately, /WS was never replaced with anything that I can see in Visual Studio.net, and the MSDN online library actually says that Imagecfg.exe should be used now that the /WS parameter has been removed...weird...very few people still have a Windows NT 4.0 CD lying around...typical Microsoft effort.

What the -u switch does is modify the executable's header which prevents it from running on more than one CPU. And, as I indicated Imagecfg.exe is supported by Microsoft albeit indirectly by telling developers to use it instead of the deprecated /WS parameter.

The -a switch sets the processor affinity mask. We should just use -u and not -a because -a overrides Windows CPU scheduler...which means it's possible that the CPU we restrict it to is already maxed out by some other processes...which means the game may not run well every time it's launched.

The "start" CMD you are referring to is an internal system command named Start. You use it on the command line...for example:

Start /affinity 1 thief.exe

The command prompt must be running with administrator privileges for it to work...and it does work fine. However, as with the -a switch for imagecfg.exe it's not wise to force an application onto a specific processor without first knowing whether that processor has sufficient resources i.e. you would still need to take a look at Task Manager to determine the best processor available.

In summary: Imagecfg.exe -u will prevent thief from freezing on multi-core systems and is the best official solution that I see available...the only difficulty is locating a Windows NT 4.0 CD or someone that has a copy of the Imagecfg.exe application to share. But, keep in mind that it makes a permanent change to the executable and there is no guarantee that it will continue to provide the desired effect in the future. The only solution guaranteed to work in the future is building an application which checks to see what the current processor is, thus allowing Task Scheduler to select the best processor, and launches thief with an affinity to that processor i.e. the code that I posted. In fact, there could be further changes to processor technology which may need to be added to that code...hopefully someone else will add to it if it stops doing its job.

hazzabag123
13th May 2012, 15:16
When I load the game all it does is run for a few seconds then closes and says Thief The Dark Project is not responding. It has done this every single time I load it up and I would appreciate some help. I have windows 7 and i havnt checked my video and sound cards yet.

John Currran
14th Jan 2013, 09:43
After looking through the many patches and fixes available, I've concluded that TFIX is by far the easiest and most effective Thief 1 fixer-upper. I reccommend anyone trying to get Thief 1 installed & patched look into it.

Instructions on my page:
http://www.johnanthonycurran.com/thief.html

Salud!

Peter_Smith
14th Jan 2013, 18:28
Thanks, John. You are absolutely correct. TFix not only does all the patches necessary, it actually makes T1 run under the updated T2 1.19 engine. If you exit to desktop you will see this in the icon. Thanks also for the link to your your web site, which is a great discussion and road map to all of this. I have modified the first post of this thread to reflect this new information.

I personally bypassed the "T2 water" option because to me it looks non-Thiefly, and it has a problem with lack of transparency when looking from above, unless you dive into the water. I also installed but then edited out the EP option (in install.cfg) because I don't like the crate model when seen from the inside, which occurrs when dropping or stacking crates. The nice thing about the TFix installer is that you can uncheck options and then re-install with the new configuration.

It might help to mention two facts on your web site:

1) Not all computers / video cards need OpenAL, and not all users want EAX (I dislike it -- to me it sounds like a tin can).

2) If you have T2 installed you can restore the keystroke mapping you already use in T2 by copying the file user.bnd from your T2 folder into the TFix'ed T1 folder. This includes features like creeping not found in T1. Otherwise you need to set the keystroke mappings manually.

John Currran
15th Jan 2013, 06:49
I have added appropriate notes regardingOpenAL, EAX, and keystroke mappings to my site, thank you!

The T2 water appears to be working for me, but I shall keep it in mind and experiment.

random person
3rd Feb 2013, 04:53
:mad2:hello if anybody can help me i have a problem with my game thief the dark project every time i play it it always freezes on me when i want to open a door or knock out a guard. please help me !

Peter_Smith
3rd Feb 2013, 21:08
The notice in the first posts makes it clear that you need to start another thread for questions, especially when they have nothing in particular to do with the subject matter. Try the suggestions given here, and if they do not work start another thread with more detail.