Page 2 of 2 FirstFirst 12
Results 26 to 36 of 36

Thread: How to make Thief 1 run on a modern computer

  1. #26
    Join Date
    Jun 2004
    Location
    Massachusetts
    Posts
    423

    Default

    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.
    Last edited by Rockn-Roll; 11-24-2011 at 11:23 PM.

  2. #27
    Join Date
    Feb 2000
    Location
    Land of Enchantment
    Posts
    2,698

    Default

    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.
    "What we've got here is a failure to communicate", the warden (Strother Martin), Cool Hand Luke

  3. #28
    Join Date
    Jun 2004
    Location
    Massachusetts
    Posts
    423

    Default

    Quote Originally Posted by Peter Smith View Post
    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:

    Code:
    #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: 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.
    Last edited by Rockn-Roll; 12-01-2011 at 04:57 PM. Reason: Added console text indicating process is being created, and specific error message if process fails.

  4. #29
    Join Date
    Feb 2000
    Location
    Land of Enchantment
    Posts
    2,698

    Default

    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/showthr...hlight=fliptib

    There is also a way to use the CMD command "start" in Vista and W7
    http://www.vistax64.com/gaming/19791...made-easy.html
    I could not find a formal explanation of the command. The above contains examples.
    "What we've got here is a failure to communicate", the warden (Strother Martin), Cool Hand Luke

  5. #30
    Join Date
    Jun 2004
    Location
    Massachusetts
    Posts
    423

    Default

    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.

  6. #31
    Join Date
    May 2012
    Posts
    1

    Default

    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.

  7. #32

    Thumbs up TFix

    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!
    Last edited by John Currran; 01-14-2013 at 01:44 AM. Reason: Cannnot Tyyype

  8. #33
    Join Date
    Feb 2000
    Location
    Land of Enchantment
    Posts
    2,698

    Default

    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.
    Last edited by Peter Smith; 01-14-2013 at 11:02 AM.
    "What we've got here is a failure to communicate", the warden (Strother Martin), Cool Hand Luke

  9. #34

    Default

    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.

  10. #35
    Join Date
    Feb 2013
    Posts
    1

    Default need help

    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 !

  11. #36
    Join Date
    Feb 2000
    Location
    Land of Enchantment
    Posts
    2,698

    Default

    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.
    "What we've got here is a failure to communicate", the warden (Strother Martin), Cool Hand Luke

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •