Really early versions of TTO

Talk about the classic original version of Transport Tycoon.
User avatar
orudge
Administrator
Administrator
Posts: 25129
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Re: Really early versions of TTO

Post by orudge »

Very nice work, NCommander. I have, somewhere, an old Watcom C/C++ 10.6 CD. I may be wrong, but I think Phar Lap may have been included with that version - if not, then there could be stuff of use on it anyway perhaps. Failing that, I think I once came across an old version of Phar Lap online somewhere - it may well still be out there. Not sure if there's anything there that would be of any use, but you never know.
NCommander
Engineer
Engineer
Posts: 11
Joined: 15 Jul 2017 10:45

Re: Really early versions of TTO

Post by NCommander »

Sorry for my inactivity on this on the last few days. My largest problem is just lack of time.

My largest problem with getting further on this is I can't quite seem to grasp how the binary file gets loaded into memory and I haven't found a decent way to examine the memory space so I can't get IDA to line up to allow me to trace string loading and such; that would make my job considerably easier.

I'll probably just end up downing Phar Lap SDK from one of the abandonware sites eventually and hope it's close enough to TT Demo that the debugger can work with it.

EDIT: So I took a look at the TTDPatch disassembles; it looks like they were working from a memory dump and not trying to disassemble the game binary directly. That's ... not an ideal way to do it, but I might get a saner dump if I do the same with the demo. I'm stuck on the laptop for at least a few hours which isn't setup to generate that kind of dump though ...
NCommander
Engineer
Engineer
Posts: 11
Joined: 15 Jul 2017 10:45

Re: Really early versions of TTO

Post by NCommander »

I figure I should add some notes since I did make some fairly decent headway over the weekend.

Using the TTDPatch disassembles as a reference point, I found the master list of classes for vehicle and object behavior. TT's internal codebase is ... a bit weird to say with a lot of index referencing all over the place. This makes it annoyingly non-trivial to locate useful bits of code. It's also fairly annoying to hexedit the binary since the memory map doesn't line up to physical binary locations, but what can you do?

Serious props to the guys who disassembled TTDPatch; I think I would have gone mad without their work in this.

It also shows a lot of code more or less went from demo, to TTO, to TTD unchanged; most of the palette, and some of the window management code looks more or less identical. As far as I can tell, the major difference is the sound code was either stripped or ifdef'ed out of the codebase to build the demo.

Multiplayer code is there, and what little I looked at, at least seems partially complete; there's a TON of code dealing with serial communications; I'm not sure if network code is there are there. I may be able to re-enable this if I can figure out the correct jump locations.

As far as I can tell, the object classes (i.e., trains, RVs, etc) have a set of dispatch methods off them which allow things like "do X when Y is clicked". In TTD, the first method off the dispatch table is what popups up the windows to do construction, but this doesn't seem to be the case in the demo (unsure in TTO proper either). I tried to replace a call from trains to RV's Method0, and it simply crashed the game but I'm not convinced I hexedited in the right location.

For the toolbar itself, in TTD, each button is essentially connected to a jumptable which draws the menu. My guess is in TT-Demo, the jump table was simply disconnected which why the other code is there but I haven't found said table in the demo yet so no luck in re-connecting it. If I could get the game to crash when I try to do railroad construction, I can at least narrow down the possibilities.
NCommander
Engineer
Engineer
Posts: 11
Joined: 15 Jul 2017 10:45

Re: Really early versions of TTO

Post by NCommander »

Image

I'm getting a better idea of how TT's code is laid out, and with some memory fiddling, got THIS to show up. Unfortunately, it doesn't work (yet). The tooltip says select airport size, but it won't actually switch the cursor to drop the airport down. I think the problem is I don't understand how CreateWindow actually works, but the second argument appears to be a class object, followed by flags I don't quite get. Obviously I'm not creating the window properly.

Trying to invoke RV causes error boxes to come up, and ships just leaves garbage data. I think all the bits are there I'm just not calling it properly.

I did find the toolbar stubs, and the expected retn. What annoys me is it looks like the call to actually CREATE the RV/Boat/Airport stuff was deleted which means I'm going to need to divine the right magic to patch it. That's made much harder due to Phar Lap. *sigh*. One bit at a time.
User avatar
Roman
Transport Coordinator
Transport Coordinator
Posts: 363
Joined: 12 Oct 2003 17:16
Location: Switzerland
Contact:

Re: Really early versions of TTO

Post by Roman »

Very interesting work, keep it up!
Image
NCommander
Engineer
Engineer
Posts: 11
Joined: 15 Jul 2017 10:45

Re: Really early versions of TTO

Post by NCommander »

Not much to add at this point.

I figured out how the toolbar GUI classes work. I was able to get the Road Vehicle button working again abet at the cost of disabling the rail button since I haven't found an enclave to put the new code in. They're essentially controlled by a single set of callbacks which hook into functions that create windows, which are then dispatched off a second table for each class of object in the game.

I was able to locate the bits of code that [try to] open the RV/Boats/Aircraft windows, and confirmed this by finding the code that cleans the "clicked" button on the toolbar. This leads to another ratsnest of pointers which try to call "CreateWindow" at which point TT-Demo corrupts the screen and things stop working.

I found the structures which define the window as well, but the format has changed in TTD but I haven't been able to divine the format as of yet. In TTD, they are essentially type, size, and an asset ID such as a sprite or text string in the GRF. I haven't however figured out how they're connected to object code. I theorize that the RV/boat window fails to dispatch because it's referencing invalid data in the GRF which also explains the screen corruption. The airport construction window displays because it's all text, but unclear at best why I can't plot an airport down. The assets themselves appear to be in the GRF.
Gurluas2000
Chief Executive
Chief Executive
Posts: 656
Joined: 31 May 2004 08:22

Re: Really early versions of TTO

Post by Gurluas2000 »

NCommander wrote:Not much to add at this point.

I figured out how the toolbar GUI classes work. I was able to get the Road Vehicle button working again abet at the cost of disabling the rail button since I haven't found an enclave to put the new code in. They're essentially controlled by a single set of callbacks which hook into functions that create windows, which are then dispatched off a second table for each class of object in the game.

I was able to locate the bits of code that [try to] open the RV/Boats/Aircraft windows, and confirmed this by finding the code that cleans the "clicked" button on the toolbar. This leads to another ratsnest of pointers which try to call "CreateWindow" at which point TT-Demo corrupts the screen and things stop working.

I found the structures which define the window as well, but the format has changed in TTD but I haven't been able to divine the format as of yet. In TTD, they are essentially type, size, and an asset ID such as a sprite or text string in the GRF. I haven't however figured out how they're connected to object code. I theorize that the RV/boat window fails to dispatch because it's referencing invalid data in the GRF which also explains the screen corruption. The airport construction window displays because it's all text, but unclear at best why I can't plot an airport down. The assets themselves appear to be in the GRF.

This is amazing progress! :3
I really hope you can manage to unlock this early build!
Keep it up! I believe in you!

For the record, I'd be fine with just the date limitation removed, even if others vehicles aren't unlocked.
Gurluas2000
Chief Executive
Chief Executive
Posts: 656
Joined: 31 May 2004 08:22

Re: Really early versions of TTO

Post by Gurluas2000 »

The 26th anniversary of TTO slowly approaches, we didn't make it for the 25th...But perhaps for the 26th anniversary the time has finally come to unlock the TTO Prototype?
We're all under lock down, so perhaps this would be worthwhile...If someone is willing to help that is...
User avatar
Roman
Transport Coordinator
Transport Coordinator
Posts: 363
Joined: 12 Oct 2003 17:16
Location: Switzerland
Contact:

Re: Really early versions of TTO

Post by Roman »

Here are five screenshots of one of the unknown review versions, extracted from the IE Interactive Entertainment CD ROM Magazine, Episode 7, November 1994. Looks like that version used the old MPS Labs logo...
COON_01.gif
COON_01.gif (9.29 KiB) Viewed 17977 times
COON_01A.gif
COON_01A.gif (167.03 KiB) Viewed 17977 times
COON_02.gif
COON_02.gif (157.24 KiB) Viewed 17977 times
Image
User avatar
Roman
Transport Coordinator
Transport Coordinator
Posts: 363
Joined: 12 Oct 2003 17:16
Location: Switzerland
Contact:

Re: Really early versions of TTO

Post by Roman »

And the otwer two:
COON_03.gif
COON_03.gif (156.56 KiB) Viewed 17977 times
COON_04.gif
COON_04.gif (155.15 KiB) Viewed 17977 times
Image
Gurluas2000
Chief Executive
Chief Executive
Posts: 656
Joined: 31 May 2004 08:22

Re: Really early versions of TTO

Post by Gurluas2000 »

Fascinating! That's a much earlier version judging by the Train station graphics!
I'd love to play that build.

Currently I'm still hoping someone can make our current build playable beyond 1932.
User avatar
luk3Z
Traffic Manager
Traffic Manager
Posts: 197
Joined: 25 Dec 2005 17:42
Location: Kielce, Poland (Mars sometimes)

Re: Really early versions of TTO

Post by luk3Z »

This TT is better than RollerCaster-ish Locomotion (even with OpenLoco).
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
User avatar
luk3Z
Traffic Manager
Traffic Manager
Posts: 197
Joined: 25 Dec 2005 17:42
Location: Kielce, Poland (Mars sometimes)

Re: Really early versions of TTO

Post by luk3Z »

Gurluas2000 wrote: 15 Dec 2010 03:04 So, some years have passed, people have become more experienced...
I propose that we attempt to crack this early demo once more to remove the crash occurring at 1932, and to enable road vehicles, airports, and ships for the player so that we can properly experience this early 'beta' of TTO and Transport Tycoon in general.
All right. Does anybody still want to play after 1932 in early 'beta' of TTO ? Seriously ?
Maybe better try TTO Full Conversion v1.4.1:
viewtopic.php?p=688451
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
User avatar
Roman
Transport Coordinator
Transport Coordinator
Posts: 363
Joined: 12 Oct 2003 17:16
Location: Switzerland
Contact:

Re: Really early versions of TTO

Post by Roman »

Did you guys know there was a TTO demo disk in the US, with version 1.06.011a on it? I found this only recently:
tto_demo_disk.jpg
tto_demo_disk.jpg (28.84 KiB) Viewed 11603 times
ttodemo106011_1.gif
ttodemo106011_1.gif (122 KiB) Viewed 11603 times
ttodemo106011_2.gif
ttodemo106011_2.gif (90.5 KiB) Viewed 11603 times
Image
Gurluas2000
Chief Executive
Chief Executive
Posts: 656
Joined: 31 May 2004 08:22

Re: Really early versions of TTO

Post by Gurluas2000 »

luk3Z wrote: 25 Jan 2022 16:00
Gurluas2000 wrote: 15 Dec 2010 03:04 So, some years have passed, people have become more experienced...
I propose that we attempt to crack this early demo once more to remove the crash occurring at 1932, and to enable road vehicles, airports, and ships for the player so that we can properly experience this early 'beta' of TTO and Transport Tycoon in general.
All right. Does anybody still want to play after 1932 in early 'beta' of TTO ? Seriously ?
Maybe better try TTO Full Conversion v1.4.1:
viewtopic.php?p=688451
Yes because it is different than the final release.
It is an early build with a lot of differences and being able to experience the rest is worth it.
I am remaining optimistic someone will figure it out! :3

Also nice find on the new demo!
User avatar
Roman
Transport Coordinator
Transport Coordinator
Posts: 363
Joined: 12 Oct 2003 17:16
Location: Switzerland
Contact:

Re: Really early versions of TTO

Post by Roman »

Sawyer indicated in a letter that he might be trying "to see if it's possible to get screenshots or video from early versions" sometime in the future. I can't wait (but will have to)... :)
Image
Gurluas2000
Chief Executive
Chief Executive
Posts: 656
Joined: 31 May 2004 08:22

Re: Really early versions of TTO

Post by Gurluas2000 »

Oh that's good news! Let's hope he can find something.
Starting to lose hope on someone cracking that demo. ^^'
Gurluas2000
Chief Executive
Chief Executive
Posts: 656
Joined: 31 May 2004 08:22

Re: Really early versions of TTO

Post by Gurluas2000 »

Yet another year has come and gone.
OpenTTD has turned 20...This entire forum feels like an artifact of a lost age, and yet it brings me comfort to see it stay the same. It feels like coming home to long lost days when I find this relic of the 2000s. Sadly the only people willing to help with this project has disappeared.
Well eventually someone will be intrigued enough to get this build to play past 1932.

Maybe it could be possible to hex edit the date to 1933? Would that crash too?

Also it's gonna be my 20th anniversary on this forum soon this year, time sure flies.
Post Reply

Return to “Transport Tycoon (Original)”

Who is online

Users browsing this forum: No registered users and 4 guests