There are multiple versions of this file format.

    Format Version | Signature    | PCC Version      | Bytes per Record
   ================|==============|==================|==================
          0        | "CCsim",26   | 0.99.10          |        51
          1        | "CCbsim0",26 | 1.0              |        53
          2        | "CCbsim1",26 | 1.0.7            |        53
          3        | "CCbsim2",26 | 1.0.16    1.99.2 |        57
          4        | "CCbsim3",26 | 1.1.11.6  1.99.2 |        65
          5        | "CCbsim4",26 |          1.99.22 |        67

All PCC/CCBSim versions can read all older format versions. Program versions 1.1.11.6/1.99.2 write version 3 if needed, higher versions only when required. Earlier versions always write their own version.

After the initial 6- or 8-byte magic string and the count indicator word, the file always consists of records of the same fixed size as given in the above table. If one record requires use of a special format feature, all records are written with that variant.

 +0   n BYTEs   Signature. 6 or 8 bytes, see above
 +n     WORD    Bit 0..14       Number of ships
                Bit 15          Set if a planet is participating
 +?   n BYTEs   Records of 51..67 bytes each, one for each ship.
                 +0  42 BYTEs   VCR object record for this ship. The
                                picture / hull type field is not
                                initialized.
                +42     WORD    Engine Type (1..9)
                +44     WORD    Hull Type (1..105)
                                (Format Version 3): 0 means a "custom
                                ship" (no corresponding HULLSPEC entry)
                +46     WORD    Shield status (0..100)
                +48   3 BYTEs   Friendly Code
               --- Format version 1 and higher ---
                +51     WORD    Aggressiveness
                                 0      passive
                                 1..12  Primary Enemy
                                 13     no fuel
                                 -1     Kill
               --- Format version 3 and higher ---
                +53     WORD    Mass (used when the hull type is zero)
                +55     WORD    Flags
                                 bit 0          "Random FC" enabled
                                 bits 1..3      (1.0.17+) randomize these
                                                chars of FC only
                                 bit 4          (1.1.11.6+) rating override
                                                should be used, implies use
                                                of format version 4 or higher
                                 bit 5          (1.1.13+) ship is cloaked
                                 bit 6          (1.1.13+) ship is deactivated
                                 bits 7..8      (1.1.17+) PlanetImmunity
                                 bits 9..10     (1.1.17+) FullWeaponry
                                 bits 11..12    (1.1.17+) Commander
                                Ship function flags (bits 7..12) can have the
                                following values for each function:
                                 0x             Use default assignment
                                 10             Ship does not have device
                                 11             Ship has device
               --- Format version 4 and higher ---
                +57     DWORD   FLAK Targeting rating
                +61     WORD    FLAK Compensation rating
                                These two fields are evaluated only if flag
                                bit 4 is set.
                +63     WORD    (1.99+) Intercept Target, for intercept-attack.
                                This field is reserved and must be zero in
                                earlier versions.
               --- Format version 5 and higher ---
                +65     WORD    Additional flags
                                 bits 0..1      Triple Beam Kill Ability
                                 bits 2..3      Double Beam Charge Ability
                                 bits 4..5      Double Torp Charge Ability
                                 bits 6..7      Elusive Ability
                                 bits 8..9      Squadron Ability
                                The interpretation of the Ability bit pairs
                                is the same as for the ship functions in the
                                first Flags field.
--- only if planet participates ---
 +?   n BYTEs   Planet record (51..67 bytes):
                 +0  10 WORDs   (Format version 2 and higher) Torpedoes on
                                starbase. Unused in earlier versions.
                +20   2 WORDs   (unused)
                +24     WORD    Id
                +26     WORD    Owner
                +28     WORD    (unused)
                +30     WORD    Beam Tech Level on starbase (1..10, 0=no
                                starbase)
                +32     WORD    (unused)
                +34     WORD    Number of fighters on starbase
                +36     WORD    (unused)
                +38     WORD    (Format versions 0 and 1) Number of
                                torpedoes on starbase, corresponding to
                                the torpedo type below. Unused in later
                                versions.
                +40     WORD    Torpedo Tech Level on starbase (1..10,
                                0=Tech 1). Only used in PHost mode with
                                PlanetsHaveTorps option enabled.
                +42     WORD    Starbase defense posts
                +44     WORD    Planetary defense posts
                +46     WORD    (unused)
                +48   3 BYTEs   Friendly Code
               --- Format version 1 and higher ---
                +51     WORD    (unused)
               --- Format version 3 and higher ---
                +53     WORD    (unused)
                +55     WORD    Flags (unused, must be zero)
               --- Format version 4 and higher ---
                +57     DWORD   FLAK Targeting rating
                +61     WORD    FLAK Compensation rating
                +63     WORD    reserved, 0
               --- Format version 5 and higher ---
                +65     WORD    reserved, 0

Unused fields should be zero. Planets in a simulation currently are a horrible hack.

Owner fields may be 12, for a totally "unspecial" race (Alien Marauders).

Note that PCC 1.0.11 and higher permit to generate ships with Id numbers greater than 500. The maximum number of ships in a simulation is 100 in PCC 1.0.9 and earlier, and 200 in later versions.