August 16th, 2013

Second Reality Code Review: Part 4 (DEV Vs Prod)

I love you Hoi-En.
While reading the source code of Second Reality, the most striking aspect was how much attention the team dedicated to make the switch DEV to PROD seamless.

Part 1: Introduction
Part 2: Engine
Part 3: Demo Interrupt Server
Part 4: Dev Vs Prod
Part 5: Parts


In Development mode, each component of the demo was an individual executable.

  • The DIS was loaded in a resident TSR and accessed via Interrupt 0cfh.
  • The loader calls the DOS Interrupt 21h in order to Open, Read, Seek and Close files.

This DEV configuration is advantageous :

  • Each coder and graphist could work on an executable and test it individually without impacting the rest of the team.
  • The full demo could be tested at any moment via the small SECOND.EXE (without all the EXE appended at the end). Each PART executable was loaded via a DOS 021h interrupt from a separate file.

Production (Demo mode)

In Production mode, the small SECOND.EXE (containing the Loader), the DIS and the EXE Parts were merged into a fat SECOND.EXE.

  • The DIS is still accessed via 0fch Interrupt.
  • The DOS 21h API was patched with custom FC routines that would open files from the end of the fat SECOND.EXE file.

This DEV configuration is advantageous in terms of loading speed and anti-reverse-engineering...but most of all, from a PART programming or loading perspective : NOTHING changes form DEV to PROD.


Second Reality Parts



Fabien Sanglard @2013