Reverse engineering in OLoco & ORCT2

Got problems with Locomotion? Find assistance here!

Moderator: Locomotion Moderators

Post Reply
User avatar
Traffic Manager
Traffic Manager
Posts: 192
Joined: 25 Dec 2005 17:42
Location: Kielce, Poland (Mars sometimes)

Reverse engineering in OLoco & ORCT2

Post by luk3Z »

For those who may wonder how it was made (for educational purposes only):
I've begun disassembling Loco.exe. It's a tough one to figure out because Atari used all kinds of bit transfers (32 bit to 64 bit and back again) for all kinds of things. Mainly time critical things like dates, speeds, etc. This seems like poor programming, giving higher cpu driven function more things to process thus slowing down the whole game.

I've tried pretty hard to figure out how the game calculates the year and I haven't figured it out yet. I also learned something interesting on that topic. The game actually keeps track of leap years! No idea why, but it does. Though they made a mistake and didn't include the year 2000 into the leap year calculations, but who's criticizing, right?

I've broken down the exe into the main parts (file I/O, time, speeds, and monetary things) and now I'm in the process of figuring out exactly how each one works. I'm hoping to find enough information to begin large scale modifications (mainly real-time changes) so I can begin doing things like TTD Patch does with TTD. It is proving very difficult due to 2 things. One, my lack of ASM understanding and two, my lack of time to do such things.

For those intrested, the game has both static and dynamic memory allocations on a large scale (which is odd). For example, some of the static memory addresses include player data (money, loan, delivered cargo, etc). Some of the dynamic addresses include Years, vehicle speeds, and vehicle reliability.
by Rapture » 12 Sep 2005, o 03:08

C++ tools to make life easier:

Wiki: ... evelopment
Find new graphics easier:
GRFCrawler ->
BaNaNaS ->
32 bit gfx in OTTD (32bpp) -> ... 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
Post Reply

Return to “Locomotion Problems, FAQs and Tutorials”

Who is online

Users browsing this forum: No registered users and 0 guests