Difference between revisions of "SA SCM"

From GTAMods Wiki
Jump to navigation Jump to search
Line 1: Line 1:
  [02 00 01] + 32 bit int         jump to next section
+
  (02 00 01)h + 32 bit int     Jump to second segment
  byte                           padding?? (73h)
+
  byte                         Padding
   ...                          global vars
+
   (Global vars)
  [02 00 01] + 32 bit int         jump to next section
+
  (02 00 01)h + 32 bit int     Jump to third segment
  byte                           section id (0)
+
  byte                         Segment id
   32 bit int                   num model names
+
   32 bit int                 Number of models
  ...                          24 byte model names (first = unused)
+
  (model names)              24 byte model names * number of models(model 0 not used)
  [02 00 01] + 32 bit int         jump to next section
+
  (02 00 01)h + 32 bit int     Jump to fourth segment
  byte                           section id (1)
+
  byte                         Segment id
   32 bit int                   size of main
+
   32 bit int                 MAIN size
   32 bit int                   size of largest mission
+
   32 bit int                 Largest mission size
   32 bit int                   num missions
+
   32 bit int                 Number of missions
   32 bit int                   highest number of local vars used in a mission or external script
+
   32 bit int                 Highest number of locals used in mission/exernal
   ...                          32 bit ints = mission offsets in file
+
   (mission addresses)        32 bit addresses * number of missions
  [02 00 01] + 32 bit int         jump to next section
+
  (02 00 01)h + 32 bit int     Jump to fifth segment
  byte                           section id (2)
+
  byte                         Segment id
   32 bit int                   size of largest external script
+
   32 bit int                 Largest external size
   32 bit int                   num external scripts
+
   32 bit int                 Number of externals
   28 bytes per external script file:
+
   (external data):          28 byte external data * number of externals
  20 bytes                     script filename
+
    20 bytes                 Name of external
  32 bit int                   script offset (in memory, relative to base of main.scm?)
+
    32 bit int               Offset of external
  32 bit int                   script len
+
    32 bit int               Size of external
  [02 00 01] + 32 bit int         jump to next section
+
  (02 00 01)h + 32 bit int     Jump to sixth segment
  byte                           section id (3)
+
  byte                         Segment id
   32 bit int                   ??? (0)
+
   32 bit int                 Unknown
  [02 00 01] + 32 bit int         jump to next section
+
  (02 00 01)h + 32 bit int     Jump to seventh segment
  byte                           section id (4)
+
  byte                         Segment id
   32 bit int                   size of global var section
+
   32 bit int                 Size of global var space
   32 bit int                   ??? (862h=2146)
+
   32 bit int                 Unknown
  ...                            code starts here!
+
(MAIN code)                 MAIN section, equal to size defined earlier
 
+
  (mission code)              The mission data, missions stored at offsets defined earlier
  
 
[[Category:Mission Script]]
 
[[Category:Mission Script]]

Revision as of 16:39, 15 November 2005

(02 00 01)h + 32 bit int     Jump to second segment
byte                         Padding
  (Global vars)
(02 00 01)h + 32 bit int     Jump to third segment
byte                         Segment id
  32 bit int                 Number of models
  (model names)              24 byte model names * number of models(model 0 not used)
(02 00 01)h + 32 bit int     Jump to fourth segment
byte                         Segment id
  32 bit int                 MAIN size
  32 bit int                 Largest mission size
  32 bit int                 Number of missions
  32 bit int                 Highest number of locals used in mission/exernal
  (mission addresses)        32 bit addresses * number of missions
(02 00 01)h + 32 bit int     Jump to fifth segment
byte                         Segment id
  32 bit int                 Largest external size
  32 bit int                 Number of externals
  (external data):           28 byte external data * number of externals
    20 bytes                 Name of external
    32 bit int               Offset of external
    32 bit int               Size of external
(02 00 01)h + 32 bit int     Jump to sixth segment
byte                         Segment id
  32 bit int                 Unknown
(02 00 01)h + 32 bit int     Jump to seventh segment
byte                         Segment id
  32 bit int                 Size of global var space
  32 bit int                 Unknown
(MAIN code)                  MAIN section, equal to size defined earlier
(mission code)               The mission data, missions stored at offsets defined earlier