Reverse Engineering More Data Files

Reverse Engineering More Data Files

Last week I spent a bit of time trying to reverse a few of the remaining data files that aren’t yet parsed in Open76. Looking at it now there actually aren’t many left. Right now the only notable one I can think of is the XDF file format and I’m already aware of what it is - it basically consists of the animated sprite effects; explosions, muzzle flashes, smoke, dust clouds, etc.

Most of the data file exploring I’ve done is using a hex editor and scouring the internet for any references to other people having done the same. Most of the time this is enough since the more data that’s uncovered, the missing pieces can become a simple case of ‘connect the dots’.

This time I spent a bit of time exploring the less exciting files - not the main game content itself but the UI assets, which appear to be located in the DATABASE.MW2 file located in the game directory. The interesting thing is that unlike the other large ZFS archive file, there are no real IDs or names for the contents of the database. The only real access point is a list of offsets in the file which correspond to files. Inside the database there are a number of files:

  • WAV - Audio files
  • SHP - Contains multiple sprites, used for menu UI images
  • PCX - Image format used for loading screen and splash screen (outside the MW2 file)
  • EFA - Compressed PCX files, used for UI backgrounds
  • FNT - Font files

All of these, with the exception of the FNT files are parsed correctly. Because of the fact there was compression and other obstacles involved there were some roadblocks. What’s particularly helpful is that because Interstate 76 uses the Mech Warrior 2 engine, some of these formats were already reversed by community members of the MW2 engine.

I also spent a fair bit of time looking through a debugger. This was interesting, however quite a slow process, primarily because the only reverse engineering experience with such a tool I have is from working on this project. While I can somewhat see what’s going on from the disassembly, there’s quite a contrast between assembly and object orientated languages such as C++ or C# which I’m used to. Nevertheless I found some interesting albeit not particularly helpful things such as a random user.rpt file reference that doesn’t go anywhere, yay!

The end result though is that with the DATABASE.MW2 contents figured out, Open76 now has an identical main menu, bringing it one step closer to its goal.