************************************* | Star Fighter 3000 | | Documentation Project | ************************************* | Reference 3: File structure | | Changed: CJB 17.12.11 | ************************************* N.B. This text is best viewed at a display width of 77 columns. To create an index do a 'List of found' search for ">>". The information in this document pertains to the original Fednet release of the game (1.00) and is of limited relevance to subsequent (iSV/APDL) versions. ----------------------------------------------------------------------------- >> Contents: ========= 3.1 Directory tree 3.2 Game files 3.2.1 !Boot 3.2.2 !Run 3.2.3 !Sprites 3.2.4 3DV_Handle 3.2.5 CMP_Handle 3.2.6 Code 3.2.7 Control 3.2.8 Font 3.2.9 Intro 3.2.10 Map1 3.2.11 MemCDA 3.2.12 Pic1 3.2.13 Pic2 3.2.14 Pointer1 3.2.15 Pointer2 3.2.16 SFX_Handle 3.2.17 TexData 3.2.18 TexMap 3.2.19 G-G-G ----------------------------------------------------------------------------- >> 3.1 Directory tree ================== !Star3000 +-!Boot +-!Run +-!Sprites +-Code | +-3DV_Handle | +-CMP_Handle | +-Code | +-Control | +-Font | +-Intro | +-Map1 | +-MemCDA | +-Pic1 | +-Pic2 | +-Pointer1 | +-Pointer2 | +-SFX_Handle | +-TexData | \-TexMap +-Disc2 | \-Landscapes | +-Base | | +-FxdObj | | | \-Academy1-Warrior2 | | \-SprScape | | \-Academy1-Warrior2 | +-Graphics | | \-Chemical-Warrior | +-Hill | | \-Chem-Warrior | +-Level | | +-Animations | | | +-Blank | | | +-E | | | | \E_01-E23 | | | +-H | | | \-M | | +-FxdObj | | | +-Blank | | | +-E | | | | \-E_10-E_36 | | | +-H | | | | \-H_01-H-31 | | | \-M | | | \-M_03-M_36 | | \-SprScape | | +-Blank | | +-E | | | \-E_11-E_26 | | +-H | | | \-H_01-H_26 | | \-M | | \-M_05-M_27 | +-Missions | | +-E | | | \-E_01-E_36 | | +-H | | | \-H_01-H_36 | | \-M | | \-M_01-M_36 | +-Palette | | \-Default-RedShip | +-Planets | | \-Alien-Mars | +-Sky | | \-Chem-Warrior3 | \-Sprites | \-Chem-Warrior +-G-G-G \-Landscapes +-Base | +-FxdObj | | \-Academy1 | \-SprScape | \-Academy1 +-Graphics | \-Earth1 +-Hill | \-Earth +-Level | +-Animations | | \-E | | \-E_01 | +-FxdObj | | \-Blank | \-SprScape | \-Blank +-Missions | \-E | \-E_01 +-Palette | \-Default +-Planets | \-Earth +-Sky | \-Earth \-Sprites \-Earth ----------------------------------------------------------------------------- >> 3.2 Game files ============== >> 3.2.1 !Boot Filetype: &FEB (Obey) Purpose: Sets the game directory and loads the application icon. >> 3.2.2 !Run Filetype: &FEB (Obey) Purpose: Sets the game directory and wimpslot and runs the game. Notes: Contains whitespace commands (defined in the module 'Sol' contained in 3DV_Handle) which are used to load and decrypt the files CMP_Handle, SFX_Handle, and Map1. For instance "Trim lines" in StrongED will produce no visible effect, but corrupt the Obey file! >> 3.2.3 !Sprites Filetype: &FF9 (Sprite) Purpose: Contains the application icon. Notes: The commercial distribution does not contain the icons to be used for the internal game files (&154,&300+,&400+). >> 3.2.4 3DV_Handle Filetype: &FFC (Utility) Purpose: Relocatable module that provides whitespace commands to load other modules and the real game loader. Notes: This code decrypts itself in 31 iterations (incompatible with a Harvard architecture such as StrongARM) then initialises a module named 'Sol' that it wrapped. The module sets up a whitespace command ' ', which is used subsequently to load CMP_Handle, SFX_Handle, and Map1. Unused commands are also defined, including decompression (' ') and a command to trigger the copy protection ('Dtya'). The main purpose of 'Sol' is to prompt the user to insert the original program disc, and it won't run the game unless you do so. The copy protection code may be removed using either Wag Software's NoDisc, or my own Star Fighter patch. >> 3.2.5 CMP_Handle Filetype: &FFA (Module) Purpose: Relocatable module that provides a decompression command. Notes: This file is an encrypted version of a module named 'FDComp' that provides a single star command 'LComp', to load and decompress a file to a specified memory address. The algorithm is detailed in another document. Internal development versions of the game sometimes had the module in a file named 'CMP_Handler'. The same compression algorithm is implemented as a command in the module 'Sol'. >> 3.2.6 Code Filetype: &154 (Fednet compressed) Purpose: Main game engine. Notes: Decompressed by 'FDComp'. >> 3.2.7 Control Filetype: &154 (Fednet compressed) Purpose: Support routines, menus, map, shop, file handling. Notes: Decompressed by 'FDComp'. >> 3.2.8 Font Filetype: &154 (Fednet compressed) Purpose: Bitmap font used for large text (not the teletype-like text) in the game and its menu, bonus and level selection screens. The file format is detailed in another document. Notes: Decompressed by 'FDComp'. >> 3.2.9 Intro Filetype: &154 (Fednet compressed) Purpose: Code to generate the TV static effect and display the game's loading screens. Notes: Decompressed by 'FDComp'. >> 3.2.10 Map1 Filetype: &FFD (Data) Purpose: The real game loader. Notes: This file is encrypted. Kills the module 'Sol', checks that the game directory contents are correct. Runs 'Pointer1' and 'Pointer2'. Loads the two title screens and 'Intro', starts the intro code. Loads, relocates and links the game engine ('Code') and the support code ('Control'). Starts the game. >> 3.2.11 MemCDA Filetype: &FFC (Utility) Purpose: Position-independent code to set up dynamic area sizes. Notes: First code to be run. Minimises RMA, sprite area, RAM disc, and allocates 160 KB screen memory for two 80 KB buffers (each 320x256 pixels, with 8 bits per pixel). >> 3.2.12 Pic1 Filetype: &154 (Fednet compressed) Purpose: World Federation Entertainments Network title screen (as raw bitmap). Notes: Decompressed by 'FDComp'. >> 3.2.13 Pic2 Filetype: &154 (Fednet compressed) Purpose: Star Fighter 3000 title screen (as raw bitmap). Notes: Decompressed by 'FDComp'. >> 3.2.14 Pointer1 Filetype: &FFC (Utility) Purpose: Code to define mouse pointer shapes for TV channel display in introduction. Notes: Redefinition code with pointer bitmaps appended: Shape 1 - "Channel 0" Shape 2 - "No signal" Shape 3 - "Channel 3" Shape 4 - "Fednet Sport" >> 3.2.15 Pointer2 Filetype: &FFC (Utility) Purpose: Code to define mouse pointer shapes for the mission map and shop. Notes: Redefinition code with pointer bitmaps appended: Shape 1 - Cross pointer Shape 2 - "View Target" Shape 3 - Arrow pointer Shape 4 - N/E/S/W >> 3.2.16 SFX_Handle Filetype: &FFA (Module) Purpose: The module used to drive the sound effects and music in the game. Notes: This file is encrypted. The module provides 10 SWIs (named SFX_a to SFX_j), which do actions such as pitch change, trigger sound effect, stop sounds, play music track etc. A separate manual (StrongHelp format) is available. >> 3.2.17 TexData Filetype: &FFD (Data) Purpose: Look-up table used by the code that draws texture-mapped floor/ceiling. Notes: The look-up table has 129 rows of data, each of which is 1 KB. The texture mapper chooses which row to use according to the y angle (pitch) of the camera. Each look-up gets a pair of half-word (16 bit) values, subsequently scaled by the z position (height) of the camera. The pairs of values at byte offsets not an exact multiple of 8 are only used for the highest detail level. The last 1020 bytes of the file are garbage. The 'garbage' is a fragment of the assembly language source code for the game. Oops! >> 3.2.18 TexMap Filetype: &FFD (Data) Purpose: Unknown, something to do with the game loader. >> 3.2.19 G-G-G Filetype: &FF8 (Absolute) Purpose: Unknown, something to do with the game loader. Notes: May be deleted if copy protection is removed.