https://moddingwiki.shikadi.net/w/api.php?action=feedcontributions&user=Malvineous&feedformat=atomModdingWiki - User contributions [en-gb]2024-03-28T14:52:22ZUser contributionsMediaWiki 1.35.1https://moddingwiki.shikadi.net/w/index.php?title=User:AllenP&diff=11832User:AllenP2024-03-28T04:02:15Z<p>Malvineous: Creating user page for new user.</p>
<hr />
<div>Hi. My name is Allen Pilgrim. I am the Game Designer and Programmer of Xargon and Kiloblaster. I also did the Game Design for Super ZZTs: Monster Zoo. I was one of Tim Sweeney's earliest hires. I noticed that there was a note for Jill of the Jungle that the editor feature had been removed from Xargon. I will be releasing the Xargon Level Editor version very soon. The last couple weeks I have been creating extensive documentation and working with several people from the Xargon Facebook group to help make it even better. I would like to add a note to the Jill and Xargon pages that it is on the verge of being released. I would be equally happy if one of your team would add that note. I'm sure there is other information I can contribute. Thank you.</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=User:Jopadan&diff=11794User:Jopadan2024-02-26T22:02:50Z<p>Malvineous: Creating user page for new user.</p>
<hr />
<div>I don't want to share a biography</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=Template:BeginFileFormatTools&diff=11790Template:BeginFileFormatTools2024-02-18T13:38:18Z<p>Malvineous: Undo bulk edit, this is the one place we want it to still say "type=group"</p>
<hr />
<div><noinclude><br />
[[Category:Layout templates]]<br />
This is the table heading for a list of file format tools.<br />
<br />
== Examples ==<br />
<br />
=== Type=archive ===<br />
<br />
This type is used for game archives. These are similar to .zip files in that they store a collection of other files, usually with filenames and sometimes with compression. A key point of an archive is that it can store arbitrary data, so tilesets are usually not considered archives as they cannot store non-image data like game maps or sound effects.<br />
<br />
''This used to be type=group, however it has now changed to type=archive. Please update if you see any old type=group uses.''<br />
<br />
<div class="templateExample"><br />
<div class="preview"><br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = Example<br />
| Platform = DOS<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = View only<br />
| editMetadata = Only title<br />
| notes = Example entry<br />
}}<br />
{{EndFileFormatTools}}<br />
</div><br />
<pre><br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = Example<br />
| Platform = DOS<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = View only<br />
| editMetadata = Only title<br />
| notes = Example entry<br />
}}<br />
{{EndFileFormatTools}}<br />
</pre><br />
</div><br />
<br />
{|class="wikitable"<br />
! Parameter/example !! Meaning<br />
|-<br />
| canExtract = Yes || Can this program extract files from the archive?<ul><br />
<li>'''Yes''': this program can extract files from the game's archive files</li><br />
<li>'''Partial''': this program can extract some files (but not all) from the game's archive files</li><br />
<li>'''No''': this program cannot extract any files from the game's archive files</li><br />
</ul><br />
|-<br />
| canDecompress = N/A || Can this program decompress files it extracts? (if supported by the format)<ul><br />
<li>'''Yes''': this program can decompress all files from the game's archive files</li><br />
<li>'''Partial''': this program can decompress some files (but not all) from the game's archive files</li><br />
<li>'''No''': this program cannot decompress any files from the game's archive files</li><br />
<li>'''N/A''': none of the archive files support compression</li><br />
</ul><br />
|-<br />
| canDecrypt = Yes || Can this program decrypt files it extracts? (if supported by the format, must add Encrypt=yes to <nowiki>{{</nowiki>[[:Template:BeginFileFormatTools|BeginFileFormatTools]]}})<br />
|-<br />
| canCreate = No || Can this program create new files in this format from scratch?<br />
|-<br />
| canModify = Yes || Can this program modify parts of the file, leaving the rest unchanged?<br />
|-<br />
| canCompress = Yes || Can this program compress files, if the group file supports compression?<br />
|-<br />
| canEncrypt = Yes || Can this program encrypt files it inserts? (if supported by the format, must add Encrypt=yes to <nowiki>{{</nowiki>[[:Template:BeginFileFormatTools|BeginFileFormatTools]]}})<br />
|-<br />
| editHidden = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit hidden data inside the file? (if supported by the format)<ul><br />
<li>'''Edit''': hidden data can be read and modified</li><br />
<li>'''Read''': hidden data can be viewed/extracted but not changed or set</li><br />
<li>'''No''': hidden data cannot be viewed or changed</li><br />
<li>'''N/A''': this file format does not have anywhere to embed any hidden data</li><br />
</ul><br />
|-<br />
| editMetadata = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit any metadata? (e.g. file description, title, artist, etc.)<ul><br />
<li>'''Edit''': all known metadata can be read and modified</li><br />
<li>'''Partial''': some metadata can be read and/or modified</li><br />
<li>'''Read''': all metadata can be viewed/extracted but not changed or set</li><br />
<li>'''No''': none of the metadata can be viewed or changed</li><br />
<li>'''N/A''': this file format does not have any metadata</li><br />
</ul><br />
|-<br />
| notes = text || Various notes, try to keep as short as possible<br />
|}<br />
<br />
=== Type=audio ===<br />
<br />
This type is used for sound effects (as opposed to music). Typically digitised audio like .wav files, but can also include OPL and PC speaker sound effects as well.<br />
<br />
<div class="templateExample"><br />
<div class="preview"><br />
{{BeginFileFormatTools|Type=audio}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = DOS<br />
| canPlay = Yes<br />
| canCreate = Yes<br />
| canModify = No<br />
| canExport = No<br />
| canImport = Yes; .wav<br />
| editHidden = N/A<br />
| editMetadata = Partial<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</div><br />
<pre><br />
{{BeginFileFormatTools|Type=audio}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = DOS<br />
| canPlay = Yes<br />
| canCreate = Yes<br />
| canModify = No<br />
| canExport = No<br />
| canImport = Yes; .wav<br />
| editHidden = N/A<br />
| editMetadata = Partial<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</pre><br />
</div><br />
<br />
{|class="wikitable"<br />
! Parameter/example !! Meaning<br />
|-<br />
| canPlay = Yes || Can this program play audio in this format?<ul><br />
<li>'''Yes''': this program can play all files in this format</li><br />
<li>'''Partial''': this program can play some files (but not all) in this format</li><br />
<li>'''No''': this program cannot play any files in this format (e.g. it is a conversion utility not a player)</li><br />
</ul><br />
|-<br />
| canCreate = No || Can this program create new files in this format from scratch?<ul><br />
<li>'''Yes''': this program can create empty files in this format</li><br />
<li>'''No''': this program cannot create empty files in this format</li><br />
</ul><br />
|-<br />
| canModify = Yes || Can this program modify parts of the file, leaving the rest unchanged?<ul><br />
<li>'''Yes''': this program can modify all files in this format</li><br />
<li>'''Partial''': this program can modify parts of files but there are some parts it cannot change</li><br />
<li>'''No''': this program cannot modify any files in this format</li><br />
</ul><br />
|-<br />
| canExport = Yes; .wav || Can this program export the image into another format?<ul><br />
<li>'''Yes''': this program can convert this file format to the ones listed</li><br />
<li>'''No''': this program cannot convert this file format to a different format</li><br />
</ul><br />
|-<br />
| canImport = Yes; .wav || Can this program import another image into this format?<ul><br />
<li>'''Yes''': this program can read the listed formats and convert them to this file format</li><br />
<li>'''No''': this program cannot convert any other file formats into this format</li><br />
</ul><br />
|-<br />
| editHidden = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit hidden data inside the file? (if supported by the format)<ul><br />
<li>'''Edit''': hidden data can be read and modified</li><br />
<li>'''Read''': hidden data can be viewed/extracted but not changed or set</li><br />
<li>'''No''': hidden data cannot be viewed or changed</li><br />
<li>'''N/A''': this file format does not have anywhere to embed any hidden data</li><br />
</ul><br />
|-<br />
| editMetadata = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit group file metadata? (e.g. file description, title, artist, etc.)<ul><br />
<li>'''Edit''': all known metadata can be read and modified</li><br />
<li>'''Partial''': some metadata can be read and/or modified</li><br />
<li>'''Read''': all metadata can be viewed/extracted but not changed or set</li><br />
<li>'''No''': none of the metadata can be viewed or changed</li><br />
<li>'''N/A''': this file format does not have any metadata</li><br />
</ul><br />
|-<br />
| notes = text || Various notes, try to keep as short as possible<br />
|}<br />
<br />
=== Type=exe ===<br />
<br />
This type is used for tools that can edit executable files, to patch code, change messages, and alter other hard-coded game attributes.<br />
<br />
<div class="templateExample"><br />
<div class="preview"><br />
{{BeginFileFormatTools|Type=exe}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = Platform<br />
| canView = Yes<br />
| canDecompress = No<br />
| canCreate = No<br />
| canModify = Partial<br />
| canCompress = No<br />
| editHidden = N/A<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</div><br />
<pre><br />
{{BeginFileFormatTools|Type=exe}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = Platform<br />
| canView = Yes<br />
| canDecompress = No<br />
| canCreate = No<br />
| canModify = Partial<br />
| canCompress = No<br />
| editHidden = N/A<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</pre><br />
</div><br />
<br />
{|class="wikitable"<br />
! Parameter/example !! Meaning<br />
|-<br />
| canView = Yes || Can this program view code or patches previously applied to the code?<ul><br />
<li>'''Yes''': this program can view code or patches</li><br />
<li>'''Partial''': this program has some incomplete functionality for viewing code or patches</li><br />
<li>'''No''': this program cannot view any code or patches</li><br />
</ul><br />
|-<br />
| canDecompress = N/A || Can this program decompress/decrypt executable files?<ul><br />
<li>'''Yes''': this program can decompress all executable files in this format</li><br />
<li>'''Partial''': this program can partially decompress some files (but not all) in this format</li><br />
<li>'''No''': this program cannot decompress any executable files in this format</li><br />
</ul><br />
|-<br />
| canCreate = No || Can this program create new files in this format from scratch?<br />
|-<br />
| canModify = Yes || Can this program modify parts of the file, leaving the rest unchanged?<br />
|-<br />
| canCompress = Yes || Can this program compress/encrypt files?<ul><br />
<li>'''Yes''': this program can compress all executable files in this format</li><br />
<li>'''Partial''': this program can partially compress some files (but not all) in this format</li><br />
<li>'''No''': this program cannot compress any executable files in this format</li><br />
</ul><br />
|-<br />
| editHidden = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit hidden data inside the file? (if supported by the format)<ul><br />
<li>'''Edit''': hidden data can be read and modified</li><br />
<li>'''Read''': hidden data can be viewed/extracted but not changed or set</li><br />
<li>'''No''': hidden data cannot be viewed or changed</li><br />
<li>'''N/A''': this file format does not have anywhere to embed any hidden data</li><br />
</ul><br />
|-<br />
| notes = text || Various notes, try to keep as short as possible<br />
|}<br />
<br />
=== Type=game ===<br />
<br />
This type is used on a game page rather than a file format page, and lists tools with respect to the general areas of the game it can edit.<br />
<br />
General programs (such as .wav file editors) are not listed here, as the focus is on editors specific to the game itself. However some general programs may be included if their focus is on game-specific file formats, such as [[IMF Format]] which is not used outside of a few of games. If this list grows to be too great (e.g. there are dozens of programs capable of editing .IMF files, so listing all of them on every game using that file format will clutter the results), then a link to the file format page should be placed below the template instead, and all the tools listed once on the file format page instead.<br />
<br />
<div class="templateExample"><br />
<div class="preview"><br />
{{BeginFileFormatTools|Type=game}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = Platform<br />
| grp = Edit<br />
| map = No<br />
| gfx = Read<br />
| mus = No<br />
| sfx = No<br />
| txt = Partial<br />
| sav = N/A<br />
| exe = No<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</div><br />
<pre><br />
{{BeginFileFormatTools|Type=game}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = Platform<br />
| grp = Edit<br />
| map = No<br />
| gfx = Read<br />
| mus = No<br />
| sfx = No<br />
| txt = Partial<br />
| sav = N/A<br />
| exe = No<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</pre><br />
</div><br />
<br />
{|class="wikitable"<br />
! Parameter/example !! Meaning<br />
|-<br />
| grp = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program edit [[:Category:Archive formats|game archives/group files]]?<ul><br />
<li>'''Edit''': this program can read and change all the game's archive files</li><br />
<li>'''Read''': this program can read/extract the game's archives, but it cannot modify them or create them from scratch</li><br />
<li>'''No''': this program cannot do anything with the game's archive files</li><br />
<li>'''N/A''': this game does not have any archive files</li><br />
</ul><br />
|-<br />
| map = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program edit [[:Category:Map formats|maps/levels]]?<ul><br />
<li>'''Edit''': this program can read and change all the game's levels</li><br />
<li>'''Read''': this program can view the game's levels, but it cannot modify them or create them from scratch</li><br />
<li>'''No''': this program cannot do anything with the game's levels</li><br />
<li>'''N/A''': this game does not have any levels/maps</li><br />
</ul><br />
|-<br />
| gfx = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program edit the [[:Category:Image formats|game's graphics]]?<ul><br />
<li>'''Edit''': this program can read and change all the game's graphics</li><br />
<li>'''Read''': this program can read/extract the game's graphics, but it cannot modify them or create them from scratch</li><br />
<li>'''No''': this program cannot do anything with the game's graphics</li><br />
<li>'''N/A''': this game does not have any graphics</li><br />
</ul><br />
|-<br />
| mus = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program edit the [[:Category:Music formats|game's music]]?<ul><br />
<li>'''Edit''': this program can read/extract/convert/play and also modify all the game's music</li><br />
<li>'''Read''': this program can read/extract/convert/play the game's music, but it cannot replace it or change it</li><br />
<li>'''No''': this program cannot do anything with the game's music</li><br />
<li>'''N/A''': this game does not have any music</li><br />
</ul><br />
|-<br />
| sfx = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program edit the [[:Category:Sound formats|game's sound effects]]?<ul><br />
<li>'''Edit''': this program can read/extract/convert/play and also modify all the game's sound effects</li><br />
<li>'''Read''': this program can read/extract/convert/play the game's sound effects, but it cannot replace it or change any of them</li><br />
<li>'''No''': this program cannot do anything with the game's sound effects</li><br />
<li>'''N/A''': this game does not have any sound effects</li><br />
</ul><br />
|-<br />
| txt = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program edit [[:Category:Text formats|text messages displayed in the game]]?<ul><br />
<li>'''Edit''': this program can view and also modify all the game's textual data</li><br />
<li>'''Read''': this program can view the game's textual data, but it cannot replace it or change any of it</li><br />
<li>'''No''': this program cannot do anything with the game's textual data</li><br />
<li>'''N/A''': this game does not have any text</li><br />
</ul><br />
|-<br />
| sav = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program alter [[:Category:Saved game formats|saved games]]?<ul><br />
<li>'''Edit''': this program can view and also modify saved game files</li><br />
<li>'''Read''': this program can view saved game files, but it cannot modify them</li><br />
<li>'''No''': this program cannot do anything with the saved game files</li><br />
<li>'''N/A''': this game does not have any saved game files</li><br />
</ul><br />
|-<br />
| exe = <nowiki>[Edit|Read|No]</nowiki> || Can this program [[:Category:Executable formats|patch the game's code]] to change e.g. enemy behaviour?<ul><br />
<li>'''Edit''': this program can patch the game's code</li><br />
<li>'''Read''': this program can view elements of the game's code, but it cannot modify anything</li><br />
<li>'''No''': this program cannot do anything with the game's code</li><br />
</ul><br />
|-<br />
| editHidden = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit hidden data inside the file? (if supported by the format)<ul><br />
<li>'''Edit''': hidden data can be read and modified</li><br />
<li>'''Read''': hidden data can be viewed/extracted but not changed or set</li><br />
<li>'''No''': hidden data cannot be viewed or changed</li><br />
<li>'''N/A''': this game does not have anywhere to embed any hidden data</li><br />
</ul><br />
|-<br />
| editMetadata = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit group file metadata? (e.g. file description, title, artist, etc.)<ul><br />
<li>'''Edit''': all known metadata can be read and modified</li><br />
<li>'''Partial''': some metadata can be read and/or modified</li><br />
<li>'''Read''': all metadata can be viewed/extracted but not changed or set</li><br />
<li>'''No''': none of the metadata can be viewed or changed</li><br />
<li>'''N/A''': this game does not have any metadata</li><br />
</ul><br />
|-<br />
| notes = text || Various notes, try to keep as short as possible<br />
|}<br />
<br />
=== Type=image ===<br />
<br />
This type is used for any sort of graphics data, including images, animations and tilesets.<br />
<br />
<div class="templateExample"><br />
<div class="preview"><br />
{{BeginFileFormatTools|Type=image}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = Linux/Mac/Windows<br />
| canView = Yes<br />
| canExport = No<br />
| canImport = Yes; .png<br />
| editHidden = N/A<br />
| editMetadata = Partial<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</div><br />
<pre><br />
{{BeginFileFormatTools|Type=image}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = Linux/Mac/Windows<br />
| canView = Yes<br />
| canExport = No<br />
| canImport = Yes; .png<br />
| editHidden = N/A<br />
| editMetadata = Partial<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</pre><br />
</div><br />
<br />
{|class="wikitable"<br />
! Parameter/example !! Meaning<br />
|-<br />
| canView = Yes || Can this program view the image?<ul><br />
<li>'''Yes''': this program can view all files in this format</li><br />
<li>'''Partial''': this program can view some files (but not all) in this format</li><br />
<li>'''No''': this program cannot view any files in this format (e.g. it is a conversion utility not a viewer)</li><br />
</ul><br />
|-<br />
| canExport = Yes; .wav || Can this program export the image into another format?<ul><br />
<li>'''Yes''': this program can convert this file format to the ones listed</li><br />
<li>'''No''': this program cannot convert this file format to a different format</li><br />
</ul><br />
|-<br />
| canImport = Yes; .wav || Can this program import another image into this format?<ul><br />
<li>'''Yes''': this program can read the listed formats and convert them to this file format</li><br />
<li>'''No''': this program cannot convert any other file formats into this format</li><br />
</ul><br />
|-<br />
| editHidden = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit hidden data inside the file? (if supported by the format)<ul><br />
<li>'''Edit''': hidden data can be read and modified</li><br />
<li>'''Read''': hidden data can be viewed/extracted but not changed or set</li><br />
<li>'''No''': hidden data cannot be viewed or changed</li><br />
<li>'''N/A''': this file format does not have anywhere to embed any hidden data</li><br />
</ul><br />
|-<br />
| editMetadata = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit group file metadata? (e.g. file description, title, artist, etc.)<ul><br />
<li>'''Edit''': all known metadata can be read and modified</li><br />
<li>'''Partial''': some metadata can be read and/or modified</li><br />
<li>'''Read''': all metadata can be viewed/extracted but not changed or set</li><br />
<li>'''No''': none of the metadata can be viewed or changed</li><br />
<li>'''N/A''': this file format does not have any metadata</li><br />
</ul><br />
|-<br />
| notes = text || Various notes, try to keep as short as possible<br />
|}<br />
<br />
=== Type=map ===<br />
<br />
This type is used for tools that can edit game levels.<br />
<br />
<div class="templateExample"><br />
<div class="preview"><br />
{{BeginFileFormatTools|Type=map}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = DOS<br />
| canView = Yes<br />
| canCreate = No<br />
| canModify = Partial<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</div><br />
<pre><br />
{{BeginFileFormatTools|Type=map}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = DOS<br />
| canView = Yes<br />
| canCreate = No<br />
| canModify = Partial<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</pre><br />
</div><br />
<br />
{|class="wikitable"<br />
! Parameter/example !! Meaning<br />
|-<br />
| canView = Yes || Can this program view/render the map? (to the screen or to an image file)<ul><br />
<li>'''Yes''': this program can view all files in this format</li><br />
<li>'''Partial''': this program can view some files (but not all) in this format</li><br />
<li>'''No''': this program cannot view any files in this format (e.g. it is a conversion utility not a viewer)</li><br />
</ul><br />
|-<br />
| canCreate = No || Can this program create new files in this format from scratch?<ul><br />
<li>'''Yes''': this program can create empty files in this format</li><br />
<li>'''No''': this program cannot create empty files in this format</li><br />
</ul><br />
|-<br />
| canModify = Yes || Can this program modify parts of the file, leaving the rest unchanged?<ul><br />
<li>'''Yes''': this program can modify all files in this format</li><br />
<li>'''Partial''': this program can modify parts of files but there are some parts it cannot change</li><br />
<li>'''No''': this program cannot modify any files in this format</li><br />
</ul><br />
|-<br />
| editHidden = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit hidden data inside the file? (if supported by the format)<ul><br />
<li>'''Edit''': hidden data can be read and modified</li><br />
<li>'''Read''': hidden data can be viewed/extracted but not changed or set</li><br />
<li>'''No''': hidden data cannot be viewed or changed</li><br />
<li>'''N/A''': this file format does not have anywhere to embed any hidden data</li><br />
</ul><br />
|-<br />
| editMetadata = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit group file metadata? (e.g. file description, title, artist, etc.)<ul><br />
<li>'''Edit''': all known metadata can be read and modified</li><br />
<li>'''Partial''': some metadata can be read and/or modified</li><br />
<li>'''Read''': all metadata can be viewed/extracted but not changed or set</li><br />
<li>'''No''': none of the metadata can be viewed or changed</li><br />
<li>'''N/A''': this file format does not have any metadata</li><br />
</ul><br />
|-<br />
| notes = text || Various notes, try to keep as short as possible<br />
|}<br />
<br />
=== Type=text ===<br />
<br />
This type is used for text files, such as scripts, plain text configuration files, etc.<br />
<br />
<div class="templateExample"><br />
<div class="preview"><br />
{{BeginFileFormatTools|Type=text}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = DOS<br />
| canView = Yes<br />
| canModify = Partial<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</div><br />
<pre><br />
{{BeginFileFormatTools|Type=text}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = DOS<br />
| canView = Yes<br />
| canModify = Partial<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</pre><br />
</div><br />
<br />
{|class="wikitable"<br />
! Parameter/example !! Meaning<br />
|-<br />
| canView = Yes || Can this program view the text?<ul><br />
<li>'''Yes''': this program can view all files in this format</li><br />
<li>'''Partial''': this program can view some files (but not all) in this format</li><br />
<li>'''No''': this program cannot view any files in this format</li><br />
</ul><br />
|-<br />
| canModify = Yes || Can this program modify parts of the file, leaving the rest unchanged?<ul><br />
<li>'''Yes''': this program can modify all files in this format</li><br />
<li>'''Partial''': this program can modify parts of files but there are some parts it cannot change</li><br />
<li>'''No''': this program cannot modify any files in this format</li><br />
</ul><br />
|-<br />
| editHidden = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit hidden data inside the file? (if supported by the format)<ul><br />
<li>'''Edit''': hidden data can be read and modified</li><br />
<li>'''Read''': hidden data can be viewed/extracted but not changed or set</li><br />
<li>'''No''': hidden data cannot be viewed or changed</li><br />
<li>'''N/A''': this file format does not have anywhere to embed any hidden data</li><br />
</ul><br />
|-<br />
| editMetadata = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit group file metadata? (e.g. file description, title, artist, etc.)<ul><br />
<li>'''Edit''': all known metadata can be read and modified</li><br />
<li>'''Partial''': some metadata can be read and/or modified</li><br />
<li>'''Read''': all metadata can be viewed/extracted but not changed or set</li><br />
<li>'''No''': none of the metadata can be viewed or changed</li><br />
<li>'''N/A''': this file format does not have any metadata</li><br />
</ul><br />
|-<br />
| notes = text || Various notes, try to keep as short as possible<br />
|}<br />
</noinclude><br />
<includeonly>The following tools are able to work with {{#ifeq:{{{Type|group}}}|game|this game|files in this format}}.<br />
<table class="wikitable"><br />
<tr><br />
<th>Name</th><br />
<th>Platform</th><!-- Remove 'group' once everything has been changed to 'archive' -->{{#ifeq:{{{Type|}}}|group|<br />
<th>Extract files?</th><br />
<th>Decompress on extract?</th>{{#ifeq:{{{Encrypt|}}}|yes|<br />
<th>Decrypt?</th>}}<br />
<th>Create new?</th><br />
<th>Modify?</th><br />
<th>Compress on insert?</th>{{#ifeq:{{{Encrypt|}}}|yes|<br />
<th>Encrypt?</th>}}<br />
<th>Access hidden data?</th><br />
<th>Edit metadata?</th><br />
}}<!-- end "remove group" -->{{#ifeq:{{{Type|archive}}}|archive|<br />
<th>Extract files?</th><br />
<th>Decompress on extract?</th>{{#ifeq:{{{Encrypt|}}}|yes|<br />
<th>Decrypt?</th>}}<br />
<th>Create new?</th><br />
<th>Modify?</th><br />
<th>Compress on insert?</th>{{#ifeq:{{{Encrypt|}}}|yes|<br />
<th>Encrypt?</th>}}<br />
<th>Access hidden data?</th><br />
<th>Edit metadata?</th><br />
}}{{#ifeq:{{{Type|}}}|image|<br />
<th>View images in this format?</th><br />
<th>Convert/export to another file/format?</th><br />
<th>Import from another file/format?</th><br />
<th>Access hidden data?</th><br />
<th>Edit metadata?</th><br />
}}{{#ifeq:{{{Type|}}}|audio|<br />
<th>Play?</th><br />
<th>Create new?</th><br />
<th>Modify?</th><br />
<th>Convert/export to other?</th><br />
<th>Import from other?</th><br />
<th>Access hidden data?</th><br />
<th>Edit metadata?</th><br />
}}{{#ifeq:{{{Type|}}}|map|<br />
<th>View?</th><br />
<th>Create new?</th><br />
<th>Modify?</th><br />
<th>Access hidden data?</th><br />
<th>Edit metadata?</th><br />
}}{{#ifeq:{{{Type|}}}|text|<br />
<th>View?</th><br />
<th>Modify?</th><br />
<th>Access hidden data?</th><br />
<th>Edit metadata?</th><br />
}}{{#ifeq:{{{Type|}}}|exe|<br />
<th>Load?</th><br />
<th>Decompress?</th><br />
<th>Create?</th><br />
<th>Modify?</th><br />
<th>Compress?</th><br />
<th>Access hidden data?</th><br />
}}{{#ifeq:{{{Type|}}}|game|<br />
<th>Group/archives</th><br />
<th>Levels</th><br />
<th>Graphics</th><br />
<th>Music</th><br />
<th>Sounds</th><br />
<th>Text</th><br />
<th>Saves</th><br />
<th>.exe patch</th><br />
}}<br />
<th>Notes</th><br />
</tr></includeonly></div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=BIN_Format_(Fury_of_the_Furries)&diff=11789BIN Format (Fury of the Furries)2024-02-18T06:22:10Z<p>Malvineous: /* Tools */ Update type (not an archive)</p>
<hr />
<div>{{Map Infobox<br />
| Type = 2D tile-based<br />
| Layers = 3<br />
| Tile size = 16&times;16<br />
| Viewport = 320&times;200<br />
| Games = <br />
{{Game|Fury of the Furries}}<br />
{{Game|Pac-In-Time}}<br />
}}<br />
<br />
[[Fury of the Furries]] maps contain the static background and landscape for the level, collectable coins, time extensions and extra lives and destructible bricks. They also contain the 'scripting for the game play itself', this is in the form of the definitions of the sprites that interact with the player character. There are up to 10 sprites in the level, each having up to 10 states. Triggers are defined for switching between states, and for the player and or sprites to switch on or off other game-play elements.<br />
<br />
The file itself is run-length encoded, and after decompression is always a fixed length. Generally unused elements within the game are marked by the [[UINT16LE]] value 0xFFFF.<br />
<br />
== File Formats ==<br />
<br />
=== RLE Compressed File Format ===<br />
<br />
{|class="wikitable"<br />
! Data Type || Name || Description<br />
|-<br />
| FOURCC || header || Appears to be a header with version number. Most files decompress to an object 25518 bytes in length, but a handful of files are shorter, and appear to be earlier versions.<br /><br />
byte is the shortest, at 25432 bytes, the last entry is the time field.<br /><br />
byt1 and byt3 are 25482 bytes long, and include currents.<br /><br />
byt4 is 25518, it's the version seen for the vast majority of the files, and includes all the fields after the currents.<br />
|-<br />
| [[UINT16LE]] || length || Number of bytes in section.<br /><br />
if zero then stop decompressing.<br /><br />
if less than 0x7D00 then use the following length bytes from the input.<br /><br />
otherwise use the following byte from the input (length - 0x7D00) times.<br /><br />
<br /><br />
compressed and uncompressed sections always alternate, even if this makes the packing less efficient. This means that if you have two adjacent runs, There will be at least 1 character represented as uncompressed.<br />
|-<br />
| ... || etc || continue with another 'length' until the final file size is achieved (25,518 bytes), or you read a 0 length.<br />
|}<br />
<br />
The file should end with a zero length section. i.e. two bytes of 0.<br />
<br />
=== Uncompressed File Format ===<br />
<br />
==== FILE Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || mapWidth || Width of the playable area (in tiles) between 20 and 78.<br />
|-<br />
| [[UINT16LE]] || mapHeight || Height of the playable area (in tiles) between 13 and 51.<br />
<br />
The maximum number of tiles in a game is 1024. This places constraints on the width and height. <br />
The minimum width is 20 to match the viewport size of 320 pixels, and this constrains the height to 51 (20 &times; 51 = 1020). <br />
The minimum height is 13 to match the viewport size of 200 pixels, and this constrains the width to 78 (13 &times; 78 = 1014).<br />
Any other combination of width and height is possible so long as it meets these constraints.<br />
|-<br />
| [[UINT8]][2][78 &times; 51] || tileIndex || Pairs of coordinates into a [[LBM Format]] <tt>DEC</tt> file containing the tiles.<br />
|-<br />
| [[UINT16LE]] || decFile || The <tt>DEC</tt> file number less one. i.e. a value of 3 indicates <tt>DECOR04.LBM</tt>.<br />
|-<br />
| [[UINT16LE]] || startLeft || The center of the starting position for the player character from the left of the level, less 16 pixels.<br />
|-<br />
| [[UINT16LE]] || startTop || The center of starting position for the player character from the top of the level, less 16 pixels.<br />
|-<br />
| [[UINT16LE]] || foregroundPaletteIndex || The index of the first palette entry to be regarded as foreground.<br />
<br />
The palette for the <tt>DEC</tt> file has 16 colours and they are used in a particular order. The first is always black and is background (i.e. the player character is not blocked by this colour)<br />
The next 4 usually dark versions of yellow, red, green and blue and are used for the shadow colour of the player character sprite, in the 4 different forms that the player can take.<br />
The next colour (colour 5 in the palette) is the bright colour of the player character, and will be swapped out as the player changes form.<br />
The remaining colours a chosen to suit the needs of the stage of the game (desert, forest, mountains etc).<br />
Generally the lower colours are regarded as background, and the upper colours as foreground, and this is used in the collision detection for the player and the landscape.<br />
|-<br />
| EXIT[5] || exit || 5 instances of a 6-byte structure describing the exits from the level.<br />
|-<br />
| WATER[5] || water1 || 5 instances of an 8-byte structure describing the regions of water in the level.<br />
|-<br />
| TELEPORT[5] || teleport || 5 instances of an 8-byte structure describing the regions of the game that can teleport the player.<br />
|-<br />
| NONSTICK[5] || nonStick || 5 instances of an 8-byte structure describing regions that the player cannot attach a rope to.<br />
|-<br />
| ACID[5] || acid || 5 instances of an 8-byte structure describing regions that will dissolve the player if touched.<br />
|-<br />
| DANGER[20] || danger || 20 instances of an 8-byte structure describing regions that will explode the player if touched.<br />
|-<br />
| SPRITE[10] || sprite || 10 instances of a 1688-byte structure describing sprites.<br />
|-<br />
| [[UINT16LE]] || blueStart || 1 if the blue form of the player is available at the start of the game.<br />
|-<br />
| [[UINT16LE]] || greenStart || 1 if the green form of the player is available at the start of the game.<br />
|-<br />
| [[UINT16LE]] || redStart || 1 if the red form of the player is available at the start of the game.<br />
|-<br />
| [[UINT16LE]] || yellowStart || 1 if the yellow form of the player is available at the start of the game.<br />
|-<br />
| [[UINT8]][12] || unknown || Purpose unknown.<br />
|-<br />
| FIELD[5] || redField || 5 instances of an 8-byte structure describing the particle field that enables/disables the red form of the player.<br />
|-<br />
| FIELD[5] || greenField || 5 instances of an 8-byte structure describing the particle field that enables/disables the green form of the player.<br />
|-<br />
| FIELD[5] || yellowField || 5 instances of an 8-byte structure describing the particle field that enables/disables the yellow form of the player.<br />
|-<br />
| FIELD[5] || blueField || 5 instances of an 8-byte structure describing the particle field that enables/disables the blue form of the player.<br />
|-<br />
| WATER[5] || water2 || 5 further instances of an 8-byte structure describing the regions of water in the level.<br />
<br />
Probably one of these 2 sets of water data describes regions that start full of water and can be emptied, and the others describe regions which start empty and can be filled. I'm not sure.<br />
|-<br />
| [[UINT8]][10] || unknown || Purpose unknown.<br />
|-<br />
| [[UINT8]] || waterPaletteIndex || Index of colour in palette used for water.<br />
|-<br />
| [[UINT8]] || airPaletteIndex || Index of colour in palette used for air.<br />
<br />
These two palette entries can be used to modify the image as regions of water fill/empty.<br />
|-<br />
| [[UINT16LE]] || time || Amount of time the player has to complete the level. In 30ths of a second (The game plays at 30 fps).<br />
|-<br />
| CURRENT[5] || current || 5 instances of a 10-byte structure describing regions of air or water currents.<br />
|-<br />
| [[UINT8]] || motePaletteIndex || Index of colour in palette used for dust motes moving in currents.<br />
|-<br />
| [[UINT8]] || unknown || Purpose unknown.<br />
|-<br />
| [[UINT16LE]] || spriteMap || Index of [[LBM Format]] <tt>SPR</tt> sprite map image to use for this level. 0 = A, 1 = B.<br />
|-<br />
| EXITRETURN[5] || exitReturn || 5 instances of a 4-byte structure describing where the player character should re-enter the level following a side-quest.<br />
|-<br />
| [[UINT16LE]][5] || exitGraphic || 5 instances of and indication of how a player is depicted exiting. 0 used for the end of the level dissolves the level viewport in a swirling vortex. 1 is smooth and is used for tunnelling in multi-map levels.<br />
|-<br />
| [[UINT16LE]] || unknown || Seems to indicate a row in the map at which some odd palette behaviour is observed. Possibly a bug, but it could be that the intention is to shift something in the colour scheme when the player is above ground / below ground.<br />
|}<br />
<br />
==== EXIT Format ====<br />
<br />
The exit region is 16 &times; 16 pixels.<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the centre of the exit.<br />
|-<br />
| [[UINT16LE]] || top || top pixel of the centre of the exit.<br />
|-<br />
| [[UINT16LE]] || destination || Level number less one to go to next from this exit. Also the most significant bit indicates 0 = level exit, 1 = go to side quest.<br /><br />
e.g. if this value is 0x8006, then go to level 7 as a side-quest.<br />
|}<br />
<br />
==== WATER Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the water region.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the water region.<br />
|-<br />
| [[UINT16LE]] || right || Right pixel of the water region.<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom pixel of the water region.<br />
|}<br />
<br />
==== TELEPORT Format ====<br />
<br />
The teleport region is 16 &times; 16 pixels.<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || srcX || Left pixel of the centre of the teleport region.<br />
|-<br />
| [[UINT16LE]] || srcY || Top pixel of the centre of the teleport region.<br />
|-<br />
| [[UINT16LE]] || destX || Right pixel of the centre of the teleport region.<br />
|-<br />
| [[UINT16LE]] || destY || Bottom pixel of the centre of the teleport region.<br />
|}<br />
<br />
==== NONSTICK Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the non-stick region.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the non-stick region.<br />
|-<br />
| [[UINT16LE]] || right || Right pixel of the non-stick region.<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom pixel of the non-stick region.<br />
|}<br />
<br />
==== ACID Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the acid region.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the acid region.<br />
|-<br />
| [[UINT16LE]] || right || Right pixel of the acid region.<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom pixel of the acid region.<br />
|}<br />
<br />
==== DANGER Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the danger region.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the danger region.<br />
|-<br />
| [[UINT16LE]] || right || Right pixel of the danger region.<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom pixel of the danger region.<br />
|}<br />
<br />
==== FIELD Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the particle field.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the particle field.<br />
|-<br />
| [[UINT16LE]] || right || Right pixel of the particle field.<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom pixel of the particle field.<br />
|}<br />
<br />
==== CURRENT Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the current region.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the current region.<br />
|-<br />
| [[UINT16LE]] || right || Right pixel of the current region.<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom pixel of the current region.<br />
|-<br />
| [[UINT16LE]] || flags || bit-0 and bit-1 : direction 00 = down, 01 = right, 10 = up, 11 = left<br/>bit-2: strength of current 0 = weak, 1 = strong<br/>bit-3: show current using dust motes 0 = no, 1 = yes<br />
|}<br />
<br />
==== EXITRETURN Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the centre of the return region.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the return region.<br />
|}<br />
<br />
==== REGION Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left of region<br />
|-<br />
| [[UINT16LE]] || top || Top of region<br />
|-<br />
| [[UINT16LE]] || right || Right of region<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom of region<br />
|}<br />
<br />
==== SPRITE Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT8]] || layer || 0 = middleground (can interact with the player)<br/>1=background<br/>2=foreground (player can move behind it).<br />
|-<br />
| [[UINT8]] || malevolence || Bit-0: sprite will kill player in ? form<br/>Bit-1: sprite will kill player in yellow form<br/>Bit-2: sprite will kill player in ? form<br/>Bit-3: sprite will kill player in ? form.<br />
|-<br />
| [[UINT16LE]] || unknown || Purpose unknown<br />
|-<br />
| [[UINT16LE]] || mask || Sprite requires a mask graphic for transparency. If a mask is required, it will be immediately below the sprite tile in the <tt>SPR</tt> file.<br />
|-<br />
| [[UINT16LE]] || cleanUp || The previous sprite image needs to be removed for each frame. This is not necessary if the sprite is unmasked and never changes position.<br />
|-<br />
| [[UINT16LE]] || strength || How much damage the sprite can sustain. 0 = infinite, otherwise 1-127.<br />
|-<br />
| [[UINT16LE]] || blastArea || Size of the explosion if the sprite is destroyed. (Purely a decorative concern, there is no splash damage).<br />
|-<br />
| [[UINT16LE]] || active || Is the sprite in use.<br />
|-<br />
| [[UINT8]][2] || unknown ||<br />
|-<br />
| REGION || furryEntryRegion || Sprite will activate if furry enters this region.<br />
|-<br />
| REGION || furryExitRegion || Sprite will activate if furry leaves this region.<br />
|-<br />
| [[UINT8]][72] || unknown || Suspect that this region is actually populated and used as working space while the level is being played. <br />
|-<br />
| [[UINT16LE]] || fireRate || How often the sprite fires projectiles. 0 = none, 1-5 = low-high.<br />
|-<br />
| [[UINT16LE]] || fireType || How are projectiles fired. 1 = All directions slowly, 2 = Right, 3 = Left, 4 = All directions medium, 5 = All directions fast.<br />
|-<br />
| STATE[10] || state || 10 instances of a 158-byte structure describing the states that the sprite can be in.<br />
|}<br />
<br />
==== STATE Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the sprite location.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the sprite location.<br />
|- <br />
| [[UINT16LE]] || destState || Another state to move towards. The sprite will physically move to the location of the destination state, and change state when it reaches that location.<br />
|- <br />
| [[UINT16LE]] || speed || Speed of sprite movement 0 = None, 1-5 = slow-fast.<br />
|- <br />
| [[UINT8]] || movementType || 0 = horizontal then vertical, 1 = as the crow flies, 2 = just track player vertically, no sideways movement, 3 = just track player horizontally, no up/down movement, 4 = track player, 5 = fast move??, 6 = None.<br />
|-<br />
| [[UINT8]] || destWaterState || Another state to change to when a requested water level change is acheived.<br />
|-<br />
| [[UINT8]] || gravity || If 1, the sprite falls when unsupported.<br />
|-<br />
| [[UINT8]] || current || Control currents. Bits 0-4 specify currents affected, Bit-5 turns currents off, Bit-6 turns currents on.<br />
|-<br />
| [[UINT16LE]] || activateSprite || Number of another sprite to activate.<br />
|-<br />
| TRIGGER || entryTrigger || A 10-byte structure that describes a trigger to change state when the player enters a region.<br />
|- <br />
| TRIGGER || exitTrigger || A 10-byte structure that describes a trigger to change state when the player leaves a region.<br />
|-<br />
| TRIGGER || spriteEntryTrigger || A 10-byte structure that describes a trigger to change state when another sprite enters a region.<br />
|-<br />
| TRIGGER || spriteExitTrigger || A 10-byte structure that describes a trigger to change state when another sprite leaves a region (or is destroyed).<br />
|-<br />
| [[UINT8]] || destroy || The sprite is destroyed (deactivated) when it enters this state.<br />
|-<br />
| [[UINT8]] || bounce || The sprite bounces ballistically when it hits a surface.<br />
|-<br />
| [[UINT16LE]] || emptyWater || Bits 8-15 speed of emptying, Bits 0-7 number of water region to empty.<br />
|-<br />
| [[UINT16LE]] || fillWater || Bits 8-15 speed of filling, Bits 0-7 number of water region to fill.<br />
|-<br />
| [[UINT8]][4] || unknown || Seems to affect the starting location of projectiles, relative to the sprite location.<br />
|-<br />
| [[UINT16LE]] || waterTriggerLeft || Left pixel of region for water trigger (see destWaterState field).<br />
|-<br />
| [[UINT16LE]] || waterTriggerTop || Top pixel of region for water trigger.<br />
|-<br />
| [[UINT16LE]] || waterTriggerRight || Right pixel of region for water trigger.<br />
|-<br />
| FRAME[10] || frame || 10 instances of an 8-byte structure describing the sprite tile location within the <tt>SPR</tt> image file<br />
|- <br />
| [[UINT16LE]] || animSpeed || Rate of frame change of sprite animation.<br />
|-<br />
| [[UINT16LE]] || cycle || Does the animation cycle repeat.<br />
|-<br />
| [[UINT8]] || cycleCount || Number of animation frames before changing state.<br />
|-<br />
| [[UINT8]] || animTriggerState || Sprite state to move to when cycleCount is reached.<br />
|-<br />
| [[UINT16LE]] || waterTriggerBottom || Bottom pixel of region for water trigger.<br />
|}<br />
<br />
==== TRIGGER Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || state || State to move to when triggered.<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the trigger region.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the trigger region.<br />
|-<br />
| [[UINT16LE]] || right || Right pixel of the trigger region.<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom pixel of the trigger region.<br />
|}<br />
<br />
==== FRAME Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the sprite on the <tt>SPR</tt> image file.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the sprite on the <tt>SPR</tt> image file.<br />
|-<br />
| [[UINT16LE]] || right || Right pixel of the sprite on the <tt>SPR</tt> image file <em>+ 8 pixels</em>.<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom pixel of the sprite on the <tt>SPR</tt> image file.<br />
|}<br />
<br />
== Notes ==<br />
<br />
There are 10 different stages in the game, and correspondingly 10 different tile and sprite sets. <br />
<br />
The tile images for the backgrounds and landscape are stored in the <tt>DEC</tt> directory, in image files which are in [[LBM Format]]. These files are named <tt>DECORxx.LBM</tt> where xx is specified by the decFile field of the main structure.<br />
<br />
The sprite images are stored in the <tt>SPR</tt> directory, in image files which are in [[LBM Format]]. These files are named <tt>SPRxxn</tt> where xx is specified by the decFile field of the main structure, and n is specified by the spriteMap field in the main structure.<br />
<br />
The sprites can be of varying sizes, the FRAME data structure describes the bounding box in pixels within the sprite image file. If the sprite requires a transparency mask, then this mask will be a rectangular region with the same size as the sprite, and placed in the image file immediately below the sprite.<br />
<br />
Within the tile image file, all the tiles are 16 &times; 16 pixels, tiles are referenced in the main file structure as a pair of byte coordinates, giving the X and Y position in tiles within the image file.<br />
<br />
Certain tiles in the image file have special meaning.<br />
<br />
The tile at 0,1 is a coin. If the player touches this tile in the level, they will gain a coin, and the tile will be swapped out for the tile at 0,0 which is always empty.<br />
<br />
The tile at 0,2 is an extra life. If the player touches this tile in the level, they will gain an extra life, and the tile will be swapped out for the tile at 0,0.<br />
<br />
The tile at 0,3 is a time extension. If the player touches this tile in the level, they will gain an extra 30 seconds on the clock, and the tile will be swapped out for the tile at 0,0.<br />
<br />
All the remaining tiles on rows 0, 1 and 2 in the map are destructible tiles. The red form of the player can chew through the scenery. Chewing a tile from row 0 will cause that tile to be swapped out with the tile immediately below it in row 1. Chewing a tile from row 1 will cause that tile to be swapped out with the tile immediately below it in row 2. Chewing a tile from row 2 will cause that tile to be swapped out with the tile at 0,0, which is empty, so the player can then get through the gap created. Typically the tiles in these rows depict a gradually degraded state, you can have tiles that require more or less action to destroy them, by choosing from the three rows. Often the top row tiles are visually indistinguishable from some other non-destructible tiles in the tileset, allowing you to hide destructible tiles.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=map}}<br />
{{FileFormatTool<br />
| Name = [[FuryUtils]]<br />
| Platform = x64Windows, Linux<br />
| canView = No<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| editHidden = No<br />
| editMetadata = No<br />
| notes = Converts to and from text files<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Carbon14|carbon14]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=BIN_Format_(Fury_of_the_Furries)&diff=11788BIN Format (Fury of the Furries)2024-02-18T06:16:45Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Map Infobox<br />
| Type = 2D tile-based<br />
| Layers = 3<br />
| Tile size = 16&times;16<br />
| Viewport = 320&times;200<br />
| Games = <br />
{{Game|Fury of the Furries}}<br />
{{Game|Pac-In-Time}}<br />
}}<br />
<br />
[[Fury of the Furries]] maps contain the static background and landscape for the level, collectable coins, time extensions and extra lives and destructible bricks. They also contain the 'scripting for the game play itself', this is in the form of the definitions of the sprites that interact with the player character. There are up to 10 sprites in the level, each having up to 10 states. Triggers are defined for switching between states, and for the player and or sprites to switch on or off other game-play elements.<br />
<br />
The file itself is run-length encoded, and after decompression is always a fixed length. Generally unused elements within the game are marked by the [[UINT16LE]] value 0xFFFF.<br />
<br />
== File Formats ==<br />
<br />
=== RLE Compressed File Format ===<br />
<br />
{|class="wikitable"<br />
! Data Type || Name || Description<br />
|-<br />
| FOURCC || header || Appears to be a header with version number. Most files decompress to an object 25518 bytes in length, but a handful of files are shorter, and appear to be earlier versions.<br /><br />
byte is the shortest, at 25432 bytes, the last entry is the time field.<br /><br />
byt1 and byt3 are 25482 bytes long, and include currents.<br /><br />
byt4 is 25518, it's the version seen for the vast majority of the files, and includes all the fields after the currents.<br />
|-<br />
| [[UINT16LE]] || length || Number of bytes in section.<br /><br />
if zero then stop decompressing.<br /><br />
if less than 0x7D00 then use the following length bytes from the input.<br /><br />
otherwise use the following byte from the input (length - 0x7D00) times.<br /><br />
<br /><br />
compressed and uncompressed sections always alternate, even if this makes the packing less efficient. This means that if you have two adjacent runs, There will be at least 1 character represented as uncompressed.<br />
|-<br />
| ... || etc || continue with another 'length' until the final file size is achieved (25,518 bytes), or you read a 0 length.<br />
|}<br />
<br />
The file should end with a zero length section. i.e. two bytes of 0.<br />
<br />
=== Uncompressed File Format ===<br />
<br />
==== FILE Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || mapWidth || Width of the playable area (in tiles) between 20 and 78.<br />
|-<br />
| [[UINT16LE]] || mapHeight || Height of the playable area (in tiles) between 13 and 51.<br />
<br />
The maximum number of tiles in a game is 1024. This places constraints on the width and height. <br />
The minimum width is 20 to match the viewport size of 320 pixels, and this constrains the height to 51 (20 &times; 51 = 1020). <br />
The minimum height is 13 to match the viewport size of 200 pixels, and this constrains the width to 78 (13 &times; 78 = 1014).<br />
Any other combination of width and height is possible so long as it meets these constraints.<br />
|-<br />
| [[UINT8]][2][78 &times; 51] || tileIndex || Pairs of coordinates into a [[LBM Format]] <tt>DEC</tt> file containing the tiles.<br />
|-<br />
| [[UINT16LE]] || decFile || The <tt>DEC</tt> file number less one. i.e. a value of 3 indicates <tt>DECOR04.LBM</tt>.<br />
|-<br />
| [[UINT16LE]] || startLeft || The center of the starting position for the player character from the left of the level, less 16 pixels.<br />
|-<br />
| [[UINT16LE]] || startTop || The center of starting position for the player character from the top of the level, less 16 pixels.<br />
|-<br />
| [[UINT16LE]] || foregroundPaletteIndex || The index of the first palette entry to be regarded as foreground.<br />
<br />
The palette for the <tt>DEC</tt> file has 16 colours and they are used in a particular order. The first is always black and is background (i.e. the player character is not blocked by this colour)<br />
The next 4 usually dark versions of yellow, red, green and blue and are used for the shadow colour of the player character sprite, in the 4 different forms that the player can take.<br />
The next colour (colour 5 in the palette) is the bright colour of the player character, and will be swapped out as the player changes form.<br />
The remaining colours a chosen to suit the needs of the stage of the game (desert, forest, mountains etc).<br />
Generally the lower colours are regarded as background, and the upper colours as foreground, and this is used in the collision detection for the player and the landscape.<br />
|-<br />
| EXIT[5] || exit || 5 instances of a 6-byte structure describing the exits from the level.<br />
|-<br />
| WATER[5] || water1 || 5 instances of an 8-byte structure describing the regions of water in the level.<br />
|-<br />
| TELEPORT[5] || teleport || 5 instances of an 8-byte structure describing the regions of the game that can teleport the player.<br />
|-<br />
| NONSTICK[5] || nonStick || 5 instances of an 8-byte structure describing regions that the player cannot attach a rope to.<br />
|-<br />
| ACID[5] || acid || 5 instances of an 8-byte structure describing regions that will dissolve the player if touched.<br />
|-<br />
| DANGER[20] || danger || 20 instances of an 8-byte structure describing regions that will explode the player if touched.<br />
|-<br />
| SPRITE[10] || sprite || 10 instances of a 1688-byte structure describing sprites.<br />
|-<br />
| [[UINT16LE]] || blueStart || 1 if the blue form of the player is available at the start of the game.<br />
|-<br />
| [[UINT16LE]] || greenStart || 1 if the green form of the player is available at the start of the game.<br />
|-<br />
| [[UINT16LE]] || redStart || 1 if the red form of the player is available at the start of the game.<br />
|-<br />
| [[UINT16LE]] || yellowStart || 1 if the yellow form of the player is available at the start of the game.<br />
|-<br />
| [[UINT8]][12] || unknown || Purpose unknown.<br />
|-<br />
| FIELD[5] || redField || 5 instances of an 8-byte structure describing the particle field that enables/disables the red form of the player.<br />
|-<br />
| FIELD[5] || greenField || 5 instances of an 8-byte structure describing the particle field that enables/disables the green form of the player.<br />
|-<br />
| FIELD[5] || yellowField || 5 instances of an 8-byte structure describing the particle field that enables/disables the yellow form of the player.<br />
|-<br />
| FIELD[5] || blueField || 5 instances of an 8-byte structure describing the particle field that enables/disables the blue form of the player.<br />
|-<br />
| WATER[5] || water2 || 5 further instances of an 8-byte structure describing the regions of water in the level.<br />
<br />
Probably one of these 2 sets of water data describes regions that start full of water and can be emptied, and the others describe regions which start empty and can be filled. I'm not sure.<br />
|-<br />
| [[UINT8]][10] || unknown || Purpose unknown.<br />
|-<br />
| [[UINT8]] || waterPaletteIndex || Index of colour in palette used for water.<br />
|-<br />
| [[UINT8]] || airPaletteIndex || Index of colour in palette used for air.<br />
<br />
These two palette entries can be used to modify the image as regions of water fill/empty.<br />
|-<br />
| [[UINT16LE]] || time || Amount of time the player has to complete the level. In 30ths of a second (The game plays at 30 fps).<br />
|-<br />
| CURRENT[5] || current || 5 instances of a 10-byte structure describing regions of air or water currents.<br />
|-<br />
| [[UINT8]] || motePaletteIndex || Index of colour in palette used for dust motes moving in currents.<br />
|-<br />
| [[UINT8]] || unknown || Purpose unknown.<br />
|-<br />
| [[UINT16LE]] || spriteMap || Index of [[LBM Format]] <tt>SPR</tt> sprite map image to use for this level. 0 = A, 1 = B.<br />
|-<br />
| EXITRETURN[5] || exitReturn || 5 instances of a 4-byte structure describing where the player character should re-enter the level following a side-quest.<br />
|-<br />
| [[UINT16LE]][5] || exitGraphic || 5 instances of and indication of how a player is depicted exiting. 0 used for the end of the level dissolves the level viewport in a swirling vortex. 1 is smooth and is used for tunnelling in multi-map levels.<br />
|-<br />
| [[UINT16LE]] || unknown || Seems to indicate a row in the map at which some odd palette behaviour is observed. Possibly a bug, but it could be that the intention is to shift something in the colour scheme when the player is above ground / below ground.<br />
|}<br />
<br />
==== EXIT Format ====<br />
<br />
The exit region is 16 &times; 16 pixels.<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the centre of the exit.<br />
|-<br />
| [[UINT16LE]] || top || top pixel of the centre of the exit.<br />
|-<br />
| [[UINT16LE]] || destination || Level number less one to go to next from this exit. Also the most significant bit indicates 0 = level exit, 1 = go to side quest.<br /><br />
e.g. if this value is 0x8006, then go to level 7 as a side-quest.<br />
|}<br />
<br />
==== WATER Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the water region.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the water region.<br />
|-<br />
| [[UINT16LE]] || right || Right pixel of the water region.<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom pixel of the water region.<br />
|}<br />
<br />
==== TELEPORT Format ====<br />
<br />
The teleport region is 16 &times; 16 pixels.<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || srcX || Left pixel of the centre of the teleport region.<br />
|-<br />
| [[UINT16LE]] || srcY || Top pixel of the centre of the teleport region.<br />
|-<br />
| [[UINT16LE]] || destX || Right pixel of the centre of the teleport region.<br />
|-<br />
| [[UINT16LE]] || destY || Bottom pixel of the centre of the teleport region.<br />
|}<br />
<br />
==== NONSTICK Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the non-stick region.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the non-stick region.<br />
|-<br />
| [[UINT16LE]] || right || Right pixel of the non-stick region.<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom pixel of the non-stick region.<br />
|}<br />
<br />
==== ACID Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the acid region.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the acid region.<br />
|-<br />
| [[UINT16LE]] || right || Right pixel of the acid region.<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom pixel of the acid region.<br />
|}<br />
<br />
==== DANGER Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the danger region.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the danger region.<br />
|-<br />
| [[UINT16LE]] || right || Right pixel of the danger region.<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom pixel of the danger region.<br />
|}<br />
<br />
==== FIELD Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the particle field.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the particle field.<br />
|-<br />
| [[UINT16LE]] || right || Right pixel of the particle field.<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom pixel of the particle field.<br />
|}<br />
<br />
==== CURRENT Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the current region.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the current region.<br />
|-<br />
| [[UINT16LE]] || right || Right pixel of the current region.<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom pixel of the current region.<br />
|-<br />
| [[UINT16LE]] || flags || bit-0 and bit-1 : direction 00 = down, 01 = right, 10 = up, 11 = left<br/>bit-2: strength of current 0 = weak, 1 = strong<br/>bit-3: show current using dust motes 0 = no, 1 = yes<br />
|}<br />
<br />
==== EXITRETURN Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the centre of the return region.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the return region.<br />
|}<br />
<br />
==== REGION Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left of region<br />
|-<br />
| [[UINT16LE]] || top || Top of region<br />
|-<br />
| [[UINT16LE]] || right || Right of region<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom of region<br />
|}<br />
<br />
==== SPRITE Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT8]] || layer || 0 = middleground (can interact with the player)<br/>1=background<br/>2=foreground (player can move behind it).<br />
|-<br />
| [[UINT8]] || malevolence || Bit-0: sprite will kill player in ? form<br/>Bit-1: sprite will kill player in yellow form<br/>Bit-2: sprite will kill player in ? form<br/>Bit-3: sprite will kill player in ? form.<br />
|-<br />
| [[UINT16LE]] || unknown || Purpose unknown<br />
|-<br />
| [[UINT16LE]] || mask || Sprite requires a mask graphic for transparency. If a mask is required, it will be immediately below the sprite tile in the <tt>SPR</tt> file.<br />
|-<br />
| [[UINT16LE]] || cleanUp || The previous sprite image needs to be removed for each frame. This is not necessary if the sprite is unmasked and never changes position.<br />
|-<br />
| [[UINT16LE]] || strength || How much damage the sprite can sustain. 0 = infinite, otherwise 1-127.<br />
|-<br />
| [[UINT16LE]] || blastArea || Size of the explosion if the sprite is destroyed. (Purely a decorative concern, there is no splash damage).<br />
|-<br />
| [[UINT16LE]] || active || Is the sprite in use.<br />
|-<br />
| [[UINT8]][2] || unknown ||<br />
|-<br />
| REGION || furryEntryRegion || Sprite will activate if furry enters this region.<br />
|-<br />
| REGION || furryExitRegion || Sprite will activate if furry leaves this region.<br />
|-<br />
| [[UINT8]][72] || unknown || Suspect that this region is actually populated and used as working space while the level is being played. <br />
|-<br />
| [[UINT16LE]] || fireRate || How often the sprite fires projectiles. 0 = none, 1-5 = low-high.<br />
|-<br />
| [[UINT16LE]] || fireType || How are projectiles fired. 1 = All directions slowly, 2 = Right, 3 = Left, 4 = All directions medium, 5 = All directions fast.<br />
|-<br />
| STATE[10] || state || 10 instances of a 158-byte structure describing the states that the sprite can be in.<br />
|}<br />
<br />
==== STATE Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the sprite location.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the sprite location.<br />
|- <br />
| [[UINT16LE]] || destState || Another state to move towards. The sprite will physically move to the location of the destination state, and change state when it reaches that location.<br />
|- <br />
| [[UINT16LE]] || speed || Speed of sprite movement 0 = None, 1-5 = slow-fast.<br />
|- <br />
| [[UINT8]] || movementType || 0 = horizontal then vertical, 1 = as the crow flies, 2 = just track player vertically, no sideways movement, 3 = just track player horizontally, no up/down movement, 4 = track player, 5 = fast move??, 6 = None.<br />
|-<br />
| [[UINT8]] || destWaterState || Another state to change to when a requested water level change is acheived.<br />
|-<br />
| [[UINT8]] || gravity || If 1, the sprite falls when unsupported.<br />
|-<br />
| [[UINT8]] || current || Control currents. Bits 0-4 specify currents affected, Bit-5 turns currents off, Bit-6 turns currents on.<br />
|-<br />
| [[UINT16LE]] || activateSprite || Number of another sprite to activate.<br />
|-<br />
| TRIGGER || entryTrigger || A 10-byte structure that describes a trigger to change state when the player enters a region.<br />
|- <br />
| TRIGGER || exitTrigger || A 10-byte structure that describes a trigger to change state when the player leaves a region.<br />
|-<br />
| TRIGGER || spriteEntryTrigger || A 10-byte structure that describes a trigger to change state when another sprite enters a region.<br />
|-<br />
| TRIGGER || spriteExitTrigger || A 10-byte structure that describes a trigger to change state when another sprite leaves a region (or is destroyed).<br />
|-<br />
| [[UINT8]] || destroy || The sprite is destroyed (deactivated) when it enters this state.<br />
|-<br />
| [[UINT8]] || bounce || The sprite bounces ballistically when it hits a surface.<br />
|-<br />
| [[UINT16LE]] || emptyWater || Bits 8-15 speed of emptying, Bits 0-7 number of water region to empty.<br />
|-<br />
| [[UINT16LE]] || fillWater || Bits 8-15 speed of filling, Bits 0-7 number of water region to fill.<br />
|-<br />
| [[UINT8]][4] || unknown || Seems to affect the starting location of projectiles, relative to the sprite location.<br />
|-<br />
| [[UINT16LE]] || waterTriggerLeft || Left pixel of region for water trigger (see destWaterState field).<br />
|-<br />
| [[UINT16LE]] || waterTriggerTop || Top pixel of region for water trigger.<br />
|-<br />
| [[UINT16LE]] || waterTriggerRight || Right pixel of region for water trigger.<br />
|-<br />
| FRAME[10] || frame || 10 instances of an 8-byte structure describing the sprite tile location within the <tt>SPR</tt> image file<br />
|- <br />
| [[UINT16LE]] || animSpeed || Rate of frame change of sprite animation.<br />
|-<br />
| [[UINT16LE]] || cycle || Does the animation cycle repeat.<br />
|-<br />
| [[UINT8]] || cycleCount || Number of animation frames before changing state.<br />
|-<br />
| [[UINT8]] || animTriggerState || Sprite state to move to when cycleCount is reached.<br />
|-<br />
| [[UINT16LE]] || waterTriggerBottom || Bottom pixel of region for water trigger.<br />
|}<br />
<br />
==== TRIGGER Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || state || State to move to when triggered.<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the trigger region.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the trigger region.<br />
|-<br />
| [[UINT16LE]] || right || Right pixel of the trigger region.<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom pixel of the trigger region.<br />
|}<br />
<br />
==== FRAME Format ====<br />
<br />
{|class="wikitable"}<br />
! Data Type || Name || Description<br />
|-<br />
| [[UINT16LE]] || left || Left pixel of the sprite on the <tt>SPR</tt> image file.<br />
|-<br />
| [[UINT16LE]] || top || Top pixel of the sprite on the <tt>SPR</tt> image file.<br />
|-<br />
| [[UINT16LE]] || right || Right pixel of the sprite on the <tt>SPR</tt> image file <em>+ 8 pixels</em>.<br />
|-<br />
| [[UINT16LE]] || bottom || Bottom pixel of the sprite on the <tt>SPR</tt> image file.<br />
|}<br />
<br />
== Notes ==<br />
<br />
There are 10 different stages in the game, and correspondingly 10 different tile and sprite sets. <br />
<br />
The tile images for the backgrounds and landscape are stored in the <tt>DEC</tt> directory, in image files which are in [[LBM Format]]. These files are named <tt>DECORxx.LBM</tt> where xx is specified by the decFile field of the main structure.<br />
<br />
The sprite images are stored in the <tt>SPR</tt> directory, in image files which are in [[LBM Format]]. These files are named <tt>SPRxxn</tt> where xx is specified by the decFile field of the main structure, and n is specified by the spriteMap field in the main structure.<br />
<br />
The sprites can be of varying sizes, the FRAME data structure describes the bounding box in pixels within the sprite image file. If the sprite requires a transparency mask, then this mask will be a rectangular region with the same size as the sprite, and placed in the image file immediately below the sprite.<br />
<br />
Within the tile image file, all the tiles are 16 &times; 16 pixels, tiles are referenced in the main file structure as a pair of byte coordinates, giving the X and Y position in tiles within the image file.<br />
<br />
Certain tiles in the image file have special meaning.<br />
<br />
The tile at 0,1 is a coin. If the player touches this tile in the level, they will gain a coin, and the tile will be swapped out for the tile at 0,0 which is always empty.<br />
<br />
The tile at 0,2 is an extra life. If the player touches this tile in the level, they will gain an extra life, and the tile will be swapped out for the tile at 0,0.<br />
<br />
The tile at 0,3 is a time extension. If the player touches this tile in the level, they will gain an extra 30 seconds on the clock, and the tile will be swapped out for the tile at 0,0.<br />
<br />
All the remaining tiles on rows 0, 1 and 2 in the map are destructible tiles. The red form of the player can chew through the scenery. Chewing a tile from row 0 will cause that tile to be swapped out with the tile immediately below it in row 1. Chewing a tile from row 1 will cause that tile to be swapped out with the tile immediately below it in row 2. Chewing a tile from row 2 will cause that tile to be swapped out with the tile at 0,0, which is empty, so the player can then get through the gap created. Typically the tiles in these rows depict a gradually degraded state, you can have tiles that require more or less action to destroy them, by choosing from the three rows. Often the top row tiles are visually indistinguishable from some other non-destructible tiles in the tileset, allowing you to hide destructible tiles.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[FuryUtils]]<br />
| Platform = x64Windows, Linux<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = Yes<br />
| editHidden = N/A<br />
| editMetadata = Yes<br />
| notes = <br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Carbon14|carbon14]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=DAT_Format_(Fury_of_the_Furries)&diff=11787DAT Format (Fury of the Furries)2024-02-18T06:16:44Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = Unlimited<br />
| FAT = Beginning<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = Y<br />
| Encrypted = N<br />
| Hidden = N<br />
| Games = <br />
{{Game|Fury of the Furries}}<br />
}}<br />
The '''Fury of the Furries DAT Format''' is used by [[Fury of the Furries]] for storing data. The data is NOT used by the game itself, but is used by the two executables that typically run before the game itself. <tt>INTRO.EXE</tt> runs an animation that illustrates the backstory to the game and <tt>LANG.EXE</tt> allows the user to select the language they wish to play the game in, and also asks for a copy-protection password. The data used by these two executables is stored in <tt>INTRO.DAT</tt> and <tt>LANG.DAT</tt> respectively.<br />
<br />
The format is an archive storing many files, each of which can be optionally compressed.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
There is no signature, and the fields must be checked to correctly detect files.<br />
<br />
=== Header ===<br />
<br />
The header is very simple.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT16LE]] || fileCount || The number of files stored in the archive.<br />
|}<br />
<br />
The header is immediately followed by the first file entry.<br />
<br />
=== File entry ===<br />
<br />
The header is followed by one or more file entries in the following structure.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[char]][13] || filename || Filename in 8.3 format, null-terminated.<br />
|-<br />
| [[UINT32LE]] || uncompressedSize || Size of the file when uncompressed.<br />
|-<br />
| [[UINT32LE]] || compressedSize || Size of the file when compressed. If the file is not compressed, this value is the same as the previous value.<br />
|-<br />
| [[UINT8]] || compressionFlag || 0 if the file is compressed. 1 if the file is not compressed.<br />
|-<br />
| [[BYTE]][compressedSize] || data || The content of the file, either plain or compressed.<br />
|}<br />
<br />
The next file header follows immediately after the data.<br />
<br />
=== Compressed structure ===<br />
<br />
If the file is compressed, it has the following structure. <br />
<br />
First is a byte containing 8 flags, these flags should be read from lsb (least significant bit) to msb.<br />
<br />
If the flag is 1, then read 1 byte and copy it to the output.<br />
<br />
If the flag is 0, then read 2 bytes and use them to determine a sequence of bytes already in the output which can be copied to the output.<br />
<br />
The length of the sequence to copy is given by the 3 plus the 4 lsb of the 2nd byte. (i.e. a length between 3 and 18).<br />
<br />
The start of the sequence to copy is given by the remaining 12 bits. The 4 msb of the start address is given by the 4 msb of the second byte. And the 8 lsb of the address is given by the first byte. <br />
Add 18 (0x12) to this 12-bit number. The address is an offset from the start of the output stream, BUT it always falls within the most recent 4096 bytes written. Therefore if the output streams is large, you may need to<br />
increase the address by adding 4096 to it until it is no more that 4096 bytes from the current position in the output stream.<br />
<br />
If the address is before the start of the output stream, then you should assume the space character (0x20) should be output. Probably this can be achieved by writing the output stream to a block of memory that immediately follows 18 spaces.<br />
<br />
NOTE that the sequence to be copied can be less than length bytes from the current output position, the source and destination for the copy will therefore overlap, and all the bytes in the overlapping region will have the same value.<br />
<br />
=== Pseudo-code ===<br />
<br />
<pre><br />
while writtenLength < uncompressedSize {<br />
compressionFlags = readByte()<br />
foreach compressionFlag in compressionFlags {<br />
if compressionFlag is set { // not compressed <br />
copy 1 byte from input to output<br />
}<br />
else {<br />
byte1 = readByte()<br />
byte2 = readByte()<br />
length = (byte2 & 0x0f) + 3;<br />
offset = ((byte2 >> 4) << 8) + byte1;<br />
offset += 0x12;<br />
adjust offset to be within most recent 4096 bytes of output<br />
copy length bytes from (offsetlocation in output) to output<br />
}<br />
stop if writtenLength = uncompressedSize<br />
}<br />
}<br />
</pre><br />
<br />
=== Example taken from within <tt>LANG.DAT</tt> ===<br />
This is a cut down section of <tt>PROT.ENG</tt>. The full file is longer and as a result the compressed file is shorter than the raw file.<br />
==== Hex ====<br />
<tt><br />
00000000&nbsp; <font color="red">50 52 4F 54 2E 45 4E 47&nbsp; 00 00 00 00 14</font> <font color="green">1E 00 00</font>&nbsp; <font color="red">PROT.ENG.....</font><font color="green">=..</font><br/><br />
00000010&nbsp; <font color="green">00</font> <font color="cadetBlue">21 00 00 00</font> <font color="blue">00</font> <font color="magenta">FF</font> <font color="orange">45&nbsp; 4E 54 45 52 20 50 41</font> <font color="magenta">FF</font>&nbsp; <font color="green">.</font><font color="cadetBlue">&lt;...</font><font color="blue">.</font><font color="magenta">.</font><font color="orange">ENTER PA</font><font color="magenta">.</font><br/><br />
00000020&nbsp; <font color="orange">53 53 57 4F 52 44 20 46</font>&nbsp; <font color="magenta">DF</font> <font color="orange>4F 52 20 43 4F</font> F9 F0&nbsp; <font color="orange">SSWORD F</font><font color="magenta">.</font><font color="orange>OR CO</font>..<br/><br />
00000030&nbsp; <font color="orange">49 4E</font> <font color="magenta">FF</font> <font color="orange">41 54 45 53</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="orange">IN</font><font color="magenta">.</font><font color="orange>ATES</font><br/><br />
</tt><br />
<br />
==== Structure ====<br />
<br />
{|class="wikitable"<br />
|-<br />
| <font color="red">50 52 4F 54 2E 45 4E 47 00 00 00 00 14</font> || filename || PROT.ENG<br />
|-<br />
| <font color="green">1E 00 00 00</font> || uncompressedSize || 30 bytes<br />
|-<br />
| <font color="cadetBlue">21 00 00 00</font> ||compressedSize || 33 bytes<br />
|-<br />
| <font color="blue">00</font> || isCompressed || file is compressed<br />
|-<br />
| <font color="magenta">FF</font> || bit flags || all plain text<br />
|-<br />
| <font color="orange">45 4E 54 45 52 20 50 41</font> || raw text || ENTER PA<br />
|-<br />
| <font color="magenta">FF</font> || bit flags || all plain text<br />
|-<br />
| <font color="orange">53 53 57 4F 52 44 20 46</font> || raw text || SSWORD F<br />
|-<br />
| <font color="magenta">DF</font> || bit flags || 5 plain text, 1 compressed, 2 plain text<br />
|-<br />
| <font color="orange>4F 52 20 43 4F</font> || raw text || OR CO<br />
|-<br />
| F9 F0</font> || lengthAndOffset || 3 bytes to be copied from position 11<br />
|-<br />
| <font color="orange">49 4E</font> || raw text || IN<br />
|-<br />
| <font color="magenta">FF</font> || bit flags || all plain text<br />
|-<br />
| <font color="orange">41 54 45 53</font> || raw text || ATES<br />
|}<br />
<br />
==== Final Output ====<br />
<br />
<tt><font color="orange">ENTER PASSW<u style="text-decoration-color: black">ORD</u> FOR CO</font>ORD<font color="orange">INATES</font><br />
</tt><br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[FuryUtils]]<br />
| Platform = x64Windows, Linux<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = Yes<br />
| canModify = No<br />
| canCompress = Yes<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
| notes = <br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Carbon14|carbon14]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=CC1_Format&diff=11786CC1 Format2024-02-18T06:16:44Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = ''Unknown''<br />
| FAT = Beginning<br />
| Names = No<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = Y<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games =<br />
{{Game|Alone in the Dark}}<br />
{{Game|Eternam}}<br />
{{Game|7 Colors}}<br />
{{Game|Advantage Tennis}}<br />
{{Game|Alpha Waves|/ Continuum}}<br />
{{Game|The Light Corridor}}<br />
{{Game|Mystical}}<br />
{{Game|Tintin on the moon}}<br />
{{Game|North & South}}<br />
{{Game|Drakkhen}}<br />
{{Game|Hostage: Rescue Mission}}<br />
{{Game|The Quest for the Time-Bird}}<br />
{{Game|Project Neptune}}<br />
}}<br />
<br />
'''CC1 Format''' is a container of compressed data blocks used by several games developed (not only published) by '''Infogrames Europe SA''' around ~1988-1992, used to store game executables, graphics, language texts and sounds. The files usually have a <tt>.CC1</tt> extension, though some variations like <tt>.1</tt> and <tt>.C1</tt> also occur. One game, [[Hostage: Rescue Mission]], uses a <tt>.PXI</tt> extension.<br />
<br />
The files have no specific identifiable information header to detect if the file is a CC1 file. Usually, the only hint is the file extension.<br />
<br />
There is a variation of the CC1 format without the ability to contain multiple compressed blocks but just one, sometimes using the extension CC0<br />
<br />
CC1 and CC0 using the same compression algorithm<br />
<br />
== Content of CC1 ==<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT16LE]] || NrOfFiles || Amount of compressed blocks.<br />
|-<br />
| [[UINT32LE]][NrOfFiles] || OffsetsTable || Offsets to PackedBlocks.<br />
|}<br />
<br />
This header is followed by PackedBlocks of compressed data.<br />
The blocks don't need to be in order and can contain gaps between<br />
<br />
== Content of CC0 ==<br />
<br />
A single PackedBlock<br />
<br />
== PackedBlock structure ==<br />
<br />
Each block of compressed data has the following structure:<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT32LE]] || PackedSize || Packed data size.<br />
|-<br />
| [[UINT32LE]] || UnpackedSize || Unpacked data size.<br />
|-<br />
| [[UINT8]][PackedSize] || PackedData || The packed data.<br />
|}<br />
<br />
There is no information inside the archive to determine what each block of compressed data is; the blocks have no names or other identifiable values.<br />
<br />
== Dictionary ==<br />
<br />
very few CC1 files have some sort of file-dictionary at end (behind the last packed block)<br />
<br />
games with dictionaries in CC1 files: Mystical, North & South, The-Light-Corridor, Shufflepuck Cafe, Cool Ball<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT8]][(Filecount*4)+6] || Unknown header || ordering and byte content unknown<br />
|-<br />
| [[UINT8]][Filecount][84] || Filename+unknown data || the first n bytes are a filename then nulls and a unknown 4 bytes at end<br />
|}<br />
<br />
== Extensions in Known Games ==<br />
<br />
{|class="wikitable"<br />
! Game !! Files !! Notes<br />
|-<br />
| [[Alone in the Dark]] || *.CC1 ||<br />
|-<br />
| [[Eternam]] || *.CC1, *.CC! || .CC! is in CC1 format<br />
|-<br />
| [[7 Colors]] || *.CC1 ||<br />
|-<br />
| [[Advantage Tennis]] || *.CC1, *.DAT || DAT files are in CC1 or CC0 format<br />
|-<br />
| [[Alpha Waves|Alpha Waves / Continuum]] || *.CC1 ||<br />
|-<br />
| [[The Light Corridor]] || *.1, *.COR || COR files are in CC1 or CC0 format<br />
|-<br />
| [[Mystical]] || *.1, *.2 || All in CC1 format<br />
|-<br />
| [[Tintin On The Moon]] || TINTINC.1 || CC1 format<br />
|-<br />
| [[North & South]] || *.1, *.2 || Most of the files are in CC0 format, some in CC1<br />
|-<br />
| [[Drakkhen]] || *.CC1, *.?C1, *.?C0 || ?C1 are in CC1 format, .?C0 are in CC0 format<br />
|-<br />
| [[Hostage: Rescue Mission]] || *.PXI, *.PKB || .PXI are CC1, .PKB are CC0<br />
|-<br />
| [[The Quest for the Time-Bird]] || *.CC1, *.CC0 ||<br />
|-<br />
| [[Neptune]] || *.CC1 ||<br />
|-<br />
| [[Full Metal Planet]] || *.CC1, *.VC0 || .VC0 are CC0<br />
|-<br />
| [[Murders in Space]] || *.CC1 ||<br />
|-<br />
| [[Safari Guns]] || *.CC1, *.PXI || .PXI are CC1<br />
|-<br />
| [[Wild Life]] || *.CC1 || <br />
|-<br />
| [[Murders in Venice]] || *.PXI || <br />
|-<br />
| [[Cool Ball]] || *.CC1, *.PX* || <br />
|-<br />
| [[Shufflepuck Cafe]] || *.CC1,*.CC0,*.PXI || .PXI are CC1<br />
|-<br />
| [[Chicago 90]] || *.CC1 || <br />
|-<br />
| [[Fire!]] || *.PIC || .PIC are CC1<br />
|-<br />
| [[Disney's Beauty and the Beast]] || *.CC1 || <br />
|-<br />
| [[Wild Life]] || *.CC1 ||<br />
|-<br />
| [[Extase]] || *.BIN, *.EGA || <br />
|-<br />
| [[Kult]] || *.BIN, *.PXI ||<br />
|-<br />
| [[Teenage Queen]] || *.PXI || <br />
|-<br />
| [[Highway Patrol II]] || *.DAT || .DAT are CC1<br />
|-<br />
| [[Call of Cthulhu: Shadow of the Comet (ES)]] || *.CC1 || <br />
<br />
|}<br />
<br />
[https://github.com/LowLevelMahn/alpha_waves_loader/blob/main/tools/uncompress_cc/known_files.txt Detailed file list of the games]<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [https://github.com/LowLevelMahn/alpha_waves_loader/blob/main/tools/uncompress_cc/uncompress_cc.cpp Uncompress tool for CC1/CC0 files]<br />
| Platform = Windows/Linux<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = No<br />
| editHidden = No<br />
| editMetadata = N/A<br />
| notes = Standalone uncompress tool for CC1/CC0 files with C/C++ source code.<br />
}}<br />
{{EndFileFormatTools}}</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=DAT_Format_(Centurion_-_Defender_of_Rome)&diff=11785DAT Format (Centurion - Defender of Rome)2024-02-18T06:16:44Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = Unlimited<br />
| FAT = External<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = Y<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Centurion: Defender of Rome}}<br />
}}<br />
The '''DAT Format''' in ''[[Centurion: Defender of Rome]]'' is used to store game data. Files can be compressed but the algorithm is currently unknown.<br />
<br />
The format uses two files with the same base name, but different extensions. The <tt>.dir</tt> extension stores the filenames and attributes, and the <tt>.dat</tt> extension stores the actual data for each file.<br />
<br />
== File format ==<br />
<br />
=== File entry ===<br />
<br />
The <tt>.dir</tt> file consists of a list of entries, one for each file. Each entry is 20 bytes in length, so dividing the file size by 20 will reveal the number of files in the archive.<br />
<br />
Note that a 16-bit integer is used for the file size, preventing files larger than 64 kB from being stored in the archive.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT32LE]] || offset || Offset of the file's data, relative to the start of the <tt>.dat</tt> file<br />
|-<br />
| [[UINT16LE]] || size || File's size on disk (compressed size, if compressed)<br />
|-<br />
| [[char]][13] || filename || Filename, must be null-terminated.<br />
|-<br />
| [[UINT8]] || attributes || Bitfield: 0x80 = compressed, 0x40 = CBM file?<br />
|}<br />
<br />
The file data is stored in the <tt>.dat</tt> file, at the given offsets and lengths.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = No<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = No<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=Shaw%27s_Nightmare_Archive_Format&diff=11784Shaw's Nightmare Archive Format2024-02-18T06:16:44Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 4,294,967,295<br />
| FAT = End<br />
| Names = Y<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Shaw's Nightmare 1}}<br />
{{Game|Shaw's Nightmare 2}}<br />
}}<br />
<br />
The '''Shaw's Nightmare Archive Format''' stores the archive headers first, file data next, and file index last.<br />
<br />
== File Format ==<br />
<br />
=== Archive Header ===<br />
<br />
If the header is not "'''DAT\x1a'''", it isn't a valid archive.<br />
<br />
{|class="wikitable"<br />
! Data type !! Bytes !! Name !! Description<br />
|-<br />
| char[4] || 4 || magic || Each archive starts with the magic/signature "DAT\x1a"<br />
|-<br />
| [[UINT16LE]] || 2 || numitems|| How many files in the archive<br />
|-<br />
| [[UINT32LE]] || 4 || index_offset|| Offset for the file index in the archive<br />
|-<br />
| UINT32LE || 4 || index_size|| size of the index in bytes<br />
|}<br />
<br />
Total size of header is '''14 bytes'''<br />
<br />
=== File Header ===<br />
<br />
File data is stored at the top of the archive after the header and before the file index.<br />
<br />
{|class="wikitable"<br />
! Data type !! Bytes !! Name !! Description<br />
|-<br />
| char[13] || 13 || name|| Filenames are right padded with 0x0 to 13 bytes<br />
|-<br />
| BYTE[3] || 3 || padding || 3 bytes of padding<br />
|-<br />
| UINT32LE || 4 || size || Size of file<br />
|-<br />
| UINT32LE || 4 || offset || Offset for the file.<br />
|}<br />
<br />
Total size of header is '''24 bytes'''<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [https://codeberg.org/parlortricks/sne SNE]<br />
| Platform = DOS<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
| notes = Coded in the [https://fennel-lang.org/ Fennel] language by [https://codeberg.org/parlortricks parlortricks]<br />
}}<br />
{{FileFormatTool<br />
| Name = [https://codeberg.org/parlortricks/snp SNP]<br />
| Platform = Windows/Linux<br />
| canExtract = No<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
| notes = Coded in the [https://fennel-lang.org/ Fennel] language by [https://codeberg.org/parlortricks parlortricks]<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
[[Category:Build engine]]</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=GX_Library&diff=11783GX Library2024-02-18T06:16:44Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 65,535<br />
| FAT = Beginning<br />
| Names = Yes, 8.3<br />
| Metadata = Label<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Word Rescue}}<br />
}}<br />
The '''GX Library''' format is a later revision of the [[PCX Library]] that makes it a little more efficient to read. The <tt>PCXLIB.EXE</tt> application has been replaced by <tt>GXLIB.EXE</tt>, distributed with the ''GX Development Series'' toolkit.<br />
<br />
Usually the default library extensions are .PCL or .LIB, but this is not required (as actual example: .GXL or .VXL used too). Library files can be easily identified by the copyright text at the beginning (see below).<br />
<br />
Library files may contain not only .PCX images, but any type of file.<br />
<br />
Library files consists of two parts - the header and file directory. Note that PCX/GX tools and the libraries code used in software verify only the <tt>id</tt> (Library ID) value in the header for both formats. Nothing else is checked in library header and can be literally anything.<br />
<br />
=== GX Library format ===<br />
<br />
Each file begins with the following header.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT16LE]] || id || Library ID. Must be 0xCA01 (bytes 0x01 0xCA)<br />
|-<br />
| [[char]][50] || copyright || Copyright notice (example: "Copyright (c) Genus Microprogramming, Inc. 1988-90").<br />
|-<br />
| [[UINT16LE]] || version || gxLib version. Always 100 (0x0064)<br />
|-<br />
| [[char]][40] || label || Library volume label<br />
|-<br />
| [[UINT16LE]] || entries || Total image entries<br />
|-<br />
| [[BYTE]][32] || reserved || Reserved for GX kernel, unused/ignored, set to 0<br />
|}<br />
<br />
After the header is <tt>entries</tt> records of an image header and image data:<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT8]] || pack || Packing type<br />
|-<br />
| [[char]][13] || name || Image file name (8.3, name padding with spaces before dot from extension, ends with 0)<br />
|-<br />
| [[INT32LE]] || offs || File offset (absolute)<br />
|-<br />
| [[INT32LE]] || size || File size<br />
|-<br />
| [[UINT16LE]] || date || DOS packed file date<br />
|-<br />
| [[UINT16LE]] || time || DOS packed file time<br />
|}<br />
<br />
After this records follows file data for each file in library. The files in the directory are NOT in the same order as the files in the archive (i.e. file 1 in the directory may actually be file 5 in the archive, etc).<br />
<br />
The date and time are in standard DOS FAT16 format:<br />
<br />
{|class="wikitable"<br />
! Field !! colspan=16| Date !!colspan=16| Time<br />
|-<br />
! Bit<br />
!style="width: 2em"| 15<br />
!style="width: 2em"| 14<br />
!style="width: 2em"| 13<br />
!style="width: 2em"| 12<br />
!style="width: 2em"| 11<br />
!style="width: 2em"| 10<br />
!style="width: 2em"| 9<br />
!style="width: 2em"| 8<br />
!style="width: 2em"| 7<br />
!style="width: 2em"| 6<br />
!style="width: 2em"| 5<br />
!style="width: 2em"| 4<br />
!style="width: 2em"| 3<br />
!style="width: 2em"| 2<br />
!style="width: 2em"| 1<br />
!style="width: 2em"| 0<br />
!style="width: 2em"| 15<br />
!style="width: 2em"| 14<br />
!style="width: 2em"| 13<br />
!style="width: 2em"| 12<br />
!style="width: 2em"| 11<br />
!style="width: 2em"| 10<br />
!style="width: 2em"| 9<br />
!style="width: 2em"| 8<br />
!style="width: 2em"| 7<br />
!style="width: 2em"| 6<br />
!style="width: 2em"| 5<br />
!style="width: 2em"| 4<br />
!style="width: 2em"| 3<br />
!style="width: 2em"| 2<br />
!style="width: 2em"| 1<br />
!style="width: 2em"| 0<br />
|-<br />
! Value<br />
|colspan=7| <center>Year (0-127)</center><br />
|colspan=4| <center>Month (1-12)</center><br />
|colspan=5| <center>Day (1-31)</center><br />
|colspan=5| <center>Hours (0-23)</center><br />
|colspan=6| <center>Minutes (0-59)</center><br />
|colspan=5| <center>Seconds (0-29)</center><br />
|}<br />
<br />
Add <tt>1980</tt> to the year value to get the calendar year (i.e. a year value of 1 translates to 1981). Multiply the seconds by 2 (i.e. a value of 29 translates to 58 seconds). A month or day value of 0 is not permitted. Dates before 1 Jan 1980 are not possible. The times are stored in the local time zone of the computer that wrote the timestamps, however the timezone itself is not stored.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [http://www.ctpax-x.org/?goto=files&show=104 PCX/GX Library unpacker]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = No<br />
| notes = PCX/GX Library support (with C source code)<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = No<br />
}}<br />
<br />
{{FileFormatTool<br />
| Name = [[Librarian]]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = No<br />
| notes = Rudimentary support only<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:CTPAX-X_Team|CTPAX-X_Team]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=Indy_500_Library_Format&diff=11782Indy 500 Library Format2024-02-18T06:16:44Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 1,073,741,822 (2<sup>30</sup> - 2) <!-- Limited by size of FAT fitting into UINT32LE, and final EOF entry --><br />
| FAT = Beginning<br />
| Names = N<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = Y<br />
| Encrypted = N<br />
| Hidden = N<br />
| Games = <br />
{{Game|Indianapolis 500: The Simulation}}<br />
}}<br />
<br />
The '''Indy 500 Library Format''' is used to store game assets for [[Indianapolis 500: The Simulation]]. Files in this format have no signature, and do not even have a consistent filename extension: the game's two archives use the extensions <tt>.1</tt> and <tt>.2</tt>, respectively.<br />
<br />
== Signature ==<br />
<br />
There is no signature, so the file offsets must be checked for validity. The last FAT entry must equal the total size of the archive file, which is a good check. Each offset must also be larger than the previous one (otherwise the file sizes would be negative).<br />
<br />
== File format ==<br />
<br />
The file starts with a list of [[UINT32LE]] values, each of which contains the starting offset for one of the archive's contained files. There is no explicit field containing the number of files, nor of any of the contained file sizes; this data is computed based on the start offsets. The size of the header is the same as the start offset of the first file. The number of files can be computed by dividing the header size by 4.<br />
<br />
At each file's stored offset, a single [[UINT32LE]] prefixes the compressed file data. This word contains the decompressed file size. The file data itself is compressed (see below).<br />
<br />
== Compression ==<br />
<br />
Each file is compressed using [[LZSS compression]] with the following properties:<br />
<br />
* Size of LZSS "length" field: 4 lower bits<br />
* Size of LZSS "offset" field: 12 upper bits (making the window size 4096 bytes)<br />
* Minimum length to write lookback: 3 bytes<br />
* Window prefill byte: 0x20<br />
* Initial window position: -16 ("length" bytes before the end of the window)<br />
* Endian/swap: Read bytes "AB CD" into an integer of value 0xCABD.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = Yes<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Example code ==<br />
<br />
* Javascript<br />
** Camoto/[https://github.com/camoto-project/gamearchivejs/blob/master/formats/arc-dat-indy500.js gamearchive.js]<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Cmb]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=SelectWare_Archive&diff=11781SelectWare Archive2024-02-18T06:16:44Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = Unlimited<br />
| FAT = Embedded<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = Y<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = N<br />
| Games = <br />
}}<br />
<br />
The '''SelectWare Archive''' format is a format used by [https://archive.org/details/The_SelectWare_System_Series_1_Volume_2_Number_3_Selectware ''The SelectWare System''], a quick-launch mechanism used by the company SelectWare Technologies to publish software, mostly shareware demos. It appears in a number of Selectware releases.<br />
<br />
===Use===<br />
<br />
The most prominent collection containing this format is the ''SelectWare Gold Medal 12 Pack''; a collection containing the following programs and games:<br />
<br />
* [[Blue Force]]<br />
* [[Dune II]]<br />
* Jet Fighter 2<br />
* [[Maelstrom]]<br />
* [[Microcosm]]<br />
* [[Shadow President]]<br />
* [[The Complete House]]<br />
* [[The Selfish Giant]]<br />
* [[Darklands]]<br />
* [[CyberRace]]<br />
* The Peter Norton Productivity Pack<br />
* Casino Master Gold Edition<br />
<br />
Besides that, the company also distributed several shareware CDs.<br />
<br />
===Header===<br />
<br />
The format starts with the following header.<br />
<br />
{|class="wikitable"<br />
!Offset||Data type!!Name!!Description<br />
|-<br />
|0x00||[[BYTE]][0x28]||Signature||The text "SelectWare Technologies demo file", followed by bytes 0x0A 0x1A, and filled to the end with zeroes.<br />
|-<br />
|0x28||[[UINT32LE]]||FreeSpace||Minimum disk free space required for this software (sizes of all files inside archive + some free space).<br />
|}<br />
<br />
===File entry===<br />
<br />
Following the header are the actual files, each one preceded by a file header that indicates its length and some other information.<br />
<br />
{|class="wikitable"<br />
!Offset||Data type!!Name!!Description<br />
|-<br />
|0x00||[[INT16LE]]||DirLevel||Current directory level. Used as flag for files in directories. Directory entries will be treated as the root of the deeper level, so their <code>DirLevel</code> will be one higher than that of the files at the same tree depth.<br />
|-<br />
|0x02||[http://www.techhelpmanual.com/364-fileinforec.html FileInfoRec]||FileInfo||Structure from FindFirst / FindNext DOS services. This data contains the file size, a flag indicating whether the entry is a directory, and a date stamp.<br />
|-<br />
|0x2D||[[BYTE]]||Padding||Padding to align whole structure to the even boundary.<br />
|}<br />
<br />
The file contents of the described file immediately follow this file header, and have the length indicated in <tt>FileInfoRec</tt>.<br />
<br />
Since there is no index in advance, nor a number of files, reading of the archive continues until the end of the file is reached.<br />
<br />
For understanding DOS <tt>FileInfoRec</tt> structure see also [http://www.techhelpmanual.com/361-file_attribute.html DOS File Attribute] and [http://www.techhelpmanual.com/363-file_time_date_format.html DOS Packed File Date/Time Format].<br />
<br />
=== Traversing the directory tree ===<br />
<br />
There is always an explicit entry for the directory before encountering files at a deeper level in the directory tree. From the <code>FileInfo</code> information, the file attributes can be checked to see if an entry is a directory. With the combined information of this directory flag and the <code>DirLevel</code>, code traversing the data can keep track of the location in the directory tree, by going deeper at the moment a directory is found, and going back when a file with a lower <code>DirLevel</code> or a directory with the same <code>DirLevel</code> is found.<br />
<br />
For practical purposes, it is probably more straightforward to decrease the read <code>DirLevel</code> of directory entries by 1, so it always indicates the level of the entry's parent directory. This allows the number to be treated the same way for files and directories.<br />
<br />
== Archive extracting example source code ==<br />
<br />
=== C ===<br />
<br />
<syntaxhighlight lang="c"><br />
/*<br />
Copyright 2021 CTPAX-X Team<br />
This source code licensed under the Apache License, Version 2.0 (the "License"):<br />
https://www.apache.org/licenses/LICENSE-2.0<br />
*/<br />
<br />
#include <stdio.h><br />
#include <stdlib.h><br />
#include <string.h><br />
#include <malloc.h><br />
#include <stdint.h><br />
#include <direct.h><br />
<br />
#pragma pack(push, 1)<br />
typedef struct {<br />
char signature[40]; /* ignored */<br />
uint32_t disksize; /* required minimum free disk space for software to run */<br />
} swt_head; /* (size of all files inside archive + some free space) */<br />
<br />
/* DOS FileInfoRec structure for FindFirst / FindNext services */<br />
typedef struct {<br />
uint8_t reserved[21];<br />
uint8_t dos_attr;<br />
uint16_t dos_time;<br />
uint16_t dos_date;<br />
uint32_t filesize;<br />
char filename[13];<br />
} dos_find;<br />
<br />
typedef struct {<br />
int16_t dirlevel; /* current directory level */<br />
dos_find fileinfo;<br />
uint8_t padding; /* padding to align whole structure to the even boundary */<br />
} swt_item;<br />
#pragma pack(pop)<br />
<br />
int main (int argc, char *argv[]) {<br />
char path[260], s[260];<br />
swt_head sh;<br />
swt_item si;<br />
int16_t dold;<br />
FILE *fl, *f;<br />
size_t i;<br />
void *p;<br />
puts("SelectWare Technologies demo file extractor\n");<br />
if (argc != 2) {<br />
puts("Usage: unswtpak <filename.swt>\n");<br />
return(1);<br />
}<br />
fl = fopen(argv[1], "rb");<br />
if (!fl) {<br />
puts("Error: can't open input file.\n");<br />
return(2);<br />
}<br />
fread(&sh, sizeof(sh), 1, fl);<br />
/* TODO: check minimum free disk space before extracting */<br />
dold = 0;<br />
path[0] = 0;<br />
do {<br />
memset(&si, 0, sizeof(si));<br />
fread(&si, sizeof(si), 1, fl);<br />
/* no more records */<br />
if (!si.fileinfo.filename[0]) { break; }<br />
/* going up */<br />
while (si.dirlevel <= dold) {<br />
/* in this level can go up only for directory (will replace current) */<br />
if ((si.dirlevel == dold) && (!(si.fileinfo.dos_attr & 0x10))) { break; }<br />
/* cut last directory */<br />
i = strlen(path);<br />
if (i) {<br />
i--;<br />
while (i) {<br />
if (path[i - 1] == '\\') { break; }<br />
i--;<br />
}<br />
path[i] = 0;<br />
}<br />
dold--;<br />
}<br />
/* update current location */<br />
dold = si.dirlevel;<br />
/* it's directory */<br />
if (si.fileinfo.dos_attr & 0x10) {<br />
/* going down */<br />
strcat(path, si.fileinfo.filename);<br />
mkdir(path);<br />
strcat(path, "\\");<br />
} else {<br />
/* it's file */<br />
p = malloc(si.fileinfo.filesize);<br />
if (p) {<br />
fread(p, si.fileinfo.filesize, 1, fl);<br />
/* build path */<br />
strcpy(s, path);<br />
strcat(s, si.fileinfo.filename);<br />
puts(s);<br />
/* dump file to disk */<br />
f = fopen(s, "wb");<br />
if (f) {<br />
fwrite(p, si.fileinfo.filesize, 1, f);<br />
/* TODO: set file date, time and attributes */<br />
fclose(f);<br />
} else {<br />
puts("Error: can't create output file.");<br />
}<br />
free(p);<br />
} else {<br />
/* not enough memory - skip file */<br />
fseek(fl, si.fileinfo.filesize, SEEK_CUR);<br />
puts("Error: not enough memory for output file.");<br />
}<br />
}<br />
} while (si.fileinfo.filename[0]);<br />
fclose(fl);<br />
puts("\ndone\n");<br />
return(0);<br />
}<br />
</syntaxhighlight><br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Librarian]]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = No<br />
| notes =<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was first reverse engineered by [https://www.vogons.org/viewtopic.php?p=729478#p729478 SirNickity on the VOGONS forum], with further research done by [[User:Nyerguds|Nyerguds]] and [[User:CTPAX-X Team|CTPAX-X Team]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=CAT_Format_(MPS_Labs)&diff=11780CAT Format (MPS Labs)2024-02-18T06:16:44Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 65,536<br />
| FAT = Beginning<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Darklands}}<br />
{{Game|Gunship 2000}}<br />
{{Game|Hyperspeed}}<br />
{{Game|Knights of the Sky}}<br />
{{Game|Lightspeed}}<br />
{{Game|M1 Tank Platoon}}<br />
{{Game|Sid Meier's Covert Action}}<br />
{{Game|Silent Service II}}<br />
{{Game|Sword of the Samurai}}<br />
}}<br />
<br />
MPS Labs's Catalog format is used in several of their games to store multiple files in a single archive. The files do not have a signature, but they typically have a *.CAT extension. There are two known versions of the format which are very similar. They consist of a header to know how many files there will be, a file allocation table, and the file data.<br />
<br />
== File Formats ==<br />
=== Version 1 ===<br />
The file begins with a header which contains the size of the file allocation table. From this, you can derive the number of files. After that, there is the FAT, then the file data. Only [[M1 Tank Platoon]] uses this format.<br />
<br />
==== Header ====<br />
{| class="wikitable"<br />
! Data Type !! Name !! Description<br />
|-<br />
| [[UINT16LE]] || FAT Size || Size of the FAT. Divide by 18 (width of a file record) to get the total number of files.<br />
|}<br />
<br />
==== File Record ====<br />
{| class="wikitable"<br />
! Data Type !! Name !! Description<br />
|-<br />
| [[char]][12] || File Name || The file name in 8.3 format, padded right with nulls.<br />
|-<br />
| [[UINT32LE]] || File Offset || The position in the archive where the file begins.<br />
|-<br />
| [[UINT16LE]] || File Size || Length of the file.<br />
|}<br />
<br />
=== Version 2 ===<br />
The file begins with the header which contains the number of files found in the archive, and then has a file record for each file, followed by the data payload.<br />
<br />
==== Header ====<br />
{| class="wikitable"<br />
! Data Type !! Name !! Description<br />
|-<br />
| [[UINT16LE]] || File Count || Number of files stored in the archive.<br />
|}<br />
<br />
==== File Record ====<br />
{| class="wikitable"<br />
! Data Type !! Name !! Description<br />
|-<br />
| [[char]][12] || File Name || The file name in 8.3 format, padded right with nulls.<br />
|-<br />
| [[UINT16LE]] || File Time || DOS packed file time.<br />
|-<br />
| [[UINT16LE]] || File Date || DOS packed file date.<br />
|-<br />
| [[UINT32LE]] || File Size || Length of the file.<br />
|-<br />
| [[UINT32LE]] || File Offset || The position in the archive where the file begins.<br />
|}<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Librarian]]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = Yes<br />
| notes = Stores and extracts 'last modified' date on v2 archives.<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Source Code ==<br />
<br />
=== Version 1 Extractor ===<br />
<syntaxhighlight lang="freebasic"><br />
Open "M1.CAT" For Binary As #1<br />
<br />
Dim As UShort HeaderSize, FileCount<br />
<br />
' Get the header size.<br />
Get #1, , HeaderSize<br />
<br />
FileCount = HeaderSize / 18 ' Each record in the FAT is 18 bytes.<br />
<br />
Print "Files: "; FileCount<br />
<br />
Dim As String FileName(FileCount)<br />
Dim As ULong FileOffset(FileCount)<br />
Dim As UShort FileSize(FileCount)<br />
Dim As Integer FileNo<br />
<br />
For FileNo = 1 To FileCount<br />
' Load 12 bytes for the file name.<br />
FileName(FileNo) = Space(12)<br />
Get #1, , FileName(FileNo)<br />
<br />
' Trim off the null padding.<br />
FileName(FileNo) = Left(FileName(FileNo), InStr(FileName(FileNo), Chr(0)))<br />
<br />
' 4 bytes for the file offset.<br />
Get #1, , FileOffset(FileNo)<br />
<br />
' 2 bytes for the file size.<br />
Get #1, , FileSize(FileNo)<br />
Next FileNo<br />
<br />
Dim As String FileContents<br />
<br />
For FileNo = 1 To FileCount<br />
Print "File #: "; FileNo<br />
Print "File Name: "; FileName(FileNo)<br />
Print "File Offset: "; FileOffset(FileNo)<br />
Print "File Size: "; FileSize(FileNo)<br />
<br />
' Just to the start of this file.<br />
Get #1, FileOffset(FileNo), ""<br />
<br />
' Prepare a buffer for the contents of the file.<br />
FileContents = Space(FileSize(FileNo))<br />
<br />
' Read the entire file into memory.<br />
Get #1, , FileContents<br />
<br />
' Write the file to disk with the proper name.<br />
Open FileName(FileNo) For Binary As #2<br />
Put #2, , FileContents<br />
Close #2<br />
Next FileNo<br />
<br />
Sleep<br />
</syntaxhighlight><br />
<br />
=== Version 2 Extractor ===<br />
<syntaxhighlight lang="freebasic"><br />
Open "C00C.CAT" For Binary As #1<br />
<br />
Dim As UShort FileCount<br />
<br />
' Get the file count from the header.<br />
Get #1, , FileCount<br />
<br />
Print "Total Files: "; FileCount<br />
<br />
Dim As String FileName(FileCount)<br />
Dim As UShort DOSTime(FileCount)<br />
Dim As UShort DOSDate(FileCount)<br />
Dim As ULong FileSize(FileCount)<br />
Dim As ULong FileOffset(FileCount)<br />
Dim As Integer FileNo<br />
<br />
' Load the File Allocation Table.<br />
For FileNo = 1 To FileCount<br />
' Load 12 bytes for the file name.<br />
FileName(FileNo) = Space(12)<br />
Get #1, , FileName(FileNo)<br />
<br />
' Trim off the null padding.<br />
FileName(FileNo) = Left(FileName(FileNo), InStr(FileName(FileNo), Chr(0)))<br />
<br />
' 2 bytes for the DOS Time.<br />
Get #1, , DOSTime(FileNo)<br />
<br />
' 2 bytes for the DOS Date.<br />
Get #1, , DOSDate(FileNo)<br />
<br />
' 4 bytes for the file size.<br />
Get #1, , FileSize(FileNo)<br />
<br />
' 4 bytes for the file offset.<br />
Get #1, , FileOffset(FileNo)<br />
Next FileNo<br />
<br />
Dim As String FileContents<br />
<br />
' Extract the files.<br />
For FileNo = 1 To FileCount<br />
Print "File #: "; FileNo<br />
Print "File Name: "; FileName(FileNo)<br />
Print "File Time: "; DOSTime(FileNo) ' Not converted.<br />
Print "File Date: "; DOSDate(FileNo) ' Not converted.<br />
Print "File Offset: "; FileOffset(FileNo)<br />
Print "File Size: "; FileSize(FileNo)<br />
<br />
' Just to the start of this file.<br />
Get #1, FileOffset(FileNo), ""<br />
<br />
' Prepare a buffer for the contents of the file.<br />
FileContents = Space(FileSize(FileNo))<br />
<br />
' Read the entire file into memory.<br />
Get #1, , FileContents<br />
<br />
' Write the file to disk with the proper name.<br />
Open FileName(FileNo) For Binary As #2<br />
Put #2, , FileContents<br />
Close #2<br />
Next FileNo<br />
<br />
Sleep<br />
</syntaxhighlight><br />
<br />
== Credits ==<br />
This archive format was reverse engineered by [[User:TheAlmightyGuru|TheAlmightyGuru]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=KORT_Sound_Archive&diff=11779KORT Sound Archive2024-02-18T06:16:44Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 65,536<br />
| FAT = Beginning<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|King Arthur's K.O.R.T.}}<br />
}}<br />
<br />
The file <tt>KORT.SND</tt> in [[King Arthur's K.O.R.T.]] is an archive containing the game's sound effects and music.<br />
<br />
===Header===<br />
<br />
The file starts with a [[UINT16LE]] which indicates the amount of files in the archive. This is followed by the files index, an array of entries with the following 25-byte structure:<br />
<br />
{|class="wikitable"<br />
!Offset!!Data type!!Name!!Description<br />
|-<br />
|0x00||[[UINT32LE]]||Size||Size of the file.<br />
|-<br />
|0x04||[[UINT32LE]]||Buffer||Unknown. Assumed to be related to buffering. Changing or clearing this value gives playback issues in-game.<br />
|-<br />
|0x08||[[UINT32LE]]||Offset||Offset of the file inside the archive.<br />
|-<br />
|0x0C||[[ASCIIZ]][13]||Filename||The name of the file. The header reserves space for an 8.3 format filename plus its ending 00 byte, giving this field a total length of 13 bytes.<br />
|}<br />
<br />
The files inside the archive are sorted alphabetically, but grouped by type: first the .CMF ones, then the .VOC ones. The archive doesn't contain any other files, but it can be assumed that the actual ordering is that the extension grouping is also done alphabetically. It is unknown whether changing the file order has any impact on the game.<br />
<br />
===Types===<br />
<br />
The archive contains the following file types:<br />
<br />
{|class="wikitable"<br />
!Extension!!Type!!Description<br />
|-<br />
|CMF||[[CMF Format|Creative Music Format]]||Music files.<br />
|-<br />
|VOC||[[VOC Format|Creative Voice File]]||Voice clips and other sound effects.<br />
|}<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Librarian]]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
| notes = No possibility to edit the unknown "Buffer" value, but the value is preserved when replacing existing files in the archive.<br />
}}<br />
{{EndFileFormatTools}}</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=DAT_Format_(The_Lost_Vikings)&diff=11778DAT Format (The Lost Vikings)2024-02-18T06:16:44Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 1,073,741,823 (2<sup>30</sup> - 1) <!-- Limited by size of FAT fitting into UINT32LE --><br />
| FAT = Beginning<br />
| Names = N<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = Y<br />
| Encrypted = N<br />
| Hidden = N<br />
| Games = <br />
{{Game|BlackThorne}}<br />
{{Game|The Lost Vikings}}<br />
{{Game|WarCraft: Orcs & Humans}}<br />
}}<br />
The '''DAT format''' is used by [[The Lost Vikings]] to store game data in <tt>DATA.DAT</tt>. This file contains pointers to data with [[LZSS compression]].<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
There is no signature, so the file offsets must be checked for validity. Each offset must be larger than the previous one (otherwise the file sizes would be negative), and must not point past the end of the archive file.<br />
<br />
Note that any file that starts with the bytes <tt>00 00 00 04</tt> will look like a valid archive containing a single large file, so some format misidentification is unavoidable. Some example archives that are misdetected as Lost Vikings are [[Death Rally BPA Format]] archives containing four files, and Terminal Velocity [[POD Format]] archives also containing four files.<br />
<br />
=== File entry ===<br />
<br />
The beginning of the file contains a list of offsets for each file.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT32LE]][fileCount] || offsets || Array of offsets, one per file.<br />
|-<br />
| [[BYTE]][...] || content || File content starts immediately after last offset.<br />
|}<br />
<br />
To calculate the file count, read the first offset and divide it by 4.<br />
<br />
To calculate the file sizes, subtract the following file's offset from the current file's offset. For the last file (where there is no following offset) use the size of the archive file.<br />
<br />
Immediately after the list of offsets, at the first offset given, the data for the first file begins.<br />
<br />
Most files are compressed. Those files that are not compressed are those at these indexes: 0, 1, 380, 384, 529, 530, 531, 534 (with 0 being the first file). There doesn't appear to be any way to identify which files are and aren't compressed, other than hard-coding a list.<br />
<br />
== Compression ==<br />
<br />
For those files that are compressed, they begin with a single [[UINT16LE]] containing the decompressed file size, followed by the compressed data using [[LZSS compression]] with the following properties:<br />
<br />
* Size of LZSS "length" field: 4 upper bits<br />
* Size of LZSS "offset" field: 12 lower bits (making the window size 4096 bytes)<br />
* Minimum length to write lookback: 3 bytes<br />
* Window prefill byte: 0x00<br />
* Initial window position: 0<br />
* Endian/swap: Read bytes "AB CD" into an integer of value 0xCDAB.<br />
<br />
Note that the 16-bit value for the decompressed size means that no file can exceed 65,535 bytes in length.<br />
<br />
== Known files ==<br />
<br />
First image in menu ("Interplay (tm)" splashscreen):<br />
<br />
* 390: Pointers to the other chunk IDs (81 B)<br />
* 388: Tiles (9024 B = 141 tiles * 64 B) (tiles is 8 x 8)<br />
* 385: Palette (384 B = 80 colors * 3 B)<br />
* 386: Tilemap (560 B = 20 x 14 metatiles * 2 B). 52 unique metatiles (each metatile is 16 x 16 and consist of 4 tiles)<br />
* 387: Metatiles (4 tiles forms 1 metatile) (416 B = 52 * 8 B)<br />
<br />
* 394: Tiles for 2nd splashscreen in the menu<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [http://www.ctpax-x.org/?goto=files&show=148 Blizzard DATA unpacker]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = No<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
| notes = partial support<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = No<br />
| canCreate = No<br />
| canModify = Yes<br />
| canCompress = No<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = Yes<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [https://github.com/stople/LostVikingsDataExtractor Lost Vikings data extractor]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = No<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Eirik|Eirik]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=SLB_Format&diff=11777SLB Format2024-02-18T06:16:44Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 2,147,483,647<br />
| FAT = Beginning<br />
| Names = No<br />
| Metadata = None<br />
| Hidden = No<br />
| Games = {{Game|Interactive Girls Club}}<br />
}}<br />
<br />
The '''SLB Format''' (with extension <tt>.SLB</tt> or <tt>.M3</tt>) is a very simple archive format used by the [[Interactive Girls Club]] games to store game data. The files of this format are usually called <tt>SHOWPART.SLB</tt>, with the exception of the "Teresa The House Guest" game, where the archive is called <tt>IMAGES.M3</tt><br />
<br />
== File format ==<br />
<br />
The archive is a very simple indexed files list without file names. The index uses [[INT32LE]] offsets, and has two more entries than the amount of files. The first entry is always zero, and the last entry marks the end offset of the last file in the archive, which should match the full length of the archive.<br />
<br />
The amount of files can be obtained by reading the second value from the index, dividing it by four (the length of an INT32LE) and subtracting the two extra entries. Since there is an end offset at the end of the index, the file size of any file for index <code>n</code> can be calculated as <code>OffsetsList[n + 1] - OffsetsList[n]</code>.<br />
<br />
The archives seem to contain four types of files:<br />
<br />
* Images in [[GX2 Format|GX2 format]] (started with bytes 0x47 0x58 0x32 0x01, i.e. "GX2" plus a byte 0x01)<br />
* Text files with scripts (started with bytes 0x7C 0x7E, i.e. "|~")<br />
* Some binary index file (2,307 bytes long)<br />
* Unknown files (4 bytes long: 0x## 0x00 0xFF 0xFF - first byte 0x## varies)<br />
<br />
== QuickBMS script ==<br />
<br />
Code for "unslbm3.bms" [http://quickbms.aluigi.org/ QuickBMS] script.<br />
<br />
All extracted GX2 images can be viewed with the <tt>IGC.EXE</tt> program included in the games themselves, like this:<br />
<br />
<tt>IGC.EXE 00000001.dat</tt><br />
<br />
<syntaxhighlight lang="c"><br />
# Interactive Girls Club .SLB/.M3 unpacker<br />
# (c) CTPAX-X Team 2018<br />
# http://www.ctpax-x.org/<br />
# Example of usage:<br />
# QuickBMS.exe -d unslbm3.bms showpart.slb .<br />
<br />
ImpType Standard<br />
<br />
Get FileCount Long<br />
Get FileCount Long<br />
Math FileCount /= 4<br />
Math FileCount -= 2<br />
<br />
For I = 1 To FileCount<br />
GoTo -4 0 SEEK_CUR<br />
Get FileOffs Long<br />
Get FileSize Long<br />
Math FileSize -= FileOffs<br />
String FileName p= "%08d.dat" I<br />
Log FileName FileOffs FileSize<br />
Next I<br />
</syntaxhighlight><br />
<br />
==Tools==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Librarian]]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Engie File Converter]]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
| notes = Can load SLB archives and show the [[GX2 Format|GX2]] images inside them. However, saving these images as GX2 files technically does not extract them; it re-saves them using Engie's own functions.<br />
}}<br />
{{EndFileFormatTools}}</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=MIX_Format_(Westwood)&diff=11776MIX Format (Westwood)2024-02-18T06:16:43Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 65,536<br />
| FAT = Beginning<br />
| Names = No<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = Y<br />
| Hidden = Y<br />
| Games =<br />
{{Game|Command & Conquer}}<br />
{{Game|Command & Conquer: Red Alert}}<br />
{{Game|Command & Conquer: Tiberian Sun}}<br />
{{Game|Command & Conquer: Red Alert 2}}<br />
{{Game|Blade Runner}}<br />
}}<br />
<br />
Westwood's '''MIX Format''' is a simple group file used in their games from 1995-2001. It only stores file name hashes so some file names will result in the same hash and as a result will not be able to be stored together if they differ in content. Position and size of files are stored so size does not need to be inferred. It does not support compression.<br />
There are 2 versions of the header, basic and advanced. The basic one only stores the file count and the total data size (not including the header or file index). The advanced one supports additional optional features such as encryption of the header and index and a sha1 checksum tailer to verify the data integrity. An additional flag field is used to indicate which features are present.<br />
The hash algorithm used for the file name is a rolling hash in Command & Conquer and Red Alert and was replaced with crc32 in Tiberian Sun and later. There is nothing to indicate which hash scheme is used. Other games may use other hash methods.<br />
<br />
Apart from the original Command & Conquer, all the games can read both types of header provided the hash format is correct for that game.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
MIX files have no signature. Usually they will have the extension .mix<br />
<br />
=== File Header ===<br />
<br />
The header consists of an optional flags section 4 bytes in size. The first 2 bytes are 0 in this case to distinguish between a mix without feature flags where this stores the file count as UNIT16LE. The flags are stored in the 3rd byte as a bit field with bit 0 indicating a checksum is present and bit 1 indicating that the header is encrypted.<br />
<br />
If the flags indicate encryption, an 80 byte block follows the flag section. This block is encrypted with an RSA private key with the public key used to decrypt being embedded in the games code. This block decrypts to a 56 byte Blowfish key that is used to decrypt the rest of the header.<br />
<br />
The standard header follows with a file count and a size which is the size of the data only. C&C games use this when caching a mix file. XCC uses this to validate the format and can be abused by making it larger to prevent XCC reading it correctly at the cost of the games reading additional garbage when caching them. This is used in so called "protection" schemes some mods use to prevent others using their assets.<br />
<br />
{|class="wikitable"<br />
!Data type!!Name!!Description<br />
|-<br />
|[[UINT32LE]]||Flags||An optional field that specifies additional optional features that the archive uses.<br />
|-<br />
|[[BYTE]][80]||Key||An optional 80 byte block containing an RSA encrypted Blowfish key to use to decode the rest of the header.<br />
|-<br />
|[[UINT16LE]]||FileCount||The number of files in the archive. Can be used to calculate the size of the file entry index.<br />
|-<br />
|[[UINT32LE]]||DataSize||Size of the data section.<br />
|}<br />
<br />
=== File Entry ===<br />
<br />
The indexes file entries contain a hash of the filename, the offset of the file within the data section (header size needs to be added for absolute position in the archive) and the size of the file in bytes.<br />
<br />
{|class="wikitable"<br />
!Data type!!Name!!Description<br />
|-<br />
|[[INT32LE]]||Id||Hash of the filename. Hash algorithm varies between games.<br />
|-<br />
|[[UINT32LE]]||Offset||File's starting offset within the data section.<br />
|-<br />
|[[UINT32LE]]||Size||File's size.<br />
|}<br />
<br />
In order to quickly locate files from their file name hashes, the index is sorted according to the hashes taken as signed integers.<br />
<br />
=== Encryption ===<br />
<br />
Header encryption can be detected by checking Flags & 0x00020000 does not equal zero. If it doesn't, then the next 80 bytes are two RSA encrypted blocks that need to be decrypted with the Westwood public key. For the purposes of the RSA algorithm, the blocks should be treated as 2 40 byte "big" integers in little endian byte order. 0x10001 should be used as the public exponent for the decryption.<br />
<br />
The result is a 56 byte block padded with zeros to use with the Blowfish algorithm in ECB mode. Blocks are 8 bytes long and you need to decode the first block to get the standard header. From that you can calculate the length of the index and thus how many additional blocks you need to decode to get the rest of the index. If the header and index together are not perfectly divisible by 8, then it is padded with zeros since blowfish operates on 8 byte blocks.<br />
<br />
Creating an encrypted header is the reverse of this process, a Blowfish key is generated somehow and used to encrypt the header and index and is itself padded with zeros and encrypted using the Westwood private key.<br />
<br />
The public key is encoded in the game binaries while the private key was leaked in the form of keys.ini included in one of the Tiberian Sun MIX files. Presumably this was a mistake as it cannot be used from that location. The full contents of the file are as follows.<br />
<br />
<syntaxhighlight lang="ini"><br />
[PublicKey]<br />
1=AihRvNoIbTn85FZRYNZRcT+i6KpU+maCsEqr3Q5q+LDB5tH7Tz2qQ38V<br />
<br />
[PrivateKey]<br />
1=AigKVje8mROcR8QixnxUEF5b29Curkq01DNDWCdOG99XBqH79OaCiTCB<br />
</syntaxhighlight><br />
<br />
The keys are Base64 encoded and DER encoded big endian "big" integers and represent the modulus and the private exponent respectively in the RSA encryption scheme.<br />
<br />
=== Checksum ===<br />
<br />
Data checksum presence can be detected by checking Flags & 0x00010000 does not equal zero. If it doesn't, then the last 20 bytes of the file are a SHA1 hash of the data contents of the file, not including the header.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [http://xhp.xwis.net/ XCC Mixer]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = Mix Manager<br />
| Platform = DOS<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = RAMIX<br />
| Platform = DOS<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [https://github.com/OpenRA/OpenRA/wiki/Utility OpenRA Utility]<br />
| Platform = Windows, Linux, Mac<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
[[Category:Westwood Studios File Formats]]</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=HomeBrew_File_Folder_Format&diff=11775HomeBrew File Folder Format2024-02-18T06:16:43Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 2<sup>32</sup>-1 (~4 billion)<br />
| FAT = Beginning<br />
| Names = Yes, 8.3 chars<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y <!-- Format stores both offsets and sizes, so data can exist in between files with no FAT entry --><br />
| Games = <br />
{{Game|Gateworld}}<br />
}}<br />
<br />
The '''HomeBrew File Folder Format''' is used by [[Gateworld]] to store much (but not all) of the game data files.<br />
<br />
== Signature ==<br />
<br />
The file begins with the ASCII string "HomeBrew File Folder" followed by 0x1A and 11 null bytes, padding the header up to 32 bytes.<br />
<br />
== File format ==<br />
<br />
The file begins with a header.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[char]][21] || signature || "HomeBrew File Folder" + 0x1A.<br />
|-<br />
| [[BYTE]][11] || padding || Set to 0x00, pads the signature to 32 bytes.<br />
|-<br />
| [[UINT16LE]] || version || Assumed version, actual purpose unknown. Set to 0x100 (version "1.0"?)<br />
|-<br />
| [[UINT32LE]] || count || Number of files in the archive. Could be UINT16LE.<br />
|-<br />
| [[BYTE]][26] || padding || Set to 0x00, pads the version and count to 32 bytes.<br />
|}<br />
<br />
The following 32-byte file entry structure is repeated <tt>count</tt> times.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[char]] || filename[12] || Non null-terminated 8.3 filename. Pad with 0x00 if less than 12 chars.<br />
|-<br />
| [[BYTE]][4] || pad1 || Padding? Always 0x00.<br />
|-<br />
| [[UINT32LE]] || offset || Offset of the file data, relative to the start of the archive.<br />
|-<br />
| [[UINT16LE]] || length || Size of the file data, in bytes.<br />
|-<br />
| [[BYTE]][8] || pad2 || Padding? Always 0x00.<br />
|}<br />
<br />
The first file's data begins directly after the FAT, which will also be the <tt>offset</tt> value of the first FAT entry.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Malvineous|Malvineous]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=DAT_Format_(Zool)&diff=11774DAT Format (Zool)2024-02-18T06:16:43Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = Unlimited<br />
| FAT = Beginning<br />
| Names = Yes, 8<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = Y<br />
| Encrypted = N<br />
| Hidden = N<br />
| Games = <br />
{{Game|Lotus: The Ultimate Challenge}}<br />
{{Game|Zool}}<br />
}}<br />
The '''Zool DAT Format''' is used by [[Lotus: The Ultimate Challenge]] and [[Zool]] for storing game data. Data is stored in chunks of 512 bytes.<br />
<br />
As the offset of the last chunk is stored in a UINT16LE field, its maximum value is 65,535. Multiplied by the 512-byte chunk length, this yields a maximum DAT size of 33,553,920 bytes (512 bytes less than 32MB.)<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
There is no signature, and the fields must be checked to correctly detect files. Since the first two bytes multiplied by 512 must equal the size of the DAT file, this is one good check.<br />
<br />
=== Header ===<br />
<br />
The header is very simple.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT16LE]] || len || Length of DAT file, in units of 512 bytes.<br />
|}<br />
<br />
This value is multiplied by 512 to give the size of the DAT file, which is also used as the offset of the end of the last file in the archive.<br />
<br />
=== File entry ===<br />
<br />
The header is followed by one or more file entries in the following structure.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[char]][8] || filename || Filename, padded with spaces (char 0x20), not null-terminated.<br />
|-<br />
| [[UINT16LE]] || len || Offset of file, in units of 512 bytes.<br />
|}<br />
<br />
The list of file entries takes up a minimum of 512 bytes, and if more files are needed, space is allocated in chunks of 512 bytes.<br />
<br />
The file's size must be calculated from the offset of the following file.<br />
<br />
This structure is repeated until the first byte in <tt>filename</tt> is 0. This immediately terminates the structure and the rest of the filename and the length are not present. (However as the FAT is padded to chunks of 512 bytes, there will always be enough bytes available in the padding data to read the full field.)<br />
<br />
In the event that 51 files are present, the last valid file entry will end exactly on a 512 byte boundary. This will cause the FAT to be extended by 512 bytes, simply to store the terminating null (with 511 bytes of padding.) This does not require any special handling when reading the archive, but is mentioned to illustrate the importance of the terminating null byte.<br />
<br />
=== Extra data ===<br />
<br />
Since both the FAT and each file are padded to occupy a multiple of 512 bytes, there is unused data at the end of most files. This is especially noticeable in the FAT itself, which seems to contain old high score data leftover from the game's development.<br />
<br />
The padding data found in later files does not seem to be compressed, suggesting that decompression happens outside the archive format.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = No<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = No<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Malvineous|Malvineous]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=GLB_Format_(Galactix)&diff=11773GLB Format (Galactix)2024-02-18T06:16:43Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 2<sup>32</sup>-1 (~4 billion)<br />
| FAT = Beginning<br />
| Names = Yes, 15 chars<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Galactix}}<br />
}}<br />
<br />
The '''Galactix GLB Format''' is used by [[Galactix]] to store all the game data files. The format was later altered for [[Raptor]] to add encryption, resulting in the [[GLB Format (Raptor)|Raptor GLB Format]].<br />
<br />
== Signature ==<br />
<br />
For version 1.0 and 1.3, the first FAT entry has the filename "GLIB FILE". This can be checked without decryption, noting that the offset is different between versions.<br />
<br />
For version 1.3a and later, the first FAT entry must be decrypted, then it contains the filename "(C)CYGNUS1992". The entry must be decrypted (rather than checking the encrypted bytes) because if the file count changes, so will the following encrypted bytes including the signature filename.<br />
<br />
== File format ==<br />
<br />
The file begins with a File Allocation Table (FAT), which lists the filename, size and offset of each file within the archive.<br />
<br />
The very first entry is not a real file, but is a header. The <tt>offset</tt> field of this entry contains the number of files in the FAT (not including this header entry itself.) The filename is used as a signature and varies depending on the file version (see below). The file size reported for this entry is zero.<br />
<br />
The first file's data begins directly after the FAT, which will also be the <tt>offset</tt> value of the second FAT entry.<br />
<br />
=== Version 1.0 ===<br />
<br />
This layout is used in the shareware and registered versions of Galactix v1.0. The file is not encrypted.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[char]] || filename[22] || Null-terminated filename (21 chars + terminating null).<br />
|-<br />
| [[UINT32LE]] || offset || Offset of the file data, relative to the start of the archive.<br />
|-<br />
| [[UINT32LE]] || length || Size of the file data, in bytes. {{TODO|Could be UINT16LE length followed by UINT16LE flags}}<br />
|}<br />
<br />
The filename of the first entry is "GLIB FILE".<br />
<br />
=== Version 1.3 ===<br />
<br />
This layout is used in Galactix v1.3. The file is not encrypted.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT32LE]] || offset || Offset of the file data, relative to the start of the archive<br />
|-<br />
| [[char]] || filename[22] || Null-terminated filename (21 chars + terminating null)<br />
|-<br />
| [[UINT16LE]] || length || Size of the file data, in bytes<br />
|}<br />
<br />
The filename of the first entry is "GLIB FILE".<br />
<br />
=== Version 1.3a ===<br />
<br />
This layout is used in Galactix v1.3a and later. The files are not encrypted but the FAT is encrypted with the same algorithm used for [[GLB Format (Raptor)]] but with the encryption key "GX1".<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT16LE]] || unknown || Unknown value.<br />
|-<br />
| [[UINT32LE]] || offset || Offset of the file data, relative to the start of the archive.<br />
|-<br />
| [[UINT16LE]] || length || Size of the file data, in bytes.<br />
|-<br />
| [[char]] || filename[16] || Null-terminated filename (15 chars + terminating null)<br />
|}<br />
<br />
The filename of the first entry is "(C)CYGNUS1992".<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
| notes = v1.3 only<br />
}}<br />
{{FileFormatTool<br />
| Name = [https://popovevgeniy.github.io/software/unmaintained/mountain_king.html Galactix fuse]<br />
| Platform = DOS<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
| notes = v1.3 only<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Malvineous|Malvineous]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=DAT_Format_(Dr._Riptide)&diff=11772DAT Format (Dr. Riptide)2024-02-18T06:16:43Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 65535<br />
| FAT = Beginning<br />
| Names = Yes, 8.3 chars<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = N<br />
| Games = <br />
{{Game|In Search of Dr. Riptide}}<br />
}}<br />
The '''Dr. Riptide DAT Format''' is used by [[In Search of Dr. Riptide|Dr. Riptide]] for storing most of the game data files.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
There is no signature, so the only known way of detecting whether a file is in this format or not is to carefully parse the header and FAT and ensure the values make sense, e.g. the FAT length is less than all the file offsets, no file offset goes past the end of the file, all filenames end with a terminating NULL, etc.<br />
<br />
=== File header ===<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT16LE]] || fileCount || Number of files in the archive<br />
|}<br />
<br />
=== File entry ===<br />
<br />
The following structure is repeated once for each file entry.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT32LE]] || size || Size of this file, in bytes<br />
|-<br />
| [[UINT32LE]] || lastModified || Time this file was last modified {{TODO|in what units? Probably a DOS FAT timestamp}}<br />
|-<br />
| [[UINT32LE]] || offset || Offset of this file, in bytes, relative to the start of the archive<br />
|-<br />
| [[char]][13] || filename || Filename in 8.3 format, all uppercase, null-terminated<br />
|}<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was documented from the description found at [http://sysmagazine.com/posts/154781/ sysmagazine.com]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=JOESND&diff=11771JOESND2024-02-18T06:16:43Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 341<br />
| FAT = End<br />
| Names = N<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Witchaven}}<br />
{{Game|Witchaven II}}<br />
{{Game|William Shatner's TekWar}}<br />
}}<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
There is no formal signature, but all known examples end with four null bytes. Also, the file sizes come in multiples of 4,096 bytes. Known files may be called JOESND, SOUNDS, SONGS, F_SONGS, W_SONGS or LOOPS depending on purpose and which game they are for.<br />
<br />
=== FAT ===<br />
The last 4096 bytes of the archive contain the file index. Every index entry consists of 12 bytes as follows:<br />
{|class="wikitable"<br />
!Data type!!Description<br />
|-<br />
|[[UINT32LE]]||Offset of file, to be multiplied by 4096<br />
|-<br />
|[[UINT32LE]]||File size<br />
|-<br />
|[[UINT32LE]]||Extra (Sound priority for sounds, possibly ignored for music)<br />
|}<br />
Any unused entries, and the final four bytes of the archive, should be filled with null bytes, although each game will expect a fixed number of entries for a particular archive.<br />
<br />
=== Contents ===<br />
These files contain either raw PCM sounds or HMP music. Sounds should be interpreted as unsigned 8 bit PCM, mono, and 11025 sample rate. The HMPs are HMIMIDIP013195 version.<br />
<br />
The end of each file entry in the archive should be padded with null bytes to reach the next 4096-byte division in the file.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = JOETOOLS<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=Death_Rally_BPA_Format&diff=11770Death Rally BPA Format2024-02-18T06:16:43Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 255<br />
| FAT = Start<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = Y<br />
| Hidden = N<br />
| Games = <br />
{{Game|Death Rally}}<br />
}}<br />
<br />
The BPA file format is an archive format used by [[Death Rally]].<br />
<br />
== Header ==<br />
<br />
{|class="wikitable"<br />
!Data type!!Description<br />
|-<br />
|[[UINT32LE]] numFiles||Number of files in the archive<br />
|-<br />
|<tt>FILEREC</tt>[255] fileRecords||Encrypted FAT<br />
|}<br />
<br />
Each <tt>FILEREC</tt> is of the form<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[char]][13] || encryptedName || Encrypted filename, padded with non-encrypted 0x00 bytes<br />
|-<br />
| [[UINT32LE]] || size || Size of the file data<br />
|}<br />
<br />
The <tt>FILEREC</tt> table has a fixed size of 255 * 17 bytes, padded with null bytes, and cannot contain more than 255 <tt>FILEREC</tt>s. Compressed file data begins immediately after the table, at offset 0x10F3. Because the header does not store offsets, these must be calculated by accumulating through the table.<br />
<br />
The file content is not compressed or encrypted by the archive itself, however many of the files typically found in this archive are already encrypted as part of their respective file formats.<br />
<br />
== Filename encryption ==<br />
<br />
To restore a filename, subtract <tt>117 - 3 * index</tt> from each byte, where <tt>index</tt> is the 0-based index of the byte in the filename. This will yield a non-null-terminated string in uppercase. The encrypted filename is null-terminated (the terminating/padding null bytes are not encrypted).<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=CUR_Format&diff=11769CUR Format2024-02-18T06:16:43Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 3,855 (12-char filenames) to 10,922 (1-char filenames)<br />
| FAT = Beginning<br />
| Names = Yes, unlimited<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = Y<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Prehistorik}}<br />
}}<br />
The '''CUR Format''' is used by [[Prehistorik]] to store data files. Some files it contains are compressed with [[LZSS compression]] while others aren't, and there is no indicator to tell other than by the filename extension.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
There is no signature, but careful parsing of the FAT should reveal a number of things:<br />
<br />
* The FAT length should be shorter than the archive file length<br />
* The FAT length must be at least six bytes (the two bytes for the length field itself plus the four byte terminator)<br />
* Adding up all the sizes of the files (including the length of the FAT) should exactly match the archive file length<br />
* Making sure there are no control characters in the filenames<br />
<br />
=== Header ===<br />
<br />
The file begins with a short header:<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT16LE]] || offStart || Offset of the first file<br />
|}<br />
<br />
The <tt>offStart</tt> value provides the offset of the first file, with the offset of subsequent files calculated by adding all their sizes on to the value. This value can also be used to work out how much data needs to be read to process the FAT.<br />
<br />
As this field is limited to a 16-bit value, the FAT can be at most 65533 bytes long (allowing two bytes for the length field itself.) Given the variable length of filenames this means the maximum number of files varies. For example using 12 character (8.3) filenames, a maximum of 3,855 files can be stored, while reducing all filenames to one character allows 10,922 files to be stored.<br />
<br />
=== File entry ===<br />
<br />
A file entry consists of the filename and its size, and is repeated back-to-back until the terminator is reached.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT32LE]] || lenFile || Size of the file data, in bytes<br />
|-<br />
| [[char]][...] || filename || Filename, all uppercase, variable length<br />
|-<br />
| [[char]] || null || 0x00 byte to terminate filename<br />
|}<br />
<br />
After the last file entry, there is a terminator consisting of four 0x00 bytes. If using the structure above, if the <tt>lenFile</tt> field is zero, finish reading the FAT and don't read the filename fields.<br />
<br />
A file with a size of zero {{TODO|TODO: Has no effect, or terminates the FAT early?}}<br />
<br />
The file's offset must be calculated from the offset of the previous file plus its size. The first file's data is at <tt>offStart</tt> from the header.<br />
<br />
Note that the filenames are variable width with no apparent limit, which can make updating the archive file a bit of a challenge. In practice, the filenames are probably limited to some value not yet discovered - probably 12 chars since they are all 8.3 filenames.<br />
<br />
=== Compression ===<br />
<br />
Those files that are compressed start with a [[UINT32BE]] value storing the uncompressed size (in bytes), followed by the compressed data. The compression algorithm is [[LZSS compression|LZSS]] with a length field of 2 bits, a distance field of 8 bits and a code field of 0=escape, 1=length/distance pair. The length-distance pair stores the length field first, followed by the distance field. Like the field storing the uncompressed size, all bits are decoded in big-endian order.<br />
<br />
As far as is known, the <tt>.mat (except charset1.mat)</tt>, <tt>.mdi</tt> and <tt>.pc1</tt> files are always compressed, and all other files are uncompressed.<br />
<br />
=== Hidden data ===<br />
<br />
While unlikely to be encountered in practice, it is possible to store data after the terminating file entry (the one with a zero file size) and the start of the first file's data.<br />
<br />
It is also theoretically possible to store data after the end of the last file, which would remain hidden as there would be no file entry pointing to it.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = Yes<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = Yes<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format, including the compression algorithm, was reverse-engineered by [[User:Malvineous|Malvineous]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=DAT_Format_(Bullfrog)&diff=11768DAT Format (Bullfrog)2024-02-18T06:16:43Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = Unlimited<br />
| FAT = End<br />
| Names = Yes, 15/16 chars max<br />
| Metadata = None<br />
| Subdirectories = Y<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Hi Octane}}<br />
}}<br />
The '''DAT Format''' is used by [[Hi Octane]] for storing some game data.<br />
<br />
== File format ==<br />
<br />
=== Structure ===<br />
<br />
At the very end of the file there is a "folder-FAT" which lists offsets and sizes of groups of files, which are referred to here as "folders". The folders do not have names. Each folder has its own FAT which contains names, offsets and sizes of each file within that folder.<br />
<br />
=== Signature ===<br />
<br />
The last four bytes in the archive are a [[UINT32LE]] value containing the offset of the folder-FAT. Assuming this offset is valid, reading eight bytes here should match the signature 01 00 01 00 01 00 01 00.<br />
<br />
Subtracting 8 from the offset (for the signature) and subtracting a further 4 (for the folder-FAT offset field itself) will reveal the size of the valid folder-FAT data. This must be a multiple of 16 (the size of each folder-FAT entry.)<br />
<br />
=== Folder entry ===<br />
<br />
The last four bytes in the archive are a [[UINT32LE]] called <tt>offFolders</tt>. At the offset given by <tt>offFolders</tt> skip the first eight bytes (the signature), the following structure is repeated until arriving at four bytes from the end of the archive again.<br />
<br />
Alternatively a folder count can be calculated as <code>numFolders = (lenArchive - offFolders - 8 - 4) / 16</code><br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| UINT32LE || offFAT || Offset of the FAT for this folder<br />
|-<br />
| UINT32LE || offData || Offset of the first file's data<br />
|-<br />
| UINT32LE || lenFAT || Length of the FAT, in bytes<br />
|-<br />
| UINT32LE || lenData || Length of the folder's data, not including the FAT<br />
|}<br />
<br />
=== File entry ===<br />
<br />
At <tt>offFAT</tt>, the following structure is repeated once for each file. The number of files is obtained either by reading <tt>lenFAT</tt> bytes, or precalculating the amount as <code>numFiles = (lenFAT / 32) - 1</code>.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| char[18] || filename || Filename, null terminated/padded<br />
|-<br />
| UINT32LE || offset || File offset, relative to start of folder (<tt>offData</tt> in folder entry)<br />
|-<br />
| UINT32LE || unknown || Unknown, always 0<br />
|-<br />
| UINT32LE || size || File size, in byte<br />
|-<br />
| UINT32LE || flags || Unknown, always 0x5A for normal files, 0x00 for first entry (see below)<br/>{{TODO|In [[Hi Octane]] it is an [[UINT16LE]] (MUSIC.DAT)}}<br />
|}<br />
<br />
The first file entry in the FAT is a kind of header and should be ignored when reading. When writing, use an empty filename (all 0x00), set the unknown value, flags and offset to 0, and the size to the same value as <tt>lenData</tt> from the folder entry.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Malvineous|Malvineous]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=DAT_Format_(Mystic_Towers)&diff=11767DAT Format (Mystic Towers)2024-02-18T06:16:43Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 65,535<br />
| FAT = End<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Mystic Towers}}<br />
}}<br />
The '''DAT Format''' is used by [[Mystic Towers]] for storing most of the game data.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
There is no signature, but the file has certain fields that can be checked for validity. For example all the offsets could be read in the FAT to ensure none of the files appear to have data beyond the end of the archive file itself.<br />
<br />
=== Header ===<br />
<br />
The very last two bytes in the file are a [[UINT16LE]] called <tt>numFiles</tt>. The FAT begins (<tt>offFAT</tt>) at the <tt>2 + numFiles * 21</tt> bytes from the end of the file.<br />
<br />
=== File entry ===<br />
<br />
At <tt>offFAT</tt>, the following structure is repeated <tt>numFiles</tt> times.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| UINT8 || lenFilename || Length of valid chars in filename field<br />
|-<br />
| char[12] || filename || Filename, padded to 12 chars with arbitrary values. Only first <tt>lenFilename</tt> chars are valid.<br />
|-<br />
| UINT32LE || offset || File offset, relative to start of file<br />
|-<br />
| UINT32LE || size || File size<br />
|}<br />
<br />
== Hidden data ==<br />
<br />
It's possible to "hide" data between the last file and the start of the FAT. This data wouldn't be accessible by filename but the game would load the other files as per normal.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Malvineous|Malvineous]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=PAK_Format_(Westwood)&diff=11766PAK Format (Westwood)2024-02-18T06:16:43Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 65,536<br />
| FAT = Beginning<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Dune II}}<br />
{{Game|Eye of the Beholder}}<br />
{{Game|Lands of Lore: The Throne of Chaos}}<br />
{{Game|The Legend of Kyrandia, Book One}}<br />
{{Game|The Legend of Kyrandia, Book Two: The Hand of Fate}}<br />
{{Game|The Legend of Kyrandia, Book Three: Malcolm's Revenge}}<br />
}}<br />
<br />
Westwood's '''PAK Format''' is a simple group file used in their games from 1991-1994. It is efficient in the sense that it only stores file names and starting positions in the header, so file lengths must be inferred. It does not support compression. There are three different versions of the header layouts which are nearly identical and backward-compatible with the previous version. Each update makes it slightly easier to read the header.<br />
<br />
* Version 1: Eye of the Beholder 1<br />
* Version 2: Dune II, Legend of Kyrandia 1<br />
* Version 3: Legend of Kyrandia 2, Lands of Lore 1, Legend of Kyrandia 3<br />
<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
PAK files have no signature. They are usually given the extension .PAK, but not always.<br />
<br />
=== File Entry ===<br />
<br />
The header contains a list of files consisting of a 32-bit file offset and a null-terminating file name. Depending on the version, the header ends either when the file pointer equals the offset of the first file (version 1), or when you encounter a file offset of 0 (versions 2 and 3).<br />
<br />
{|class="wikitable"<br />
!Data type!!Name!!Description<br />
|-<br />
|[[UINT32LE]]||Offset||File's starting offset in the PAK archive.<br />
|-<br />
|[[ASCIIZ]]||Filename||File name (8.3 style), null terminated, variable width.<br />
|}<br />
<br />
Each file's size must be calculated by subtracting it from the next file's offset. Version 1 PAK files have a final file offset equal to the size of the file. Version 2 PAK files replace this offset with an end of header flag (0x0000), so the end of the last file must be inferred from the size of the file itself. Version 3 PAK files have an additional file offset with an empty file name (just a null) to determine the size of the last file and then feature an end of header flag (0x0000). Because of this, version 2 PAK files cannot contain hidden files after the last file.<br />
<br />
Note that while version 1 PAK files normally have the end offset set to the file size, about half of the PAK files in Eye of the Beholder 1 have it set to complete garbage. The game doesn't actually use the end offset in any way; it has a table of file sizes hardcoded in the exe file, and relies on that to extract the files correctly. This should be taken into account when dealing with version 1 PAK files.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}{{FileFormatTool<br />
| Name = [http://xhp.xwis.net/ XCC Mixer]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
| notes = Can open at least the [[Dune II]] type PAK files.<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Librarian]]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Source Code ==<br />
<br />
=== Extractor ===<br />
This FreeBASIC code will extract all of the files from a version 1, 2, or 3 PAK file into the folder you specify.<br />
<br />
<syntaxhighlight lang="freebasic"><br />
' This program will extract the files stored in a Westwood PAK file used in various games in the first half of the 1990s.<br />
' There are three versions of the PAK file. Version 1 was used only in Eye of the Beholder 1. To determine the <br />
' end of the header, just wait until the file pointer equals the position of the first file. The last file offset is the <br />
' length of the file. Version 2 was first used in Dune II. It's header ends when the file offset is zero (0x0000). <br />
' Version 3 was first used in The Legend of Kyrandia 2. It has an additional empty file name with a file offset so you <br />
' can easily determine the size of the last file rather than relying on the length of the file, like in version 2.<br />
<br />
Dim As String PAKFile = "H:\DOS\DUNE2\sound.pak"<br />
Dim As String ExportFolder = "H:\DOS\DUNE2\dune"<br />
<br />
Open PAKFile For Binary As #1<br />
<br />
Dim As UInteger<32> FileStart(1000)<br />
Dim As String FileName(1000)<br />
Dim As UInteger<32> Position<br />
Dim As String Char<br />
Dim As UInteger FileCount = 0<br />
Dim As UInteger FileNo<br />
Dim As ULong FileSize<br />
Dim As UInteger ByteNo<br />
<br />
' Loop through the header.<br />
Do<br />
' 4-byte file start position.<br />
Get #1, , FileStart(FileCount)<br />
<br />
Position = Seek(1)<br />
<br />
' Trap for version 2 and 3 PAK files.<br />
If FileStart(FileCount) = 0 Then<br />
Exit Do<br />
Else<br />
' Trap for version 1 PAK files.<br />
If (Position - 1) = FileStart(0) Then<br />
FileCount = FileCount + 1<br />
Exit Do<br />
Else<br />
' Read the file name until we hit a null.<br />
FileName(FileCount) = ""<br />
Do<br />
Char = " "<br />
Get #1, , Char<br />
If Asc(Char) <> 0 Then<br />
FileName(FileCount) = FileName(FileCount) + Char<br />
End If<br />
Loop While Asc(Char) <> 0<br />
<br />
FileCount = FileCount + 1<br />
End If<br />
End If<br />
Loop<br />
<br />
FileCount = FileCount - 1<br />
<br />
MKDir(ExportFolder)<br />
<br />
For FileNo = 0 To FileCount<br />
' Read the previous file from the PAK.<br />
<br />
' Get the file size.<br />
If FileNo = FileCount Then<br />
' Trap for version 1 and 2 PAK files.<br />
FileSize = LoF(1) - FileStart(FileNo)<br />
Else<br />
FileSize = FileStart(FileNo + 1) - FileStart(FileNo)<br />
End If<br />
<br />
Print Using "###) File: \ \ Offset: ########,, Size: ########,"; FileNo; FileName(FileNo); FileStart(FileNo); FileSize<br />
<br />
' Trap for version 3 PAK files.<br />
If FileSize > 0 Then<br />
' Create a buffer to store the next file.<br />
ReDim As Byte FileData(0 To FileSize)<br />
<br />
' Load the file from the PAK into the buffer.<br />
Seek 1, FileStart(FileNo) + 1<br />
For ByteNo = 0 To (FileSize - 1)<br />
Get #1, , FileData(ByteNo)<br />
Next ByteNo<br />
<br />
' Save the buffer to the export folder.<br />
Open ExportFolder + "\" + FileName(FileNo) For Binary As #2<br />
For ByteNo = 0 To (FileSize - 1)<br />
Put #2, , FileData(ByteNo)<br />
Next ByteNo<br />
Close #2<br />
End If<br />
Next FileNo<br />
<br />
Print "Finished."<br />
Close #1<br />
<br />
Sleep<br />
</syntaxhighlight><br />
<br />
== Credits ==<br />
<br />
This archive format was reverse engineered by [[User:TheAlmightyGuru|TheAlmightyGuru]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)<br />
<br />
[[Category: Westwood Studios File Formats]]</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=DAT_Format_(Highway_Hunter)&diff=11765DAT Format (Highway Hunter)2024-02-18T06:16:43Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 3,855 <!-- 65535/17 --><br />
| FAT = Beginning + Embedded<br />
| Names = Yes, 8.3 chars<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Highway Hunter}}<br />
}}<br />
The '''Highway Hunter DAT Format''' is used by [[Highway Hunter]] for storing most of the game data files.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
There is no signature, so the only known way of detecting whether a file is in this format or not is to carefully parse the header and FAT and ensure the values make sense, e.g. the FAT length is less than all the file offsets, no file offset goes past the end of the file, all filenames end with a terminating NULL, the last FAT entry is all NULLs, etc.<br />
<br />
=== File header ===<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT16LE]] || lenFAT || Length of FAT, in bytes<br />
|}<br />
<br />
As each FAT entry is 17 bytes long, dividing lenFAT by 17 will reveal the number of file entries in the archive. The last FAT entry is always empty, so remember to subtract one from this value to obtain the actual number of files.<br />
<br />
=== File entry ===<br />
<br />
The following structure is repeated once for each file entry.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT32LE]] || offset || Offset of first byte of file data, relative to the start of the archive<br />
|-<br />
| [[char]][13] || filename || Filename in 8.3 format, all lowercase, padded with 0x00 bytes to 13 chars (last char is always 0x00)<br />
|}<br />
<br />
The very last file entry is always empty (<tt>offset</tt> is zero and the <tt>filename</tt> is 13 nulls.)<br />
<br />
=== File data ===<br />
<br />
The file data follows the FAT, at the offsets given. At each offset, the file data is stored as follows:<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT32LE]] || length || Length of the file content, in bytes<br />
|-<br />
| [[BYTE]][length] || content || File data, <tt>length</tt> bytes long<br />
|}<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Malvineous|Malvineous]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=LIB_Format_(Mythos_Software)&diff=11764LIB Format (Mythos Software)2024-02-18T06:16:43Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 65,536<br />
| FAT = Beginning<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel}}<br />
{{Game|The Lost Files of Sherlock Holmes: The Case of the Rose Tattoo}}<br />
{{Game|Bodyworks Voyager: Missions in Anatomy}}<br />
}}<br />
Mythos Software's '''LIB Format''' is very similar to the [[LIB Format (Electronic Arts)|LIB format]] used by Electronic Arts, which is fitting since EA was the publisher for Mythos Software. It is efficient in the sense that it only stores file names and starting positions in the header, so file lengths must be inferred. It does not support compression. There are two versions of LIB files. An earlier version used in [[The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel]], and a later version used in [[Bodyworks Voyager: Missions in Anatomy]] and [[The Lost Files of Sherlock Holmes: The Case of the Rose Tattoo]]. The second version has a slightly different layout, which is not yet fully understood, but it seems the added data in the second format is not actually needed by the games.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
Version 1 LIB files begin with "LIB", then character 0x1A, then the number of files. In version 2, the string part is "LIC". You actually have to read one more file entry than the header suggests, as there is an empty file entry at the end of the list to indicate where the final file ends.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[char]][4] || Signature || "LIB" plus 0x1A in version 1. Version 2 uses "LIC" plus 0x1A.<br />
|-<br />
| [[UINT16LE]] || FileCount || Number of files<br />
|}<br />
<br />
In version 1, the signature is followed immediately by the file entry index, a list of the file entry structure described below, repeated <code>fileCount</code> times.<br />
<br />
In version 2, there is a kind of table with a length of <code>FileCount * 8</code> between this header and the file entries, but besides that, the format is completely identical. The values in this table are unknown, but tests in both ''Bodyworks Voyager'' and ''Rose Tattoo'' showed that the games didn't seem to care if data in the .lib file was modified without any change to these header value, or even if all these table values were blanked out to 0x00 bytes, so even if the table values would be some sort of file checksums, they don't prevent the game from accepting the archive and its contents.<br />
<br />
=== File entry ===<br />
<br />
Each file entry consists of the file name and its offset in the file. Even though the file name is fixed-width, it appears to be null-terminated.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[char]][13] || filename || File name (8.3 style), padded with nulls to 13 characters<br />
|-<br />
| [[UINT32LE]] || offset || File's offset from the start of the LIB archive<br />
|}<br />
<br />
Each file's size must be calculated by subtracting it from the next file's offset. There is an additional null-named file at the end with an offset equal to the size of the file so you don't need any special code to get the final file's size. This entry is not included in <tt>fileCount</tt> in the header.<br />
<br />
=== Hidden data ===<br />
<br />
While no files appear to use this, it is possible to hide data after the list of file entries and before the first file.<br />
<br />
As there is an extra file entry to hold the size of the archive file, it is also possible to hide data at the end of the file as long as it comes after the offset of the final null-named file entry.<br />
<br />
Both these methods produce valid files where the hidden data would always be ignored.<br />
<br />
== Notes ==<br />
The Music.lib group affixes 12 spaces to the beginning of each file. Although this may just be part of the music format, it is also affixed to the driver files. It is unknown why these spaces are in this lib group, but they do not show up in other lib files. Perhaps it was required for the sound engine?<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Librarian]]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Source Code ==<br />
<br />
This FreeBASIC code will extract all of the files from the LIB file into a folder named after the LIB file you specify.<br />
<br />
<syntaxhighlight lang="freebasic"><br />
' Specify the Mythos Software LIB file here:<br />
Dim As String LibFileName = "music.lib"<br />
<br />
Open LibFileName For Binary As #1<br />
<br />
Print "Reading header..."<br />
<br />
' Verify the format's magic word.<br />
Dim As String MagicWord = Space(3)<br />
Get #1, , MagicWord<br />
If MagicWord <> "LIB" Then<br />
Print "Not a Mythos Software .LIB file."<br />
End<br />
End If<br />
<br />
' Header Structure<br />
Dim As Byte Unknown1<br />
Get #1, , Unknown1<br />
Dim As UShort NumberOfFiles<br />
Get #1, , NumberOfFiles<br />
<br />
' An additional entry is made which has an empty file name and stores the length of the LIB file as the starting offset.<br />
' This is used to calculate the length of the last file without needing special code to determine it based on the file size.<br />
NumberOfFiles = NumberOfFiles + 1<br />
<br />
Print "Valid LIB File."<br />
<br />
' Load the header filenames and their offsets.<br />
Dim FileName(1 To NumberOfFiles) As String<br />
Dim FileStart(1 To NumberOfFiles) As UInteger<br />
<br />
Dim As UShort FileNo<br />
For FileNo = 1 To NumberOfFiles<br />
FileName(FileNo) = Space(13)<br />
<br />
Get #1, , FileName(FileNo)<br />
FileName(FileNo) = Left(FileName(FileNo), InStr(FileName(FileNo), Chr(0)) - 1)<br />
<br />
Get #1, , FileStart(FileNo)<br />
Next FileNo<br />
<br />
' Extract the files.<br />
Print "Extracting..."<br />
<br />
Dim As String LibFolder = Left(LibFileName, InStr(LibFileName, ".") - 1)<br />
MkDir("./" + LibFolder)<br />
<br />
Dim As ULongInt FileLength<br />
For FileNo = 1 To (NumberOfFiles - 1) ' Skip the last file which is not a real file anyway.<br />
FileLength = FileStart(FileNo + 1) - FileStart(FileNo)<br />
<br />
Print " ./" + LibFolder + "/" + FileName(FileNo) + " - " + Str(FileLength) + " bytes"<br />
<br />
Dim FileContents(0 To (FileLength - 1)) As Byte<br />
Get #1, FileStart(FileNo) + 1, FileContents()<br />
<br />
Open ("./" + LibFolder + "/" + FileName(FileNo)) For Binary As #2<br />
Put #2, , FileContents()<br />
Close #2<br />
Next FileNo<br />
<br />
Close #1<br />
Print : Print Str(NumberOfFiles - 1) + " file(s) extracted."<br />
Sleep<br />
</syntaxhighlight><br />
<br />
== Credits ==<br />
<br />
This archive format was reverse engineered by [[User:TheAlmightyGuru|TheAlmightyGuru]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=Legend_of_Seven_Paladins_3D_Archive_Format&diff=11763Legend of Seven Paladins 3D Archive Format2024-02-18T06:16:43Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = less than 4,294,967,296<br />
| FAT = Beginning<br />
| Names = N<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Legend of Seven Paladins 3D}}<br />
}}<br />
<br />
The '''Legend of Seven Paladins 3D Archive Format''' is one of the more efficient archives in that it only stores file offsets in the headers, and the file sizes must be calculated from these. It doesn't store filenames.<br />
<br />
== File format ==<br />
<br />
The file starts with a [[UINT32LE]] representing the offset of the first file in the archive. Then comes a [[UINT32LE]] representing the offset of the second file, etc. Until a [[UINT32LE]] comes along who's value is the same as the file size of the archive.<br />
Between these offsets and the actual data of the first file, there is room for hidden data.<br />
<br />
The size of a file must be calculated from the offset of the next file minus its own offset.<br />
<br />
This archive doesn't store filenames, so it's impossible to determine the file formats of the archived files by looking at the filename extension. Luckily, all file formats of the files in the officially released archives can be determined by looking at the first byte of each file:<br />
<br />
{|class="wikitable"<br />
! First byte !! File format<br />
|-<br />
| 0x00<br /> 0x1f<br />
| 6-bit [[VGA Palette]]<br />
|-<br />
| 0x04<br />
| [[Build-engine Map Format]]<br />
|-<br />
| 0x0a<br />
| [[PCX Format]]<br />
|-<br />
| 0x43<br />
| [[VOC Format]]<br />
|-<br />
| 0x4d<br />
| [[MID Format]]<br />
|}<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [http://sfprod.shikadi.net/old/games/lotsp.htm#extractor Lotspe]<br />
| Platform = DOS<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [https://codeberg.org/parlortricks/lotspe LOTSPE]<br />
| Platform = Windows/Linux<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
| notes = Coded in the [https://fennel-lang.org/ Fennel] language by [https://codeberg.org/parlortricks parlortricks]<br />
}}<br />
{{FileFormatTool<br />
| Name = [https://codeberg.org/parlortricks/lotspp LOTSPP]<br />
| Platform = Windows/Linux<br />
| canExtract = no<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
| notes = Coded in the [https://fennel-lang.org/ Fennel] language by [https://codeberg.org/parlortricks parlortricks]<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Frenkel|Frenkel]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=Legend_of_Seven_Paladins_3D&diff=11762Legend of Seven Paladins 3D2024-02-18T06:16:42Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Stub}}<br />
<br />
{{Game Infobox<br />
| Levels = No<br />
| Tiles = No<br />
| Sprites = No<br />
| Fullscreen = No<br />
| Sound = No<br />
| Music = No<br />
| Text = No<br />
| Story = No<br />
| Interface = No<br />
}}<br />
<br />
'''Legend of Seven Paladins 3D''' is a first-person shooter and it's the first commercially released game that uses the [[:Category:Build engine|Build engine]].<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [http://sfprod.shikadi.net/old/games/lotsp.htm#extractor Lotspe]<br />
| Platform = DOS<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [https://codeberg.org/parlortricks/lotspe LOTSPE]<br />
| Platform = Windows/Linux<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
| notes = Coded in the [https://fennel-lang.org/ Fennel] language by [https://codeberg.org/parlortricks parlortricks]<br />
}}<br />
{{FileFormatTool<br />
| Name = [https://codeberg.org/parlortricks/lotspp LOTSPP]<br />
| Platform = Windows/Linux<br />
| canExtract = no<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
| notes = Coded in the [https://fennel-lang.org/ Fennel] language by [https://codeberg.org/parlortricks parlortricks]<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
<br />
{{BeginGameFileList}}<br />
{{GameFile<br />
| Name = 75m.exe<br />75t.exe<br />laart000.dat<br />ltart000.dat<br />
| Format = [[EXE format]]<br />
| KnownFormat = Yes<br />
| Desc = Executables<br />
}}<br />
{{GameFile<br />
| Name = l0art000.dat<br />l1art000.dat<br />
| Format = [[ART Format (Build)]]<br />
| KnownFormat = Yes<br />
| Desc = Level textures and sprites<br />
}}<br />
{{GameFile<br />
| Name = lcart000.dat<br />lfart000.dat<br />lgart000.dat<br />
| Format = [[FLIC Format]]<br />
| KnownFormat = Yes<br />
| Desc = Animations<br />
}}<br />
{{GameFile<br />
| Name = lmart000.dat<br />lvart000.dat<br />
| Format = [[Legend of Seven Paladins 3D Archive Format]]<br />
| KnownFormat = Yes<br />
| Desc = Archive storing most of the game's data files<br />
}}<br />
{{GameFile<br />
| Name = palette.dat<br />
| Format = [[Palette Format (Build)]]<br />
| KnownFormat = Yes<br />
| Desc = Palettes, palettes swaps, shade and translucency (blending) tables<br />
}}<br />
{{GameFile<br />
| Name = setup.dat<br />
| Format = [[Legend of Seven Paladins 3D Settings Format]]<br />
| KnownFormat = No<br />
| Desc = Game settings<br />
}}<br />
{{GameFile<br />
| Name = tables.dat<br />
| Format = [[Tables Format (Build)]]<br />
| KnownFormat = Yes<br />
| Desc = Tables for sin, atn, large font, small font, gamma correction<br />
}}<br />
{{GameFile<br />
| Name = *.map<br />
| Format = [[MAP Format (Build)]]<br />
| KnownFormat = Yes<br />
| Desc = Game levels<br />
}}<br />
{{GameFile<br />
| Name = *.mid<br />
| Format = [[MID Format]]<br />
| KnownFormat = Yes<br />
| Desc = Background music<br />
}}<br />
{{GameFile<br />
| Name = *.pal<br />
| Format = [[VGA Palette]]<br />
| KnownFormat = Yes<br />
| Desc = 6-bit VGA Palette<br />
}}<br />
{{GameFile<br />
| Name = *.pcx<br />
| Format = [[PCX Format]]<br />
| KnownFormat = Yes<br />
| Desc = Full-screen images<br />
}}<br />
{{GameFile<br />
| Name = *.voc<br />
| Format = [[VOC Format]]<br />
| KnownFormat = Yes<br />
| Desc = Sound effects<br />
}}<br />
{{EndGameFileList}}<br />
<br />
[[Category:3D]]<br />
[[Category:First-Person Shooter]]<br />
[[Category:Build engine]]</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=Doofus_Game_Data_Format&diff=11761Doofus Game Data Format2024-02-18T06:16:42Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{NeedMoreInfo}}<br />
{{Archive Infobox<br />
| MaxFiles = Unlimited<br />
| FAT = External<br />
| Names = N<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = Y<br />
| Encrypted = N<br />
| Hidden = N<br />
| Games = <br />
{{Game|Doofus}}<br />
}}<br />
The '''Doofus Game Data Format''' is used by [[Doofus]] to store much of the game's data.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
There is no signature, but since some file entries begin with the letters "GB", this could be used to identify files, by checking to see whether these characters appear at the expected locations. The music files also start with "TBSA0.01".<br />
<br />
=== FAT ===<br />
<br />
The ''File Allocation Table (FAT)'' is stored in <tt>doofus.exe</tt>.<br />
<br />
{|class="wikitable"<br />
! EXE version !! FAT offset !! Identification method<br />
|-<br />
| 1.0 || 0x15372 || 0xFB10 contains text "The Bone Shaker Architect", after reversing [[PKLite]] compression<br />
|}<br />
<br />
The FAT consists of the following structure, repeated 65 times. There are another four 0x00 bytes following this, but it is unknown whether these belong to the FAT (as a final terminator) or whether they belong to the data following the FAT.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT16LE]] || length || Length of file data, in bytes<br />
|-<br />
| [[UINT16LE]] || type || File type<br />
|-<br />
| BYTE[4] || padding || Always 0x00<br />
|}<br />
<br />
The first file begins at offset 0 in <tt>gamedata.g-d</tt>. To calculate the offsets of subsequent files, the <tt>length</tt> fields must be totalled.<br />
<br />
The <tt>type</tt> field appears to contain a code representing the type of data stored at that file's location. Known types are:<br />
<br />
{|class="wikitable"<br />
! Code !! File type<br />
|-<br />
| 0x0000 || Generic data<br />
|-<br />
| 0x1636 || {{TODO|Unknown}}<br />
|-<br />
| 0x2376 || {{TODO|Unknown}}<br />
|-<br />
| 0x3276 || {{TODO|Unknown}}<br />
|-<br />
| 0x3F2E || {{TODO|Unknown}}<br />
|-<br />
| 0x3F64 || {{TODO|Unknown}}<br />
|-<br />
| 0x48BE || {{TODO|Unknown}}<br />
|-<br />
| 0x43EE || {{TODO|Unknown}}<br />
|-<br />
| 0x59EE || [[TBSA Music Format]]<br />
|}<br />
<br />
=== Files ===<br />
<br />
==== #0: Config ====<br />
<br />
The first file contains configuration data.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT8]] || option1 || 0=70Hz videomode, 1=55Hz videomode<br />
|-<br />
| [[UINT8]] || option2 || 0=scrollmode-1, 1=scrollmode-2<br />
|-<br />
| [[UINT8]] || option3 || 0=keyboard, 1=keyboard+joystick<br />
|-<br />
| [[UINT8]] || option4 || bitfield: 0x80=turbo mode, 0x08=samples, 0x04=music, 0x03=always set. Turbo mode only allowed with samples on.<br />
|-<br />
| [[char]][8] || playerName || Player's name, padded with spaces and not null-terminated<br />
|-<br />
| [[char]][8] || password || Level password, padded with spaces and not null-terminated<br />
|}<br />
<br />
==== #1: High scores ====<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT32LE]][7] || score || Score for each of the seven high-score entries<br />
|-<br />
| [[char]][20][7] || highName || Name for each of the seven high-score entries (20 chars each, not null-terminated)<br />
|}<br />
<br />
Each high score entry begins with a space, a number and a full-stop, and is padded with dashes and a final space, e.g. " 1.example ------ ". The dashes are replaced with the actual score when displayed in-game.<br />
<br />
==== Compressed/encrypted files ====<br />
<br />
These files all start with a particular header.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[char]][2] || signature || "GB"<br />
|-<br />
| [[UINT16LE]] || length || Length of data in file<br />
|-<br />
| [[UINT16LE]] || unknown ||<br />
|-<br />
| [[UINT16LE]] || unknown2 ||<br />
|-<br />
| BYTE[47] || padding || Bring total structure up to 55 bytes<br />
|-<br />
| BYTE[length] || content || Actual data for this file<br />
|}<br />
<br />
==== Music files ====<br />
<br />
The music files start with the characters "TBSA0.01". This probably stands for "The Bone Shaker Architect", the name of the music player library. They are in [[TBSA Music Format]].<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = No<br />
| canCreate = No<br />
| canModify = Yes<br />
| canCompress = No<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = No<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = No<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Malvineous|Malvineous]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=DLT_Format&diff=11760DLT Format2024-02-18T06:16:42Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 65,535<br />
| FAT = Embedded<br />
| Names = Yes, 8.3, encrypted<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = Y<br />
| Encrypted = Y<br />
| Hidden = N<br />
| Games = <br />
{{Game|Stargunner}}<br />
}}<br />
The '''DLT format''' is used to store most of the data for [[Stargunner]].<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
The first four characters of the file are "DAVE". Each compressed subfile begins with "PGBP", while uncompressed subfiles do not. It is probably not possible to store a file that has "PGBP" as its first four bytes unless it is first compressed.<br />
<br />
=== Header ===<br />
<br />
The file starts with a single field indicating the number of files present.<br />
<br />
{|class="wikitable"<br />
! Data type !! Description<br />
|-<br />
| [[char]] signature[4] || "DAVE"<br />
|-<br />
| [[UINT16LE]] version || File version<br />
|-<br />
| [[UINT16LE]] numFiles || File count<br />
|}<br />
<br />
The file version must be 0x100 ("00 01") to work with .exe version 1.0b (the version in the full freeware release.)<br />
<br />
=== File entry ===<br />
<br />
After the header, the following structure is repeated <tt>numFiles</tt> times.<br />
<br />
{|class="wikitable"<br />
! Data type !! Description<br />
|-<br />
| [[BYTE]] filename[32] || Encrypted filename (8.3, with a path, backslash as separator)<br />
|-<br />
| [[UINT32LE]] lastModified || Last modified date, as number of seconds since 1980-01-01 (no timezone, so local time wherever the archive was created)<br />
|-<br />
| [[UINT32LE]] size || File size<br />
|-<br />
| [[BYTE]] data[size] || File content, <tt>size</tt> bytes long<br />
|}<br />
<br />
{{TODO|Does the filename need to be null terminated before encryption (31 chars max) or can it be the full 32 chars?}}<br />
<br />
=== Filename encryption ===<br />
<br />
The filenames are encrypted using an XOR cipher. The first character is in cleartext, then the second and subsequent characters are XOR'd with the previous character's cleartext value incremented by its offset from the start of the string:<br />
<br />
for (int i = 1; i < 32; i++) name[i] ^= name[i - 1] + i;<br />
<br />
=== Compression ===<br />
<br />
Many of the files inside the DLT are compressed using a variant of [[wp:Byte_pair_encoding|byte-pair encoding]]. If a file begins with the four bytes "PGBP" then it is compressed.<br />
<br />
[[User:The_coder|The_coder]] has decompiled the decompression algorithm and [http://code.google.com/p/tombexcavator/source/browse/branches/v0/src/providers/stargunner/read.cc produced C++ code] which can extract and decompress the files. A cleaned up version of this, with only the decompression algorithm, follows:<br />
<br />
<syntaxhighlight lang="cpp"><br />
//<br />
// unstargun.cpp<br />
//<br />
// Stargunner decompression utility.<br />
//<br />
// Written by Adam Nielsen <malvineous@shikadi.net>. Based on The_coder's work<br />
// for tombexcavator.<br />
//<br />
// Use: unstargun < infile > outfile<br />
//<br />
<br />
#include <iostream><br />
#include <cstring><br />
#include <cassert><br />
#include <stdint.h><br />
<br />
/// Chunk size used during compression. Each chunk expands to this amount of data.<br />
#define CHUNK_SIZE 4096<br />
<br />
/// Largest possible chunk of compressed data. (No compression + worst case dictionary size.)<br />
#define CMP_CHUNK_SIZE (CHUNK_SIZE + 256)<br />
<br />
/// Read 32-bit little-endian int, in an endian-neutral way<br />
uint32_t get_u32()<br />
{<br />
uint8_t sig[4];<br />
std::cin.read((char *)sig, 4);<br />
return sig[0] | (sig[1] << 8) | (sig[2] << 16) | (sig[3] << 24);<br />
}<br />
<br />
/// Read 16-bit little-endian int, in an endian-neutral way<br />
uint16_t get_u16()<br />
{<br />
uint8_t sig[2];<br />
std::cin.read((char *)sig, 2);<br />
return sig[0] | (sig[1] << 8);<br />
}<br />
<br />
/// Decompress a data chunk.<br />
/**<br />
* @param in<br />
* Input data. First byte is the one immediately following the chunk length.<br />
*<br />
* @param expanded_size<br />
* The size of the input chunk after decompression. The output buffer must<br />
* be able to hold this many bytes.<br />
*<br />
* @param out<br />
* Output buffer.<br />
*/<br />
unsigned int explode_chunk(const uint8_t* in, size_t expanded_size, uint8_t* out)<br />
{<br />
uint8_t tableA[256], tableB[256];<br />
unsigned int inpos = 0;<br />
unsigned int outpos = 0;<br />
<br />
while (outpos < expanded_size) {<br />
// Initialise the dictionary so that no bytes are codewords (or if you<br />
// prefer, each byte expands to itself only.)<br />
for (int i = 0; i < 256; i++) tableA[i] = i;<br />
<br />
//<br />
// Read in the dictionary<br />
//<br />
<br />
uint8_t code;<br />
unsigned int tablepos = 0;<br />
do {<br />
code = in[inpos++];<br />
<br />
// If the code has the high bit set, the lower 7 bits plus one is the<br />
// number of codewords that will be skipped from the dictionary. (Those<br />
// codewords were initialised to expand to themselves in the loop above.)<br />
if (code > 127) {<br />
tablepos += code - 127;<br />
code = 0;<br />
}<br />
if (tablepos == 256) break;<br />
<br />
// Read in the indicated number of codewords.<br />
for (int i = 0; i <= code; i++) {<br />
assert(tablepos < 256);<br />
uint8_t data = in[inpos++];<br />
tableA[tablepos] = data;<br />
if (tablepos != data) {<br />
// If this codeword didn't expand to itself, store the second byte<br />
// of the expansion pair.<br />
tableB[tablepos] = in[inpos++];<br />
}<br />
tablepos++;<br />
}<br />
} while (tablepos < 256);<br />
<br />
// Read the length of the data encoded with this dictionary<br />
int len = in[inpos++];<br />
len |= in[inpos++] << 8;<br />
<br />
//<br />
// Decompress the data<br />
//<br />
<br />
int expbufpos = 0;<br />
// This is the maximum number of bytes a single codeword can expand to.<br />
uint8_t expbuf[32];<br />
while (1) {<br />
if (expbufpos) {<br />
// There is data in the expansion buffer, use that<br />
code = expbuf[--expbufpos];<br />
} else {<br />
// There is no data in the expansion buffer, use the input data<br />
if (--len == -1) break; // no more input data<br />
code = in[inpos++];<br />
}<br />
<br />
if (code == tableA[code]) {<br />
// This byte is itself, write this to the output<br />
out[outpos++] = code;<br />
} else {<br />
// This byte is actually a codeword, expand it into the expansion buffer<br />
assert(expbufpos < (signed)sizeof(expbuf) - 2);<br />
expbuf[expbufpos++] = tableB[code];<br />
expbuf[expbufpos++] = tableA[code];<br />
}<br />
}<br />
}<br />
return outpos - expanded_size;<br />
}<br />
<br />
int main(void)<br />
{<br />
std::cerr << "Stargunner decompressor.\n"<br />
"Written by Adam Nielsen <malvineous@shikadi.net>\n"<br />
"Decompression algorithm decompiled by The_coder" << std::endl;<br />
<br />
// Make sure the input data has a valid "PGBP" signature.<br />
char sig[4];<br />
std::cin.read(sig, 4);<br />
if (strncmp(sig, "PGBP", 4) != 0) {<br />
std::cerr << "ERROR: Input file is not a Stargunner compressed file."<br />
<< std::endl;<br />
return 1;<br />
}<br />
<br />
// Read the header<br />
uint32_t outSize = get_u32();<br />
std::cerr << "Writing " << outSize << " bytes" << std::flush;<br />
uint8_t *chunk = new uint8_t[CMP_CHUNK_SIZE];<br />
uint8_t *chunkOut = new uint8_t[CHUNK_SIZE];<br />
<br />
while (!std::cin.eof()) {<br />
long chunkSize = get_u16();<br />
if (chunkSize > CMP_CHUNK_SIZE) {<br />
std::cerr << "\nERROR: Compressed chunk is too large!"<br />
<< std::endl;<br />
return 2;<br />
}<br />
std::cerr << "." << std::flush;<br />
std::cin.read((char *)chunk, chunkSize);<br />
int lenOut;<br />
if (outSize < CHUNK_SIZE) lenOut = outSize;<br />
else lenOut = CHUNK_SIZE;<br />
if (explode_chunk(chunk, lenOut, chunkOut)) {<br />
std::cerr << "\nERROR: Failed to explode chunk!" << std::endl;<br />
return 2;<br />
}<br />
std::cout.write((char *)chunkOut, lenOut);<br />
outSize -= lenOut;<br />
}<br />
std::cerr << "done." << std::endl;<br />
<br />
return 0;<br />
}<br />
</syntaxhighlight><br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = No<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = No<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = Yes<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [http://code.google.com/p/tombexcavator/source/browse/branches/v0/src/providers/stargunner/read.cc tombexcavator]<br />
| Platform = Any/console<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = No<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== See also ==<br />
<br />
* Some early [http://forum.xentax.com/viewtopic.php?f=21&t=7662&p=62021 discussion about the compression algorithm]<br />
<br />
== Credits ==<br />
<br />
The filename encryption algorithm was reverse engineered by a user on the [http://forum.xentax.com/viewtopic.php?f=10&t=1895 Xentax forum]. The compression algorithm was reverse engineered by [[User:The_coder|The_coder]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)<br />
<br />
[[Category:Encryption algorithms]]</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=TIM_Resource_Format&diff=11759TIM Resource Format2024-02-18T06:16:42Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{NeedMoreInfo}}<br />
{{Archive Infobox<br />
| MaxFiles = 65,535<br />
| FAT = External + embedded<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = N<br />
| Games = <br />
{{Game|The Incredible Machine}}<br />
}}<br />
The '''TIM Resource Format''' is used by [[The Incredible Machine]] to store much of the game data.<br />
<br />
== File format ==<br />
<br />
The format comprised of multiple files. The index file is a <tt>.MAP</tt> file which stores the offsets of each subfile. The subfile data is split between a number of real files, and the <tt>.MAP</tt> file also provides the filenames of these real files. In [[The Incredible Machine]], the index file is called <tt>RESOURCE.MAP</tt> and the data files are <tt>RESOURCE.001</tt> to <tt>RESOURCE.004</tt>.<br />
<br />
In theory data can be read from the data files alone (without the <tt>.MAP</tt> file) however if the data is to be modified then the <tt>.MAP</tt> file will have to be updated with the new offsets.<br />
<br />
=== Signature ===<br />
<br />
There is no known signature, other than carefully reading the file structure and verifying it seems correct (e.g. offsets don't go past the end of the file.) The data filenames can also be read from the <tt>.MAP</tt> file and checked to see whether they exist in the current directory.<br />
<br />
=== Structure ===<br />
<br />
The <tt>.MAP</tt> file begins with a header:<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[BYTE]][4] || hash_idx || Hash string indexes<br />
|-<br />
| [[UINT16LE]] || fileCount || Number of data files<br />
|}<br />
<br />
Note that hash indexes are hardcoded in the game execuatable file as sequences <tt>0, 1, '''6''', 7</tt>, but the actual .MAP file uses <tt>0, 1, '''5''', 7</tt> so the internal table will be overwritten with these new values.<br />
<br />
This is then followed by a file structure, repeated <tt>fileCount</tt> times:<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[char]][13] || filename || Filename of real data file (DOS 8.3, null terminated)<br />
|-<br />
| [[UINT16LE]] || count || Number of file entries<br />
|-<br />
| FILE_ENTRY[count] || entry || Actual file entries<br />
|}<br />
<br />
A single <tt>FILE_ENTRY</tt> is defined as:<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[INT32LE]] || hash || Filename hash (see below)<br />
|-<br />
| [[UINT32LE]] || offset || Offset of file from start of data<br />
|}<br />
<br />
To read the subfile data, the filename must be read from the <tt>.MAP</tt> file (the <tt>filename</tt> field above) along with the <tt>offset</tt>. The file identified by <tt>filename</tt> must then be opened. It should<br />
be in the same directory as the <tt>.MAP</tt> file. Seeking to <tt>offset</tt> in this newly opened file will result in the file pointer being at the start of the subfile header:<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[char]][13] || filename || Filename of subfile (DOS 8.3, null terminated)<br />
|-<br />
| [[UINT32LE]] || len || Length of subfile data, in bytes<br />
|-<br />
| [[BYTE]][len] || content || Subfile content<br />
|}<br />
<br />
If the <tt>.MAP</tt> file is not being used, the data files simply consist of the above subfile header and data concatenated one after the other. Subfiles aren't split between real files, so each data file can be considered independent (with the exception that the <tt>.MAP</tt> file contains the offsets for all the subfiles across all the data files.)<br />
<br />
The game search for required file (like <tt>VM.OVL</tt>) in the current folder and if it didn't there then it calc a hash from filename (<tt>0x564CF4C0</tt> in this example) and search inside the <tt>.MAP</tt> file index.<br />
<br />
Here is a hash routine for the filenames:<br />
<syntaxhighlight lang="c"><br />
/*<br />
input:<br />
s - pointer to ASCIIZ filename string<br />
idx - pointer to an array of 4 bytes (hash indexes)<br />
return:<br />
hash - filename hash<br />
*/<br />
int32_t tim_hash(char *s, uint8_t *idx) {<br />
int32_t i, c;<br />
int16_t isum, ixor;<br />
isum = 0;<br />
ixor = 0;<br />
for (i = 0; s[i]; i++) {<br />
c = toupper(s[i]);<br />
isum += c;<br />
ixor ^= c;<br />
}<br />
/* both types here MUST be int16_t */<br />
isum *= ixor;<br />
c = 0;<br />
for (ixor = 0; ixor < 4; ixor++) {<br />
c <<= 8;<br />
/* can use only existing characters<br />
("i" holds the string length now) */<br />
if (i > idx[ixor]) {<br />
c |= toupper(s[idx[ixor]]);<br />
}<br />
}<br />
c += isum;<br />
return(c);<br />
}<br />
<br />
/*<br />
// this MUST be overwritten with the correct one from the .MAP file!<br />
uint8_t idx[4] = {0, 1, 6, 7}; // 0, 1, 5, 7<br />
// example of usage<br />
printf("%08X\n", tim_hash("vm.ovl", idx));<br />
*/<br />
</syntaxhighlight><br />
<br />
== Bitmap Subfiles ==<br />
<br />
See [[The Incredible Machine Image Format]].<br />
<br />
This is an example of PART23.BMP which is the smalles of the bitmap files. It contains one sprite which is 16x16 pixels in size.<br />
<br />
If anyone knows the compression used in the SCN section, please let me know. The length of the compressed data is 127:<br />
https://cloud.githubusercontent.com/assets/1974959/25874475/03651bf0-3513-11e7-98bb-b3640c20fb6f.png<br />
<br />
PART28.BMP, the second largest bitmap and only 16x15 px in size, contains 137 compressed bytes:<br />
https://cloud.githubusercontent.com/assets/1974959/25874624/9f622b10-3513-11e7-8f24-d66877c0ad84.png<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Malvineous|Malvineous]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=PCX_Library&diff=11758PCX Library2024-02-18T06:16:42Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 65,535<br />
| FAT = Beginning<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|The Oregon Trail}}<br />
}}<br />
Some games use PCX libraries to store [[PCX Format|.PCX files]]. The '''PCX Library''' format was developed by Genus Microprogramming, Inc. and is handled by the PCXLIB.EXE tool distributed with their ''PCX Utilities'' (later renamed to ''PCX Toolkit''). This library file format was later revised and called the [[GX Library]] format.<br />
<br />
Usually the default library extensions are .PCL or .LIB, but this is not required (as actual example: .GXL or .VXL used too). Library files can be easily identified by the copyright text at the beginning (see below).<br />
<br />
Library files may contain not only .PCX images, but any type of file.<br />
<br />
Library files consists of two parts - the header and file directory. Note that PCX/GX tools and the libraries code used in software verified only the <tt>id</tt> (Library ID) value in header for both formats. Nothing else is checked in library header and can be literally anything.<br />
<br />
=== PCX Library format ===<br />
<br />
Each file begins with the following header.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[char]][10] || id || Library ID string. Must be null-terminated "pcxLib" string. Following three bytes are unused and generally random (e.g. "pcxLib\x00\x14\xBE\x00"). Some games (at least those using toolkit v3.53) only verify the first character is 'p' and ignore the rest, but PCXLIB.EXE expected full string here.<br />
|-<br />
| [[char]][50] || copyright || Copyright notice (example: "Copyright (c) Genus Microprogramming, Inc. 1988-89").<br />
|-<br />
| [[UINT16LE]] || version || pcxLib version<br />
|-<br />
| [[char]][40] || label || Library volume label<br />
|-<br />
| [[BYTE]][20] || xtra || Filler, unused/ignored, set to 0<br />
|}<br />
<br />
Immediately after the header are the files, each with their own header.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT8]] || synch || Synch byte (always 1)<br />
|-<br />
| [[char]][13] || name || Image file name (8.3, name padding with spaces before dot from extension, ends with 0)<br />
|-<br />
| [[INT32LE]] || size || File size<br />
|-<br />
| [[UINT16LE]] || date || DOS packed file date<br />
|-<br />
| [[UINT16LE]] || time || DOS packed file time<br />
|-<br />
| [[UINT16LE]] || pack || Packing type<br />
|-<br />
| [[char]][40] || note || Image note<br />
|-<br />
| [[BYTE]][20] || xtra || Extra filler, unused/ignored, set to 0<br />
|}<br />
<br />
After the file's header is <tt>size</tt> bytes of file data. This file header and file data are then repeated for each file in the library. The library file should be read until the end of the file or while synch byte still 1 (in case of extra data at the end of the library).<br />
<br />
The date and time are in standard DOS FAT16 format:<br />
<br />
{|class="wikitable"<br />
! Field !! colspan=16| Date !!colspan=16| Time<br />
|-<br />
! Bit<br />
!style="width: 2em"| 15<br />
!style="width: 2em"| 14<br />
!style="width: 2em"| 13<br />
!style="width: 2em"| 12<br />
!style="width: 2em"| 11<br />
!style="width: 2em"| 10<br />
!style="width: 2em"| 9<br />
!style="width: 2em"| 8<br />
!style="width: 2em"| 7<br />
!style="width: 2em"| 6<br />
!style="width: 2em"| 5<br />
!style="width: 2em"| 4<br />
!style="width: 2em"| 3<br />
!style="width: 2em"| 2<br />
!style="width: 2em"| 1<br />
!style="width: 2em"| 0<br />
!style="width: 2em"| 15<br />
!style="width: 2em"| 14<br />
!style="width: 2em"| 13<br />
!style="width: 2em"| 12<br />
!style="width: 2em"| 11<br />
!style="width: 2em"| 10<br />
!style="width: 2em"| 9<br />
!style="width: 2em"| 8<br />
!style="width: 2em"| 7<br />
!style="width: 2em"| 6<br />
!style="width: 2em"| 5<br />
!style="width: 2em"| 4<br />
!style="width: 2em"| 3<br />
!style="width: 2em"| 2<br />
!style="width: 2em"| 1<br />
!style="width: 2em"| 0<br />
|-<br />
! Value<br />
|colspan=7| <center>Year (0-127)</center><br />
|colspan=4| <center>Month (1-12)</center><br />
|colspan=5| <center>Day (1-31)</center><br />
|colspan=5| <center>Hours (0-23)</center><br />
|colspan=6| <center>Minutes (0-59)</center><br />
|colspan=5| <center>Seconds (0-29)</center><br />
|}<br />
<br />
Add <tt>1980</tt> to the year value to get the calendar year (i.e. a year value of 1 translates to 1981). Multiply the seconds by 2 (i.e. a value of 29 translates to 58 seconds). A month or day value of 0 is not permitted. Dates before 1 Jan 1980 are not possible. The times are stored in the local time zone of the computer that wrote the timestamps, however the timezone itself is not stored.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [http://www.ctpax-x.org/?goto=files&show=104 PCX/GX Library unpacker]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = No<br />
| notes = PCX/GX Library support (with C source code)<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== See also ==<br />
<br />
* [[GX Library]], a newer version of this format.<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:CTPAX-X_Team|CTPAX-X_Team]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=DAT_Format_(God_of_Thunder)&diff=11757DAT Format (God of Thunder)2024-02-18T06:16:42Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 256<br />
| FAT = Beginning<br />
| Names = Yes, 8 chars<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = Y<br />
| Encrypted = Y<br />
| Hidden = Y<br />
| Games = <br />
{{Game|God of Thunder}}<br />
}}<br />
The '''DAT format''' is used by [[God of Thunder]] to store game data in <tt>GOTRES.DAT</tt>. Most files are compressed, and the header where the filenames are stored is encrypted with a simple [[XOR cipher]].<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
There is no known signature for this format, however reading in the entire FAT and checking that the filenames contain valid characters and that the offsets and file sizes are within range should correctly identify files.<br />
<br />
The FAT is a fixed size, so the offset of the first file will always be 0x1700.<br />
<br />
=== File entry ===<br />
<br />
The file begins with 256 file entries, in the format below. All these file entries (i.e. the first 5888 bytes of the file) are encrypted (see below).<br />
<br />
After decryption, each file entry is as follows:<br />
<br />
{|class="wikitable"<br />
!Data type!!Description<br />
|-<br />
|[[char]] filename[9]||Filename (8 chars max), must be NULL-terminated<br />
|-<br />
|[[UINT32LE]] offset||File offset from start of file<br />
|-<br />
|[[UINT32LE]] size||Length of file stored here<br />
|-<br />
|[[UINT32LE]] decompressedSize||Length of file after decompression<br />
|-<br />
|[[UINT16LE]] flags||Flags (1 if file is compressed, 0 otherwise)<br />
|}<br />
<br />
The remaining unused file entries are all zeroes. Since the FAT is fixed at 256 entries, the offset of the first file will always be 5888 (0x1700).<br />
<br />
The file content immediately follows the FAT, and is not encrypted (but may be compressed, see below).<br />
<br />
== Encryption ==<br />
<br />
The list of 256 file entries (the first 5,888 bytes in the file) are encrypted with an [[XOR cipher]], at the byte level, starting with a value of 128 and incrementing at each byte (so the first byte in the file is XOR'd with 128, the second byte with 129, third byte with 130 and so on. After XOR'ing with 255 the value wraps and so the next byte is XOR'd with 0).<br />
<br />
Since XOR ciphers are symmetrical, the same algorithm applies to both encrypt and decrypt the data.<br />
<br />
The following Python 2.7 script will decrypt the header and output the result to a file:<br />
<syntaxhighlight lang="Python"><br />
# Setup our starting variables.<br />
Cypher = 128 # Cypher starts at 128.<br />
Header = "" # Header will store the decrypted header.<br />
HeaderSize = 5888 # The header in GOTRES.DAT is 5888 bytes.<br />
<br />
# Open the God of Thunder data file.<br />
with open("GOTRES.DAT", "rb") as Input:<br />
# Loop through the header which consists of the first 5888 bytes.<br />
for x in range(0, HeaderSize):<br />
# Read a byte.<br />
Byte = Input.read(1)<br />
# XOR the byte with the current cypher.<br />
Header += chr(ord(Byte) ^ Cypher)<br />
<br />
# Increment the cypher value, and set it back to 0 when it hits 256.<br />
Cypher += 1<br />
if Cypher == 256:<br />
Cypher = 0<br />
<br />
# Write the decrypted header to a file.<br />
with open("GOTHead.bin", "w") as Output:<br />
Output.write(Header)<br />
</syntaxhighlight><br />
<br />
== Compression ==<br />
<br />
If a file's flag indicates it is compressed, then it should be decompressed with the [[LZSS compression|LZSS algorithm]] below. Each file's data begins with a [[UINT16LE]] value holding the decompressed size, in bytes, followed by another [[UINT16LE]] value of unknown purpose which should be ignored (the value is always 0x0001.) The rest of the data decompresses as follows:<br />
<br />
<ol><br />
<li><br />
If the amount of data decompressed matches the target size, finish. Otherwise:<br />
</li><br />
<li><br />
Read a byte from the input data<br />
</li><br />
<li><br />
For each bit in the previous byte, from the least significant to the most:<br />
<ul><br />
<li><br />
If the bit is 1, copy a byte unchanged from the input data to the output<br />
</li><br />
<li><br />
Otherwise the bit is zero:<br />
<ol style="list-style-type: lower-alpha;"><br />
<li><br />
Read a [[UINT16LE]]<br />
<ul><br />
<li><br />
Add two to the upper (most significant) four bits, and treat this value as the LZSS "count"<br />
</li><br />
<li><br />
Take the lower 12 bits and treat the value as the LZSS "offset"<br />
</li><br />
</ul><br />
</li><br />
<li><br />
Look back "offset" bytes into the newly decompressed data<br />
</li><br />
<li><br />
Copy "count" bytes from here to the end of the newly decompressed data. Take note that as each byte is copied to its destination, that new byte may later become a source byte in this '''same''' copy operation. For example, if "offset" is 1 (i.e. look back one byte) and the counter is 15, then the last byte will be copied 17 times (15 + 2 = 17). This is because as each byte is copied, it becomes the source byte for the next copy cycle.<br />
</li><br />
</ol><br />
</li><br />
</ul><br />
</li><br />
<li><br />
Go back to step 1<br />
</li><br />
</ol><br />
<br />
If a generic LZSS algorithm is used, it must be configured as follows:<br />
<br />
* Byte-level<br />
* Inverted flags (1 = literal, 0 = length/value pair)<br />
* Length/distance pair is [[UINT16LE]]<br />
* Length is 4-bits, in most significant bits of length/distance pair<br />
* Distance is 12-bits, least significant bits of length/distance pair<br />
* Add 0 to distance value, add 2 to length value<br />
* Distance is relative to current window position<br />
* Initial window offset is 0<br />
<br />
=== Hidden data ===<br />
<br />
Since both the file offset and size are stored, it is possible to hide data before and after each file. Without a corresponding file entry, this data would be invisible.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = Yes<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = Yes<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Wombat]]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [http://grompe.org.ru/ Grom PE]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=LBR_Format&diff=11756LBR Format2024-02-18T06:16:42Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 65535<br />
| FAT = Beginning<br />
| Names = Yes, hashed<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = N<br />
| Games = <br />
{{Game|Vinyl Goddess From Mars}}<br />
}}<br />
The '''LBR Format''' is used by [[Vinyl Goddess From Mars]] to store most of the game data.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
There is no known signature for this format. One method to identify files is to read in the file entries and ensure all the offsets are within range (and perhaps increasing in value.) It is somewhat unlikely that this method would incorrectly identify a file.<br />
<br />
=== Header ===<br />
<br />
The header begins at the start of the file (offset 0.)<br />
<br />
{|class="wikitable"<br />
!Data type!!Description<br />
|-<br />
|[[UINT16LE]] numFiles||Number of files stored within<br />
|}<br />
<br />
=== File entry ===<br />
<br />
After the header, the following structure is repeated once for each file.<br />
<br />
{|class="wikitable"<br />
!Data type!!Description<br />
|-<br />
|[[UINT16LE]] hash||Hash of the filename<br />
|-<br />
|[[UINT32LE]] offset||Offset into LBR where file data begins<br />
|}<br />
<br />
Each file's data starts at the offset indicated. File sizes must be calculated by comparing adjacent offsets, or in the case of the last file, comparing its offset to the total size of the LBR.<br />
<br />
=== Filename hash ===<br />
<br />
Rather than storing filenames, LBR files store a hash calculated from the original filename. If you have a filename it is very easy to calculate the hash, but because hashes are one-way functions, if all you have is a hash it is impossible to calculate the filename (this is because each hash matches at least 56 billion different filenames. [[User:Malvineous|Malvineous]] wrote a tool to list all possible filenames for a hash matching a given prefix and suffix, but the many thousands of names produced makes this a very tedious and error-prone way of discovering filenames.)<br />
<br />
Some example code to calculate the hashes follows.<br />
<br />
<syntaxhighlight lang="c"><br />
int calcHash(const std::string& data)<br />
{<br />
int hash = 0;<br />
for (std::string::const_iterator i = data.begin(); i != data.end(); i++) {<br />
hash ^= *i << 8;<br />
for (int j = 0; j < 8; j++) {<br />
hash <<= 1;<br />
if (hash & 0x10000) hash ^= 0x1021;<br />
}<br />
}<br />
return hash & 0xffff;<br />
}<br />
</syntaxhighlight><br />
<br />
Optimized C code:<br />
<br />
<syntaxhighlight lang="c"><br />
/* original code in GODDESS.EXE at offset 0x00016622<br />
self test: lbr_hash("Casplat1.cmp") == 0xBDCB */<br />
uint16_t lbr_hash(char *s) {<br />
uint16_t hash;<br />
uint8_t b, i;<br />
hash = 0;<br />
if (s) {<br />
for (; *s; s++) {<br />
/* a..z => A..Z */<br />
b = toupper(*s);<br />
hash ^= (b << 8);<br />
for (i = 0; i < 8; i++) {<br />
/* b = (hash & 0x8000) ? 1 : 0; */<br />
b = hash >> 15;<br />
hash <<= 1;<br />
/* hash ^= b ? 0x1021 : 0; */<br />
hash ^= (b << 12) | (b << 5) | b;<br />
}<br />
}<br />
}<br />
return(hash);<br />
}<br />
</syntaxhighlight><br />
<br />
Vgfmext also contains BASIC code to calculate hashes, using a slight variation.<br />
<br />
=== List of known filenames ===<br />
<br />
Here is a list of known filenames inside the archive. They can be passed to the hash function to calculate the hash, then matched against an entry in the archive to give that entry a filename.<br />
<br />
<div style="border: 1px solid #AACCFF; margin: 1em; padding: 1em;"><br />
<tt><br />
1000P.CMP<br />
100P.CMP<br />
250P.CMP<br />
500P.CMP<br />
50P.CMP<br />
APPLE.CMP<br />
APPLE.SND<br />
BAMBOOP.CMP<br />
BAPPLE0.OMP<br />
BETA.BIN<br />
BGRENSHT.CMP<br />
BLOOK.CMP<br />
BLUEBALL.CMP<br />
BLUEKEY.CMP<br />
BLUE.PAL<br />
BLUE.TLS<br />
BOTTLE.CMP<br />
BOUNCE.CMP<br />
BRAIN.CMP<br />
BREATH.CMP<br />
BRIDGE.CMP<br />
BSHOT.CMP<br />
BUTFLY.CMP<br />
CANNON.CMP<br />
CASPLAT1.CMP<br />
CASPLAT2.CMP<br />
CASPLAT3.CMP<br />
CASPLAT4.CMP<br />
CASTLE.PAL<br />
CASTLE.TLS<br />
COVERUP.MUS<br />
CREDITS.PAL<br />
CREDITS.SCR<br />
CRUSH.MUS<br />
CSTARS.CMP<br />
DATA.DAT<br />
DDARKBAR2.GRA<br />
DEATH.CMP<br />
DEMO_1.DTA<br />
DEMO_2.DTA<br />
DEMO_3.DTA<br />
DIFFBUTN.CMP<br />
DIFFMENU.CMP<br />
DOTS1.CMP<br />
DUNGEON.PAL<br />
DUNGEON.TLS<br />
DUNPLAT1.CMP<br />
DUSTCLUD.CMP<br />
ECHOT1.CMP<br />
EGYPPLAT.CMP<br />
EGYPT.PAL<br />
EGYPT.TLS<br />
ENDBOSSW.CMP<br />
ENDING.SCN<br />
ENTER2.SND<br />
EPISODE.PAL<br />
EPISODE.SCR<br />
EVILEYE.MUS<br />
EXIT.CMP<br />
EXPL1.SND<br />
FEVER.MUS<br />
FIRE231.CMP<br />
FRUIT.SND<br />
GAME1.PAL<br />
GAMEOPT.GRA<br />
GATEKEY.CMP<br />
GOLDKEY.CMP<br />
GRAVE.PAL<br />
GRAVE.TLS<br />
GREYKEY.CMP<br />
GRID.DTA<br />
HARDHEAD.CMP<br />
HEALJUG.CMP<br />
HEALPOT.CMP<br />
HEALPOTD.CMP<br />
HEALPOT.SND<br />
HELLO.T<br />
HORUS.MUS<br />
HURT.SND<br />
HUTS.PAL<br />
HUTS.TLS<br />
INBET.PAL<br />
INBETW.SCR<br />
INOUTP00.CMP<br />
INSURED.MUS<br />
INTRO.MUS<br />
JFIREB.CMP<br />
JILL.CMP<br />
JILLEXPB.CMP<br />
JILLEXP.CMP<br />
JILLFIRE.CMP<br />
JILL.SPR<br />
JUNGLE2.FON<br />
JUNGLE.FON<br />
KNIFE.CMP<br />
LAND.SND<br />
LC_CAPS.RAW<br />
LC_NUMS.RAW<br />
LEVEL1-1.M<br />
LEVEL1-2.M<br />
LEVEL1-3.M<br />
LEVEL1-4.M<br />
LEVEL1-5.M<br />
LEVEL1-6.M<br />
LEVEL1-7.M<br />
LEVEL1-8.M<br />
LEVEL1-9.M<br />
LEVEL2-1.M<br />
LEVEL2-2.M<br />
LEVEL2-3.M<br />
LEVEL2-4.M<br />
LEVEL2-5.M<br />
LEVEL2-6.M<br />
LEVEL2-7.M<br />
LEVEL2-8.M<br />
LEVEL2-9.M<br />
LEVEL3-1.M<br />
LEVEL3-2.M<br />
LEVEL3-3.M<br />
LEVEL3-4.M<br />
LEVEL3-5.M<br />
LEVEL3-6.M<br />
LEVEL3-7.M<br />
LEVEL3-8.M<br />
LEVEL3-9.M<br />
LGRENSHT.CMP<br />
LITSCROL.CMP<br />
MAINFONT.GRA<br />
MANEATPL.CMP<br />
MENU2.RAW<br />
MENUCH.GRA<br />
MENUCLIK.SND<br />
MENU.RAW<br />
MENUYSNO.GRA<br />
MIDLEVEL.CMP<br />
MIDPOST.SND<br />
MMREST.GRA<br />
MONDIE.SND<br />
MOUNT.TLS<br />
MPLAT211.CMP<br />
MPLAT212.CMP<br />
MPLAT221.CMP<br />
MPLAT311.CMP<br />
MPLAT331.CMP<br />
MPLAT332.CMP<br />
MUSHSHOT.CMP<br />
MYSTIC.MUS<br />
NEWBEH.CMP<br />
OLDBEH.CMP<br />
ORDER.RES<br />
OSIRIS.MUS<br />
OUTGATE.CMP<br />
OVERHEAD.PAL<br />
OVERHEAD.TLS<br />
OVERHED1.MAP<br />
OVERHED2.MAP<br />
OVERHED3.MAP<br />
PAN2.SND<br />
PRESENT.GRA<br />
PRESENT.PAL<br />
PROWLER.MUS<br />
PURPLE.PAL<br />
PURPLE.TLS<br />
PUZZ6.MUS<br />
RABBIT.CMP<br />
RABBITD.CMP<br />
REDKEY.CMP<br />
RETROJIL.MUS<br />
RING.CMP<br />
RUFEYE.CMP<br />
RUFEYES.CMP<br />
RUFEYSE.CMP<br />
SAVEBOXG.GRA<br />
SAVEBOXO.GRA<br />
SCORE.CMP<br />
SCROLLG.CMP<br />
SCROLLO.CMP<br />
SGREENE.CMP<br />
SHOTEXPL.CMP<br />
SHOTTEST.CMP<br />
SHWRREM.GRA<br />
SIXPS.GRA<br />
SIXPS.PAL<br />
SKELBONE.CMP<br />
SKELETON.CMP<br />
SKELETON.SND<br />
SKELFLY.CMP<br />
SMALLEX.CMP<br />
SMALNUM.CMP<br />
SPARE.SCR<br />
SPIKEBA.CMP<br />
SPLADY.CMP<br />
SPLAT211.CMP<br />
SPLAT223.CMP<br />
SPLAT231.CMP<br />
SPRING.SND<br />
SPROIN.CMP<br />
SQUARE.TLS<br />
STAR.CMP<br />
STARDUST.MUS<br />
STHORNSH.CMP<br />
STICKEYE.CMP<br />
STIKHORN.CMP<br />
STLSPIKE.CMP<br />
STORY.PAL<br />
STORY.SCR<br />
STRIKE.MUS<br />
STRYFNT1.GRA<br />
SVINYL.SPR<br />
TAFA.MUS<br />
T.CMP<br />
TEST0004.CMP<br />
THROW.SND<br />
TITLE.PAL<br />
TITLE.SCR<br />
TORNADO.CMP<br />
TRAMPLE.MUS<br />
TREEMPLA.CMP<br />
TREES.PAL<br />
TREES.TLS<br />
TWILIGHT.MUS<br />
UGH.CMP<br />
UNLOGIC1.GRA<br />
UNLOGIC1.PAL<br />
UNLOGIC.UNM<br />
VINE.CMP<br />
VINYLDIE.SND<br />
VINYL.GRA<br />
VINYL.PAL<br />
VINYL.SPR<br />
VSMALLE.CMP<br />
WEAPBLNK.OMP<br />
WEAPBLUE.OMP<br />
WEAPBOTL.OMP<br />
WEAPFIRE.OMP<br />
WEAPFSKF.OMP<br />
WEAPSLKF.OMP<br />
WEAPSTAR.OMP<br />
WFIREB.CMP<br />
WOODSPIK.CMP<br />
XHUTS.PAL<br />
YELLOW.PAL<br />
YELLOW.TLS<br />
YES.CMP<br />
<br />
// These names were guessed by looking at others<br/><br />
ENDG1.PAL<br />
ENDG1.SCR<br />
ENDG2.PAL<br />
ENDG2.SCR<br />
ENDG3.PAL<br />
ENDG3.SCR<br />
MOUNT.PAL<br />
JUNGLE3.FON<br />
<br />
// These names were brute-forced from the hashes against a dictionary so they<br/><br />
// could be wrong (each hash matches about 56 billion different filenames...)<br/><br />
BEGIN.PAL // Also ARCHIL.PAL. Before Bl so probably correct.<br/><br />
P.PAL // Also SANGGIL.PAL. Between O-P maybe correct.<br />
<br />
// These names were guessed from the music filenames but with a different<br/><br />
// extension for the instruments.<br/><br />
COVERUP.TIM<br />
CRUSH.TIM<br />
EVILEYE.TIM<br />
FEVER.TIM<br />
HORUS.TIM<br />
INSURED.TIM<br />
INTRO.TIM<br />
MYSTIC.TIM<br />
OSIRIS.TIM<br />
PROWLER.TIM<br />
PUZZ6.TIM<br />
RETROJIL.TIM<br />
STARDUST.TIM<br />
STRIKE.TIM<br />
TAFA.TIM<br />
TRAMPLE.TIM<br />
TWILIGHT.TIM<br />
</tt><br />
</div><br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = Vgfmext<br />
| Platform = DOS<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Frenkel|Frenkel Smeijers]] with the hash algorithm refined by [[User:Malvineous|Malvineous]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=DAT_Format_(Sango_Fighter)&diff=11755DAT Format (Sango Fighter)2024-02-18T06:16:42Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = Unlimited<br />
| FAT = Beginning<br />
| Names = N<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = N<br />
| Games = <br />
{{Game|Sango Fighter}}<br />
}}<br />
The '''DAT format''' is used by [[Sango Fighter]] to store various types of game data across a number of different files. The file extensions used are related to the content type rather than indicating the file is in DAT format (so .mid is used for a collection of music, .pcm for sound files, and so on.) The format does not store any filenames.<br />
<br />
Although .dat is one of the many extensions used, it was chosen to describe the format as, like the format itself, it is fairly generic.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
There is no signature for this format. One method to identify files is to read in the first four bytes to get the size of the FAT. This should be less than the total file size, and when divided by four (the size of a single file entry) it will yield the number of files in the collection. The rest of the file entries can then be read, and each file offset must be less than the total size of the DAT file. The very last file entry is a "terminator" (there is no associated file) so it must equal the size of the DAT file. It is extremely unlikely that this method would incorrectly identify a file.<br />
<br />
=== File entry ===<br />
<br />
The file starts off with a single [[UINT32LE]] repeated once for each file. As the first file's data comes directly after the FAT, the first file entry will also reveal the size of the FAT. Dividing this number by four (the size of a UINT32LE) and subtracting one (to ignore the "terminator") will return the number of files.<br />
<br />
{|class="wikitable"<br />
!Data type!!Description<br />
|-<br />
|[[UINT32LE]] offset||File offset<br />
|}<br />
<br />
The very last file entry is a terminator and has no associated file. It must be equal to the size of the DAT file, i.e. it points to the end of the file.<br />
<br />
File sizes must be calculated by working out the difference between two neighbouring file offsets.<br />
<br />
== Alternate version ==<br />
<br />
Some files use an alternate version of this format, where all [[UINT32LE]] fields are instead [[UINT16LE]]. These files are otherwise identical.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Malvineous|Malvineous]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=DAT_Format_(Hugo)&diff=11754DAT Format (Hugo)2024-02-18T06:16:42Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = Unlimited<br />
| FAT = Beginning/external<br />
| Names = No<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Hugo II, Whodunit?}}<br />
{{Game|Hugo III, Jungle of Doom!}}<br />
}}<br />
The '''DAT format''' is used to store most of the data for [[Hugo II, Whodunit?]] and [[Hugo III, Jungle of Doom!]] Unfortunately the format has no signature and a generic filename extension (.dat) so automatic detection of these files is difficult. The format also does not store any filenames.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
There is no signature for this format. One method to identify files is to read in the first four bytes to get the offset of the first file. This should be less than the total file size, and when divided by eight (the size of a single file entry) it will yield the number of files in the group. The rest of the file entries can then be read, and each file offset plus its size must be less than the total size of the DAT file. It is extremely unlikely that this method would incorrectly identify a file.<br />
<br />
=== File entry ===<br />
<br />
The file starts off with the following structure which is repeated once for each file. It is unknown whether there is a set method to detect the number of files, but reading file entries until the offset of the first file is reached seems to work well enough.<br />
<br />
{|class="wikitable"<br />
!Data type!!Description<br />
|-<br />
|UINT32LE offset||File offset<br />
|-<br />
|UINT32LE size||File size<br />
|}<br />
<br />
It is possible for the file offset and size to be zero (this could be considered a spare or unused file entry.) It is not known (i.e. not yet tested) whether any zero offset+size entries must be present to terminate the FAT, however this is perhaps not required given these empty/spare entries are present throughout the FAT.<br />
<br />
=== Notes ===<br />
<br />
[[Hugo II, Whodunit?]] uses this format for <tt>scenery.dat</tt>, however [[Hugo III, Jungle of Doom!]] has <tt>scenery1.dat</tt> and <tt>scenery2.dat</tt>. All file entries are stored in <tt>scenery1.dat</tt>, and in the middle of the entries the file offset will revert back to zero, after which all subsequent entries are for <tt>scenery2.dat</tt>.<br />
<br />
Note that unlike other formats, the file offsets are not sequential, i.e. the FAT entries are in a different order to the actual file data. The only exception to this seems to be for Hugo III in that after the second zero-offset file, all subsequent FAT entries - although still jumbled - are for the second .dat file.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Hugo II only<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Wombat]]<br />
| Platform = Windows<br />
| canExtract = No<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Malvineous|Malvineous]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=RFF_Format&diff=11753RFF Format2024-02-18T06:16:42Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{NeedMoreInfo}}<br />
{{Archive Infobox<br />
| MaxFiles = 2,147,483,647<br />
| FAT = End<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = Y<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Blood}}<br />
}}<br />
The '''RFF format''' is used by Blood, instead of the typical [[GRP Format]] used by other Build engine games. Later versions of the format encrypt the start of each file to avoid extraction by ripping utilities.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
All files begin with the four bytes: "RFF" followed by EOF (0x1A).<br />
<br />
=== Header ===<br />
<br />
The header is never encrypted.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| char[4] || signature || "RFF\x1A"<br />
|-<br />
| [[INT16LE]] || version || Format revision<br />
|-<br />
| char[2] || pad1 || padding (unused)<br />
|-<br />
| INT32LE || dictOffset || Offset of FAT<br />
|-<br />
| INT32LE || dictEntries || Number of files<br />
|-<br />
| char[16] || pad2 || header padding up to 32 bytes (unused)<br />
|}<br />
<br />
==== Known versions ====<br />
<br />
* 0x0200 - shareware 0.99 (CD version) - FAT is not encrypted<br />
* 0x0300 - registered 1.00 - FAT is encrypted<br />
* 0x0301 - patches for registered and later shareware releases - FAT is encrypted<br />
<br />
Note that Blood Alpha uses completely different format (except the four bytes signature).<br />
<br />
=== File entry ===<br />
<br />
At <tt>dictOffset</tt>, the following structure is repeated <tt>dictEntries</tt> times. When <tt>version</tt> are <tt>0x300</tt> or <tt>0x301</tt>, the entire FAT is encrypted.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| BYTE[16] || CACHENODE || preallocated buffer for internal structure (fill with 0x00)<br />
|-<br />
| UINT32LE || offset || Offset of file's data, relative to start of archive file<br />
|-<br />
| UINT32LE || size || File size<br />
|-<br />
| UINT32LE || packedSize || always 0 (unused)<br />
|-<br />
| time_t || time || Last modified time (in seconds since the UNIX epoch)<br />
|-<br />
| UINT8 || flags || File state flags<br />
|-<br />
| char[3] || type || File extension (see below for arrangement)<br />
|-<br />
| char[8] || name || File name (see below for arrangement)<br />
|-<br />
| UINT32LE || id || File id<br />
|}<br />
<br />
Valid <tt>flags</tt> values:<br />
<br />
* 0x01 = kDictID - <tt>type</tt> and <tt>id</tt> pair will be used instead of <tt>type</tt> and <tt>name</tt> to find file in the archive<br />
* 0x02 = kDictExternal - actual file not stored inside .RFF and must be loaded from the folder as <tt>name</tt>.<tt>type</tt>; note that game didn't obtain actual file size and reads only <tt>size</tt> bytes instead (WARNING: internal flag, BARF.EXE will remove it on archive update)<br />
* 0x04 = kDictPreload - file will be preloaded on .RFF open<br />
* 0x08 = kDictPrelock - file will be prelocked on .RFF open<br />
* 0x10 = kDictEncrypted - the first 256 bytes of the file are encrypted (version >= 0x300)<br />
<br />
The <tt>type</tt> and <tt>name</tt> field contains a standard 8.3 filename. Each will be terminated with zero byte if shorter than the actual field length.<br />
<br />
The <tt>time</tt> is stored as UINT32LE in seconds since midnight, January 1st 1970. One quick example of use is the PHP code <code>echo date('Y-m-d', time);</code><br />
<br />
=== Encryption ===<br />
<br />
==== FAT ====<br />
<br />
The encryption algorithm for the FAT only applies to files of version <tt>0x300</tt> or <tt>0x301</tt>. It is an 8-bit XOR cipher, with the key incrementing by one every two bytes. The tricky part is that the initial value for the key is the lower 8-bits of the FAT offset, so if the FAT moves for any reason it will need to be re-encrypted.<br />
<br />
Example code:<br />
<syntaxhighlight lang="c"><br />
// En/de-crypt the FAT<br />
if (version >= 0x300) {<br />
uint8_t key = dictOffset & 0xFF;<br />
for (int i = 0; i < lenFAT; i++) {<br />
if (version == 0x300) {<br />
fat[i] ^= (key >> 1);<br />
key++;<br />
} else {<br />
fat[i] ^= key;<br />
key += (i & 1);<br />
}<br />
}<br />
}<br />
</syntaxhightlight><br />
<br />
Since it is an XOR cipher, the same code applies to both encrypt and decrypt the FAT.<br />
<br />
==== Files ====<br />
<br />
If the <tt>flags</tt> value in the FAT entry has the fifth bit set (0x10) then the file is encrypted. The algorithm is a variation on that used for the FAT. The key is half the offset into the file (i.e. it is <tt>offset >> 1</tt>, which will cause it to start at zero for all files.) Only the first 256 bytes of each file are encrypted, the rest of the data is unchanged.<br />
<br />
Example code:<br />
<syntaxhighlight lang="c"><br />
// En/de-crypt a file<br />
if (flags & 0x10) {<br />
for (int i = 0; i < 256; i++) {<br />
data[i] ^= (i >> 1);<br />
}<br />
}<br />
</syntaxhightlight><br />
<br />
Again since it is an XOR cipher, the same code applies to both encrypt and decrypt the FAT.<br />
<br />
=== Hidden data ===<br />
<br />
Because there is much redundancy in the way the RFF format records the locations of files, there are a number of different ways that data can be hidden within the RFF that would not normally be visible.<br />
<br />
As the FAT is located at an arbitrary location within the RFF file (although by convention at the end) it is possible to hide data by inserting it between the end of the last file and the start of the FAT. Although no known files or utilities store the FAT anywhere else except at the end of the file, it would be technically possible to store the FAT in the middle of the file, which would allow data to be hidden both before and after the FAT.<br />
<br />
Due to the FAT storing both an offset and a size for each file, it is also trivial to store data in between files. This could be most easily accomplished by adding files as normal, then simply removing some entries from the FAT. The data will remain in the file but will be invisible to most utilities, and the other files will be unaffected by the change.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive|Encrypt=yes}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canDecrypt = Yes<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| canEncrypt = Yes<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canDecrypt = Yes<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| canEncrypt = Yes<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [http://advsys.net/ken/download.htm#slab6 KBARF]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canDecrypt = Yes<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| canEncrypt = No<br />
| editHidden = No<br />
| editMetadata = N/A<br />
| notes = with C source code, supports mask like *.KVX<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== External links ==<br />
* [http://planetblood.deathmask.net/bloodsource/rff_fileformat.shtml Planet Blood RFF info] has some notes from the Blood project manager<br />
<br />
== Credits ==<br />
<br />
This file format was documented here by following the source code of the [http://blood.sourceforge.net/rebuild.php Rebuild project's] RFF utility.<br />
<br />
[[Category:Build engine]]<br />
[[Category:Encryption algorithms]]</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=Template:BeginFileFormatTools&diff=11752Template:BeginFileFormatTools2024-02-18T06:16:41Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div><noinclude><br />
[[Category:Layout templates]]<br />
This is the table heading for a list of file format tools.<br />
<br />
== Examples ==<br />
<br />
=== Type=archive ===<br />
<br />
This type is used for game archives. These are similar to .zip files in that they store a collection of other files, usually with filenames and sometimes with compression. A key point of an archive is that it can store arbitrary data, so tilesets are usually not considered archives as they cannot store non-image data like game maps or sound effects.<br />
<br />
''This used to be type=archive, however it has now changed to type=archive. Please update if you see any old type=archive uses.''<br />
<br />
<div class="templateExample"><br />
<div class="preview"><br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = Example<br />
| Platform = DOS<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = View only<br />
| editMetadata = Only title<br />
| notes = Example entry<br />
}}<br />
{{EndFileFormatTools}}<br />
</div><br />
<pre><br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = Example<br />
| Platform = DOS<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = View only<br />
| editMetadata = Only title<br />
| notes = Example entry<br />
}}<br />
{{EndFileFormatTools}}<br />
</pre><br />
</div><br />
<br />
{|class="wikitable"<br />
! Parameter/example !! Meaning<br />
|-<br />
| canExtract = Yes || Can this program extract files from the archive?<ul><br />
<li>'''Yes''': this program can extract files from the game's archive files</li><br />
<li>'''Partial''': this program can extract some files (but not all) from the game's archive files</li><br />
<li>'''No''': this program cannot extract any files from the game's archive files</li><br />
</ul><br />
|-<br />
| canDecompress = N/A || Can this program decompress files it extracts? (if supported by the format)<ul><br />
<li>'''Yes''': this program can decompress all files from the game's archive files</li><br />
<li>'''Partial''': this program can decompress some files (but not all) from the game's archive files</li><br />
<li>'''No''': this program cannot decompress any files from the game's archive files</li><br />
<li>'''N/A''': none of the archive files support compression</li><br />
</ul><br />
|-<br />
| canDecrypt = Yes || Can this program decrypt files it extracts? (if supported by the format, must add Encrypt=yes to <nowiki>{{</nowiki>[[:Template:BeginFileFormatTools|BeginFileFormatTools]]}})<br />
|-<br />
| canCreate = No || Can this program create new files in this format from scratch?<br />
|-<br />
| canModify = Yes || Can this program modify parts of the file, leaving the rest unchanged?<br />
|-<br />
| canCompress = Yes || Can this program compress files, if the group file supports compression?<br />
|-<br />
| canEncrypt = Yes || Can this program encrypt files it inserts? (if supported by the format, must add Encrypt=yes to <nowiki>{{</nowiki>[[:Template:BeginFileFormatTools|BeginFileFormatTools]]}})<br />
|-<br />
| editHidden = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit hidden data inside the file? (if supported by the format)<ul><br />
<li>'''Edit''': hidden data can be read and modified</li><br />
<li>'''Read''': hidden data can be viewed/extracted but not changed or set</li><br />
<li>'''No''': hidden data cannot be viewed or changed</li><br />
<li>'''N/A''': this file format does not have anywhere to embed any hidden data</li><br />
</ul><br />
|-<br />
| editMetadata = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit any metadata? (e.g. file description, title, artist, etc.)<ul><br />
<li>'''Edit''': all known metadata can be read and modified</li><br />
<li>'''Partial''': some metadata can be read and/or modified</li><br />
<li>'''Read''': all metadata can be viewed/extracted but not changed or set</li><br />
<li>'''No''': none of the metadata can be viewed or changed</li><br />
<li>'''N/A''': this file format does not have any metadata</li><br />
</ul><br />
|-<br />
| notes = text || Various notes, try to keep as short as possible<br />
|}<br />
<br />
=== Type=audio ===<br />
<br />
This type is used for sound effects (as opposed to music). Typically digitised audio like .wav files, but can also include OPL and PC speaker sound effects as well.<br />
<br />
<div class="templateExample"><br />
<div class="preview"><br />
{{BeginFileFormatTools|Type=audio}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = DOS<br />
| canPlay = Yes<br />
| canCreate = Yes<br />
| canModify = No<br />
| canExport = No<br />
| canImport = Yes; .wav<br />
| editHidden = N/A<br />
| editMetadata = Partial<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</div><br />
<pre><br />
{{BeginFileFormatTools|Type=audio}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = DOS<br />
| canPlay = Yes<br />
| canCreate = Yes<br />
| canModify = No<br />
| canExport = No<br />
| canImport = Yes; .wav<br />
| editHidden = N/A<br />
| editMetadata = Partial<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</pre><br />
</div><br />
<br />
{|class="wikitable"<br />
! Parameter/example !! Meaning<br />
|-<br />
| canPlay = Yes || Can this program play audio in this format?<ul><br />
<li>'''Yes''': this program can play all files in this format</li><br />
<li>'''Partial''': this program can play some files (but not all) in this format</li><br />
<li>'''No''': this program cannot play any files in this format (e.g. it is a conversion utility not a player)</li><br />
</ul><br />
|-<br />
| canCreate = No || Can this program create new files in this format from scratch?<ul><br />
<li>'''Yes''': this program can create empty files in this format</li><br />
<li>'''No''': this program cannot create empty files in this format</li><br />
</ul><br />
|-<br />
| canModify = Yes || Can this program modify parts of the file, leaving the rest unchanged?<ul><br />
<li>'''Yes''': this program can modify all files in this format</li><br />
<li>'''Partial''': this program can modify parts of files but there are some parts it cannot change</li><br />
<li>'''No''': this program cannot modify any files in this format</li><br />
</ul><br />
|-<br />
| canExport = Yes; .wav || Can this program export the image into another format?<ul><br />
<li>'''Yes''': this program can convert this file format to the ones listed</li><br />
<li>'''No''': this program cannot convert this file format to a different format</li><br />
</ul><br />
|-<br />
| canImport = Yes; .wav || Can this program import another image into this format?<ul><br />
<li>'''Yes''': this program can read the listed formats and convert them to this file format</li><br />
<li>'''No''': this program cannot convert any other file formats into this format</li><br />
</ul><br />
|-<br />
| editHidden = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit hidden data inside the file? (if supported by the format)<ul><br />
<li>'''Edit''': hidden data can be read and modified</li><br />
<li>'''Read''': hidden data can be viewed/extracted but not changed or set</li><br />
<li>'''No''': hidden data cannot be viewed or changed</li><br />
<li>'''N/A''': this file format does not have anywhere to embed any hidden data</li><br />
</ul><br />
|-<br />
| editMetadata = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit group file metadata? (e.g. file description, title, artist, etc.)<ul><br />
<li>'''Edit''': all known metadata can be read and modified</li><br />
<li>'''Partial''': some metadata can be read and/or modified</li><br />
<li>'''Read''': all metadata can be viewed/extracted but not changed or set</li><br />
<li>'''No''': none of the metadata can be viewed or changed</li><br />
<li>'''N/A''': this file format does not have any metadata</li><br />
</ul><br />
|-<br />
| notes = text || Various notes, try to keep as short as possible<br />
|}<br />
<br />
=== Type=exe ===<br />
<br />
This type is used for tools that can edit executable files, to patch code, change messages, and alter other hard-coded game attributes.<br />
<br />
<div class="templateExample"><br />
<div class="preview"><br />
{{BeginFileFormatTools|Type=exe}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = Platform<br />
| canView = Yes<br />
| canDecompress = No<br />
| canCreate = No<br />
| canModify = Partial<br />
| canCompress = No<br />
| editHidden = N/A<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</div><br />
<pre><br />
{{BeginFileFormatTools|Type=exe}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = Platform<br />
| canView = Yes<br />
| canDecompress = No<br />
| canCreate = No<br />
| canModify = Partial<br />
| canCompress = No<br />
| editHidden = N/A<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</pre><br />
</div><br />
<br />
{|class="wikitable"<br />
! Parameter/example !! Meaning<br />
|-<br />
| canView = Yes || Can this program view code or patches previously applied to the code?<ul><br />
<li>'''Yes''': this program can view code or patches</li><br />
<li>'''Partial''': this program has some incomplete functionality for viewing code or patches</li><br />
<li>'''No''': this program cannot view any code or patches</li><br />
</ul><br />
|-<br />
| canDecompress = N/A || Can this program decompress/decrypt executable files?<ul><br />
<li>'''Yes''': this program can decompress all executable files in this format</li><br />
<li>'''Partial''': this program can partially decompress some files (but not all) in this format</li><br />
<li>'''No''': this program cannot decompress any executable files in this format</li><br />
</ul><br />
|-<br />
| canCreate = No || Can this program create new files in this format from scratch?<br />
|-<br />
| canModify = Yes || Can this program modify parts of the file, leaving the rest unchanged?<br />
|-<br />
| canCompress = Yes || Can this program compress/encrypt files?<ul><br />
<li>'''Yes''': this program can compress all executable files in this format</li><br />
<li>'''Partial''': this program can partially compress some files (but not all) in this format</li><br />
<li>'''No''': this program cannot compress any executable files in this format</li><br />
</ul><br />
|-<br />
| editHidden = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit hidden data inside the file? (if supported by the format)<ul><br />
<li>'''Edit''': hidden data can be read and modified</li><br />
<li>'''Read''': hidden data can be viewed/extracted but not changed or set</li><br />
<li>'''No''': hidden data cannot be viewed or changed</li><br />
<li>'''N/A''': this file format does not have anywhere to embed any hidden data</li><br />
</ul><br />
|-<br />
| notes = text || Various notes, try to keep as short as possible<br />
|}<br />
<br />
=== Type=game ===<br />
<br />
This type is used on a game page rather than a file format page, and lists tools with respect to the general areas of the game it can edit.<br />
<br />
General programs (such as .wav file editors) are not listed here, as the focus is on editors specific to the game itself. However some general programs may be included if their focus is on game-specific file formats, such as [[IMF Format]] which is not used outside of a few of games. If this list grows to be too great (e.g. there are dozens of programs capable of editing .IMF files, so listing all of them on every game using that file format will clutter the results), then a link to the file format page should be placed below the template instead, and all the tools listed once on the file format page instead.<br />
<br />
<div class="templateExample"><br />
<div class="preview"><br />
{{BeginFileFormatTools|Type=game}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = Platform<br />
| grp = Edit<br />
| map = No<br />
| gfx = Read<br />
| mus = No<br />
| sfx = No<br />
| txt = Partial<br />
| sav = N/A<br />
| exe = No<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</div><br />
<pre><br />
{{BeginFileFormatTools|Type=game}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = Platform<br />
| grp = Edit<br />
| map = No<br />
| gfx = Read<br />
| mus = No<br />
| sfx = No<br />
| txt = Partial<br />
| sav = N/A<br />
| exe = No<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</pre><br />
</div><br />
<br />
{|class="wikitable"<br />
! Parameter/example !! Meaning<br />
|-<br />
| grp = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program edit [[:Category:Archive formats|game archives/group files]]?<ul><br />
<li>'''Edit''': this program can read and change all the game's archive files</li><br />
<li>'''Read''': this program can read/extract the game's archives, but it cannot modify them or create them from scratch</li><br />
<li>'''No''': this program cannot do anything with the game's archive files</li><br />
<li>'''N/A''': this game does not have any archive files</li><br />
</ul><br />
|-<br />
| map = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program edit [[:Category:Map formats|maps/levels]]?<ul><br />
<li>'''Edit''': this program can read and change all the game's levels</li><br />
<li>'''Read''': this program can view the game's levels, but it cannot modify them or create them from scratch</li><br />
<li>'''No''': this program cannot do anything with the game's levels</li><br />
<li>'''N/A''': this game does not have any levels/maps</li><br />
</ul><br />
|-<br />
| gfx = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program edit the [[:Category:Image formats|game's graphics]]?<ul><br />
<li>'''Edit''': this program can read and change all the game's graphics</li><br />
<li>'''Read''': this program can read/extract the game's graphics, but it cannot modify them or create them from scratch</li><br />
<li>'''No''': this program cannot do anything with the game's graphics</li><br />
<li>'''N/A''': this game does not have any graphics</li><br />
</ul><br />
|-<br />
| mus = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program edit the [[:Category:Music formats|game's music]]?<ul><br />
<li>'''Edit''': this program can read/extract/convert/play and also modify all the game's music</li><br />
<li>'''Read''': this program can read/extract/convert/play the game's music, but it cannot replace it or change it</li><br />
<li>'''No''': this program cannot do anything with the game's music</li><br />
<li>'''N/A''': this game does not have any music</li><br />
</ul><br />
|-<br />
| sfx = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program edit the [[:Category:Sound formats|game's sound effects]]?<ul><br />
<li>'''Edit''': this program can read/extract/convert/play and also modify all the game's sound effects</li><br />
<li>'''Read''': this program can read/extract/convert/play the game's sound effects, but it cannot replace it or change any of them</li><br />
<li>'''No''': this program cannot do anything with the game's sound effects</li><br />
<li>'''N/A''': this game does not have any sound effects</li><br />
</ul><br />
|-<br />
| txt = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program edit [[:Category:Text formats|text messages displayed in the game]]?<ul><br />
<li>'''Edit''': this program can view and also modify all the game's textual data</li><br />
<li>'''Read''': this program can view the game's textual data, but it cannot replace it or change any of it</li><br />
<li>'''No''': this program cannot do anything with the game's textual data</li><br />
<li>'''N/A''': this game does not have any text</li><br />
</ul><br />
|-<br />
| sav = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program alter [[:Category:Saved game formats|saved games]]?<ul><br />
<li>'''Edit''': this program can view and also modify saved game files</li><br />
<li>'''Read''': this program can view saved game files, but it cannot modify them</li><br />
<li>'''No''': this program cannot do anything with the saved game files</li><br />
<li>'''N/A''': this game does not have any saved game files</li><br />
</ul><br />
|-<br />
| exe = <nowiki>[Edit|Read|No]</nowiki> || Can this program [[:Category:Executable formats|patch the game's code]] to change e.g. enemy behaviour?<ul><br />
<li>'''Edit''': this program can patch the game's code</li><br />
<li>'''Read''': this program can view elements of the game's code, but it cannot modify anything</li><br />
<li>'''No''': this program cannot do anything with the game's code</li><br />
</ul><br />
|-<br />
| editHidden = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit hidden data inside the file? (if supported by the format)<ul><br />
<li>'''Edit''': hidden data can be read and modified</li><br />
<li>'''Read''': hidden data can be viewed/extracted but not changed or set</li><br />
<li>'''No''': hidden data cannot be viewed or changed</li><br />
<li>'''N/A''': this game does not have anywhere to embed any hidden data</li><br />
</ul><br />
|-<br />
| editMetadata = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit group file metadata? (e.g. file description, title, artist, etc.)<ul><br />
<li>'''Edit''': all known metadata can be read and modified</li><br />
<li>'''Partial''': some metadata can be read and/or modified</li><br />
<li>'''Read''': all metadata can be viewed/extracted but not changed or set</li><br />
<li>'''No''': none of the metadata can be viewed or changed</li><br />
<li>'''N/A''': this game does not have any metadata</li><br />
</ul><br />
|-<br />
| notes = text || Various notes, try to keep as short as possible<br />
|}<br />
<br />
=== Type=image ===<br />
<br />
This type is used for any sort of graphics data, including images, animations and tilesets.<br />
<br />
<div class="templateExample"><br />
<div class="preview"><br />
{{BeginFileFormatTools|Type=image}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = Linux/Mac/Windows<br />
| canView = Yes<br />
| canExport = No<br />
| canImport = Yes; .png<br />
| editHidden = N/A<br />
| editMetadata = Partial<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</div><br />
<pre><br />
{{BeginFileFormatTools|Type=image}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = Linux/Mac/Windows<br />
| canView = Yes<br />
| canExport = No<br />
| canImport = Yes; .png<br />
| editHidden = N/A<br />
| editMetadata = Partial<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</pre><br />
</div><br />
<br />
{|class="wikitable"<br />
! Parameter/example !! Meaning<br />
|-<br />
| canView = Yes || Can this program view the image?<ul><br />
<li>'''Yes''': this program can view all files in this format</li><br />
<li>'''Partial''': this program can view some files (but not all) in this format</li><br />
<li>'''No''': this program cannot view any files in this format (e.g. it is a conversion utility not a viewer)</li><br />
</ul><br />
|-<br />
| canExport = Yes; .wav || Can this program export the image into another format?<ul><br />
<li>'''Yes''': this program can convert this file format to the ones listed</li><br />
<li>'''No''': this program cannot convert this file format to a different format</li><br />
</ul><br />
|-<br />
| canImport = Yes; .wav || Can this program import another image into this format?<ul><br />
<li>'''Yes''': this program can read the listed formats and convert them to this file format</li><br />
<li>'''No''': this program cannot convert any other file formats into this format</li><br />
</ul><br />
|-<br />
| editHidden = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit hidden data inside the file? (if supported by the format)<ul><br />
<li>'''Edit''': hidden data can be read and modified</li><br />
<li>'''Read''': hidden data can be viewed/extracted but not changed or set</li><br />
<li>'''No''': hidden data cannot be viewed or changed</li><br />
<li>'''N/A''': this file format does not have anywhere to embed any hidden data</li><br />
</ul><br />
|-<br />
| editMetadata = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit group file metadata? (e.g. file description, title, artist, etc.)<ul><br />
<li>'''Edit''': all known metadata can be read and modified</li><br />
<li>'''Partial''': some metadata can be read and/or modified</li><br />
<li>'''Read''': all metadata can be viewed/extracted but not changed or set</li><br />
<li>'''No''': none of the metadata can be viewed or changed</li><br />
<li>'''N/A''': this file format does not have any metadata</li><br />
</ul><br />
|-<br />
| notes = text || Various notes, try to keep as short as possible<br />
|}<br />
<br />
=== Type=map ===<br />
<br />
This type is used for tools that can edit game levels.<br />
<br />
<div class="templateExample"><br />
<div class="preview"><br />
{{BeginFileFormatTools|Type=map}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = DOS<br />
| canView = Yes<br />
| canCreate = No<br />
| canModify = Partial<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</div><br />
<pre><br />
{{BeginFileFormatTools|Type=map}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = DOS<br />
| canView = Yes<br />
| canCreate = No<br />
| canModify = Partial<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</pre><br />
</div><br />
<br />
{|class="wikitable"<br />
! Parameter/example !! Meaning<br />
|-<br />
| canView = Yes || Can this program view/render the map? (to the screen or to an image file)<ul><br />
<li>'''Yes''': this program can view all files in this format</li><br />
<li>'''Partial''': this program can view some files (but not all) in this format</li><br />
<li>'''No''': this program cannot view any files in this format (e.g. it is a conversion utility not a viewer)</li><br />
</ul><br />
|-<br />
| canCreate = No || Can this program create new files in this format from scratch?<ul><br />
<li>'''Yes''': this program can create empty files in this format</li><br />
<li>'''No''': this program cannot create empty files in this format</li><br />
</ul><br />
|-<br />
| canModify = Yes || Can this program modify parts of the file, leaving the rest unchanged?<ul><br />
<li>'''Yes''': this program can modify all files in this format</li><br />
<li>'''Partial''': this program can modify parts of files but there are some parts it cannot change</li><br />
<li>'''No''': this program cannot modify any files in this format</li><br />
</ul><br />
|-<br />
| editHidden = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit hidden data inside the file? (if supported by the format)<ul><br />
<li>'''Edit''': hidden data can be read and modified</li><br />
<li>'''Read''': hidden data can be viewed/extracted but not changed or set</li><br />
<li>'''No''': hidden data cannot be viewed or changed</li><br />
<li>'''N/A''': this file format does not have anywhere to embed any hidden data</li><br />
</ul><br />
|-<br />
| editMetadata = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit group file metadata? (e.g. file description, title, artist, etc.)<ul><br />
<li>'''Edit''': all known metadata can be read and modified</li><br />
<li>'''Partial''': some metadata can be read and/or modified</li><br />
<li>'''Read''': all metadata can be viewed/extracted but not changed or set</li><br />
<li>'''No''': none of the metadata can be viewed or changed</li><br />
<li>'''N/A''': this file format does not have any metadata</li><br />
</ul><br />
|-<br />
| notes = text || Various notes, try to keep as short as possible<br />
|}<br />
<br />
=== Type=text ===<br />
<br />
This type is used for text files, such as scripts, plain text configuration files, etc.<br />
<br />
<div class="templateExample"><br />
<div class="preview"><br />
{{BeginFileFormatTools|Type=text}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = DOS<br />
| canView = Yes<br />
| canModify = Partial<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</div><br />
<pre><br />
{{BeginFileFormatTools|Type=text}}<br />
{{FileFormatTool<br />
| Name = Name<br />
| Platform = DOS<br />
| canView = Yes<br />
| canModify = Partial<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
| notes = notes<br />
}}<br />
{{EndFileFormatTools}}<br />
</pre><br />
</div><br />
<br />
{|class="wikitable"<br />
! Parameter/example !! Meaning<br />
|-<br />
| canView = Yes || Can this program view the text?<ul><br />
<li>'''Yes''': this program can view all files in this format</li><br />
<li>'''Partial''': this program can view some files (but not all) in this format</li><br />
<li>'''No''': this program cannot view any files in this format</li><br />
</ul><br />
|-<br />
| canModify = Yes || Can this program modify parts of the file, leaving the rest unchanged?<ul><br />
<li>'''Yes''': this program can modify all files in this format</li><br />
<li>'''Partial''': this program can modify parts of files but there are some parts it cannot change</li><br />
<li>'''No''': this program cannot modify any files in this format</li><br />
</ul><br />
|-<br />
| editHidden = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit hidden data inside the file? (if supported by the format)<ul><br />
<li>'''Edit''': hidden data can be read and modified</li><br />
<li>'''Read''': hidden data can be viewed/extracted but not changed or set</li><br />
<li>'''No''': hidden data cannot be viewed or changed</li><br />
<li>'''N/A''': this file format does not have anywhere to embed any hidden data</li><br />
</ul><br />
|-<br />
| editMetadata = <nowiki>[Edit|Read|No|N/A]</nowiki> || Can this program view/edit group file metadata? (e.g. file description, title, artist, etc.)<ul><br />
<li>'''Edit''': all known metadata can be read and modified</li><br />
<li>'''Partial''': some metadata can be read and/or modified</li><br />
<li>'''Read''': all metadata can be viewed/extracted but not changed or set</li><br />
<li>'''No''': none of the metadata can be viewed or changed</li><br />
<li>'''N/A''': this file format does not have any metadata</li><br />
</ul><br />
|-<br />
| notes = text || Various notes, try to keep as short as possible<br />
|}<br />
</noinclude><br />
<includeonly>The following tools are able to work with {{#ifeq:{{{Type|group}}}|game|this game|files in this format}}.<br />
<table class="wikitable"><br />
<tr><br />
<th>Name</th><br />
<th>Platform</th><!-- Remove 'group' once everything has been changed to 'archive' -->{{#ifeq:{{{Type|}}}|group|<br />
<th>Extract files?</th><br />
<th>Decompress on extract?</th>{{#ifeq:{{{Encrypt|}}}|yes|<br />
<th>Decrypt?</th>}}<br />
<th>Create new?</th><br />
<th>Modify?</th><br />
<th>Compress on insert?</th>{{#ifeq:{{{Encrypt|}}}|yes|<br />
<th>Encrypt?</th>}}<br />
<th>Access hidden data?</th><br />
<th>Edit metadata?</th><br />
}}<!-- end "remove group" -->{{#ifeq:{{{Type|archive}}}|archive|<br />
<th>Extract files?</th><br />
<th>Decompress on extract?</th>{{#ifeq:{{{Encrypt|}}}|yes|<br />
<th>Decrypt?</th>}}<br />
<th>Create new?</th><br />
<th>Modify?</th><br />
<th>Compress on insert?</th>{{#ifeq:{{{Encrypt|}}}|yes|<br />
<th>Encrypt?</th>}}<br />
<th>Access hidden data?</th><br />
<th>Edit metadata?</th><br />
}}{{#ifeq:{{{Type|}}}|image|<br />
<th>View images in this format?</th><br />
<th>Convert/export to another file/format?</th><br />
<th>Import from another file/format?</th><br />
<th>Access hidden data?</th><br />
<th>Edit metadata?</th><br />
}}{{#ifeq:{{{Type|}}}|audio|<br />
<th>Play?</th><br />
<th>Create new?</th><br />
<th>Modify?</th><br />
<th>Convert/export to other?</th><br />
<th>Import from other?</th><br />
<th>Access hidden data?</th><br />
<th>Edit metadata?</th><br />
}}{{#ifeq:{{{Type|}}}|map|<br />
<th>View?</th><br />
<th>Create new?</th><br />
<th>Modify?</th><br />
<th>Access hidden data?</th><br />
<th>Edit metadata?</th><br />
}}{{#ifeq:{{{Type|}}}|text|<br />
<th>View?</th><br />
<th>Modify?</th><br />
<th>Access hidden data?</th><br />
<th>Edit metadata?</th><br />
}}{{#ifeq:{{{Type|}}}|exe|<br />
<th>Load?</th><br />
<th>Decompress?</th><br />
<th>Create?</th><br />
<th>Modify?</th><br />
<th>Compress?</th><br />
<th>Access hidden data?</th><br />
}}{{#ifeq:{{{Type|}}}|game|<br />
<th>Group/archives</th><br />
<th>Levels</th><br />
<th>Graphics</th><br />
<th>Music</th><br />
<th>Sounds</th><br />
<th>Text</th><br />
<th>Saves</th><br />
<th>.exe patch</th><br />
}}<br />
<th>Notes</th><br />
</tr></includeonly></div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=Softdisk_Library_Format&diff=11751Softdisk Library Format2024-02-18T06:16:41Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 65,535<br />
| FAT = Beginning<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = Y<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Commander Keen Dreams}}<br />
{{Game|Dangerous Dave 3}}<br />
{{Game|Dangerous Dave 4}}<br />
}}<br />
'''SLIB''', or '''Softdisk LIBrary''', compression is a container file format used by [[Softdisk]] software to compress various files used by their games, most notably the Commander Keen Dreams series of games, (Including Dangerous Dave 3 and Dangerous Dave 4)to store title images used at the beginning of each game. It was created in 1992 by Jim Row.<br />
<br />
The data held in the file can be compressed in any one of three ways, uncompressed, LZW and LZH. The compression used is primitive and rather different from later or traditional versions of LZW\LZH. SLIB files were created by the program <tt>SOFTLIB.EXE</tt> and as such any game that uses this format contains various segments of code in common with <tt>SOFTLIB</tt> for the decompression of data.<br />
<br />
There is a closely related format, the SHL or Softdisk Help Library format. SHL files contain only a single file. Their header is slightly different, it's file signature is 'CMP1' (CoMPression of 1 file) while that of SLIB files is SLIB. The veracity of both files can be confirmed by checking for a word of value 2 at offset 4 in the file. The actual files have been given a number of extensions; <tt>.CMP</tt> (CoMPressed), <tt>.SHL</tt> (Softdisk Help Library) or the game extension.<br />
<br />
The SLIB file can roughly be broken into a number of parts; the header, which contains data about the various data chunks, and the data chunks themselves, each containing a single file. Each chunk also has a short header.<br />
<br />
== Header ==<br />
<br />
The file header is found only in SLIB files and is absent in SHL files, which are loaded into memory in their enitrety. The SLIB header allows individual data chunks to be loaded inhto memory seperately.<br />
<br />
The SLIB header is a variable length header that contains information about how many chunks there are in a file as well as their location in the file and size. It is used by the game to load chunks into memory and by <tt>SOFLIB</tt> to extract compressed files.<br />
<br />
The first part of the header is a fixed length of 8 bytes and allows the game to identify the file as SLIB and also the total length of the header (Which will be 30 * the value at offset 6 plus 8.) The second part is a series of chunk headers that hold information about what file is held in each chunk. (The last six bytes are repeated at the start of the data chunk.)<br />
<br />
FILE HEADER:<br />
0 CHAR[4] fID Signature, 'SLIB' (Softdisk LIBrary)<br />
4 UINT16LE Version Version number, always $0002<br />
6 UINT16LE Chunks Number of data chunks in file<br />
8 CHAR[30x] Chunk headers Chunk headers<br />
<br />
IMAGE HEADERS:<br />
? CHAR[16] Name Name of compressed image (Max len 12 chars) padded with nuls<br />
+16 UINT32LE Dat st Start of image data in file (From start of first image chunk)<br />
+20 UINT32LE Dat end End of image data in file (From start of first image chunk)<br />
+24 UINT32LE iOriginalSize Decompressed data size<br />
+28 UINT16LE iCompression Compression used, 0 = none, 1 = LZW, 2 = LZH<br />
<br />
== Data Chunks ==<br />
<br />
The data chunk has a short header followed by the actual data itself. The format differs slightly between SLIB chunkks and SHL files. Both format must identify themselves to the game, and they do so in different ways.<br />
<br />
Notice that in the case of SLIB chunks bytes 4-10 are identical to bytes 24-30 of that chunk's header.<br />
<br />
SLIB CHUNK FORMAT<br />
? CHAR[4] cID Signature'CUNK' (Chunk UNKompressed size)<br />
+4 UINT32LE iOriginalSize Decompressed data size<br />
+8 UINT16LE iCompression Compression method<br />
+10 CHAR[?] Data Image data<br />
<br />
SHL files are slightly more tricky; an uncompressed SHL file is simply raw data, compressed data must identify itself as such and so the header is slightly longer. It can be considered a combination of the chunk header and the SLIB header in the section above.<br />
<br />
SHL FILE FORMAT<br />
0 CHAR[4] cID Signature'CMP1' (CoMPressed s1ingle file)<br />
4 UINT16LE iCompression Compression method (as above)<br />
6 UINT32LE iOriginalSize Decompressed data size<br />
10 UINT32LE iCompressedSize Compressed data size<br />
14 CHAR[?] Data Image data<br />
<br />
== Compression ==<br />
<br />
As noted above there are three forms of compression. The first is simple enough, no compression at all, the data is simply stored in the file. (Actually increasing the size!) The other two are called 'LZW' and 'LZH' by the programmers but both differ from what are now standard implmentations of those formats.<br />
<br />
=== LZW ===<br />
<br />
A compression value of 1 means the chunk is [[LZW compression|LZW compressed]]. The format of the compression used is different from the more 'usual' implementation of LZW. Most LZW works by building a 'dictionary', but LZW is in essence just referring back to data that has already been read.<br />
<br />
The core of the implementation is that if a sequence is encountered that has already been read then it is replaced with a pointer to it. There are three types of data, flag bytes, pointers and literals.<br />
<br />
Flag bytes divide the datastream into segments of eight 'values' which can be either literals or pointers. Pointers are 2 bytes long, literals 1 byte. (Therefore there will be a flag byte every 8 to 16 bytes of data.) The value of each bit (In little endian) indicates whether a value will be a literal (1) or codeword (0) Thus a value of 199 (11000111 in binary) indicates three pointers, three literals and two pointers in that order. (Total of 13 bytes.)<br />
<br />
Literals are sequences that have never been seen in the datastream before, they cannot be compressed and are thus the same in the compressed and decompressed datastreams. (If the data is text they become quite obvious.) Any string less than 3 bytes long that has not been read before or cannot be pointed to (See below) will be stored as literals.<br />
<br />
Pointers are reference to data that has already been read. They are two bytes long, with the first 12 bits giving the location to read data from and the last 4 bits giving the length of data to read.<br />
<br />
The lower nybble (4 bits) of the second pointer byte holds the length of repeat data to read minus three. (This makes sense, the shortest sequence it makes sense to code is three bytes which can be given the value 0.) It will be immediately apparent that the maximum length of repeated data that can be stored as a pointer is 18 bytes.<br />
<br />
The high nybble of the second byte is multiplied by 256 then added to the first byte to give the location of the data to read in the 'sliding window' minus 18. In hexadecimal this is as simple as appending the nybble to the first byte. For example flag bytes of <tt>$EA $F6</tt> point to location <tt>$FEA</tt> with '6' relating to the data length to read.<br />
<br />
The 'sliding window' in this case is the region of decompressed data that the compressed data can point to. It will be immediately obvious that the pointers can encode values between +-2048, or about 2KB. If the decompressed data is less than 2KB in size then zero is the start of the data, if it is larger than it is 2048 bytes from the end of the data. (This is the origin of the term 'sliding window'; it is a window of data that can be slid along the datastream as it gets bigger.)<br />
<br />
It will be noted that it is probable that the compressed datastream will not be perfectly divisible by flag bytes. In this case the unused bits are set to 0. The decompressor stops when the decompressed data size is equal to the value given in the chunk header.<br />
<br />
The last thing to keep in mind is that the flagged location obtained requires 18 to be added to it. This is due to how the decompressor is set up in memory; it needs a buffer of 18 bytes (the maximum length of compressed data that can be decompressed) between where it is working and the start of the datastream proper. These bytes are initially filled with blank spaces (<tt>$20</tt> not <tt>$00</tt>.) and considered part of the datastream but not part that is output to the final file. (Their locations are negative.)<br />
<br />
This has an odd result; it's entirely possible for a flag byte to point to a negative value and output one or more characters that were never part of the uncompressed data. To illustrate this we will look at the text string 'I am Sam. Sam I am!' as compressed by <tt>softlib.exe</tt>. Note that on line 6 it requests 5 bytes from address -1. This is the string ' I am'. The last four bytes are from the start of the sentence but the first, a blank space, comes from the buffer.<br />
<br />
FF Flag byte, 8 literals follow<br />
49 20 61 6D 20 53 61 6D 'I am Sam' as literals<br />
09 Flag byte, 1L, 2P, 1L,4Blanks ($09 = 00001001)<br />
2E '.' as literal<br />
F2 F1 Pointer, read 1 + 3 = 4 bytes from $FF2, or -14 + 18 = 4 in the data. This is ' Sam'<br />
ED F2 Pointer, read 2 + 3 = 5 bytes from $FED or -19 + 18 = -1 in the data. This is ' I am'<br />
21 '!' as literal<br />
<br />
=== LZH ===<br />
<br />
LZH (also known as LZHUF) is a combination of [[LZSS compression]] and [[Huffman Compression]] originally developed by Haruyasu Yoshizaki for his [https://en.wikipedia.org/wiki/LHA_(file_format) LHarc compressor], based on the prior LZARI algorithm from Haruhiko Okumura.<br />
<br />
Compressing data with LZHUF can be considered a two-stage process (though, in practice, both stages are run simultaneously).<br />
<br />
First, the data is LZ-compressed, converting it to a series of literals (uncompressed bytes) and matches (references to a contiguous run of bytes which appeared earlier: these references consist of a length and an offset).<br />
<br />
These literals and matches are then huffman compressed using two separate huffman tables.<br />
<br />
Literals (as well as the lengths of matches) are compressed using the main _adaptive_ Huffman tree. This huffman tree has 256 + 28 = 284 leaf nodes: the first 256 represent literal bytes, the next 28 represent matches of length 2 to length 30. After every entry is encoded or decoded, a probability for that value is updated and, if necessary, the huffman tree is reconstructed to be optimal for the new probability distribution.<br />
<br />
If the encoded value is a match length, the offset (which is 12-bits long) is then split into two 6-bit halves. The upper 6 bits are encoded with a fixed huffman dictionary. The bottom 6 bits are stored as-is.<br />
<br />
The [http://www.apogeesoftware.com/uncategorized/apogee-releases-blake-stone-source-code Planet Strike source code release] contains C code that handles LZH compression and decompression in <tt>JM_LZH.C</tt>. The code was written by Jim T. Row, who apparently also wrote the Softlib utility, so chances are it is the same implementation of LZH.<br />
<br />
The same compressor/decompressor can also be found in the open-sourced Keen Dreams source, in [https://github.com/keendreams/keen/blob/master/lzhuf.c LZHUF.C].<br />
<br />
An account of the development of this algorithm can be found in [https://oku.edu.mie-u.ac.jp/~okumura/compression/history.html A History of Data Compression in Japan]. Okumura further describes the algorithms in [https://oku.edu.mie-u.ac.jp/~okumura/compression/ar002/compr2.txt this page]. Note however, that the Softdisk library implementation uses Jim T. Row's implementation, not the original by Okumura and Yoshizaki.<br />
<br />
== Softlib ==<br />
<br />
Soflib (Softdisk Library Creator) is a DOS program that can be used to create or extract files from SLIB files. It can work with both forms of compression used in SLIB files. It is notable that for some reason files shorter than 24 bytes often fail to be compressed correctly. (Soflib outputs a library with an empty chunk in it.) Soflib can be downloaded from the tools section of this page.<br />
<br />
== Data contained in libraries ==<br />
<br />
Keen Dreams uses SLIB to compress its title screen and also comes with a number of LZH compressed .SHL files containing text. The title screen is in [[LBM Format]] It is notable that the game does not read most of the LBM chunks, focusing instead on the FORM, BMHD and BODY chunks. This is because while the compressed files were designed to be viewed and edited in a standalone program, the game did not need things such as the LBM palette.<br />
<br />
Dangerous Dave 3 and 4 use an additional SLIB file to store their digital sound effects, which are seperate from their [[AudioT Format|PC\adlib sounds]]<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [http://files.shikadi.net/moddingwiki/tools/kdreams/softlib.exe SOFTLIB.EXE]<br />
| Platform = DOS<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = Yes<br />
| editHidden = No<br />
| editMetadata = N/A<br />
| notes = Original DOS program that can create and modify Softdisk Libraries<br />
}}<br />
{{FileFormatTool<br />
| Name = [http://files.shikadi.net/moddingwiki/tools/kdreams/Titlebuild.zip Titlebuild]<br />
| Platform = Windows<br />
| canExtract = No<br />
| canDecompress = No<br />
| canCreate = Yes<br />
| canModify = No<br />
| canCompress = Yes<br />
| editHidden = No<br />
| editMetadata = N/A<br />
| notes = Windows program to turn a 320x200 bitmap into <tt>KDREAMS.CMP</tt> for Keen Dreams<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This format partially reverse engineered by [[User:Lemm]] and [[User:Levellass]].</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=DAT_Format_(Hocus_Pocus)&diff=11750DAT Format (Hocus Pocus)2024-02-18T06:16:41Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = Set by FAT length<br />
| FAT = External<br />
| Names = N<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Hocus Pocus}}<br />
}}<br />
The '''DAT group format''' used by [[Hocus Pocus]] is for storing a number of related game files together in a single file (similar to how a .zip file is used.) The format is somewhat complicated by the fact that the offsets of each file are stored in the main <tt>HOCUS.EXE</tt>, which can make altering the file more complex than most other group formats.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
The Hocus Pocus .DAT file has no signature, so there isn't really any way of detecting whether it's a .DAT file or not - but the fact that <tt>HOCUS.EXE</tt> must exist and contain in-range offsets is probably good enough to avoid false detection.<br />
<br />
=== FAT ===<br />
<br />
The File Allocation Table is stored in the main game executable, <tt>HOCUS.EXE</tt>. The offsets are in the table below. The FAT itself is a simple array of eight-byte entries, where each entry contains two numbers - a UINT32LE for the offset into the .DAT file, followed by another UINT32LE containing the file size.<br />
<br />
{|class="wikitable"<br />
!Version!!FAT Offset||Number of files||Method of identifying this EXE version<br />
|-<br />
|Leaked beta||0x01AD74||236||EXE is 218,069 bytes<br />
|-<br />
|Shareware v1.0||0x01EE04||252||EXE is 178,592 bytes, and string at offset 0x20E03 is "HOCUS POCUS Version 1.0"<br />
|-<br />
|Shareware v1.1||0x01F0E4||253||EXE is 179,360 bytes, and string at offset 0x210F9 is "HOCUS POCUS Version 1.1"<br />
|-<br />
|Registered v1.0||0x01EEB4||651||EXE is 181,872 bytes, and string at offset 0x21AD1 is "HOCUS POCUS Version 1.0"<br />
|-<br />
|Registered v1.1||0x01F1A4||652||EXE is 182,656 bytes, and string at offset 0x21DD7 is "HOCUS POCUS Version 1.1"<br />
|}<br />
<br />
== List of files ==<br />
<br />
The following table lists the contents of <tt>HOCUS.DAT</tt> from the registered version 1.1 of the game. In version 1.0 or the shareware versions of the game, some files may be absent or have different sizes, but the order of the files appears to be unchanged.<br />
<br />
Please keep in mind that these filenames are not the original filenames of the files stored in the DAT file.<br />
<br />
{|class="wikitable"<br />
!File #!!Offset||Size!!Filename||Format||Notes<br />
|-<br />
|0||0||720||FONT.MSK||1bpp (monochrome) 8×720 image || Main font, containing 90 8×8 glyphs<br />
|-<br />
|1||720||30949||APOGEE.PCX|| [[PCX Format]] ||<br />
|-<br />
|2||31669||39081||TITLE.PCX|| [[PCX Format]] ||<br />
|-<br />
|3||70750||3844||REGIST.IMG|| [[Hocus Pocus Image Format]] ||Registered Version only<br />
|-<br />
|4||74594||73346||WARP.PCX|| [[PCX Format]] ||<br />
|-<br />
|5||147940||2880||SINCOS.DAT||720 floats||Sine / Cosine values for all angles from 0 to 359 degrees<br />
|-<br />
|6||150820||2000||RANDOM.DAT||1000 INT16LEs||Random number table<br />
|-<br />
|7||152820||384||GAMEPAL.PAL|| [[Hocus Pocus Palette Format]] ||<br />
|-<br />
|8||153204||384||MENUPAL.PAL|| [[Hocus Pocus Palette Format]] ||<br />
|-<br />
|9||153588||5124||BOTTOM.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|10||158712||12484||HOCUS.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|11||171196||1348||HUDSTUFF.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|12||172544||12804||NEW_HUD.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|13||185348||12804||OLD_HUD.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|14||198152||1924||BULLIT.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|15||200076||420||VOL_BAR.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|16||200496||14964||CRYSTAL.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|17||215460||9403||PIRACY.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|18||224863||9380||DEMO1.DMO|| [[Hocus Pocus Demo Format]] ||<br />
|-<br />
|19||234243||11474||DEMO2.DMO|| [[Hocus Pocus Demo Format]] ||<br />
|-<br />
|20||245717||12932||DEMO3.DMO|| [[Hocus Pocus Demo Format]] ||<br />
|-<br />
|21||258649||11420||DEMO4.DMO|| [[Hocus Pocus Demo Format]] ||<br />
|-<br />
|22||270069||8408||DEMO5.DMO|| [[Hocus Pocus Demo Format]] ||<br />
|-<br />
|23||278477||11729||CREDITS1.PCX|| [[PCX Format]] ||<br />
|-<br />
|24||290206||9406||CREDITS2.PCX|| [[PCX Format]] ||<br />
|-<br />
|25||299612||10962||HELP1_K.PCX|| [[PCX Format]] ||<br />
|-<br />
|26||310574||11086||HELP1_J.PCX|| [[PCX Format]] ||<br />
|-<br />
|27||321660||14470||HELP2.PCX|| [[PCX Format]] ||<br />
|-<br />
|28||336130||10461||GRAVIS.PCX|| [[PCX Format]] ||v1.1 only<br />
|-<br />
|29||346591||9199||HELP3.PCX|| [[PCX Format]] ||<br />
|-<br />
|30||355790||39168||PREVIEW1.PCX|| [[PCX Format]] ||<br />
|-<br />
|31||394958||38135||PREVIEW2.PCX|| [[PCX Format]] ||<br />
|-<br />
|32||433093||46814||PREVIEW3.PCX|| [[PCX Format]] ||<br />
|-<br />
|33||479907||36010||PREVIEW4.PCX|| [[PCX Format]] ||<br />
|-<br />
|34||515917||46515||PREVIEW5.PCX|| [[PCX Format]] ||<br />
|-<br />
|35||562432||53374||PREVIEW6.PCX|| [[PCX Format]] ||<br />
|-<br />
|36||615806||36861||PREVIEW7.PCX|| [[PCX Format]] ||<br />
|-<br />
|37||652667||45998||PREVIEW8.PCX|| [[PCX Format]] ||<br />
|-<br />
|38||698665||50472||PREVIEW9.PCX|| [[PCX Format]] ||<br />
|-<br />
|39||749137||45009||PREVIEW11.PCX|| [[PCX Format]] ||<br />
|-<br />
|40||794146||39457||PREVIEW12.PCX|| [[PCX Format]] ||<br />
|-<br />
|41||833603||1686||ORDER_R1.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|42||835289||1686||ORDER_R2.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|43||836975||1686||ORDER1.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|44||838661||1686||ORDER2.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|45||840347||1686||ORDER3.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|46||842033||1686||ORDER4.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|47||843719||1686||ORDER5.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|48||845405||1686||ORDER6.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|49||847091||1686||ORDER7.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|50||848777||1686||ORDER7+.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|51||850463||1686||REGISTER.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|52||852149||1686||STORY01.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|53||853835||1686||STORY02.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|54||855521||1686||STORY03.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|55||857207||1686||STORY04.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|56||858893||1686||STORY05.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|57||860579||1686||STORY06.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|58||862265||1686||STORY07.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|59||863951||1686||STORY08.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|60||865637||1686||STORY09.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|61||867323||1686||STORY10.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|62||869009||1686||E1END1.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|63||870695||1686||E1END2.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|64||872381||1686||E2END1.PAG|| [[Hocus Pocus Text Format]] ||Registered Version only<br />
|-<br />
|65||874067||1686||E2END2.PAG|| [[Hocus Pocus Text Format]] ||Registered Version only<br />
|-<br />
|66||875753||1686||E3END1.PAG|| [[Hocus Pocus Text Format]] ||Registered Version only<br />
|-<br />
|67||877439||1686||E3END2.PAG|| [[Hocus Pocus Text Format]] ||Registered Version only<br />
|-<br />
|68||879125||1686||E3END3.PAG|| [[Hocus Pocus Text Format]] ||Registered Version only<br />
|-<br />
|69||880811||1686||E3END4.PAG|| [[Hocus Pocus Text Format]] ||Registered Version only<br />
|-<br />
|70||882497||1686||E4END1.PAG|| [[Hocus Pocus Text Format]] ||Registered Version only<br />
|-<br />
|71||884183||1686||E4END2.PAG|| [[Hocus Pocus Text Format]] ||Registered Version only<br />
|-<br />
|72||885869||38203||KISS.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|73||924072||384||BACK01.PAL|| [[Hocus Pocus Palette Format]] ||<br />
|-<br />
|74||924456||384||BACK02.PAL|| [[Hocus Pocus Palette Format]] ||<br />
|-<br />
|75||924840||384||BACK03.PAL|| [[Hocus Pocus Palette Format]] ||<br />
|-<br />
|76||925224||384||BACK04.PAL|| [[Hocus Pocus Palette Format]] ||<br />
|-<br />
|77||925608||384||BACK05.PAL|| [[Hocus Pocus Palette Format]] ||Registered Version only<br />
|-<br />
|78||925992||384||BACK06.PAL|| [[Hocus Pocus Palette Format]] ||Registered Version only<br />
|-<br />
|79||926376||384||BACK07.PAL|| [[Hocus Pocus Palette Format]] ||Registered Version only<br />
|-<br />
|80||926760||384||BACK08.PAL|| [[Hocus Pocus Palette Format]] ||Registered Version only<br />
|-<br />
|81||927144||384||BACK09.PAL|| [[Hocus Pocus Palette Format]] ||Registered Version only<br />
|-<br />
|82||927528||384||BACK10.PAL|| [[Hocus Pocus Palette Format]] ||Registered Version only<br />
|-<br />
|83||927912||384||BACK11.PAL|| [[Hocus Pocus Palette Format]] ||Registered Version only<br />
|-<br />
|84||928296||384||BACK12.PAL|| [[Hocus Pocus Palette Format]] ||Registered Version only<br />
|-<br />
|85||928680||384||BACK13.PAL|| [[Hocus Pocus Palette Format]] ||Registered Version only<br />
|-<br />
|86||929064||384||BACK14.PAL|| [[Hocus Pocus Palette Format]] ||Registered Version only<br />
|-<br />
|87||929448||384||BACK15.PAL|| [[Hocus Pocus Palette Format]] ||Registered Version only<br />
|-<br />
|88||929832||384||BACK16.PAL|| [[Hocus Pocus Palette Format]] ||Registered Version only<br />
|-<br />
|89||930216||34000||BACK01.PCX|| [[PCX Format]] ||<br />
|-<br />
|90||964216||48085||BACK02.PCX|| [[PCX Format]] ||<br />
|-<br />
|91||1012301||33432||BACK03.PCX|| [[PCX Format]] ||<br />
|-<br />
|92||1045733||45319||BACK04.PCX|| [[PCX Format]] ||<br />
|-<br />
|93||1091052||33286||BACK05.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|94||1124338||50652||BACK06.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|95||1174990||38067||BACK07.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|96||1213057||59856||BACK08.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|97||1272913||32394||BACK09.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|98||1305307||28400||BACK10.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|99||1333707||43647||BACK11.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|100||1377354||46761||BACK12.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|101||1424115||32361||BACK13.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|102||1456476||47212||BACK14.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|103||1503688||35841||BACK15.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|104||1539529||59572||BACK16.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|105||1599101||24974||TILES01.PCX|| [[PCX Format]] ||<br />
|-<br />
|106||1624075||28637||TILES02.PCX|| [[PCX Format]] ||<br />
|-<br />
|107||1652712||30376||TILES03.PCX|| [[PCX Format]] ||<br />
|-<br />
|108||1683088||20435||TILES04.PCX|| [[PCX Format]] ||<br />
|-<br />
|109||1703523||22139||TILES05.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|110||1725662||24693||TILES06.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|111||1750355||26397||TILES07.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|112||1776752||25608||TILES08.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|113||1802360||22390||TILES09.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|114||1824750||20262||TILES10.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|115||1845012||25570||TILES11.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|116||1870582||23451||TILES12.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|117||1894033||24107||TILES13.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|118||1918140||26763||TILES14.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|119||1944903||23696||TILES15.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|120||1968599||21583||TILES16.PCX|| [[PCX Format]] ||Registered Version only<br />
|-<br />
|121||1990182||15796||PIC1.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|122||2005978||39249||WIN.PCX|| [[PCX Format]] ||<br />
|-<br />
|123||2045227||22468||PIC2.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|124||2067695||22468||PIC3.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|125||2090163||15796||PIC4.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|126||2105959||27652||PIC5.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|127||2133611||22468||PIC6.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|128||2156079||22468||PIC7.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|129||2178547||28804||PIC8.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|130||2207351||386965||SPRITES.SPR||[[Hocus Pocus Sprite Format]]||<br />
|-<br />
|131||2594316||8||E1L1.000||Player Coordinates||<br />
|-<br />
|132||2594324||8||E1L2.000||Player Coordinates||<br />
|-<br />
|133||2594332||8||E1L3.000||Player Coordinates||<br />
|-<br />
|134||2594340||8||E1L4.000||Player Coordinates||<br />
|-<br />
|135||2594348||8||E1L5.000||Player Coordinates||<br />
|-<br />
|136||2594356||8||E1L6.000||Player Coordinates||<br />
|-<br />
|137||2594364||8||E1L7.000||Player Coordinates||<br />
|-<br />
|138||2594372||8||E1L8.000||Player Coordinates||<br />
|-<br />
|139||2594380||8||E1L9.000||Player Coordinates||<br />
|-<br />
|140||2594388||8||E2L1.000||Player Coordinates||Registered Version only<br />
|-<br />
|141||2594396||8||E2L2.000||Player Coordinates||Registered Version only<br />
|-<br />
|142||2594404||8||E2L3.000||Player Coordinates||Registered Version only<br />
|-<br />
|143||2594412||8||E2L4.000||Player Coordinates||Registered Version only<br />
|-<br />
|144||2594420||8||E2L5.000||Player Coordinates||Registered Version only<br />
|-<br />
|145||2594428||8||E2L6.000||Player Coordinates||Registered Version only<br />
|-<br />
|146||2594436||8||E2L7.000||Player Coordinates||Registered Version only<br />
|-<br />
|147||2594444||8||E2L8.000||Player Coordinates||Registered Version only<br />
|-<br />
|148||2594452||8||E2L9.000||Player Coordinates||Registered Version only<br />
|-<br />
|149||2594460||8||E3L1.000||Player Coordinates||Registered Version only<br />
|-<br />
|150||2594468||8||E3L2.000||Player Coordinates||Registered Version only<br />
|-<br />
|151||2594476||8||E3L3.000||Player Coordinates||Registered Version only<br />
|-<br />
|152||2594484||8||E3L4.000||Player Coordinates||Registered Version only<br />
|-<br />
|153||2594492||8||E3L5.000||Player Coordinates||Registered Version only<br />
|-<br />
|154||2594500||8||E3L6.000||Player Coordinates||Registered Version only<br />
|-<br />
|155||2594508||8||E3L7.000||Player Coordinates||Registered Version only<br />
|-<br />
|156||2594516||8||E3L8.000||Player Coordinates||Registered Version only<br />
|-<br />
|157||2594524||8||E3L9.000||Player Coordinates||Registered Version only<br />
|-<br />
|158||2594532||8||E4L1.000||Player Coordinates||Registered Version only<br />
|-<br />
|159||2594540||8||E4L2.000||Player Coordinates||Registered Version only<br />
|-<br />
|160||2594548||8||E4L3.000||Player Coordinates||Registered Version only<br />
|-<br />
|161||2594556||8||E4L4.000||Player Coordinates||Registered Version only<br />
|-<br />
|162||2594564||8||E4L5.000||Player Coordinates||Registered Version only<br />
|-<br />
|163||2594572||8||E4L6.000||Player Coordinates||Registered Version only<br />
|-<br />
|164||2594580||8||E4L7.000||Player Coordinates||Registered Version only<br />
|-<br />
|165||2594588||8||E4L8.000||Player Coordinates||Registered Version only<br />
|-<br />
|166||2594596||8||E4L9.000||Player Coordinates||Registered Version only<br />
|-<br />
|167||2594604||724||E1L1.001||Tile Animation Settings||<br />
|-<br />
|168||2595328||724||E1L2.001||Tile Animation Settings||<br />
|-<br />
|169||2596052||724||E1L3.001||Tile Animation Settings||<br />
|-<br />
|170||2596776||724||E1L4.001||Tile Animation Settings||<br />
|-<br />
|171||2597500||724||E1L5.001||Tile Animation Settings||<br />
|-<br />
|172||2598224||724||E1L6.001||Tile Animation Settings||<br />
|-<br />
|173||2598948||724||E1L7.001||Tile Animation Settings||<br />
|-<br />
|174||2599672||724||E1L8.001||Tile Animation Settings||<br />
|-<br />
|175||2600396||724||E1L9.001||Tile Animation Settings||<br />
|-<br />
|176||2601120||724||E2L1.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|177||2601844||724||E2L2.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|178||2602568||724||E2L3.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|179||2603292||724||E2L4.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|180||2604016||724||E2L5.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|181||2604740||724||E2L6.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|182||2605464||724||E2L7.001,||Tile Animation Settings||Registered Version only<br />
|-<br />
|183||2606188||724||E2L8.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|184||2606912||724||E2L9.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|185||2607636||724||E3L1.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|186||2608360||724||E3L2.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|187||2609084||724||E3L3.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|188||2609808||724||E3L4.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|189||2610532||724||E3L5.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|190||2611256||724||E3L6.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|191||2611980||724||E3L7.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|192||2612704||724||E3L8.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|193||2613428||724||E3L9.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|194||2614152||724||E4L1.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|195||2614876||724||E4L2.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|196||2615600||724||E4L3.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|197||2616324||724||E4L4.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|198||2617048||724||E4L5.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|199||2617772||724||E4L6.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|200||2618496||724||E4L7.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|201||2619220||724||E4L8.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|202||2619944||724||E4L9.001||Tile Animation Settings||Registered Version only<br />
|-<br />
|203||2620668||5040||E1L1.002||Message Texts||<br />
|-<br />
|204||2625708||5040||E1L2.002||Message Texts||<br />
|-<br />
|205||2630748||5040||E1L3.002||Message Texts||<br />
|-<br />
|206||2635788||5040||E1L4.002||Message Texts||<br />
|-<br />
|207||2640828||5040||E1L5.002||Message Texts||<br />
|-<br />
|208||2645868||5040||E1L6.002||Message Texts||<br />
|-<br />
|209||2650908||5040||E1L7.002||Message Texts||<br />
|-<br />
|210||2655948||5040||E1L8.002||Message Texts||<br />
|-<br />
|211||2660988||5040||E1L9.002||Message Texts||<br />
|-<br />
|212||2666028||5040||E2L1.002||Message Texts||Registered Version only<br />
|-<br />
|213||2671068||5040||E2L2.002||Message Texts||Registered Version only<br />
|-<br />
|214||2676108||5040||E2L3.002||Message Texts||Registered Version only<br />
|-<br />
|215||2681148||5040||E2L4.002||Message Texts||Registered Version only<br />
|-<br />
|216||2686188||5040||E2L5.002||Message Texts||Registered Version only<br />
|-<br />
|217||2691228||5040||E2L6.002||Message Texts||Registered Version only<br />
|-<br />
|218||2696268||5040||E2L7.002||Message Texts||Registered Version only<br />
|-<br />
|219||2701308||5040||E2L8.002||Message Texts||Registered Version only<br />
|-<br />
|220||2706348||5040||E2L9.002||Message Texts||Registered Version only<br />
|-<br />
|221||2711388||5040||E3L1.002||Message Texts||Registered Version only<br />
|-<br />
|222||2716428||5040||E3L2.002||Message Texts||Registered Version only<br />
|-<br />
|223||2721468||5040||E3L3.002||Message Texts||Registered Version only<br />
|-<br />
|224||2726508||5040||E3L4.002||Message Texts||Registered Version only<br />
|-<br />
|225||2731548||5040||E3L5.002||Message Texts||Registered Version only<br />
|-<br />
|226||2736588||5040||E3L6.002||Message Texts||Registered Version only<br />
|-<br />
|227||2741628||5040||E3L7.002||Message Texts||Registered Version only<br />
|-<br />
|228||2746668||5040||E3L8.002||Message Texts||Registered Version only<br />
|-<br />
|229||2751708||5040||E3L9.002||Message Texts||Registered Version only<br />
|-<br />
|230||2756748||5040||E4L1.002||Message Texts||Registered Version only<br />
|-<br />
|231||2761788||5040||E4L2.002||Message Texts||Registered Version only<br />
|-<br />
|232||2766828||5040||E4L3.002||Message Texts||Registered Version only<br />
|-<br />
|233||2771868||5040||E4L4.002||Message Texts||Registered Version only<br />
|-<br />
|234||2776908||5040||E4L5.002||Message Texts||Registered Version only<br />
|-<br />
|235||2781948||5040||E4L6.002||Message Texts||Registered Version only<br />
|-<br />
|236||2786988||5040||E4L7.002||Message Texts||Registered Version only<br />
|-<br />
|237||2792028||5040||E4L8.002||Message Texts||Registered Version only<br />
|-<br />
|238||2797068||5040||E4L9.002||Message Texts||Registered Version only<br />
|-<br />
|239||2802108||40||E1L1.003||Teleporter Coordinates||<br />
|-<br />
|240||2802148||40||E1L2.003||Teleporter Coordinates||<br />
|-<br />
|241||2802188||40||E1L3.003||Teleporter Coordinates||<br />
|-<br />
|242||2802228||40||E1L4.003||Teleporter Coordinates||<br />
|-<br />
|243||2802268||40||E1L5.003||Teleporter Coordinates||<br />
|-<br />
|244||2802308||40||E1L6.003||Teleporter Coordinates||<br />
|-<br />
|245||2802348||40||E1L7.003||Teleporter Coordinates||<br />
|-<br />
|246||2802388||40||E1L8.003||Teleporter Coordinates||<br />
|-<br />
|247||2802428||40||E1L9.003||Teleporter Coordinates||<br />
|-<br />
|248||2802468||40||E2L1.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|249||2802508||40||E2L2.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|250||2802548||40||E2L3.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|251||2802588||40||E2L4.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|252||2802628||40||E2L5.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|253||2802668||40||E2L6.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|254||2802708||40||E2L7.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|255||2802748||40||E2L8.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|256||2802788||40||E2L9.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|257||2802828||40||E3L1.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|258||2802868||40||E3L2.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|259||2802908||40||E3L3.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|260||2802948||40||E3L4.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|261||2802988||40||E3L5.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|262||2803028||40||E3L6.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|263||2803068||40||E3L7.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|264||2803108||40||E3L8.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|265||2803148||40||E3L9.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|266||2803188||40||E4L1.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|267||2803228||40||E4L2.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|268||2803268||40||E4L3.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|269||2803308||40||E4L4.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|270||2803348||40||E4L5.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|271||2803388||40||E4L6.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|272||2803428||40||E4L7.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|273||2803468||40||E4L8.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|274||2803508||40||E4L9.003||Teleporter Coordinates||Registered Version only<br />
|-<br />
|275||2803548||506||E1L1.004||Switch Coordinates||<br />
|-<br />
|276||2804054||506||E1L2.004||Switch Coordinates||<br />
|-<br />
|277||2804560||506||E1L3.004||Switch Coordinates||<br />
|-<br />
|278||2805066||506||E1L4.004||Switch Coordinates||<br />
|-<br />
|279||2805572||506||E1L5.004||Switch Coordinates||<br />
|-<br />
|280||2806078||506||E1L6.004||Switch Coordinates||<br />
|-<br />
|281||2806584||506||E1L7.004||Switch Coordinates||<br />
|-<br />
|282||2807090||506||E1L8.004||Switch Coordinates||<br />
|-<br />
|283||2807596||506||E1L9.004||Switch Coordinates||<br />
|-<br />
|284||2808102||506||E2L1.004||Switch Coordinates||Registered Version only<br />
|-<br />
|285||2808608||506||E2L2.004||Switch Coordinates||Registered Version only<br />
|-<br />
|286||2809114||506||E2L3.004||Switch Coordinates||Registered Version only<br />
|-<br />
|287||2809620||506||E2L4.004||Switch Coordinates||Registered Version only<br />
|-<br />
|288||2810126||506||E2L5.004||Switch Coordinates||Registered Version only<br />
|-<br />
|289||2810632||506||E2L6.004||Switch Coordinates||Registered Version only<br />
|-<br />
|290||2811138||506||E2L7.004||Switch Coordinates||Registered Version only<br />
|-<br />
|291||2811644||506||E2L8.004||Switch Coordinates||Registered Version only<br />
|-<br />
|292||2812150||506||E2L9.004||Switch Coordinates||Registered Version only<br />
|-<br />
|293||2812656||506||E3L1.004||Switch Coordinates||Registered Version only<br />
|-<br />
|294||2813162||506||E3L2.004||Switch Coordinates||Registered Version only<br />
|-<br />
|295||2813668||506||E3L3.004||Switch Coordinates||Registered Version only<br />
|-<br />
|296||2814174||506||E3L4.004||Switch Coordinates||Registered Version only<br />
|-<br />
|297||2814680||506||E3L5.004||Switch Coordinates||Registered Version only<br />
|-<br />
|298||2815186||506||E3L6.004||Switch Coordinates||Registered Version only<br />
|-<br />
|299||2815692||506||E3L7.004||Switch Coordinates||Registered Version only<br />
|-<br />
|300||2816198||506||E3L8.004||Switch Coordinates||Registered Version only<br />
|-<br />
|301||2816704||506||E3L9.004||Switch Coordinates||Registered Version only<br />
|-<br />
|302||2817210||506||E4L1.004||Switch Coordinates||Registered Version only<br />
|-<br />
|303||2817716||506||E4L2.004||Switch Coordinates||Registered Version only<br />
|-<br />
|304||2818222||506||E4L3.004||Switch Coordinates||Registered Version only<br />
|-<br />
|305||2818728||506||E4L4.004||Switch Coordinates||Registered Version only<br />
|-<br />
|306||2819234||506||E4L5.004||Switch Coordinates||Registered Version only<br />
|-<br />
|307||2819740||506||E4L6.004||Switch Coordinates||Registered Version only<br />
|-<br />
|308||2820246||506||E4L7.004||Switch Coordinates||Registered Version only<br />
|-<br />
|309||2820752||506||E4L8.004||Switch Coordinates||Registered Version only<br />
|-<br />
|310||2821258||506||E4L9.004||Switch Coordinates||Registered Version only<br />
|-<br />
|311||2821764||300||E1L1.005||Insert Data Coordinates||<br />
|-<br />
|312||2822064||300||E1L2.005||Insert Data Coordinates||<br />
|-<br />
|313||2822364||300||E1L3.005||Insert Data Coordinates||<br />
|-<br />
|314||2822664||300||E1L4.005||Insert Data Coordinates||<br />
|-<br />
|315||2822964||300||E1L5.005||Insert Data Coordinates||<br />
|-<br />
|316||2823264||300||E1L6.005||Insert Data Coordinates||<br />
|-<br />
|317||2823564||300||E1L7.005||Insert Data Coordinates||<br />
|-<br />
|318||2823864||300||E1L8.005||Insert Data Coordinates||<br />
|-<br />
|319||2824164||300||E1L9.005||Insert Data Coordinates||<br />
|-<br />
|320||2824464||300||E2L1.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|321||2824764||300||E2L2.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|322||2825064||300||E2L3.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|323||2825364||300||E2L4.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|324||2825664||300||E2L5.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|325||2825964||300||E2L6.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|326||2826264||300||E2L7.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|327||2826564||300||E2L8.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|328||2826864||300||E2L9.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|329||2827164||300||E3L1.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|330||2827464||300||E3L2.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|331||2827764||300||E3L3.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|332||2828064||300||E3L4.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|333||2828364||300||E3L5.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|334||2828664||300||E3L6.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|335||2828964||300||E3L7.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|336||2829264||300||E3L8.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|337||2829564||300||E3L9.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|338||2829864||300||E4L1.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|339||2830164||300||E4L2.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|340||2830464||300||E4L3.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|341||2830764||300||E4L4.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|342||2831064||300||E4L5.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|343||2831364||300||E4L6.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|344||2831664||300||E4L7.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|345||2831964||300||E4L8.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|346||2832264||300||E4L9.005||Insert Data Coordinates||Registered Version only<br />
|-<br />
|347||2832564||300||E1L1.006||Keyhole Coordinates||<br />
|-<br />
|348||2832864||300||E1L2.006||Keyhole Coordinates||<br />
|-<br />
|349||2833164||300||E1L3.006||Keyhole Coordinates||<br />
|-<br />
|350||2833464||300||E1L4.006||Keyhole Coordinates||<br />
|-<br />
|351||2833764||300||E1L5.006||Keyhole Coordinates||<br />
|-<br />
|352||2834064||300||E1L6.006||Keyhole Coordinates||<br />
|-<br />
|353||2834364||300||E1L7.006||Keyhole Coordinates||<br />
|-<br />
|354||2834664||300||E1L8.006||Keyhole Coordinates||<br />
|-<br />
|355||2834964||300||E1L9.006||Keyhole Coordinates||<br />
|-<br />
|356||2835264||300||E2L1.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|357||2835564||300||E2L2.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|358||2835864||300||E2L3.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|359||2836164||300||E2L4.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|360||2836464||300||E2L5.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|361||2836764||300||E2L6.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|362||2837064||300||E2L7.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|363||2837364||300||E2L8.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|364||2837664||300||E2L9.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|365||2837964||300||E3L1.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|366||2838264||300||E3L2.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|367||2838564||300||E3L3.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|368||2838864||300||E3L4.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|369||2839164||300||E3L5.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|370||2839464||300||E3L6.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|371||2839764||300||E3L7.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|372||2840064||300||E3L8.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|373||2840364||300||E3L9.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|374||2840664||300||E4L1.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|375||2840964||300||E4L2.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|376||2841264||300||E4L3.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|377||2841564||300||E4L4.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|378||2841864||300||E4L5.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|379||2842164||300||E4L6.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|380||2842464||300||E4L7.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|381||2842764||300||E4L8.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|382||2843064||300||E4L9.006||Keyhole Coordinates||Registered Version only<br />
|-<br />
|383||2843364||240||E1L1.007||Tile Properties?||<br />
|-<br />
|384||2843604||240||E1L2.007||Tile Properties?||<br />
|-<br />
|385||2843844||240||E1L3.007||Tile Properties?||<br />
|-<br />
|386||2844084||240||E1L4.007||Tile Properties?||<br />
|-<br />
|387||2844324||240||E1L5.007||Tile Properties?||<br />
|-<br />
|388||2844564||240||E1L6.007||Tile Properties?||<br />
|-<br />
|389||2844804||240||E1L7.007||Tile Properties?||<br />
|-<br />
|390||2845044||240||E1L8.007||Tile Properties?||<br />
|-<br />
|391||2845284||240||E1L9.007||Tile Properties?||<br />
|-<br />
|392||2845524||240||E2L1.007||Tile Properties?||Registered Version only<br />
|-<br />
|393||2845764||240||E2L2.007||Tile Properties?||Registered Version only<br />
|-<br />
|394||2846004||240||E2L3.007||Tile Properties?||Registered Version only<br />
|-<br />
|395||2846244||240||E2L4.007||Tile Properties?||Registered Version only<br />
|-<br />
|396||2846484||240||E2L5.007||Tile Properties?||Registered Version only<br />
|-<br />
|397||2846724||240||E2L6.007||Tile Properties?||Registered Version only<br />
|-<br />
|398||2846964||240||E2L7.007||Tile Properties?||Registered Version only<br />
|-<br />
|399||2847204||240||E2L8.007||Tile Properties?||Registered Version only<br />
|-<br />
|400||2847444||240||E2L9.007||Tile Properties?||Registered Version only<br />
|-<br />
|401||2847684||240||E3L1.007||Tile Properties?||Registered Version only<br />
|-<br />
|402||2847924||240||E3L2.007||Tile Properties?||Registered Version only<br />
|-<br />
|403||2848164||240||E3L3.007||Tile Properties?||Registered Version only<br />
|-<br />
|404||2848404||240||E3L4.007||Tile Properties?||Registered Version only<br />
|-<br />
|405||2848644||240||E3L5.007||Tile Properties?||Registered Version only<br />
|-<br />
|406||2848884||240||E3L6.007||Tile Properties?||Registered Version only<br />
|-<br />
|407||2849124||240||E3L7.007||Tile Properties?||Registered Version only<br />
|-<br />
|408||2849364||240||E3L8.007||Tile Properties?||Registered Version only<br />
|-<br />
|409||2849604||240||E3L9.007||Tile Properties?||Registered Version only<br />
|-<br />
|410||2849844||240||E4L1.007||Tile Properties?||Registered Version only<br />
|-<br />
|411||2850084||240||E4L2.007||Tile Properties?||Registered Version only<br />
|-<br />
|412||2850324||240||E4L3.007||Tile Properties?||Registered Version only<br />
|-<br />
|413||2850564||240||E4L4.007||Tile Properties?||Registered Version only<br />
|-<br />
|414||2850804||240||E4L5.007||Tile Properties?||Registered Version only<br />
|-<br />
|415||2851044||240||E4L6.007||Tile Properties?||Registered Version only<br />
|-<br />
|416||2851284||240||E4L7.007||Tile Properties?||Registered Version only<br />
|-<br />
|417||2851524||240||E4L8.007||Tile Properties?||Registered Version only<br />
|-<br />
|418||2851764||240||E4L9.007||Tile Properties?||Registered Version only<br />
|-<br />
|419||2852004||8000||E1L1.008||Enemy Trigger Table||<br />
|-<br />
|420||2860004||8000||E1L2.008||Enemy Trigger Table||<br />
|-<br />
|421||2868004||8000||E1L3.008||Enemy Trigger Table||<br />
|-<br />
|422||2876004||8000||E1L4.008||Enemy Trigger Table||<br />
|-<br />
|423||2884004||8000||E1L5.008||Enemy Trigger Table||<br />
|-<br />
|424||2892004||8000||E1L6.008||Enemy Trigger Table||<br />
|-<br />
|425||2900004||8000||E1L7.008||Enemy Trigger Table||<br />
|-<br />
|426||2908004||8000||E1L8.008||Enemy Trigger Table||<br />
|-<br />
|427||2916004||8000||E1L9.008||Enemy Trigger Table||<br />
|-<br />
|428||2924004||8000||E2L1.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|429||2932004||8000||E2L2.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|430||2940004||8000||E2L3.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|431||2948004||8000||E2L4.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|432||2956004||8000||E2L5.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|433||2964004||8000||E2L6.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|434||2972004||8000||E2L7.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|435||2980004||8000||E2L8.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|436||2988004||8000||E2L9.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|437||2996004||8000||E3L1.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|438||3004004||8000||E3L2.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|439||3012004||8000||E3L3.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|440||3020004||8000||E3L4.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|441||3028004||8000||E3L5.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|442||3036004||8000||E3L6.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|443||3044004||8000||E3L7.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|444||3052004||8000||E3L8.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|445||3060004||8000||E3L9.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|446||3068004||8000||E4L1.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|447||3076004||8000||E4L2.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|448||3084004||8000||E4L3.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|449||3092004||8000||E4L4.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|450||3100004||8000||E4L5.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|451||3108004||8000||E4L6.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|452||3116004||8000||E4L7.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|453||3124004||8000||E4L8.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|454||3132004||8000||E4L9.008||Enemy Trigger Table||Registered Version only<br />
|-<br />
|455||3140004||14400||E1L1.009||Background Layer||<br />
|-<br />
|456||3154404||14400||E1L2.009||Background Layer||<br />
|-<br />
|457||3168804||14400||E1L3.009||Background Layer||<br />
|-<br />
|458||3183204||14400||E1L4.009||Background Layer||<br />
|-<br />
|459||3197604||14400||E1L5.009||Background Layer||<br />
|-<br />
|460||3212004||14400||E1L6.009||Background Layer||<br />
|-<br />
|461||3226404||14400||E1L7.009||Background Layer||<br />
|-<br />
|462||3240804||14400||E1L8.009||Background Layer||<br />
|-<br />
|463||3255204||14400||E1L9.009||Background Layer||<br />
|-<br />
|464||3269604||14400||E2L1.009||Background Layer||Registered Version only<br />
|-<br />
|465||3284004||14400||E2L2.009||Background Layer||Registered Version only<br />
|-<br />
|466||3298404||14400||E2L3.009||Background Layer||Registered Version only<br />
|-<br />
|467||3312804||14400||E2L4.009||Background Layer||Registered Version only<br />
|-<br />
|468||3327204||14400||E2L5.009||Background Layer||Registered Version only<br />
|-<br />
|469||3341604||14400||E2L6.009||Background Layer||Registered Version only<br />
|-<br />
|470||3356004||14400||E2L7.009||Background Layer||Registered Version only<br />
|-<br />
|471||3370404||14400||E2L8.009||Background Layer||Registered Version only<br />
|-<br />
|472||3384804||14400||E2L9.009||Background Layer||Registered Version only<br />
|-<br />
|473||3399204||14400||E3L1.009||Background Layer||Registered Version only<br />
|-<br />
|474||3413604||14400||E3L2.009||Background Layer||Registered Version only<br />
|-<br />
|475||3428004||14400||E3L3.009||Background Layer||Registered Version only<br />
|-<br />
|476||3442404||14400||E3L4.009||Background Layer||Registered Version only<br />
|-<br />
|477||3456804||14400||E3L5.009||Background Layer||Registered Version only<br />
|-<br />
|478||3471204||14400||E3L6.009||Background Layer||Registered Version only<br />
|-<br />
|479||3485604||14400||E3L7.009||Background Layer||Registered Version only<br />
|-<br />
|480||3500004||14400||E3L8.009||Background Layer||Registered Version only<br />
|-<br />
|481||3514404||14400||E3L9.009||Background Layer||Registered Version only<br />
|-<br />
|482||3528804||14400||E4L1.009||Background Layer||Registered Version only<br />
|-<br />
|483||3543204||14400||E4L2.009||Background Layer||Registered Version only<br />
|-<br />
|484||3557604||14400||E4L3.009||Background Layer||Registered Version only<br />
|-<br />
|485||3572004||14400||E4L4.009||Background Layer||Registered Version only<br />
|-<br />
|486||3586404||14400||E4L5.009||Background Layer||Registered Version only<br />
|-<br />
|487||3600804||14400||E4L6.009||Background Layer||Registered Version only<br />
|-<br />
|488||3615204||14400||E4L7.009||Background Layer||Registered Version only<br />
|-<br />
|489||3629604||14400||E4L8.009||Background Layer||Registered Version only<br />
|-<br />
|490||3644004||14400||E4L9.009||Background Layer||Registered Version only<br />
|-<br />
|491||3658404||14400||E1L1.010||Main Map Layer||<br />
|-<br />
|492||3672804||14400||E1L2.010||Main Map Layer||<br />
|-<br />
|493||3687204||14400||E1L3.010||Main Map Layer||<br />
|-<br />
|494||3701604||14400||E1L4.010||Main Map Layer||<br />
|-<br />
|495||3716004||14400||E1L5.010||Main Map Layer||<br />
|-<br />
|496||3730404||14400||E1L6.010||Main Map Layer||<br />
|-<br />
|497||3744804||14400||E1L7.010||Main Map Layer||<br />
|-<br />
|498||3759204||14400||E1L8.010||Main Map Layer||<br />
|-<br />
|499||3773604||14400||E1L9.010||Main Map Layer||<br />
|-<br />
|500||3788004||14400||E2L1.010||Main Map Layer||Registered Version only<br />
|-<br />
|501||3802404||14400||E2L2.010||Main Map Layer||Registered Version only<br />
|-<br />
|502||3816804||14400||E2L3.010||Main Map Layer||Registered Version only<br />
|-<br />
|503||3831204||14400||E2L4.010||Main Map Layer||Registered Version only<br />
|-<br />
|504||3845604||14400||E2L5.010||Main Map Layer||Registered Version only<br />
|-<br />
|505||3860004||14400||E2L6.010||Main Map Layer||Registered Version only<br />
|-<br />
|506||3874404||14400||E2L7.010||Main Map Layer||Registered Version only<br />
|-<br />
|507||3888804||14400||E2L8.010||Main Map Layer||Registered Version only<br />
|-<br />
|508||3903204||14400||E2L9.010||Main Map Layer||Registered Version only<br />
|-<br />
|509||3917604||14400||E3L1.010||Main Map Layer||Registered Version only<br />
|-<br />
|510||3932004||14400||E3L2.010||Main Map Layer||Registered Version only<br />
|-<br />
|511||3946404||14400||E3L3.010||Main Map Layer||Registered Version only<br />
|-<br />
|512||3960804||14400||E3L4.010||Main Map Layer||Registered Version only<br />
|-<br />
|513||3975204||14400||E3L5.010||Main Map Layer||Registered Version only<br />
|-<br />
|514||3989604||14400||E3L6.010||Main Map Layer||Registered Version only<br />
|-<br />
|515||4004004||14400||E3L7.010||Main Map Layer||Registered Version only<br />
|-<br />
|516||4018404||14400||E3L8.010||Main Map Layer||Registered Version only<br />
|-<br />
|517||4032804||14400||E3L9.010||Main Map Layer||Registered Version only<br />
|-<br />
|518||4047204||14400||E4L1.010||Main Map Layer||Registered Version only<br />
|-<br />
|519||4061604||14400||E4L2.010||Main Map Layer||Registered Version only<br />
|-<br />
|520||4076004||14400||E4L3.010||Main Map Layer||Registered Version only<br />
|-<br />
|521||4090404||14400||E4L4.010||Main Map Layer||Registered Version only<br />
|-<br />
|522||4104804||14400||E4L5.010||Main Map Layer||Registered Version only<br />
|-<br />
|523||4119204||14400||E4L6.010||Main Map Layer||Registered Version only<br />
|-<br />
|524||4133604||14400||E4L7.010||Main Map Layer||Registered Version only<br />
|-<br />
|525||4148004||14400||E4L8.010||Main Map Layer||Registered Version only<br />
|-<br />
|526||4162404||14400||E4L9.010||Main Map Layer||Registered Version only<br />
|-<br />
|527||4176804||14400||E1L1.011||Insert Data Layer||<br />
|-<br />
|528||4191204||14400||E1L2.011||Insert Data Layer||<br />
|-<br />
|529||4205604||14400||E1L3.011||Insert Data Layer||<br />
|-<br />
|530||4220004||14400||E1L4.011||Insert Data Layer||<br />
|-<br />
|531||4234404||14400||E1L5.011||Insert Data Layer||<br />
|-<br />
|532||4248804||14400||E1L6.011||Insert Data Layer||<br />
|-<br />
|533||4263204||14400||E1L7.011||Insert Data Layer||<br />
|-<br />
|534||4277604||14400||E1L8.011||Insert Data Layer||<br />
|-<br />
|535||4292004||14400||E1L9.011||Insert Data Layer||<br />
|-<br />
|536||4306404||14400||E2L1.011||Insert Data Layer||Registered Version only<br />
|-<br />
|537||4320804||14400||E2L2.011||Insert Data Layer||Registered Version only<br />
|-<br />
|538||4335204||14400||E2L3.011||Insert Data Layer||Registered Version only<br />
|-<br />
|539||4349604||14400||E2L4.011||Insert Data Layer||Registered Version only<br />
|-<br />
|540||4364004||14400||E2L5.011||Insert Data Layer||Registered Version only<br />
|-<br />
|541||4378404||14400||E2L6.011||Insert Data Layer||Registered Version only<br />
|-<br />
|542||4392804||14400||E2L7.011||Insert Data Layer||Registered Version only<br />
|-<br />
|543||4407204||14400||E2L8.011||Insert Data Layer||Registered Version only<br />
|-<br />
|544||4421604||14400||E2L9.011||Insert Data Layer||Registered Version only<br />
|-<br />
|545||4436004||14400||E3L1.011||Insert Data Layer||Registered Version only<br />
|-<br />
|546||4450404||14400||E3L2.011||Insert Data Layer||Registered Version only<br />
|-<br />
|547||4464804||14400||E3L3.011||Insert Data Layer||Registered Version only<br />
|-<br />
|548||4479204||14400||E3L4.011||Insert Data Layer||Registered Version only<br />
|-<br />
|549||4493604||14400||E3L5.011||Insert Data Layer||Registered Version only<br />
|-<br />
|550||4508004||14400||E3L6.011||Insert Data Layer||Registered Version only<br />
|-<br />
|551||4522404||14400||E3L7.011||Insert Data Layer||Registered Version only<br />
|-<br />
|552||4536804||14400||E3L8.011||Insert Data Layer||Registered Version only<br />
|-<br />
|553||4551204||14400||E3L9.011||Insert Data Layer||Registered Version only<br />
|-<br />
|554||4565604||14400||E4L1.011||Insert Data Layer||Registered Version only<br />
|-<br />
|555||4580004||14400||E4L2.011||Insert Data Layer||Registered Version only<br />
|-<br />
|556||4594404||14400||E4L3.011||Insert Data Layer||Registered Version only<br />
|-<br />
|557||4608804||14400||E4L4.011||Insert Data Layer||Registered Version only<br />
|-<br />
|558||4623204||14400||E4L5.011||Insert Data Layer||Registered Version only<br />
|-<br />
|559||4637604||14400||E4L6.011||Insert Data Layer||Registered Version only<br />
|-<br />
|560||4652004||14400||E4L7.011||Insert Data Layer||Registered Version only<br />
|-<br />
|561||4666404||14400||E4L8.011||Insert Data Layer||Registered Version only<br />
|-<br />
|562||4680804||14400||E4L9.011||Insert Data Layer||Registered Version only<br />
|-<br />
|563||4695204||28800||E1L1.012||Info Layer||<br />
|-<br />
|564||4724004||28800||E1L2.012||Info Layer||<br />
|-<br />
|565||4752804||28800||E1L3.012||Info Layer||<br />
|-<br />
|566||4781604||28800||E1L4.012||Info Layer||<br />
|-<br />
|567||4810404||28800||E1L5.012||Info Layer||<br />
|-<br />
|568||4839204||28800||E1L6.012||Info Layer||<br />
|-<br />
|569||4868004||28800||E1L7.012||Info Layer||<br />
|-<br />
|570||4896804||28800||E1L8.012||Info Layer||<br />
|-<br />
|571||4925604||28800||E1L9.012||Info Layer||<br />
|-<br />
|572||4954404||28800||E2L1.012||Info Layer||Registered Version only<br />
|-<br />
|573||4983204||28800||E2L2.012||Info Layer||Registered Version only<br />
|-<br />
|574||5012004||28800||E2L3.012||Info Layer||Registered Version only<br />
|-<br />
|575||5040804||28800||E2L4.012||Info Layer||Registered Version only<br />
|-<br />
|576||5069604||28800||E2L5.012||Info Layer||Registered Version only<br />
|-<br />
|577||5098404||28800||E2L6.012||Info Layer||Registered Version only<br />
|-<br />
|578||5127204||28800||E2L7.012||Info Layer||Registered Version only<br />
|-<br />
|579||5156004||28800||E2L8.012||Info Layer||Registered Version only<br />
|-<br />
|580||5184804||28800||E2L9.012||Info Layer||Registered Version only<br />
|-<br />
|581||5213604||28800||E3L1.012||Info Layer||Registered Version only<br />
|-<br />
|582||5242404||28800||E3L2.012||Info Layer||Registered Version only<br />
|-<br />
|583||5271204||28800||E3L3.012||Info Layer||Registered Version only<br />
|-<br />
|584||5300004||28800||E3L4.012||Info Layer||Registered Version only<br />
|-<br />
|585||5328804||28800||E3L5.012||Info Layer||Registered Version only<br />
|-<br />
|586||5357604||28800||E3L6.012||Info Layer||Registered Version only<br />
|-<br />
|587||5386404||28800||E3L7.012||Info Layer||Registered Version only<br />
|-<br />
|588||5415204||28800||E3L8.012||Info Layer||Registered Version only<br />
|-<br />
|589||5444004||28800||E3L9.012||Info Layer||Registered Version only<br />
|-<br />
|590||5472804||28800||E4L1.012||Info Layer||Registered Version only<br />
|-<br />
|591||5501604||28800||E4L2.012||Info Layer||Registered Version only<br />
|-<br />
|592||5530404||28800||E4L3.012||Info Layer||Registered Version only<br />
|-<br />
|593||5559204||28800||E4L4.012||Info Layer||Registered Version only<br />
|-<br />
|594||5588004||28800||E4L5.012||Info Layer||Registered Version only<br />
|-<br />
|595||5616804||28800||E4L6.012||Info Layer||Registered Version only<br />
|-<br />
|596||5645604||28800||E4L7.012||Info Layer||Registered Version only<br />
|-<br />
|597||5674404||28800||E4L8.012||Info Layer||Registered Version only<br />
|-<br />
|598||5703204||28800||E4L9.012||Info Layer||Registered Version only<br />
|-<br />
|599||5732004||1540||FANFARE.MID|| [[MID Format]] ||<br />
|-<br />
|600||5733544||11820||MUSIC01.MID|| [[MID Format]] ||<br />
|-<br />
|601||5745364||8895||MUSIC02.MID|| [[MID Format]] ||<br />
|-<br />
|602||5754259||10778||TITLE.MID|| [[MID Format]] ||<br />
|-<br />
|603||5765037||13889||MUSIC04.MID|| [[MID Format]] ||<br />
|-<br />
|604||5778926||10795||MUSIC05.MID|| [[MID Format]] ||<br />
|-<br />
|605||5789721||9742||MUSIC06.MID|| [[MID Format]] ||<br />
|-<br />
|606||5799463||12525||DUNES.MID|| [[MID Format]] ||<br />
|-<br />
|607||5811988||10441||SPOOKY.MID|| [[MID Format]] ||<br />
|-<br />
|608||5822429||9288||TAJMAHAL.MID|| [[MID Format]] ||<br />
|-<br />
|609||5831717||29099||MUSIC10.MID|| [[MID Format]] ||<br />
|-<br />
|610||5860816||1404||TREE10.MID|| [[MID Format]] ||Registered Version only<br />
|-<br />
|611||5862220||62925||SOUND01.VOC|| [[VOC Format]] ||<br />
|-<br />
|612||5925145||13489||SOUND02.VOC|| [[VOC Format]] ||<br />
|-<br />
|613||5938634||1000||SOUND02.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|614||5939634||9176||SOUND03.VOC|| [[VOC Format]] ||<br />
|-<br />
|615||5948810||16744||SOUND04.VOC|| [[VOC Format]] ||<br />
|-<br />
|616||5965554||18682||SOUND05.VOC|| [[VOC Format]] ||<br />
|-<br />
|617||5984236||11233||SOUND06.VOC|| [[VOC Format]] ||<br />
|-<br />
|618||5995469||6643||SOUND07.VOC|| [[VOC Format]] ||<br />
|-<br />
|619||6002112||1000||SOUND07.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|620||6003112||3935||SOUND08.VOC|| [[VOC Format]] ||<br />
|-<br />
|621||6007047||400||SOUND08.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|622||6007447||4273||SOUND09.VOC|| [[VOC Format]] ||<br />
|-<br />
|623||6011720||400||SOUND09.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|624||6012120||9333||SOUND10.VOC|| [[VOC Format]] ||<br />
|-<br />
|625||6021453||200||SOUND10.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|626||6021653||2705||SOUND11.VOC|| [[VOC Format]] ||<br />
|-<br />
|627||6024358||400||SOUND11.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|628||6024758||2167||SOUND12.VOC|| [[VOC Format]] ||<br />
|-<br />
|629||6026925||400||SOUND12.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|630||6027325||4191||SOUND13.VOC|| [[VOC Format]] ||<br />
|-<br />
|631||6031516||1000||SOUND13.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|632||6032516||4191||SOUND14.VOC|| [[VOC Format]] ||<br />
|-<br />
|633||6036707||1000||SOUND14.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|634||6037707||7241||SOUND15.VOC|| [[VOC Format]] ||<br />
|-<br />
|635||6044948||1200||SOUND15.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|636||6046148||1573||SOUND16.VOC|| [[VOC Format]] ||<br />
|-<br />
|637||6047721||80||SOUND16.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|638||6047801||12361||SOUND17.VOC|| [[VOC Format]] ||<br />
|-<br />
|639||6060162||1000||SOUND17.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|640||6061162||791||SOUND18.VOC|| [[VOC Format]] ||<br />
|-<br />
|641||6061953||400||SOUND18.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|642||6062353||8211||SOUND19.VOC|| [[VOC Format]] ||<br />
|-<br />
|643||6070564||1200||SOUND19.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|644||6071764||5969||SOUND20.VOC|| [[VOC Format]] ||<br />
|-<br />
|645||6077733||1000||SOUND20.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|646||6078733||12863||SOUND21.VOC|| [[VOC Format]] ||<br />
|-<br />
|647||6091596||400||SOUND21.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|648||6091996||1129||SOUND22.VOC|| [[VOC Format]] ||<br />
|-<br />
|649||6093125||400||SOUND22.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|650||6093525||4000||DOSSHARE.BIN|| [[B800 Text]] ||<br />
|-<br />
|651||6097525||4000||DOSREG.BIN|| [[B800 Text]] ||<br />
|}<br />
<br />
== List of beta files ==<br />
<br />
The following table lists the contents of <tt>HOCUS.DAT</tt> from the beta version of the game.<br />
<br />
Please keep in mind that these filenames are not the original filenames of the files stored in the DAT file.<br />
<br />
{|class="wikitable"<br />
!File #!!Offset||Size!!Filename||Format||Notes<br />
|-<br />
|0||0||720||FONT.MSK||1bpp (monochrome) 8×720 image || Main font, containing 90 8×8 glyphs<br />
|-<br />
|1||720||956||UNKNOWN||??||<br />
|-<br />
|2||1676||30949||APOGEE.PCX|| [[PCX Format]] ||<br />
|-<br />
|3||32625||39097||TITLE.PCX|| [[PCX Format]] ||<br />
|-<br />
|4||71722||73346||WARP.PCX|| [[PCX Format]] ||<br />
|-<br />
|5||145068||2880||SINCOS.DAT||720 floats||Sine / Cosine values for all angles from 0 to 359 degrees<br />
|-<br />
|6||147948||2000||RANDOM.DAT||1000 INT16LEs||Random number table<br />
|-<br />
|7||149948||384||GAMEPAL.PAL|| [[Hocus Pocus Palette Format]] ||<br />
|-<br />
|8||150332||384||MENUPAL.PAL|| [[Hocus Pocus Palette Format]] ||<br />
|-<br />
|9||150716||5124||BOTTOM.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|10||155840||12484||HOCUS.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|11||168324||1348||HUDSTUFF.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|12||169672||12804||NEW_HUD.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|13||182476||12804||OLD_HUD.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|14||195280||1924||BULLIT.IMG|| [[Hocus Pocus Image Format]] ||<br />
|-<br />
|15||197204||10142||DEMO1.DMO|| [[Hocus Pocus Demo Format]] ||<br />
|-<br />
|16||207346||9746||DEMO2.DMO|| [[Hocus Pocus Demo Format]] ||<br />
|-<br />
|17||217092||4562||DEMO3.DMO|| [[Hocus Pocus Demo Format]] ||<br />
|-<br />
|18||221654||5990||DEMO4.DMO|| [[Hocus Pocus Demo Format]] ||<br />
|-<br />
|19||227644||8234||DEMO5.DMO|| [[Hocus Pocus Demo Format]] ||<br />
|-<br />
|20||235878||6430||CREDITS1.PCX|| [[PCX Format]] ||<br />
|-<br />
|21||242308||7679||CREDITS2.PCX|| [[PCX Format]] ||<br />
|-<br />
|22||249987||5764||CREDITS3.PCX|| [[PCX Format]] ||<br />
|-<br />
|23||255751||7156||CREDITS4.PCX|| [[PCX Format]] ||<br />
|-<br />
|24||262907||7206||CREDITS5.PCX|| [[PCX Format]] ||<br />
|-<br />
|25||270113||9932||CREDITS6.PCX|| [[PCX Format]] ||<br />
|-<br />
|26||280045||5489||CREDITS7.PCX|| [[PCX Format]] ||<br />
|-<br />
|27||285534||12661||CREDITS8.PCX|| [[PCX Format]] ||<br />
|-<br />
|28||298195||10500||HELP1_K.PCX|| [[PCX Format]] ||<br />
|-<br />
|29||308695||10620||HELP1_J.PCX|| [[PCX Format]] ||<br />
|-<br />
|30||319315||12315||HELP2.PCX|| [[PCX Format]] ||<br />
|-<br />
|31||331630||10875||HELP3.PCX|| [[PCX Format]] ||<br />
|-<br />
|32||342505||64768||PREVIEW1|| 768-byte [[VGA Palette]] (6-bit RGB) followed by 8bpp image split into 16 planes ||<br />
|-<br />
|33||407273||64768||PREVIEW2|| 768-byte [[VGA Palette]] (6-bit RGB) followed by 8bpp image split into 16 planes ||<br />
|-<br />
|34||472041||64768||PREVIEW3|| 768-byte [[VGA Palette]] (6-bit RGB) followed by 8bpp image split into 16 planes ||<br />
|-<br />
|35||536809||64768||PREVIEW4|| 768-byte [[VGA Palette]] (6-bit RGB) followed by 8bpp image split into 16 planes ||<br />
|-<br />
|36||601577||64768||PREVIEW5|| 768-byte [[VGA Palette]] (6-bit RGB) followed by 8bpp image split into 16 planes ||<br />
|-<br />
|37||666345||64768||PREVIEW6|| 768-byte [[VGA Palette]] (6-bit RGB) followed by 8bpp image split into 16 planes ||<br />
|-<br />
|38||731113||64768||PREVIEW7|| 768-byte [[VGA Palette]] (6-bit RGB) followed by 8bpp image split into 16 planes ||<br />
|-<br />
|39||795881||64768||PREVIEW8|| 768-byte [[VGA Palette]] (6-bit RGB) followed by 8bpp image split into 16 planes ||<br />
|-<br />
|40||860649||64768||PREVIEW9|| 768-byte [[VGA Palette]] (6-bit RGB) followed by 8bpp image split into 16 planes ||<br />
|-<br />
|41||925417||64768||PREVIEW10|| 768-byte [[VGA Palette]] (6-bit RGB) followed by 8bpp image split into 16 planes ||<br />
|-<br />
|42||990185||1686||ORDER1.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|43||991871||1686||ORDER2.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|44||993557||1686||ORDER3.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|45||995243||1686||ORDER4.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|46||996929||1686||ORDER5.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|47||998615||1686||ORDER6.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|48||1000301||1686||ORDER7.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|49||1001987||1686||ORDER8.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|50||1003673||1686||ORDER9.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|51||1005359||1686||ORDER10.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|52||1007045||1686||ORDER11.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|53||1008731||1686||ORDER12.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|54||1010417||1686||ORDER13.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|55||1012103||1686||ORDER14.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|56||1013789||1686||ORDER15.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|57||1015475||1686||ORDER16.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|58||1017161||1686||ORDER17.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|59||1018847||1686||ORDER18.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|60||1020533||1686||ORDER19.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|61||1022219||1686||ORDER20.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|62||1023905||1686||ORDER21.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|63||1025591||1686||ORDER22.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|64||1027277||1686||REGISTER.PAG|| [[Hocus Pocus Text Format]] ||<br />
|-<br />
|65||1028963||384||BACK01.PAL|| [[Hocus Pocus Palette Format]] ||<br />
|-<br />
|66||1029347||384||BACK02.PAL|| [[Hocus Pocus Palette Format]] ||<br />
|-<br />
|67||1029731||384||BACK03.PAL|| [[Hocus Pocus Palette Format]] ||<br />
|-<br />
|68||1030115||384||BACK04.PAL|| [[Hocus Pocus Palette Format]] ||<br />
|-<br />
|69||1030499||34000||BACK01.PCX|| [[PCX Format]] ||<br />
|-<br />
|70||1064499||48085||BACK02.PCX|| [[PCX Format]] ||<br />
|-<br />
|71||1112584||33432||BACK03.PCX|| [[PCX Format]] ||<br />
|-<br />
|72||1146016||45319||BACK04.PCX|| [[PCX Format]] ||<br />
|-<br />
|73||1191335||17816||TILES01.PCX|| [[PCX Format]] ||<br />
|-<br />
|74||1209151||28301||TILES02.PCX|| [[PCX Format]] ||<br />
|-<br />
|75||1237452||30052||TILES03.PCX|| [[PCX Format]] ||<br />
|-<br />
|76||1267504||20056||TILES04.PCX|| [[PCX Format]] ||<br />
|-<br />
|77||1287560||39249||WIN.PCX|| [[PCX Format]] ||<br />
|-<br />
|78||1326809||381555||SPRITES.SPR||[[Hocus Pocus Sprite Format]]||<br />
|-<br />
|79||1708364||8||E1L1.000||Player Coordinates||<br />
|-<br />
|80||1708372||8||E1L2.000||Player Coordinates||<br />
|-<br />
|81||1708380||8||E1L3.000||Player Coordinates||<br />
|-<br />
|82||1708388||8||E1L4.000||Player Coordinates||<br />
|-<br />
|83||1708396||8||E1L5.000||Player Coordinates||<br />
|-<br />
|84||1708404||8||E1L6.000||Player Coordinates||<br />
|-<br />
|85||1708412||8||E1L7.000||Player Coordinates||<br />
|-<br />
|86||1708420||8||E1L8.000||Player Coordinates||<br />
|-<br />
|87||1708428||8||E1L9.000||Player Coordinates||<br />
|-<br />
|88||1708436||724||E1L1.001||Tile Animation Settings||<br />
|-<br />
|89||1709160||724||E1L2.001||Tile Animation Settings||<br />
|-<br />
|90||1709884||724||E1L3.001||Tile Animation Settings||<br />
|-<br />
|91||1710608||724||E1L4.001||Tile Animation Settings||<br />
|-<br />
|92||1711332||724||E1L5.001||Tile Animation Settings||<br />
|-<br />
|93||1712056||724||E1L6.001||Tile Animation Settings||<br />
|-<br />
|94||1712780||724||E1L7.001||Tile Animation Settings||<br />
|-<br />
|95||1713504||724||E1L8.001||Tile Animation Settings||<br />
|-<br />
|96||1714228||724||E1L9.001||Tile Animation Settings||<br />
|-<br />
|97||1714952||5040||E1L1.002||Message Texts||<br />
|-<br />
|98||1719992||5040||E1L2.002||Message Texts||<br />
|-<br />
|99||1725032||5040||E1L3.002||Message Texts||<br />
|-<br />
|100||1730072||5040||E1L4.002||Message Texts||<br />
|-<br />
|101||1735112||5040||E1L5.002||Message Texts||<br />
|-<br />
|102||1740152||5040||E1L6.002||Message Texts||<br />
|-<br />
|103||1745192||5040||E1L7.002||Message Texts||<br />
|-<br />
|104||1750232||5040||E1L8.002||Message Texts||<br />
|-<br />
|105||1755272||5040||E1L9.002||Message Texts||<br />
|-<br />
|106||1760312||40||E1L1.003||Teleporter Coordinates||<br />
|-<br />
|107||1760352||40||E1L2.003||Teleporter Coordinates||<br />
|-<br />
|108||1760392||40||E1L3.003||Teleporter Coordinates||<br />
|-<br />
|109||1760432||40||E1L4.003||Teleporter Coordinates||<br />
|-<br />
|110||1760472||40||E1L5.003||Teleporter Coordinates||<br />
|-<br />
|111||1760512||40||E1L6.003||Teleporter Coordinates||<br />
|-<br />
|112||1760552||40||E1L7.003||Teleporter Coordinates||<br />
|-<br />
|113||1760592||40||E1L8.003||Teleporter Coordinates||<br />
|-<br />
|114||1760632||40||E1L9.003||Teleporter Coordinates||<br />
|-<br />
|115||1760672||506||E1L1.004||Switch Coordinates||<br />
|-<br />
|116||1761178||506||E1L2.004||Switch Coordinates||<br />
|-<br />
|117||1761684||506||E1L3.004||Switch Coordinates||<br />
|-<br />
|118||1762190||506||E1L4.004||Switch Coordinates||<br />
|-<br />
|119||1762696||506||E1L5.004||Switch Coordinates||<br />
|-<br />
|120||1763202||506||E1L6.004||Switch Coordinates||<br />
|-<br />
|121||1763708||506||E1L7.004||Switch Coordinates||<br />
|-<br />
|122||1764214||506||E1L8.004||Switch Coordinates||<br />
|-<br />
|123||1764720||506||E1L9.004||Switch Coordinates||<br />
|-<br />
|124||1765226||300||E1L1.005||Insert Data Coordinates||<br />
|-<br />
|125||1765526||300||E1L2.005||Insert Data Coordinates||<br />
|-<br />
|126||1765826||300||E1L3.005||Insert Data Coordinates||<br />
|-<br />
|127||1766126||300||E1L4.005||Insert Data Coordinates||<br />
|-<br />
|128||1766426||300||E1L5.005||Insert Data Coordinates||<br />
|-<br />
|129||1766726||300||E1L6.005||Insert Data Coordinates||<br />
|-<br />
|130||1767026||300||E1L7.005||Insert Data Coordinates||<br />
|-<br />
|131||1767326||300||E1L8.005||Insert Data Coordinates||<br />
|-<br />
|132||1767626||300||E1L9.005||Insert Data Coordinates||<br />
|-<br />
|133||1767926||300||E1L1.006||Keyhole Coordinates||<br />
|-<br />
|134||1768226||300||E1L2.006||Keyhole Coordinates||<br />
|-<br />
|135||1768526||300||E1L3.006||Keyhole Coordinates||<br />
|-<br />
|136||1768826||300||E1L4.006||Keyhole Coordinates||<br />
|-<br />
|137||1769126||300||E1L5.006||Keyhole Coordinates||<br />
|-<br />
|138||1769426||300||E1L6.006||Keyhole Coordinates||<br />
|-<br />
|139||1769726||300||E1L7.006||Keyhole Coordinates||<br />
|-<br />
|140||1770026||300||E1L8.006||Keyhole Coordinates||<br />
|-<br />
|141||1770326||300||E1L9.006||Keyhole Coordinates||<br />
|-<br />
|142||1770626||240||E1L1.007||Tile Properties?||<br />
|-<br />
|143||1770866||240||E1L2.007||Tile Properties?||<br />
|-<br />
|144||1771106||240||E1L3.007||Tile Properties?||<br />
|-<br />
|145||1771346||240||E1L4.007||Tile Properties?||<br />
|-<br />
|146||1771586||240||E1L5.007||Tile Properties?||<br />
|-<br />
|147||1771826||240||E1L6.007||Tile Properties?||<br />
|-<br />
|148||1772066||240||E1L7.007||Tile Properties?||<br />
|-<br />
|149||1772306||240||E1L8.007||Tile Properties?||<br />
|-<br />
|150||1772546||240||E1L9.007||Tile Properties?||<br />
|-<br />
|151||1772786||8000||E1L1.008||Enemy Trigger Table||<br />
|-<br />
|152||1780786||8000||E1L2.008||Enemy Trigger Table||<br />
|-<br />
|153||1788786||8000||E1L3.008||Enemy Trigger Table||<br />
|-<br />
|154||1796786||8000||E1L4.008||Enemy Trigger Table||<br />
|-<br />
|155||1804786||8000||E1L5.008||Enemy Trigger Table||<br />
|-<br />
|156||1812786||8000||E1L6.008||Enemy Trigger Table||<br />
|-<br />
|157||1820786||8000||E1L7.008||Enemy Trigger Table||<br />
|-<br />
|158||1828786||8000||E1L8.008||Enemy Trigger Table||<br />
|-<br />
|159||1836786||8000||E1L9.008||Enemy Trigger Table||<br />
|-<br />
|160||1844786||14400||E1L1.009||Background Layer||<br />
|-<br />
|161||1859186||14400||E1L2.009||Background Layer||<br />
|-<br />
|162||1873586||14400||E1L3.009||Background Layer||<br />
|-<br />
|163||1887986||14400||E1L4.009||Background Layer||<br />
|-<br />
|164||1902386||14400||E1L5.009||Background Layer||<br />
|-<br />
|165||1916786||14400||E1L6.009||Background Layer||<br />
|-<br />
|166||1931186||14400||E1L7.009||Background Layer||<br />
|-<br />
|167||1945586||14400||E1L8.009||Background Layer||<br />
|-<br />
|168||1959986||14400||E1L9.009||Background Layer||<br />
|-<br />
|169||1974386||14400||E1L1.010||Main Map Layer||<br />
|-<br />
|170||1988786||14400||E1L2.010||Main Map Layer||<br />
|-<br />
|171||2003186||14400||E1L3.010||Main Map Layer||<br />
|-<br />
|172||2017586||14400||E1L4.010||Main Map Layer||<br />
|-<br />
|173||2031986||14400||E1L5.010||Main Map Layer||<br />
|-<br />
|174||2046386||14400||E1L6.010||Main Map Layer||<br />
|-<br />
|175||2060786||14400||E1L7.010||Main Map Layer||<br />
|-<br />
|176||2075186||14400||E1L8.010||Main Map Layer||<br />
|-<br />
|177||2089586||14400||E1L9.010||Main Map Layer||<br />
|-<br />
|178||2103986||14400||E1L1.011||Insert Data Layer||<br />
|-<br />
|179||2118386||14400||E1L2.011||Insert Data Layer||<br />
|-<br />
|180||2132786||14400||E1L3.011||Insert Data Layer||<br />
|-<br />
|181||2147186||14400||E1L4.011||Insert Data Layer||<br />
|-<br />
|182||2161586||14400||E1L5.011||Insert Data Layer||<br />
|-<br />
|183||2175986||14400||E1L6.011||Insert Data Layer||<br />
|-<br />
|184||2190386||14400||E1L7.011||Insert Data Layer||<br />
|-<br />
|185||2204786||14400||E1L8.011||Insert Data Layer||<br />
|-<br />
|186||2219186||14400||E1L9.011||Insert Data Layer||<br />
|-<br />
|187||2233586||28800||E1L1.012||Info Layer||<br />
|-<br />
|188||2262386||28800||E1L2.012||Info Layer||<br />
|-<br />
|189||2291186||28800||E1L3.012||Info Layer||<br />
|-<br />
|190||2319986||28800||E1L4.012||Info Layer||<br />
|-<br />
|191||2348786||28800||E1L5.012||Info Layer||<br />
|-<br />
|192||2377586||28800||E1L6.012||Info Layer||<br />
|-<br />
|193||2406386||28800||E1L7.012||Info Layer||<br />
|-<br />
|194||2435186||28800||E1L8.012||Info Layer||<br />
|-<br />
|195||2463986||28800||E1L9.012||Info Layer||<br />
|-<br />
|196||2492786||3756||MUSIC01.IMF||[[IMF Format]]||<br />
|-<br />
|197||2496542||12608||MUSIC02.IMF||[[IMF Format]]||<br />
|-<br />
|198||2509150||9500||MUSIC03.IMF||[[IMF Format]]||<br />
|-<br />
|199||2518650||11476||MUSIC04.IMF||[[IMF Format]]||<br />
|-<br />
|200||2530126||9752||MUSIC05.IMF||[[IMF Format]]||<br />
|-<br />
|201||2539878||11988||MUSIC06.IMF||[[IMF Format]]||<br />
|-<br />
|202||2551866||12320||MUSIC07.IMF||[[IMF Format]]||<br />
|-<br />
|203||2564186||15096||MUSIC08.IMF||[[IMF Format]]||<br />
|-<br />
|204||2579282||15984||MUSIC09.IMF||[[IMF Format]]||<br />
|-<br />
|205||2595266||11844||MUSIC10.IMF||[[IMF Format]]||<br />
|-<br />
|206||2607110||28116||MUSIC11.IMF||[[IMF Format]]||<br />
|-<br />
|207||2635226||15571||SOUND01.VOC|| [[VOC Format]] ||<br />
|-<br />
|208||2650797||1000||SOUND01.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|209||2651797||9176||SOUND02.VOC|| [[VOC Format]] ||<br />
|-<br />
|210||2660973||16744||SOUND03.VOC|| [[VOC Format]] ||<br />
|-<br />
|211||2677717||18682||SOUND04.VOC|| [[VOC Format]] ||<br />
|-<br />
|212||2696399||11233||SOUND05.VOC|| [[VOC Format]] ||<br />
|-<br />
|213||2707632||7137||SOUND06.VOC|| [[VOC Format]] ||<br />
|-<br />
|214||2714769||400||SOUND06.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|215||2715169||9525||SOUND07.VOC|| [[VOC Format]] ||<br />
|-<br />
|216||2724694||200||SOUND07.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|217||2724894||3114||SOUND08.VOC|| [[VOC Format]] ||<br />
|-<br />
|218||2728008||400||SOUND08.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|219||2728408||4097||SOUND09.VOC|| [[VOC Format]] ||<br />
|-<br />
|220||2732505||1000||SOUND09.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|221||2733505||3490||SOUND10.VOC|| [[VOC Format]] ||<br />
|-<br />
|222||2736995||1000||SOUND10.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|223||2737995||5689||SOUND11.VOC|| [[VOC Format]] ||<br />
|-<br />
|224||2743684||1200||SOUND11.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|225||2744884||5790||SOUND12.VOC|| [[VOC Format]] ||<br />
|-<br />
|226||2750674||80||SOUND13.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|227||2750754||9163||SOUND14.VOC|| [[VOC Format]] ||<br />
|-<br />
|228||2759917||1000||SOUND14.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|229||2760917||6043||SOUND15.VOC|| [[VOC Format]] ||<br />
|-<br />
|230||2766960||400||SOUND15.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|231||2767360||9817||SOUND16.VOC|| [[VOC Format]] ||<br />
|-<br />
|232||2777177||1200||SOUND16.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|233||2778377||4329||SOUND17.VOC|| [[VOC Format]] ||<br />
|-<br />
|234||2782706||1000||SOUND17.SFX|| [[Hocus Pocus SFX Format]] ||<br />
|-<br />
|235||2783706||4000||DOSMSG.BIN|| [[B800 Text]] ||<br />
|}<br />
<br />
== Identifying files ==<br />
<br />
Since there are no filenames in this format, some other method needs to be used to identify files (to avoid uninteresting names like FILE001.DAT, FILE002.DAT, etc.)<br />
<br />
One method is to scan the first few bytes of each file, and if it's a known signature the file type can be identified. A few examples of known file formats used by Hocus Pocus and how to identify them are shown below.<br />
<br />
{|class="wikitable"<br />
!Initial Bytes!!Fixed Size||File Type!!File Format<br />
|-<br />
|0x0A 0x05||-||Image||[[PCX Format]]<br />
|-<br />
|"Creative Voice File" 0x1A||-||Digital audio||[[VOC Format]]<br />
|-<br />
|"MThd"||-||Background music||[[MID Format]]<br />
|-<br />
||-||14400 bytes||Map layer||[[Hocus Pocus Map Format]]<br />
|-<br />
||-||28800 bytes||Map event layer||[[Hocus Pocus Map Format]]<br />
|-<br />
||-||384 bytes||VGA palette||[[Hocus Pocus Palette Format]]<br />
|-<br />
||-||4000 bytes||Text screen||[[B800 Text]]<br />
|}<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Wombat]]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[HocusEditor]]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Malvineous|Malvineous]], with contributions from [[User:Spinal|Spinal]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=EPF_Format&diff=11749EPF Format2024-02-18T06:16:41Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 65,535<br />
| FAT = End<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = Y<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Alien Breed Tower Assault}}<br />
{{Game|Arcade Pool}}<br />
{{Game|Kingpin: Arcade Sports Bowling}}<br />
{{Game|Mr Blobby}}<br />
{{Game|Overdrive}}<br />
{{Game|Project X}}<br />
{{Game|Sensible Golf}}<br />
{{Game|Speed Demons}}<br />
{{Game|Spirou}}<br />
{{Game|The Adventures of Tintin: Prisoners of the Sun}}<br />
{{Game|The Jungle Book}}<br />
{{Game|The Lion King}}<br />
{{Game|The Smurfs}}<br />
{{Game|Tintin in Tibet}}<br />
{{Game|Universe}}<br />
}}<br />
The '''EPF Format''' is a file format used in many games. These games were (probably?) all made by East Point Software, so EPF (a shortened version of "EPFS" from the file header) probably stands for "East Point File System" or something similar.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
The first four bytes in the file are "EPFS", followed by a [[UINT32LE]] offset (so that value must be smaller than the total file size.)<br />
<br />
=== Header ===<br />
<br />
{|class="wikitable"<br />
!Data type!!Description<br />
|-<br />
|[[BYTE]] signature[4]||"EPFS"<br />
|-<br />
|[[UINT32LE]] fatOffset||Offset of the FAT<br />
|-<br />
|[[UINT8]] unknown||{{TODO|Unknown, always zero - flags?}}<br />
|-<br />
|[[UINT16LE]] numFiles||Number of files<br />
|}<br />
<br />
The data for the first file starts immediately after the header (i.e. file offset 11.)<br />
<br />
=== File entry ===<br />
<br />
At offset <tt>fatOffset</tt> sits a list of file entries. The following structure is repeated until the end of the file.<br />
<br />
{|class="wikitable"<br />
!Data type!!Description<br />
|-<br />
|[[BYTE]] filename[13]||Filename (NULL-terminated)<br />
|-<br />
|[[UINT8]] compressionFlag||0 for "file is not compressed", 1 for "file is compressed"<br />
|-<br />
|[[UINT32LE]] compressedSize||size of the compressed file<br />
|-<br />
|[[UINT32LE]] decompressedSize||size of the file after decompression<br />
|}<br />
<br />
In order to calculate the offset of each file, a running total is required. It should start at offset 11 (just after the header), then the <tt>compressedSize</tt> should be added to reveal the offset of the next file.<br />
<br />
=== Compression ===<br />
<br />
The compression scheme is [[LZW compression|LZW]], with a dynamic bit length from 9 to 14.<br />
<br />
The bits are stored in big-endian byte order, in contrast to e.g. Apogee/id LZW. For example:<br />
<br />
12 34 56 // bytes in compressed data file<br />
00010010 00110100 01010110 // converted to 8-bit binary<br />
000100100 011010001 010110 // bits read in big-endian order (Lion King)<br />
000010010 100011010 010101 // bits read in little-endian order (id/Apogee)<br />
^...go here ^bits from here...<br />
<br />
Although it uses a "normal" LZW algorithm, there are a few differences:<br />
<br />
* There are no reserved codewords at the beginning of the dictionary, so the first valid (9-bit) codeword is 0x100.<br />
* When the dictionary is reset, the bit length is unchanged.<br />
* The two largest possible codewords (at the current bit length) are reserved. The largest codeword is used to signify the end of the data, and the second largest codeword is used to reset the dictionary.<br />
* Once the third-largest codeword is encountered and processed (this is the largest valid/non-reserved codeword - 1021 for 10-bit codes) the bit length is incremented.<br />
<br />
The reserved codewords deserve a little extra explanation. For a 10-bit codeword length, the largest possible value that can fit in ten bits is (1<<10)-1 == 1023, so a codeword of 1023 signifies the end of the data. A codeword of 1022 (one less than the maximum) will reset the dictionary, but leave the codeword length unchanged (10-bits in this example), although in reality it would not make sense to encounter a dictionary-reset codeword until the dictionary has reached its maximum size, i.e. 14-bit codewords are in use.<br />
<br />
Keep in mind that these reserved codewords must be processed before the LZW decoder sees them, otherwise it will treat them as lookups into the dictionary, resulting in out of range accesses. Also remember that once the bit length increases, the two reserved codewords will change, as the maximum codeword value has increased. This frees up the "old" reserved codewords which are then used as normal codewords.<br />
<br />
At least one EPF file (OVER.EPF from the game "Overdrive") contains corrupted files (4X43.MAP and 4X44.MAP), apparently due to a bug in the original compression algorithm when the files were created. No tools are able to extract these files, and the levels are unplayable in the game (which crashes with an error.)<br />
<br />
=== Hidden data ===<br />
<br />
Nothing requires the FAT to sit directly after the last file, and because the offset is specified in the header, it is possible to store the FAT much further past the end of the last file. This can be done to provide a block of data between the end of the last file and the start of the FAT which is effectively hidden, as it does not belong to any file in the archive.<br />
<br />
While none of the official files seem to do this, it is nonetheless an interesting possibility. The Camoto tool makes this space available as a "comment" field.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = No<br />
| editHidden = Yes<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = Yes<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [http://www.ctpax-x.org/?goto=files&show=103 East Point Software .EPF file unpacker]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = No<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=DAT_Format_(Wacky_Wheels)&diff=11748DAT Format (Wacky Wheels)2024-02-18T06:16:41Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 65,535<br />
| FAT = Embedded<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Wacky Wheels}}<br />
}}<br />
The '''DAT format''' is used to store most of the data for [[Wacky Wheels]]. Unfortunately the format has no signature and a generic filename extension (.dat) so automatic detection of these files is difficult.<br />
<br />
In [http://yellowantphil.com/wacky_wheels/downloads/1ww10.zip Wacky Wheels 1.0] (a pre-release version of Wacky Wheels), this file was named <tt>WACKY.LID</tt>.<br />
<br />
Wacky Wheels does not check the current directory for files before falling back to the DAT file, so any changed files must be merged into the DAT file before the game will see them.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
There is no signature for this format. One method to identify files is to read in the file entries (failing if the end of the file is reached early) and confirm that each filename only consists of ASCII characters or nulls, and each file offset plus its size is less than the total size of the DAT file. It is extremely unlikely that this method would incorrectly identify a file.<br />
<br />
=== Header ===<br />
<br />
The file starts with a single field indicating the number of files present.<br />
<br />
{|class="wikitable"<br />
!Data type!!Description<br />
|-<br />
|UINT16LE numFiles||File count<br />
|}<br />
<br />
=== File entry ===<br />
<br />
After the two-byte header, the following structure is repeated <tt>numFiles</tt> times. As each entry includes both an offset and a size, it is possible (in theory) for two different files to share the same data, and to insert “hidden” data between files.<br />
<br />
{|class="wikitable"<br />
!Data type!!Description<br />
|-<br />
|BYTE filename[14]||Filename (8.3, 12 chars including dot, null padded to 14 chars)<br />
|-<br />
|UINT32LE size||File size<br />
|-<br />
|UINT32LE offset||File offset (see below)<br />
|}<br />
<br />
The file offsets don’t include the two-byte file count in the header, so an <tt>offset</tt> of 10 means the file actually starts at 12 bytes from the beginning of the DAT file.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Wombat]]<br />
| Platform = Windows GUI<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [http://sfprod.shikadi.net/old/games/wackywheels.htm#extractor wextract]<br />
| Platform = DOS<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=RES_Format_(Boppin)&diff=11747RES Format (Boppin)2024-02-18T06:16:41Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Stub}}<br />
{{Archive Infobox<br />
| MaxFiles = Unlimited<br />
| FAT = Beginning<br />
| Names = N<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = Y<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Boppin'}}<br />
}}<br />
The '''Boppin RES Format''' is used by Boppin for storing game data. No filenames are saved, and files can be stored compressed or uncompressed.<br />
<br />
== File format ==<br />
<br />
The offsets and sizes of each file are stored in the file header. If a file is compressed, the size stored in the header is of the compressed size, so this can be used to accurately extract data from the RES file itself.<br />
<br />
{|class="wikitable"<br />
!Data type!!Name!!Description<br />
|-<br />
|UINT32LE||iOffset||Offset to the file at this index<br />
|-<br />
|UINT32LE||iSize||Size of data stored in RES file<br />
|}<br />
<br />
If <tt>iOffset</tt> is 0xFFFFFFFF or <tt>iSize</tt> is zero, this "slot" is unused and doesn't point to a file, so it should be ignored.<br />
<br />
This structure is repeated until a file offset plus its size points at or past the end of the RES file. (You could also keep reading until you reach the offset of the first file.)<br />
<br />
To access a file, you must seek to its offset as given in the header. At this offset, read in a UINT32LE. This value is the compressed file size. If it matches the value given in the header, then the file is compressed. If the value doesn't match then the file is uncompressed (and these four bytes are actually the start of the file itself.)<br />
<br />
If the file is compressed, read in another UINT32LE. This is the decompressed file size. The compressed data then follows.<br />
<br />
=== Compression ===<br />
<br />
The data is compressed using the LZSS algorithm. This still needs to be posted here, however the original Boppin programmer has released code for manipulating RES files and this code includes the LZSS algorithm - until the details are posted here, the code can be obtained easily enough (try asking on the [http://www.pckf.com PCKF])<br />
<br />
The compression code also contains this header:<br />
<br />
<pre><br />
/**************************************************************<br />
LZSS.C -- A Data Compression Program<br />
(tab = 4 spaces)<br />
***************************************************************<br />
4/6/1989 Haruhiko Okumura<br />
Use, distribute, and modify this program freely.<br />
Please send me your improved versions.<br />
PC-VAN SCIENCE<br />
NIFTY-Serve PAF01022<br />
CompuServe 74050,1022<br />
**************************************************************/<br />
</pre><br />
<br />
=== Filenames ===<br />
<br />
Since the RES format doesn't store any filenames, these would normally have to be automatically generated (e.g. file0001.bin, file0002.bin, etc.) Since the Boppin programmer has released some source code however, the original filenames can be obtained from there:<br />
<br />
<pre><br />
char *boppin_res[] = {<br />
"boppin.cfg",<br />
"candy.img",<br />
"candy.txb",<br />
"boppin.snd",<br />
"boppin.mus",<br />
"score.cfg",<br />
"walls.res",<br />
"floors.res",<br />
"elevator.til",<br />
"source.til",<br />
"bopping.til",<br />
"bckgnd.til",<br />
"prize.til",<br />
"monster.til",<br />
"misc.til",<br />
"char.til",<br />
"boppin.lvl", // doesn't seem to be boppin.lvl<br />
"<unknown>",<br />
"<unknown>",<br />
"<unknown>", // boppin.lvl seems to be here instead<br />
"<unknown>",<br />
"<unknown>",<br />
"<unknown>",<br />
"<unknown>",<br />
"endscrn.bin",<br />
"",<br />
""<br />
};<br />
<br />
char *boppin_mus[] = {<br />
"bopbop2.mid",<br />
"magnetic.mid",<br />
"frustrat.mid",<br />
"sapphire.mid",<br />
"opus43.mid",<br />
"foundat.mid",<br />
"feltibun.mid",<br />
"stumbum.mid",<br />
"starbop.mid",<br />
"bumble.mid",<br />
"skeptica.mid",<br />
"stabhapp.mid",<br />
"streets.mid",<br />
"dixie.mid",<br />
"lobero.mid",<br />
"apogee.mid"<br />
};<br />
<br />
char *boppin_snd[] = {<br />
"addcred.voc",<br />
"addlife.voc",<br />
"blkbnc1.voc",<br />
"blkbnc2.voc",<br />
"blkdrp.voc",<br />
"blockpsh.voc",<br />
"blockrez.voc",<br />
"bodythud.voc",<br />
"boikrez1.voc",<br />
"boikrez2.voc",<br />
"boikrez3.voc",<br />
"boiksui1.voc",<br />
"boiksui2.voc",<br />
"yeetrez1.voc",<br />
"yeetrez3.voc",<br />
"yeetsui1.voc",<br />
"yeetsu1a.voc",<br />
"yeetsui2.voc",<br />
"bonustim.voc",<br />
"bonustly.voc",<br />
"bophit.voc",<br />
"crying.voc",<br />
"ducking.voc",<br />
"elevator.voc",<br />
"explosn.voc",<br />
"foottap.voc",<br />
"jumpjoy.voc",<br />
"logo.voc",<br />
"logo2.voc",<br />
"logo3.voc",<br />
"ping.voc",<br />
"prizdrop.voc",<br />
"prize.voc",<br />
"prizelos.voc",<br />
"ptrnflsh.voc",<br />
"ptrnhit.voc",<br />
"refractr.voc",<br />
"walking.voc",<br />
"noteman.voc",<br />
"echotink.voc",<br />
"beefbras.voc",<br />
"cleanbas.voc",<br />
"deepbass.voc",<br />
"flickbas.voc",<br />
"jahrmark.voc",<br />
"licks.voc",<br />
"marimba.voc",<br />
"nightmar.voc",<br />
"piano.voc",<br />
"shaker.voc",<br />
"softtp12.voc",<br />
"strings1.voc",<br />
"synbuz.voc",<br />
"unknown.voc",<br />
"unknown2.voc"<br />
};<br />
</pre><br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = No<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Wombat]]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was discovered thanks to Stephen P. Lepisto, the original Boppin' programmer, supplying source code for the programs used in development to create the official .RES files. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=BNK_Format_(Halloween_Harry)&diff=11746BNK Format (Halloween Harry)2024-02-18T06:16:41Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = Unlimited<br />
| FAT = Embedded + External<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Halloween Harry}}<br />
}}<br />
The '''BNK (Bank) archive format''' is the format used by [[Halloween Harry]] to store a number of related game files. The format is trivial, being a collection of concurrent file chunks. Each BNK file has an associated FAT (File Allocation Table) file that provides quick access to the filenames, offset in the BNK file and size of the files stored in the BNK file. The FAT file however is usually not necessary to read data from the BNK file, all required information can be obtained by simply scanning said BNK file.<br />
<br />
Files in the BNK file may or may not be compressed. This depends on what version of the BNK format is being used.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
Each ''file entry'' begins with a signature, so the very first file entry's signature can be used to verify the main file in in .BNK format. This means at offset zero, there should be a character of code 0x04, followed by the four characters "-ID-" (see ''file entry'' below for more details.)<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[BYTE]][5] || signature || "\x04-ID-" (not null-terminated)<br />
|}<br />
<br />
Note that there are two versions of the .BNK format - the original [[Halloween Harry]] version (with no compression) and the later [[Alien Carnage]] version (with compression.) The version can be detected by using the following method:<br />
<br />
# Read in the first file header (see ''file entry'' below), in Halloween Harry format (i.e. pretend the ''iDecompressedSize'' field was not present.)<br />
# Use that information to jump to the second file within the main .BNK file.<br />
# Check for the "-ID-" signature at the start of the second file entry. If it's there (at the expected offset), then it's a non-compressed Halloween Harry .BNK file.<br />
# If the "-ID-" signature is missing, try again four bytes further in (making up for the ''iDecompressedSize'' field that we ignored in the first step.)<br />
# If the "-ID-" signature is now present, it's a compressed Alien Carnage .BNK file.<br />
# If the "-ID-" signature still can't be found, it's not a valid .BNK file.<br />
<br />
If there is a <tt>.FAT</tt> file and it is a multiple of 21, then it is in Halloween Harry format. Alien Carnage no longer uses the <tt>.FAT</tt> file.<br />
<br />
=== FAT format ===<br />
<br />
For Halloween Harry (not Alien Carnage), an external file (with the same name as the BNK file but with a <tt>.FAT</tt> extension) stores a summary of the files in the BNK file. It also stores file offsets for quick access. This file is not necessary to read the BNK archive (since the filenames are stored in both places) however it can provide a faster alternative for listing files compared to scanning through the entire BNK file. Of course if a BNK file is to be modified, then the FAT file will also need to be updated.<br />
<br />
Alien Carnage no longer uses the FAT file. {{TODO|Is this data stored somewhere else instead or is it no longer required?}}<br />
<br />
A FAT entry consists of a filename, offset and size.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT8]] || lenName || Length of the filename<br />
|-<br />
| [[char]][12] || filename || Filename, 12 chars long, but the name itself is only <tt>lenName</tt> characters long. Not null-terminated, but null-padded if needed.<br />
|-<br />
| [[UINT32LE]] || fileOffset || Offset of the file from the start of the BNK<br />
|-<br />
| [[UINT32LE]] || fileSize || Size of the file in bytes<br />
|}<br />
<br />
The very first file entry is at offset zero, and the above structure is repeated back-to-back until there are no more files. The offset given for each file is to the start of the file data itself, just after the header (in other words, the offset points to <tt>cData</tt> in the structure below.)<br />
<br />
=== File entry ===<br />
<br />
Each file entry in the BNK is similar to the entry in the external FAT file, with the addition of a signature and the omission of the offset, and of course the actual file data as well.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[BYTE]][5] || signature || "\x04-ID-" (not NULL-terminated)<br />
|-<br />
| [[UINT8]] || lenName || Length of the filename<br />
|-<br />
|[[char]][12] || filename || Filename, 12 chars long, but the name itself is only <tt>lenName</tt> characters long. Not null-terminated, but null-padded if needed.<br />
|-<br />
| [[UINT32LE]] || fileSize || Size of the file in bytes<br />
|-<br />
| [[UINT32LE]] || decompressedSize || ''Alien Carnage only:'' Size of the file in bytes, once it has been decompressed (this field is not present in Halloween Harry)<br />
|-<br />
| [[BYTE]][iFileSize] || data || File data<br />
|}<br />
<br />
The very first file entry is at offset zero, and the above structure is repeated back-to-back until there is no more data in the .BNK file.<br />
<br />
=== Compression format ===<br />
<br />
The files are compressed with the PKWare DCL Implode algorithm. Note that this is different to the PKZip Implode algorithm.<br />
<br />
Sample code:<br />
* Go<br />
** [https://github.com/JoshVarga/blast blast] (compress and decompress)<br />
* C<br />
** ACXTRACT<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = ACXTRACT<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = No<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
| notes = Algorithm is decompiled so only works on little-endian machines<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = No<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = No<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = No<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = No<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Wombat]]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = Yes<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = No<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Malvineous|Malvineous]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=GLB_Format_(Raptor)&diff=11745GLB Format (Raptor)2024-02-18T06:16:41Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 2<sup>31</sup>-1 (~2 billion)<br />
| FAT = Beginning<br />
| Names = Yes, 15 chars<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = Y<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Raptor}}<br />
}}<br />
<br />
The '''GLB Format''' is used by [[Raptor]] to store all the game data files. Most files are not encrypted, but those the author deemed easily identifiable (such as text files) are.<br />
<br />
== Signature ==<br />
<br />
Due to the encryption, and the fact that the first four bytes are always zero (after decryption), the file will always start with the byte sequence 64 9B D1 09.<br />
<br />
Beyond this, the usual checks of valid file offsets and sizes will work.<br />
<br />
== File format ==<br />
<br />
The File Allocation Table (FAT), which lists the filename, size and offset of each file within the archive, is encrypted. The FAT begins at offset 0 and the first entry (28 bytes) must be decrypted to obtain a count of the number of files in the archive. After decryption, the FAT is in the following structure:<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| [[UINT32LE]] || flags || 0=normal, 1=encrypted<br />
|-<br />
| [[UINT32LE]] || offset || Offset of the file data, relative to the start of the archive<br />
|-<br />
| [[UINT32LE]] || length || Size of the file data, in bytes<br />
|-<br />
| [[char]] || filename[16] || Null-terminated filename (15 chars + terminating null)<br />
|}<br />
<br />
The very first entry is not a real file, but is a header. The <tt>offset</tt> field of this entry contains the number of files in the FAT (not including this header entry itself.) The rest of the fields are unused and should be set to zero.<br />
<br />
The first file's data begins directly after the FAT, which will also be the <tt>offset</tt> value of the second FAT entry.<br />
<br />
Filenames are not unique. Images making up a sprite set can be identified by their filename, which will be the same for all sprites in that set.<br />
<br />
== Encryption algorithm ==<br />
<br />
The encryption key is the string "32768GLB".<br />
<br />
For each byte in the file:<br />
# Subtract the character value from the current position in the encryption key (i.e. if the current position is 0, subtract 0x33, the character code for "3")<br />
# Advance the position in the encryption key by one (i.e. go to the next letter)<br />
# If the end of the encryption key has been reached, go back to the first character<br />
# Subtract the value of the previous byte read (note the previous byte *read*, not the decrypted version of that byte)<br />
# Logical AND with 0xFF to limit the result to 0-255<br />
# This byte is now decoded, move on to the next<br />
<br />
Before performing the above loop, the initial state is as such:<br />
* The position in the encryption key (step 1) does not start at 0. Instead, it starts at 25 % <length of key>. In the case of the "32768GLB" key, the length is 8, so 25 mod 8 == 1, so the encryption key starts at position 1 (i.e. the first character of the key is skipped on the first run.) After the end of the encryption key is reached, it loops back to position 0 again.<br />
* The very first "previous byte read" value (step 4) is the actual key character at the initial position. As per the previous item in this list, if the initial key position is 1, this is key character "2", so the first "previous byte read" is the character "2" (hex 0x32).<br />
<br />
Be aware:<br />
* The game only decrypts one FAT entry at a time, so after 28 bytes the key and "previous byte read" must be set back to the initial state. Failure to do this has the effect of making every second FAT entry appear as random characters.<br />
* When decrypting file content, the whole file is decrypted in one go, so the previous point does not apply - the state variables are not reset to their initial state at any point during the decryption.<br />
* The pilot files apparently ({{TODO|untested}}) use the same encryption algorithm with the key "CASTLE" instead. They also decrypt in blocks of 88 bytes and 24 bytes, instead of the FAT's 28 bytes.<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [http://blackforest.heliohost.org/programs/glbext.php GLBExt]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = No<br />
| canCompress = N/A<br />
| editHidden = No<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format, including the decryption algorithm, was reverse engineered by [[User:Malvineous|Malvineous]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=WAD_Format&diff=11744WAD Format2024-02-18T06:16:41Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 2,147,483,648<br />
| FAT = Internal<br />
| Names = Yes, 8 chars max<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = Y<br />
| Games = <br />
{{Game|Doom}}<br />
{{Game|Duke Nukem 3D <!-- .RTS file, see below -->}}<br />
{{Game|Heretic}}<br />
{{Game|Hexen}}<br />
{{Game|Strife}}<br />
{{Game|Redneck Rampage <!-- .RTS file, see below -->}}<br />
{{Game|Rise of the Triad}}<br />
{{Game|Shadow Warrior <!-- .RTS file, see below -->}}<br />
}}<br />
The '''WAD''' ("Where's All the Data") '''Format''' is an archive file used by [[Doom]] and [[Rise of the Triad]], as well as Doom engine games such as [[Hexen]], [[Heretic]] and [[Strife]] to store individual game data files (known as ''lumps'') in a single large file. The files can be internal (IWAD) or external/patch (PWAD). Typically a game will only load one IWAD, but it can additionally load zero or more PWADs. Any PWADs specified override resources found in the IWAD. In this way, a mod can be entirely contained with a PWAD, and any lumps that were not modified do not have to be included in the PWAD as the game will automatically go back to the IWAD to load them.<br />
<br />
Despite BUILD games having their own [[GRP Format]] archives for game data, they also use WAD files in the form of [[RTS Format]] "RemoteRidicule" audio, first introduced with [[Rise of the Triad]].<br />
<br />
== File format ==<br />
<br />
The basic architecture is a header, followed by a variable sized 'directory', followed by the raw file data.<br />
<br />
=== Signature ===<br />
<br />
All WAD files begin with the WAD type, the number of files stored within, and where the filenames are located.<br />
<br />
{|class="wikitable"<br />
! Data type !! Field name !! Description<br />
|-<br />
| [[char]][4] || sig || "IWAD" or "PWAD", not NULL-terminated<br />
|-<br />
| [[INT32LE]] || numFiles || Number of files<br />
|-<br />
| [[INT32LE]] || offFAT || Offset of FAT (directory) from start of file<br />
|}<br />
<br />
The signature is followed immediately by a file entry structure, repeated <tt>numFiles</tt> times.<br />
<br />
=== File entry ===<br />
<br />
The directory associates names of lumps with the data that belong to them. It consists of <tt>numFiles</tt> 16-byte entries, one for each lump of data in the file. The name lacks a file extension as the games are programmed to recognize lumps by their format.<br />
<br />
{|class="wikitable"<br />
! Data type !! Field name !! Description<br />
|-<br />
| [[INT32LE]] || offData || Offset of lump's data (from start of WAD file)<br />
|-<br />
| [[INT32LE]] || lenData || Size of lump, in bytes<br />
|-<br />
| [[char]][8] || name || Name of lump, not NULL terminated but padded with 0x00 if necessary<br />
|}<br />
<br />
== Lumps ==<br />
<br />
More than one lump can have the same offset, if two files point to the same data. A lump may include (overlap) data from another lump. This makes extraction difficult. It is also notable that some lumps have an invalid size, usually 0 bytes. These are known as 'virtual lumps' and are basically placeholders, signalling the start and end of a certain collection of lumps that are related in some way.<br />
<br />
Note that the order of data lumps in the file does NOT have to be the same as that in the directory, some tools can import new data to a WAD, attaching it to the end of the file but leaving the directory entry where it is, 'jumbling' the order. The majority of lumps have no restrictions on where they must be located in WAD files, although there are typically some guidelines to make the file easily readable by other people. For certain lumps, however, the location is crucial. <br />
<br />
Some lumps are known by their names and apply to the game as a whole. Some of these are:<br />
<br />
* Sound effects<br />
* Music<br />
* PLAYPAL: Color palettes for various situations.<br />
* COLORMAP: Map to adjust pixel values for reduced brightness.<br />
* ENDOOM: Text displayed when vanilla Doom exits.<br />
* TEXTURE1, TEXTURE2, PNAMES: Data defining the wall textures.<br />
* DEMOs: Recorded games, auto-played before any level is started. <br />
<br />
=== Map data lumps ===<br />
<br />
A map in Doom is made up of several lumps, each containing specific data required to construct and execute the map. The first lump gives the internal name of the map. In Doom, this had to be in the form ExMy or MAPxx, where x and y could not exceed 4 and 9 respectively (Ultimate Doom), and xx could not exceed 32 (Doom 2/Final Doom). Other than defining the name of the map, the lump is usually empty but can contain data. The level name marks the start of this map. In order to work properly, the following lumps must follow immediately after the the level name:<br />
<br />
;THINGS<br />
: A lump listing all the Things present in this map: their X and Y coordinates, starting angles, type and flags. As with all of these lumps, this list will be generated by your level editor and should generally be left alone. 1 <br />
;LINEDEFS<br />
: A list of linedefs, defined by their starting and ending vertices, flags, type, tag, args, and front and back sidedefs (if any). Note: The standard Doom format does not contain args. <br />
;SIDEDEFS<br />
: A list of the sidedefs that are linked to the linedefs. These contain the data for what textures appear where on the side of each line, their X and Y offsets, and what sector this side of the linedef belongs to. <br />
;VERTEXES<br />
: A list of each vertex in the map, using X and Y coordinates. <br />
;SEGS<br />
: A list of line segments called "segs" that connect to form subsectors. Created by a node builder. <br />
;SSECTORS<br />
: A list of subsectors, created by a node builder. <br />
;NODES<br />
: The node tree which Doom uses to speed up the rendering process. Similar to a vismap in modern 3D games (such as Quake 3). Created by a node builder. <br />
;SECTORS<br />
: Defines the floor and ceiling heights and textures, as well as light value, tag, and type of each sector in your map. <br />
;REJECT<br />
: Optionally compiled by the node builder, this lump contains data about which sectors are visible from which other sectors. Originally, Doom used this to optimize the game speed by skipping AI routines for enemies whose target was in a rejected sector. Some modern source ports do not require this lump any more; ZDoom for example has been designed to work even without this lump present. For compatibility purposes, an empty (0-filled) REJECT lump should be included if nothing else. The REJECT lump can also be used to create certain special effects (sectors into which enemies cannot see, for example) if modified carefully. <br />
;BLOCKMAP<br />
: Collision-detection information which determines whether objects in a map are touching. <br />
;BEHAVIOR<br />
: Not originally a part of Doom, the BEHAVIOR lump was first used in Hexen and contains the compiled scripts that this map will use. Vanilla Doom and other ports designed for Doom only will crash when this lump is present because Hexen format levels are not compatible with Doom format levels. This lump must be present for Hexen format levels since it is the only way to tell if a map is in Hexen or Doom format. <br />
<br />
=== Flats, Sprites, and Patches ===<br />
<br />
These three resources must be located between special marker lumps so that Doom knows what it is looking at. Other than defining the beginning and end of a graphics section, these lumps contain no data and are 0 bytes long.<br />
<br />
The markers consist of names X_START and X_END, where X is the first 1 or 2 letters of the appropriate resource. For example, sprites should be located between S_START and S_END markers. SS_START and SS_END are usually used for user WAD files. Patches are not required to have any markers. Some lump management utilities require P_START and P_END. <br />
<br />
These markers are required by all versions of Doom:<br />
<br />
{|class="wikitable"<br />
! Start marker !! End marker !! Content<br />
|-<br />
| F_START || F_END || Flat delimiters<br />
|-<br />
| S_START || S_END || Sprite delimiters<br />
|}<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [http://slade.mancubus.net SLADE]<br />
| Platform = Windows/Mac<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [http://eureka-editor.sourceforge.net/ Eureka]<br />
| Platform = Windows/Mac/Linux<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Wombat]]<br />
| Platform = Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = No<br />
| canModify = ?<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== See also ==<br />
<br />
* [[RTS Format]] - RemoteRidicule files are in WAD format</div>Malvineoushttps://moddingwiki.shikadi.net/w/index.php?title=HOG_Format&diff=11743HOG Format2024-02-18T06:16:41Z<p>Malvineous: type=group -> type=archive</p>
<hr />
<div>{{Archive Infobox<br />
| MaxFiles = 250<br />
| FAT = Embedded<br />
| Names = Yes, 8.3<br />
| Metadata = None<br />
| Subdirectories = N<br />
| Compressed = N<br />
| Encrypted = N<br />
| Hidden = N<br />
| Games = <br />
{{Game|Descent}}<br />
}}<br />
The '''HOG format''' is used by [[Descent]] to store some of the game data.<br />
<br />
== File format ==<br />
<br />
=== Signature ===<br />
<br />
The file begins with the three characters "DHF", which presumably stands for Descent Hog Format.<br />
<br />
=== File entry ===<br />
<br />
After the signature, the file consists of one or more file entries, one after the other.<br />
<br />
{|class="wikitable"<br />
! Data type !! Name !! Description<br />
|-<br />
| char[13] || filename || Null-terminated 8.3 filename (lowercase, padded with \0)<br />
|-<br />
| UINT32LE || size || Length of the data<br />
|-<br />
| BYTE[size] || data || File content, <tt>size</tt> bytes of data<br />
|}<br />
<br />
=== Notes ===<br />
<br />
* Descent will refuse to load the HOG file if it contains more than 250 files.<br />
* Some websites erroneously report the signature as '''DHFmoon01.bbm''', but '''moon01.bbm''' is actually the first entry (a [[LBM Format|LBM File]]) of the DESCENT.HOG.<br />
* HOG appears to stand for the animal, as other files in Descent are named after pigs, like [[PIG Format|*.PIG]] or [[Descent 2 HAM Format|*.HAM]].<br />
<br />
== Tools ==<br />
<br />
{{BeginFileFormatTools|Type=archive}}<br />
{{FileFormatTool<br />
| Name = [[Camoto]]<br />
| Platform = Linux/Windows<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]<br />
| Platform = Any<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{FileFormatTool<br />
| Name = [[DMB2]]<br />
| Platform = Windows (16bit)<br />
| canExtract = Yes<br />
| canDecompress = N/A<br />
| canCreate = Yes<br />
| canModify = Yes<br />
| canCompress = N/A<br />
| editHidden = N/A<br />
| editMetadata = N/A<br />
}}<br />
{{EndFileFormatTools}}<br />
<br />
== Credits ==<br />
<br />
This file format was reverse engineered by [[User:Malvineous|Malvineous]]. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)</div>Malvineous