Author Topic: An Old Binder  (Read 2089 times)

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
An Old Binder
« on: April 04, 2007, 07:37:25 PM »
I was cleaning out my desk drawer a little, and I came across an old binder. It was about an inch thick full of OP2 related stuff. Mostly a lot of printed pages of assembly that I was analysing at the time, but a few hand written pages too. It's all pretty much outdated and useless now, and I was thinking of throwing it out or using it as scrap paper, but after flipping through a few pages I couldn't help but feel a little nostalgic.

Just the first few pages had stuff from virtual function tables of units, to memory layouts of unit and technology info, and UNIT_PROP tags, to checksums and cheats, and what the EXE patches were (bytes changed, from what, to what, and why), to what looks like it was the plans for an early cheat detector but I'm not too sure anymore, to sizes of the exported classes, to calling conventions of the exported functions, and the memory layout of what function and data pointers to DLL code/data was where. It also had notes on how mines.txt was used, how GetSaveRegions should be used, what needed to be done to get BuildingGroups to work, and what oddities might popup, as well as some notes on the old NoCD patch that made actually having a CD useless rather than just not required. It also had a lot of details on network code, including important function addresses, network packet layouts, where internal IPs got encapsulated. It also had details on the internal Player class and where the CommandPackets were executed, and a little bit about the Filter class and user interface events.

And that was just the first few pages of mostly hand written notes. There were also a few nicely printed pages at the back on things like the network packet structure, the types of CommandPackets (before the table in the EXE that told us what they did was found), and a summary of EXE patches that were applied.

The main bulk of the binder is the assembly printouts. Lots of handwritten notes added off to the side, and a few diagrams of memory layouts or notes about what type of data structure was being used and how they worked. It covered code from starting SIGS and validation checking, to loading and parsing tech files, and some very interesting parts on how the data in the original VOL files gets decompressed. There were a few printouts of some of the files at that point. There was even a bit stream printed of part of morale.txt where the bits were broken down into the chunks that represented the output characters. I remember it being quite helpful in understanding how the code worked, especially since the representation of certain characters changed, due to the adaptive nature of the compression. There was also the checksumming algorithm for checking the EXE and the loaded data files, and locations of where things like the "ART" data was loaded. There's even a list of code locations where things get drawn, like the main map view, the mini map, the details pane, buttons, and BitBlt, CreateCompatibleDC, and CreateDIBSection are called. It's even got an attempt at deciphering what the name decoration used on the exported functions means (but there is a Windows API function that does this already, which I didn't know about at the time). Then there's a huge amount of code on CommandPacket processing, and details on how units are created (and wreckage in particular). Then there was a fairly detailed analysis of the network code that helped with the NAT-fix patches. And of course, the cheats. Nice details on how the game checks for cheat codes, including the hasing function, and what it does when the cheats were activated. I knew what the 4th cheat did long before I ever found a code to activate it.


Most of that stuff in now in posted txt files that are also backup up on many CDs, or in the OllyDbg comment file. Although, now that I've had another look through that stuff, I sort of wonder if there are a few things in there that aren't written anywhere else. Probably nothing of real great important though, or nothing that can't be figured out in a day. But a little bit here and there might add up I guess.
 

Offline Freeza-CII

  • Administrator
  • Hero Member
  • *****
  • Posts: 2308
An Old Binder
« Reply #1 on: April 05, 2007, 04:36:24 AM »
are you going to autograph it and sell it on ebay?

Offline dm-horus

  • Banned
  • Hero Member
  • *****
  • Posts: 1042
An Old Binder
« Reply #2 on: April 05, 2007, 11:48:06 AM »
I honestly think you should scan them and put up for access or at least type them out for us. Theres no reason to throw away something with that much info, even if it is outdated. You never know who might be able to use it.

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
An Old Binder
« Reply #3 on: April 05, 2007, 06:38:57 PM »
Hah, nice Freeza. If only someone was willing to pay for it. ... but considering the game itself has a no-CD patch applied to it....


Most of it is already typed up. And if there is something in there that isn't typed up, it'd probably take about just as much time to figure it out again as it would to figure out my notes.  :blush:  Some of them were more of a temporary thing, where I'd remember what I was doing the last few days, but maybe not all the important memory addresses. But seriously, even if most of it wasn't already typed up, do you know how long that would take to type up, or even to scan? The binder is about 1 inch thick.
 

Offline dm-horus

  • Banned
  • Hero Member
  • *****
  • Posts: 1042
An Old Binder
« Reply #4 on: April 06, 2007, 09:36:41 AM »
I still think its worth putting on display! Its not often someone invests an inch of research into op2. If nothing else, do it for nostalgia. If you dont I imagine youll end up just chucking it.

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
An Old Binder
« Reply #5 on: April 06, 2007, 05:10:33 PM »
Knowing me it'll sit in a drawer for another few years, being largely forgotten about.