Posted February 15, 2014
There's been a few threads dedicated to this topic and plenty of people share the problem, however, and while there are solutions out there, I'm surprised to see how difficult they can be to find. That a sticky doesn't already exist to fix this issue when so many people are experiencing it (as far as I can tell, almost everyone using the recommended widescreen mod) is very surprising to me. Well, with the help of a few users on this and other forums, I managed to fix the issue via hex editing and decided to write up this guide for everyone.
Note: All credit to discovering the fix goes to scient.
I'm not sure of the exact technical reason behind the glitch, but as far as I can tell it affects those using the widescreen mod because occasionally the game will attempt to load assets in the game's native resolution (640x480) instead of the resolution the widescreen mod has altered the game to run at, hence the crash. If this explanation is incorrect or not comprehensive enough, I more than welcome someone more knowledgeable about the topic to chime in.
*So here's how you fix it.*
IMPORTANT: I recommend making a back-up copy of your Torment.exe file before proceeding any further.
Download a hex editor program, I recommend HxD which is free and easy to download. Now, with your hex editor program of choice, boot it up and navigate to your Planescape: Torment installation directory (using the command "File > Open"). Once there, open the Torment.exe file.
Now that you have the Torment.exe file open you'll see a bunch of hex values and other information. What you need to do now is search for some very specific values using the command "Search > Find". Switch the search options to "hex value" from "text string" and then enter (and modify) the following four lines ONE AT A TIME.
search: B9 80 02 00 00 F7 F9 89 45 BC 8B 95 D8 FE FF FF 8B 82 F0 00 00 00 99 B9 80 02 00 00
search: B9 E0 01 00 00 F7 F9 89 45 A0 8B 95 D8 FE FF FF 8B 82 F4 00 00 00 99 B9 E0 01 00 00
search: B9 80 02 00 00 F7 F9 89 85 68 FF FF FF 8B 55 18 8B 42 04 99 B9 E0 01 00 00
search: B9 80 02 00 00 F7 F9 89 85 70 FF FF FF 8B 55 18 8B 42 0C 99 B9 E0 01 00 00
The values that are relevant here are "80 02" and "E0 01". You'll need to modify these values to represent the correct resolution (the one you've modified the game to run in with the widescreen mod). IMPORTANT TIP: When modifying hex values, click your cursor in front of the value you want to modify (e.g. |80) and then input new values OVER the old ones, do not select and delete hex values then reenter them!
For example, to change the values for a resolution of 1920x1080, you would change all instances of 80 02 to 80 07, and all instances of E0 01 to 38 04.
Here's a list of common resolutions and their corresponding values (IMPORTANT: the ones you want are the "Formatted Value").
Value******Hexadecimal Value******Formatted Value
---------------------------------------------------------------
200*******00C8*****************C800
---------------------------------------------------------------
240*******00F0*****************F000
---------------------------------------------------------------
320*******0140*****************4001
---------------------------------------------------------------
480*******01E0*****************E001
---------------------------------------------------------------
525*******020D*****************0D02
---------------------------------------------------------------
540*******021C*****************1C02
---------------------------------------------------------------
576*******0240*****************4002
---------------------------------------------------------------
600*******0258*****************5802
---------------------------------------------------------------
640*******0280*****************8002
---------------------------------------------------------------
704*******02C0*****************C002
---------------------------------------------------------------
720*******02D0*****************D002
---------------------------------------------------------------
768*******0300*****************0003
---------------------------------------------------------------
800*******0320*****************2003
---------------------------------------------------------------
840*******0348*****************4803
---------------------------------------------------------------
848*******0350*****************5003
---------------------------------------------------------------
854*******0356*****************5603
---------------------------------------------------------------
900*******0384*****************8403
---------------------------------------------------------------
960*******03C0*****************C003
---------------------------------------------------------------
992*******03E0*****************E003
---------------------------------------------------------------
1000******03E8*****************E803
---------------------------------------------------------------
1024******0400*****************0004
---------------------------------------------------------------
1050******041A*****************1A04
---------------------------------------------------------------
1080******0438*****************3804
---------------------------------------------------------------
1152******0480*****************8004
---------------------------------------------------------------
1200******04B0*****************B004
---------------------------------------------------------------
1280******0500*****************0005
---------------------------------------------------------------
1360******0550*****************5005
---------------------------------------------------------------
1366******0556*****************5605
---------------------------------------------------------------
1368******0558*****************5805
---------------------------------------------------------------
1440******05A0*****************A005
---------------------------------------------------------------
1536******0600*****************0006
---------------------------------------------------------------
1600******0640*****************4006
---------------------------------------------------------------
1680******0690*****************9006
---------------------------------------------------------------
1768******06E8*****************E806
---------------------------------------------------------------
1776******06F0*****************F006
---------------------------------------------------------------
1800******0708*****************0807
---------------------------------------------------------------
1920******0780*****************8007
---------------------------------------------------------------
2048******0800*****************0008
---------------------------------------------------------------
2400******0960*****************6009
---------------------------------------------------------------
2560******0A00*****************000A
---------------------------------------------------------------
2720******0AA0*****************A00A
---------------------------------------------------------------
2880******0B40*****************400B
---------------------------------------------------------------
3072******0C00*****************000C
---------------------------------------------------------------
3200******0C80*****************800C
---------------------------------------------------------------
3360******0D20*****************200D
---------------------------------------------------------------
3840******0F00*****************000F
---------------------------------------------------------------
4080******0FF0*****************F00F
---------------------------------------------------------------
4320******0010E0***************E010
---------------------------------------------------------------
5040******0013B0***************B013
---------------------------------------------------------------
For me, this fix resolved 99% of the crashes I was experiencing while loading into new areas, and I have only had 1 crash in the last 4-5 hours. Good luck and if anyone needs any assistance or has anything to add, please drop a reply. :)
Note: All credit to discovering the fix goes to scient.
I'm not sure of the exact technical reason behind the glitch, but as far as I can tell it affects those using the widescreen mod because occasionally the game will attempt to load assets in the game's native resolution (640x480) instead of the resolution the widescreen mod has altered the game to run at, hence the crash. If this explanation is incorrect or not comprehensive enough, I more than welcome someone more knowledgeable about the topic to chime in.
*So here's how you fix it.*
IMPORTANT: I recommend making a back-up copy of your Torment.exe file before proceeding any further.
Download a hex editor program, I recommend HxD which is free and easy to download. Now, with your hex editor program of choice, boot it up and navigate to your Planescape: Torment installation directory (using the command "File > Open"). Once there, open the Torment.exe file.
Now that you have the Torment.exe file open you'll see a bunch of hex values and other information. What you need to do now is search for some very specific values using the command "Search > Find". Switch the search options to "hex value" from "text string" and then enter (and modify) the following four lines ONE AT A TIME.
search: B9 80 02 00 00 F7 F9 89 45 BC 8B 95 D8 FE FF FF 8B 82 F0 00 00 00 99 B9 80 02 00 00
search: B9 E0 01 00 00 F7 F9 89 45 A0 8B 95 D8 FE FF FF 8B 82 F4 00 00 00 99 B9 E0 01 00 00
search: B9 80 02 00 00 F7 F9 89 85 68 FF FF FF 8B 55 18 8B 42 04 99 B9 E0 01 00 00
search: B9 80 02 00 00 F7 F9 89 85 70 FF FF FF 8B 55 18 8B 42 0C 99 B9 E0 01 00 00
The values that are relevant here are "80 02" and "E0 01". You'll need to modify these values to represent the correct resolution (the one you've modified the game to run in with the widescreen mod). IMPORTANT TIP: When modifying hex values, click your cursor in front of the value you want to modify (e.g. |80) and then input new values OVER the old ones, do not select and delete hex values then reenter them!
For example, to change the values for a resolution of 1920x1080, you would change all instances of 80 02 to 80 07, and all instances of E0 01 to 38 04.
Here's a list of common resolutions and their corresponding values (IMPORTANT: the ones you want are the "Formatted Value").
Value******Hexadecimal Value******Formatted Value
---------------------------------------------------------------
200*******00C8*****************C800
---------------------------------------------------------------
240*******00F0*****************F000
---------------------------------------------------------------
320*******0140*****************4001
---------------------------------------------------------------
480*******01E0*****************E001
---------------------------------------------------------------
525*******020D*****************0D02
---------------------------------------------------------------
540*******021C*****************1C02
---------------------------------------------------------------
576*******0240*****************4002
---------------------------------------------------------------
600*******0258*****************5802
---------------------------------------------------------------
640*******0280*****************8002
---------------------------------------------------------------
704*******02C0*****************C002
---------------------------------------------------------------
720*******02D0*****************D002
---------------------------------------------------------------
768*******0300*****************0003
---------------------------------------------------------------
800*******0320*****************2003
---------------------------------------------------------------
840*******0348*****************4803
---------------------------------------------------------------
848*******0350*****************5003
---------------------------------------------------------------
854*******0356*****************5603
---------------------------------------------------------------
900*******0384*****************8403
---------------------------------------------------------------
960*******03C0*****************C003
---------------------------------------------------------------
992*******03E0*****************E003
---------------------------------------------------------------
1000******03E8*****************E803
---------------------------------------------------------------
1024******0400*****************0004
---------------------------------------------------------------
1050******041A*****************1A04
---------------------------------------------------------------
1080******0438*****************3804
---------------------------------------------------------------
1152******0480*****************8004
---------------------------------------------------------------
1200******04B0*****************B004
---------------------------------------------------------------
1280******0500*****************0005
---------------------------------------------------------------
1360******0550*****************5005
---------------------------------------------------------------
1366******0556*****************5605
---------------------------------------------------------------
1368******0558*****************5805
---------------------------------------------------------------
1440******05A0*****************A005
---------------------------------------------------------------
1536******0600*****************0006
---------------------------------------------------------------
1600******0640*****************4006
---------------------------------------------------------------
1680******0690*****************9006
---------------------------------------------------------------
1768******06E8*****************E806
---------------------------------------------------------------
1776******06F0*****************F006
---------------------------------------------------------------
1800******0708*****************0807
---------------------------------------------------------------
1920******0780*****************8007
---------------------------------------------------------------
2048******0800*****************0008
---------------------------------------------------------------
2400******0960*****************6009
---------------------------------------------------------------
2560******0A00*****************000A
---------------------------------------------------------------
2720******0AA0*****************A00A
---------------------------------------------------------------
2880******0B40*****************400B
---------------------------------------------------------------
3072******0C00*****************000C
---------------------------------------------------------------
3200******0C80*****************800C
---------------------------------------------------------------
3360******0D20*****************200D
---------------------------------------------------------------
3840******0F00*****************000F
---------------------------------------------------------------
4080******0FF0*****************F00F
---------------------------------------------------------------
4320******0010E0***************E010
---------------------------------------------------------------
5040******0013B0***************B013
---------------------------------------------------------------
For me, this fix resolved 99% of the crashes I was experiencing while loading into new areas, and I have only had 1 crash in the last 4-5 hours. Good luck and if anyone needs any assistance or has anything to add, please drop a reply. :)
Post edited February 17, 2014 by Beertastic