Discussion:
TTDPatch on Win xp x64
(too old to reply)
Stan Kondak
2005-05-29 09:36:30 UTC
Permalink
Hi Josef,

just I wanted to test the TTDPatch on Win XP x64, but it crashes.
I adjusted the compatibility to windows 2000, XP and Win98, all the same - the game crashes every time :-(

Stan
--
Opera M2/8.01
Josef Drexler
2005-05-29 14:24:04 UTC
Permalink
Post by Stan Kondak
Hi Josef,
just I wanted to test the TTDPatch on Win XP x64, but it crashes.
I adjusted the compatibility to windows 2000, XP and Win98, all the same - the game crashes every time :-(
At what point does it crash? Does it make a crash log?
--
Josef Drexler | http://jdrexler.com/home/
---------------------------------+---------------------------------------
Please help Conserve Gravity | Email address is *valid*.
Use tape&glue, no paperweights | Don't remove the "nospam" part.
Stan Kondak
2005-05-29 14:56:18 UTC
Permalink
Post by Josef Drexler
Post by Stan Kondak
just I wanted to test the TTDPatch on Win XP x64, but it crashes.
At what point does it crash? Does it make a crash log?
It crashes just at the beginning. The CRASH000.TXT in attachment

Stan
--
Opera M2/8.01
Josef Drexler
2005-05-29 15:48:03 UTC
Permalink
Post by Stan Kondak
Post by Josef Drexler
Post by Stan Kondak
just I wanted to test the TTDPatch on Win XP x64, but it crashes.
At what point does it crash? Does it make a crash log?
It crashes just at the beginning. The CRASH000.TXT in attachment
Ah, that's actually a crash in TTD. Somehow XP64 doesn't seem to allow
setting the FS segment register, or it fails in other ways. TTD needs
this to display its graphics, however.

That's not something I can fix. Someone who has XP64 might be able to,
though.
--
Josef Drexler | http://jdrexler.com/home/
---------------------------------+---------------------------------------
Please help Conserve Gravity | Email address is *valid*.
Walk with a light step. | Don't remove the "nospam" part.
Marcin Grzegorczyk
2005-05-30 14:21:02 UTC
Permalink
Post by Josef Drexler
[...]
Ah, that's actually a crash in TTD. Somehow XP64 doesn't seem to allow
setting the FS segment register, or it fails in other ways.
As you may know, under Win32 the FS register points to a special segment
which contains a structure called Thread Information Block. This is
used, among others, for structured exception handling.

AFAIK when a 64-bit processor is running in the IA-32e compatibility
mode, the FS and GS registers are treated somewhat different to the
other segment registers. Might have something to do with the crash.
(Perhaps XP64 somehow protects the FS register to ensure that IA-32
programs don't mess it up.)
--
Marcin Grzegorczyk
Josef Drexler
2005-05-30 22:43:03 UTC
Permalink
Post by Marcin Grzegorczyk
Post by Josef Drexler
[...]
Ah, that's actually a crash in TTD. Somehow XP64 doesn't seem to allow
setting the FS segment register, or it fails in other ways.
As you may know, under Win32 the FS register points to a special segment
which contains a structure called Thread Information Block. This is
used, among others, for structured exception handling.
AFAIK when a 64-bit processor is running in the IA-32e compatibility
mode, the FS and GS registers are treated somewhat different to the
other segment registers. Might have something to do with the crash.
(Perhaps XP64 somehow protects the FS register to ensure that IA-32
programs don't mess it up.)
It's either that, or it doesn't restore it properly after a mode switch
from 64 bit mode. Perhaps it always restores it to the TIB instead of the
value it had before.

Either way, just removing all FS prefix instructions fixed the problem, so
I've integrated that into alpha 51 (as part of the win2k switch).
--
Josef Drexler | http://jdrexler.com/home/
---------------------------------+---------------------------------------
Please help Conserve Gravity | Email address is *valid*.
Give up downhill skiing. | Don't remove the "nospam" part.
Josef Drexler
2005-05-29 17:23:02 UTC
Permalink
Post by Stan Kondak
It crashes just at the beginning. The CRASH000.TXT in attachment
One possible way to fix this should be to remove all FS prefixes in the
game, they aren't really needed.

If you are comfortable using a hex editor, you can open gamegfx.exe (make
a backup first!), find all occurences of "64 8A 04 18" and change the "64"
into "90" for all of them (everything in hex here).

Then delete ttdloadw.ovl to make sure these changes get imported there.
That should theoretically fix the problem.
--
Josef Drexler | http://jdrexler.com/home/
---------------------------------+---------------------------------------
Please help Conserve Gravity | Email address is *valid*.
Play Chess, not Basketball. | Don't remove the "nospam" part.
Josef Drexler
2005-05-29 18:22:02 UTC
Permalink
Post by Josef Drexler
Post by Stan Kondak
It crashes just at the beginning. The CRASH000.TXT in attachment
If you are comfortable using a hex editor, you can open gamegfx.exe (make
a backup first!), find all occurences of "64 8A 04 18" and change the "64"
into "90" for all of them (everything in hex here).
By the way, if you aren't comfortable with a hex editor, let me know and I
can easily do this and send you the modified file. I could add this to
the patch too, but first I'd need to confirm that it actually works, so
I'd appreciate if you could be the guinea pig :)
--
Josef Drexler | http://jdrexler.com/home/
---------------------------------+---------------------------------------
Please help Conserve Gravity | Email address is *valid*.
Give up downhill skiing. | Don't remove the "nospam" part.
Stan Kondak
2005-05-29 18:48:10 UTC
Permalink
Post by Josef Drexler
If you are comfortable using a hex editor, you can open gamegfx.exe (make
a backup first!), find all occurences of "64 8A 04 18" and change the "64"
into "90" for all of them (everything in hex here).
done - 277 times replaced given String
Post by Josef Drexler
That should theoretically fix the problem.
The Game works now - thanks ;-)

Stan
--
Opera M2/8.01
Owen Rudge
2005-05-29 14:29:21 UTC
Permalink
Post by Stan Kondak
just I wanted to test the TTDPatch on Win XP x64, but it crashes.
I adjusted the compatibility to windows 2000, XP and Win98, all the same -
the game crashes every time :-(
I tested it and I think it worked. Or maybe that was OpenTTD, I can't
remember for sure... will test it again later. ;-)
--
Owen Rudge
http://www.owenrudge.net/
Stan Kondak
2005-05-29 15:00:35 UTC
Permalink
Post by Stan Kondak
just I wanted to test the TTDPatch on Win XP x64, but it crashes.
I tested it and I think it worked. Or maybe that was OpenTTD, I can't remember for sure... will test it again later. ;-)
OpenTTD works very well on win x64 :-)

Stan
--
Opera M2/8.01
Loading...