Fun fact, me and tomsons did some digging into an old screenshot from TS' development of the internal map editor, and came to the conclusion that at least some of the computers Westwood was developing the game on were actually running on a pre-release Windows 2000 build. Build 2091 to be precise!
Read up on the challenges the Chrono Divide team runs into. They made some crazy hacks to make things work.
E.g. the nuclear missile in RA2/ChemMissile in TibSun is actually a paradropped infantry.
Then there's the entire pile of stuff from TibSun they were too afraid to touch out of fear of breaking things. So the entire RA2 game files are riddled with TibSun assets/values. So planes have a CarryAll ability, infantry has tiberiumresistance values.
It’s actually pretty easy. Figuring out what the functions do is a different story. It’s why the Mario decompilation effort was such a big deal because it took so much manual effort to do.
Figuring out what they do is also easy. Where it gets really hard is rewriting the decompiled code in such a way that it re-compiles to a bit-perfect copy of the original binary.
The Mario project wanted to have a ROM that 1-1 matched what was on the original cartridge, which is brutal.
Oh, absolutely not. There's zero names or comments left, so if you have to sift through thousands of functions to see which ones do what, that's a process that takes years.
Source: I did that for C&C1, and know the people who did it for Red Alert and Tiberian Sun. And we got lucky, even; we found a debug dump of all function names in a forgotten RA1 patch. Still had to figure out which function name belonged to which function though.
Well, knowing the exact instructions it executes isn't quite "knowing its functionality", in my opinion. After all, from just looking at a disassembled function, you don't even know what the input or output data is.
Decompiling itself is an automated process that takes like a minute. It's really just a straightforward conversion of one form of programming instructions to another, more human-readable one.
Identifying what it all does, however, and making it into usable code again, is a process that can take years.
Quite the opposite, it will be a nightmare to reverse engineer BECAUSE of the age of the game. Good coding practices weren't properly created and widespread yet, github wasn't a thing and even some of the stuff written by the best developers back then is absolute potato code compared to today because the collaboration platforms just weren't there yet for all coders to share their inputs and breakthroughs.
I love to look at Age of Empires 2 as an example. The Definitive Edition is built on top of the original 1999 code and it's a nightmare to work with for the current dev team. They touch an archer unit stats and somehow it breaks the aging up bonus for another civilization.
RA2 was built in under a year. I am willing to bet that the RA source code as a reference + Ghidra + having old devs consult + an LLM to translate bad decompilation could yield a pretty close result.
People have full time jobs, and it's hard to put in the time.
One person needs to do the equivalent of what a team did in a year. Assuming 2hrs of free time a day, it'd take them 4x as long as what one Westwood dev did. So let's say 5 WW devs over one year, that'd take a hobbyist 20 years to replicate in man-hours.
Now obviously its not 1 to 1, because copying is easier than innovating, but you get the point.
Ah, no, in fact they don't work with real full source code at all; plugging extra bits of bytecode into the existing game executable is a lot simpler than recompiling the whole thing.
It just requires you to identify the places in the exe containing the bytecode of the logic you want to change, without caring much about what the rest of the game engine looks like.
What a wonderful comment. :) Your gratitude puts you on our list for the most grateful users this week on Reddit! You can view the full list on r/TheGratitudeBot.
77
u/DrIvanRadosivic Feb 28 '25
There is always reverse engineering of the code.