Jan 22th, 2014

Strike Commander: Architecture and Documentation

This page describes the architecture of Strike Commander and provides a list of all relevant documentation.


TABLE OF CONTENT :

Part 1: Introduction
Part 2: Game Architecture
Part 3: Reverse Engineer Assets
Part 4: Play the game again
Part 5: Oculus Rift
Part 6: Epilogue

Architecture

Strike Commander is not made of one monolithic executable. Instead six executable collaborate together to generate the game experience. The core idea is similar to what found in Second Reality code Review. Several EXE can have multiple explanations:

  • Improved team collaboration (each member could work on a part without impacting the others).
  • Programs were limited to 640KB RAM because of DOS real-mode. A big monolithic executable would have caused a lot of disk swapping or not been loadable at all.

Upon inspection with IDA, it turned out that each executables featured DOS 21h system call to load and start others .EXE. For example, the story mode which takes care of dialogs and cinematic is OPTTEST.EXE. It removes itself from RAM and load/starts STRIKE.EXE when the 3D action is needed.

DosBOX was very handy to explore and discover what components were responsible for which part of Strike Commander: The currently running executable name appears in the Window Title:

Executable Screenshot Notes
INSTALL.EXE A laucher that starts MKGAME.EXE
MKGAME.EXE

The real installer:
  • Make boot disk.
  • Detect sound card.
  • Perform copy protection (question with answer in Sudden Death magazine).
  • Decompress the 8 floppy disks.
MKTERR.EXE

The map generator in charge of producing all elements of a map and group them in a PAK:
  • ALASKA.PAK
  • ANDMAL1.PAK
  • ANDMAL2.PAK
  • ARENA.PAK
  • CANYON.PAK
  • EGYPT.PAK
  • EUROPE.PAK
  • MAPDATA.PAK
  • MAURITAN.PAK
  • QUEBEC.PAK
  • RHODEI.PAK
  • SANFRAN.PAK
  • TURKEY.PAK
OPTTEST.EXE


Responsible for all midgames dialogs, cinematic, menu, hangar weapon selection and object viewer.
SC.EXE The way the game used to be started. It usually load and executes OPTTEST.EXE.
STRIKE.EXE
RealSpace 3D engine. Responsible for action phase.


Note: If you delete a map PAK archive, STRIKE.EXE will detect the missing file and will automatically spawn MKTERR.EXE in order to regenerate the map.

So most of the effort is to be focused on OPTTEST.EXE and STRIKE.EXE. Something that hasn't been done yet is to determine how parameters are passed between them. Dos 21h system calls allows command line parameters and a specific page of memory to contain data but the state of the game could also be stored on HD: IDA will tell.

Important files List

Here are the important files :



    //Executables
      16 -rw-r--r--  1 fabiensanglard  staff      7,793 17 Jan 03:02 INSTALL.EXE
     264 -rw-r--r--  1 fabiensanglard  staff    131,696 17 Jan 03:02  MKGAME.EXE
     400 -rw-r--r--  1 fabiensanglard  staff    203,744 17 Jan 03:03  MKTERR.EXE
    1704 -rw-r--r--  1 fabiensanglard  staff    870,528 17 Jan 03:02 OPTTEST.EXE
      16 -rw-r--r--  1 fabiensanglard  staff      7,793 17 Jan 03:09      SC.EXE
    1464 -rw-r--r--  1 fabiensanglard  staff    746,304 17 Jan 03:03  STRIKE.EXE

    //Assets
   19832 -rw-r--r--  1 fabiensanglard  staff 10,150,560 17 Jan 03:03 GAMEFLOW.TRE
     952 -rw-r--r--  1 fabiensanglard  staff    485,877 17 Jan 03:02     MISC.TRE
    1304 -rw-r--r--  1 fabiensanglard  staff    665,456 17 Jan 03:02 MISSIONS.TRE
   13544 -rw-r--r--  1 fabiensanglard  staff  6,932,708 17 Jan 03:02  OBJECTS.TRE
    1760 -rw-r--r--  1 fabiensanglard  staff    899,145 17 Jan 03:02    SOUND.TRE
    3288 -rw-r--r--  1 fabiensanglard  staff  1,681,738 17 Jan 03:02 TEXTURES.TRE

    //Maps
    2040 -rw-r--r--  1 fabiensanglard  staff  1,042,674 17 Jan 03:05   ALASKA.PAK
    2040 -rw-r--r--  1 fabiensanglard  staff  1,042,570 17 Jan 03:04  ANDMAL1.PAK
    2040 -rw-r--r--  1 fabiensanglard  staff  1,042,960 17 Jan 03:09  ANDMAL2.PAK
    2048 -rw-r--r--  1 fabiensanglard  staff  1,046,382 17 Jan 03:09    ARENA.PAK
    2040 -rw-r--r--  1 fabiensanglard  staff  1,043,268 17 Jan 03:06   CANYON.PAK
    2032 -rw-r--r--  1 fabiensanglard  staff  1,038,716 17 Jan 03:05    EGYPT.PAK
    2024 -rw-r--r--  1 fabiensanglard  staff  1,033,096 17 Jan 03:07   EUROPE.PAK
     656 -rw-r--r--  1 fabiensanglard  staff    333,464 17 Jan 03:02  MAPDATA.PAK
    2040 -rw-r--r--  1 fabiensanglard  staff  1,044,396 17 Jan 03:03 MAURITAN.PAK
    2032 -rw-r--r--  1 fabiensanglard  staff  1,037,798 17 Jan 03:04   QUEBEC.PAK
    2040 -rw-r--r--  1 fabiensanglard  staff  1,043,840 17 Jan 03:08   RHODEI.PAK
    2048 -rw-r--r--  1 fabiensanglard  staff  1,046,316 17 Jan 03:06  SANFRAN.PAK
    2048 -rw-r--r--  1 fabiensanglard  staff  1,045,766 17 Jan 03:08   TURKEY.PAK

    //Maps Seeds Files
      80 -rw-r--r--  1 fabiensanglard  staff     37,732 17 Jan 03:02 MSFILES.PAK

    // The 3D engine palette
      8 -rw-r--r--  1 fabiensanglard  staff       1,806 17 Jan 03:02  PALETTE.IFF
    
  

Documentation relevant to Strike Commander

Next

Reverse Engineering Assets

 

@