<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://moddingwiki.shikadi.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=CTPAX-X+Team</id>
	<title>ModdingWiki - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://moddingwiki.shikadi.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=CTPAX-X+Team"/>
	<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/wiki/Special:Contributions/CTPAX-X_Team"/>
	<updated>2026-05-30T01:35:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.11</generator>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Westwood_AUD_Format&amp;diff=12680</id>
		<title>Westwood AUD Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Westwood_AUD_Format&amp;diff=12680"/>
		<updated>2026-01-11T06:02:11Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: typo and link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Aud is a format from Westwood studios for storing game Music and Sound Effects.  Files typically hae a &amp;lt;tt&amp;gt;.AUD&amp;lt;/tt&amp;gt; extension. The extension is probably short for &amp;quot;Audio&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Aud is known to be used in Command and Conquer and Command and Conquer: Red Alert.  Most likely it&#039;s used in other Westwood Studios game too.  \[citation needed\]&lt;br /&gt;
&lt;br /&gt;
==File format==&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
The format starts with the following header.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|[[UINT16LE]]||Sample||Sample rate in Hz (typically 22,050Hz)&lt;br /&gt;
|-&lt;br /&gt;
|[[UINT32LE]]||FileSize||Size of file less the 12 byte header&lt;br /&gt;
|-&lt;br /&gt;
|[[UINT32LE]]||DecompressSize||Bytes required to hold the decompressed data (For users of really old languages where you have to pre size your data types)&lt;br /&gt;
|-&lt;br /&gt;
|[[UINT16LE]]||Flags||There&#039;s two.  First bit 0 = mono and 1 = stereo.  Second bit 0 = 8 bit and 1 = 16 bit&lt;br /&gt;
|-&lt;br /&gt;
|[[UINT16LE]]||AudioType||There&#039;s two types of audio compression 1=WW compressed, 99=IMA ADPCM&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Following this header are the actual frames of data.&lt;br /&gt;
&lt;br /&gt;
=== Frames data ===&lt;br /&gt;
&lt;br /&gt;
Each frame has the following header:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|[[UINT16LE]]||CompressedSize||Size of compressed data in bytes that follows this header)&lt;br /&gt;
|-&lt;br /&gt;
|[[UINT16LE]]||DecompressedSize||Size of decompressed data&lt;br /&gt;
|-&lt;br /&gt;
|[[UINT32LE]]||0000DEAF||Two bytes, always 0x0000DEAF (Deaf, get it?!)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If the compression is IMA ADPCM, indicated by 99 (0x63) in the type filed of the header, then the data contains 4 bit nibbles, which decompress using IMA ADPCM to 16 bit PCM samples.&lt;br /&gt;
&lt;br /&gt;
If the compression is WW compressed, indicated by 1 (0x01) in the type filed of the header, then the data is compressed using some clever Westwood compression system.  If you find out which one, please update this page.&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/ValeryAnisimovsky/GameAudioPlayer/tree/master/Specs Game Audio Player specs] - documentation and specification on various game audio formats including Westwood Aud (see &amp;quot;AUD3.txt&amp;quot; and &amp;quot;WS-AUD.txt&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
[[Category:Westwood Studios File Formats]]&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Chasm:_The_Rift&amp;diff=12392</id>
		<title>Chasm: The Rift</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Chasm:_The_Rift&amp;diff=12392"/>
		<updated>2025-06-28T22:38:23Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: this was actually well known format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
{{Game Infobox&lt;br /&gt;
 | Title = Chasm- The Rift.png &amp;lt;!-- Only because of the colon --&amp;gt;&lt;br /&gt;
 | Modded = Mod-Chasm- The Rift.png&lt;br /&gt;
 | Levels = Edit&lt;br /&gt;
 | Tiles = Edit&lt;br /&gt;
 | Sprites = No&lt;br /&gt;
 | Fullscreen = No&lt;br /&gt;
 | Sound = No&lt;br /&gt;
 | Music = No&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = Edit&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
&#039;&#039;&#039;Chasm: The Rift&#039;&#039;&#039; is an FPS game from the twilight of the DOS era, developed by Action Forms Ltd. and released in 1997.  The engine, contrary to popularly spread misinformation, is not based on [[Quake]] but appears to be an original, and has some interesting features but is also, for its time, somewhat limited regarding the level geometry that can be created.&lt;br /&gt;
&lt;br /&gt;
A level editor is included on the game CD, and some enemy and weapon stats can be modified using a plain text configuration, but certain other aspects of modifying the game (such as the 3D models) remain poorly understood.&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = csm.bin&lt;br /&gt;
 | Format = [[BIN Format (Chasm: The Rift)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Main data archive. Structure and archive formats differ between DOS (CSM.BIN) and the 2022 Remaster (csm.bin)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = chasm2.pal&lt;br /&gt;
 | Format = [[VGA Palette]] (6-bit version)&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Game palette&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = chasm.inf&lt;br /&gt;
 | Format = [[CHASM.INF]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Configures enemy and weapon stats&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.rgb&lt;br /&gt;
 | Format = 256x255 color index array&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Translucency tables&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.3o&lt;br /&gt;
 | Format = [[3O Format (Chasm: The Rift)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = 3D models (weapons, scenery)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.ani&lt;br /&gt;
 | Format = [[ANI Format (Chasm: The Rift)]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = &#039;&#039;&#039;&#039;&#039;DOS:&#039;&#039;&#039;&#039;&#039; Data to animate models.  &#039;&#039;&#039;&#039;&#039;2022 Remaster:&#039;&#039;&#039;&#039;&#039; ASCII text to determine keyframes for animation.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.car&lt;br /&gt;
 | Format = [[CAR Format (Chasm: The Rift)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Contain data for &amp;quot;living&amp;quot; entities (player, monsters)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.obj&lt;br /&gt;
 | Format = [[OBJ Format (Chasm: The Rift)]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Sprites {{TODO|Possibly multiple frames per file}}&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cel&lt;br /&gt;
 | Format = [http://justsolve.archiveteam.org/wiki/Animator_PIC/CEL Autodesk Animator PIC/CEL]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Textures and raster graphics&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.wav&lt;br /&gt;
 | Format = [[WAV Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sounds&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = resource.**&lt;br /&gt;
 | Format = [[RESOURCE (Chasm: The Rift)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Level data (definitions)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = process.**&lt;br /&gt;
 | Format = [[PROCESS (Chasm: The Rift)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Level data (action scripts)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = floors.**&lt;br /&gt;
 | Format = [[FLOORS (Chasm: The Rift)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Floor graphics associated with level&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = map.**&lt;br /&gt;
 | Format = [[MAP (Chasm: The Rift)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Level data&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = script.**&lt;br /&gt;
 | Format = [[SCRIPT (Chasm: The Rift)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Level data (cutscene scripts, not present in every level)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.raw&lt;br /&gt;
 | Format = Raw PCM audio, unsigned 8-bit PCM, mono, little-endian, 11025 Hz&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound effects&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.pcm&lt;br /&gt;
 | Format = Raw PCM audio, unsigned 8-bit PCM, mono, little-endian, 11025 Hz&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound effects&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.sfx&lt;br /&gt;
 | Format = Raw PCM audio, unsigned 8-bit PCM, mono, little-endian, 11025 Hz&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound effects&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = chasm.r??&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = {{TODO|Likely recorded gameplay with ?? corresponding to level number}}&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = chasm.key&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = {{TODO|Appears to be related to keyboard layout}}&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = menu.txt&lt;br /&gt;
 | Format = Plain Text&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = {{TODO|Appears to configure aspects of the game menu (possibly useful for translation only?)}}&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.flac&lt;br /&gt;
 | Format = [[wikipedia:FLAC|FLAC (Free Lossless Audio Codec)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = &#039;&#039;&#039;&#039;&#039;(2022 Remaster Only)&#039;&#039;&#039;&#039;&#039; music&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.gltf&lt;br /&gt;
 | Format = [[wikipedia:GlTF|glTF (Graphics Library Transmission Format)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = &#039;&#039;&#039;&#039;&#039;(2022 Remaster Only)&#039;&#039;&#039;&#039;&#039; geometry, monster, character and item models&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.png&lt;br /&gt;
 | Format = [[wikipedia:PNG|PNG (Portable Network Graphics)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = &#039;&#039;&#039;&#039;&#039;(2022 Remaster Only)&#039;&#039;&#039;&#039;&#039; Textures used for walls, geometry models, item models and character models&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.ttf and *.otf&lt;br /&gt;
 | Format = [[wikipedia:TrueType|TrueType Font]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = &#039;&#039;&#039;&#039;&#039;(2022 Remaster Only)&#039;&#039;&#039;&#039;&#039; In-game fonts (accessibility mode only)&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
==Source Ports and Reimplementations==&lt;br /&gt;
===DOS===&lt;br /&gt;
The original 1997 version of the game.&lt;br /&gt;
&lt;br /&gt;
===2022 Remaster===&lt;br /&gt;
An official remaster of the game was released in 2022 by General Arcade and SNEG for Windows (decent compatibility for Linux via Proton has been reported). This version of the game includes a new fully featured release of the game, the DOS version with DOSBox, a three level addon pack (including two additional monsters and a boss), and level editing software. &#039;Modding Manual.pdf&#039; is also included, which contains notes on how to modify parts of the game for this new version.&lt;br /&gt;
&lt;br /&gt;
The 2022 Remaster uses .gltf and .png files for easier modding, rather than the legacy file types from the DOS version. Having said this, the 2022 Remaster also has the ability to convert these legacy file types, making mods for the DOS version compatible with the rerelease.&lt;br /&gt;
&lt;br /&gt;
===PanzerChasm===&lt;br /&gt;
PanzerChasm was a project to reverse-engineer and re-implement the game&#039;s engine, being worked on by Artöm &amp;quot;Panzerschrek&amp;quot; Kunz. It can be found at:&lt;br /&gt;
&lt;br /&gt;
https://github.com/Panzerschrek/Chasm-Reverse&lt;br /&gt;
&lt;br /&gt;
Due to some changes in the way PanzerChasm works, some map-packs and mods might have compatibility issues unless they were specifically designed for this source port.&lt;br /&gt;
&lt;br /&gt;
Panzerschrek has confirmed that PanzerChasm is no longer in active development and that elements of it were used, with permission, for the Remastered version of the game released in 2022. Panzerschrek is noted in the credits of the 2022 Remaster.&lt;br /&gt;
==Modding Tools==&lt;br /&gt;
===Chasm Modding Toolkit Package===&lt;br /&gt;
[https://www.moddb.com/games/chasm-the-rift/downloads/chasm-modding-toolkit-package Chasm Modding Toolkit Package] is a comprehensive Windows package for customizing and modding game assets for both DOS and 2022 Remaster version of Chasm the Rift. It supports CAR, OBJ, CEL and SPR formats for models, sprites, textures, animations and many more. You can extract, replace and preview textures, edit palettes, import/export audio, generate skyboxes and cube maps, and view assets with dedicated GUI or CLI tools.&lt;br /&gt;
===AwesomeChasm===&lt;br /&gt;
[https://www.github.com/jopadan/AwesomeChasm AwesomeChasm] is a Chasm: The Rift URL collection with 3D Format documentation.&lt;br /&gt;
&lt;br /&gt;
==DOS Specifics==&lt;br /&gt;
===Archive and addons===&lt;br /&gt;
Most of the files listed above are normally stored inside CSM.BIN.  However, an addon loaded with the &amp;quot;-addon:&amp;lt;addon_dir&amp;gt;&amp;quot; game parameter can read replacement files from an open directory structure, provided that they are placed in the correctly named subdirectory.&lt;br /&gt;
&lt;br /&gt;
===Levels, cutscenes===&lt;br /&gt;
Levels are not stored in a single file, but several files with an extension .01, .02 etc. corresponding to the level number.  The process.**, script.** and resource.** files are in plain text; process defines action scripts using a scripting language explained in the level editor documentation, script defines a cutscene for the level and resource defines level settings such as title, CD track to play for background music, 3O, CEL and WAV files used, etc.  The map.** and floors.** files contain binary data; floors contains graphics for the floors (and probably ceilings) and appears to use a mipmap system.&lt;br /&gt;
&lt;br /&gt;
Level 99 exists in CSM.BIN, but is not a playable level and cannot be warped to.  Instead, it is a special case use of the map format whose purpose is to provide the background scenes for the mission briefing cutscenes.  The &amp;quot;room&amp;quot; numbers in the script.** files correspond to the numbered player starts in level 99.&lt;br /&gt;
&lt;br /&gt;
===Translucency===&lt;br /&gt;
CHASM.RGB and CHASM60.RGB are almost identical in construction to the TINTTAB format used in [[Heretic]] and [[Hexen]] except that there is no 256th row for the final color (which in Chasm is a dummy/transparent color).  CHASM.RGB appears to be a 50-50 blend while CHASM60.RGB appears to have a stronger influence from one of the colors (perhaps 60-40, judging by the file name?)&lt;br /&gt;
&lt;br /&gt;
===Textures===&lt;br /&gt;
Wall textures are of a .CEL format which is an &#039;&#039;Autodesk Animator&#039;&#039; file type. They conform to the Chasm color palette (which can be obtained [https://web.archive.org/web/20150120005440/http://www.angelfire.com/games6/chasm/transformers_files.htm here]).&lt;br /&gt;
&lt;br /&gt;
Textures are 64px or 128px in length and are always 128px in height. A pink color is used for transparency.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/AnimatorPro Autodesk Animator Pro] source code was released by the author and can be downloaded and compiled if desired.&lt;br /&gt;
&lt;br /&gt;
[https://www.nyam.pe.kr/dev/imagine/ Imagine], by Sejin Chun, is free software which allows application of color palettes, as well as conversion to and from the .CEL format. This makes it an ideal tool for modding for Chasm: The Rift.&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
The .CAR format is believed to be an early iteration of the format used by the Carnivores games for Windows (however, Chasm&#039;s .CAR data might be more closely related to the Chasm .3O files).  There is speculation where some believe .CAR refers to &#039;Caracter&#039; (per folder name) or &#039;Chasm Archive&#039;.  Part of the data contained within are sounds for the entity that the .CAR defines. These sounds can be heard at the end of the file if imported as raw data into audio software such as Audacity.&lt;br /&gt;
&lt;br /&gt;
==2022 Remaster Specifics==&lt;br /&gt;
&lt;br /&gt;
===Archive and Addons===&lt;br /&gt;
Files are kept within [[BIN Format (Chasm)|csm.bin]] in the root directory of the game and within a specific file structure. The 2022 Remaster uses a .tar file renamed as .bin and can therefore be accessed easily via archiving software (such as 7Zip) or even [http://slade.mancubus.net SLADE]. Mods made for the 2022 Remaster should copy this file structure and file extension. Much like a [[WAD Format]] file (for Doom), not all folders and files are required to be present with a mod because anything not present is instead taken from csm.bin. A mod can be created by archiving the files into an uncompressed .tar archive and then manually renamed to .bin.&lt;br /&gt;
&lt;br /&gt;
Addons can be played using the launch parameter of &#039;&#039;&#039;--addon xxxx&#039;&#039;&#039; (where xxxx is the name of the addon&#039;s .bin file, without the bin extension. e.g: &#039;&#039;&#039;--addon mymod&#039;&#039;&#039; would launch mymod.bin). It is possible to append this further with &#039;&#039;&#039;--modding&#039;&#039;&#039; (e.g: --addon xxxx --modding).&lt;br /&gt;
&lt;br /&gt;
The --modding parameter unlocks additional functionality which is useful for testing:&lt;br /&gt;
* &amp;quot;noclip&amp;quot; command available&lt;br /&gt;
* &amp;quot;go&amp;quot; command allows access to map 99&lt;br /&gt;
* &amp;quot;chojin&amp;quot; command not only provides invulnerability, but also restores ammo&lt;br /&gt;
* Pressing &amp;quot;M&amp;quot; toggles Monster animation on/off&lt;br /&gt;
* Pressing &amp;quot;N&amp;quot; toggles on-screen debug information&lt;br /&gt;
* Additional options in the menu are accessible, including movement speed, draw distance etc&lt;br /&gt;
&lt;br /&gt;
===Music===&lt;br /&gt;
The 2022 Remaster uses .FLAC (Free Lossless Audio Codec) files for music audio. However, it is not limited to this format specifically. The game can also use:&lt;br /&gt;
* [[wikipedia:FLAC|.flac]]&lt;br /&gt;
* [[wikipedia:Vorbis|.ogg]]&lt;br /&gt;
* [[WAV Format|.wav]]&lt;br /&gt;
&lt;br /&gt;
Although the game can use .ogg and .wav audio files, they must be manually renamed with a .flac extension (even if the data within the file is not .flac formatted). These files must be placed inside your mod&#039;s .bin file within the &#039;Music&#039; folder. Additionally, they must be named as trackxx.flac (where xx represents a number, e.g track01.flac).&lt;br /&gt;
&lt;br /&gt;
A map&#039;s [[RESOURCE (Chasm)|RESOURCE.XX]] file tells the game which music track to play.&lt;br /&gt;
&lt;br /&gt;
===Textures===&lt;br /&gt;
Wall .CEL textures are converted and appended to .PNG at runtime. The texture keeps it&#039;s previous full file name plus the appended .PNG extension. For example, TEXTURE.CEL becomes TEXTURE.CEL.PNG.&lt;br /&gt;
It&#039;s therefore possible to make texture swaps or up-scales in the Remastered version of the game by renaming the texture file as such and including it in the &#039;texture&#039; folder in your mod&#039;s .bin file. The game will use the .PNG file included in your .bin file if found, otherwise will fall-back to the texture file in the base game archive.&lt;br /&gt;
&lt;br /&gt;
The same approach is used for Chasm&#039;s .3O files. In the DOS version, the texture is baked into the .3O file. However, this can be replaced in the 2022 Remaster by adding a PNG file renamed as MODEL.3O.PNG. into the &#039;model&#039; folder in your mod&#039;s .bin file.&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
Like textures, models are converted at runtime. Models (including .3O and .CAR) are converted to .GLTF. Custom .GLTF files should be placed into the appropriate folder for use in mods (&#039;model&#039; folder for static models, &#039;monster&#039; folder for enemy actors).&lt;br /&gt;
.3O files are appended to MODEL.3O.GLTF and .CAR files are appended to MONSTER.CAR.GLTF.&lt;br /&gt;
&lt;br /&gt;
Whereas the DOS version uses .ANI files which appear to include some kind of animation, the 2022 Remaster includes .ANI files as plain text which work in tandem with the related .GLTF file. Static .GLTF files do not require a .ANI counterpart, but one can be used if desired.&lt;br /&gt;
&lt;br /&gt;
The .ANI file should have the same filename as the .GLTF it is referencing. (eg, SCARYMONSTER.GLTF and SCARYMONSTER.ANI).&lt;br /&gt;
&lt;br /&gt;
This plain text file determines the frames of animation used.&lt;br /&gt;
&lt;br /&gt;
The .ANI file uses three integers in the following order: Anim-Number, Start-Frame, No-Of-Frames&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
0 0 2&lt;br /&gt;
&lt;br /&gt;
1 2 11&lt;br /&gt;
&lt;br /&gt;
2 13 15&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, 3 animations are defined. Animation 0, Animation 1 and Animation 2.&lt;br /&gt;
&lt;br /&gt;
Animation 0 starts at Frame 0 and plays for 2 frames.&lt;br /&gt;
&lt;br /&gt;
Animation 2 starts at Frame 2 and plays for 11 frames.&lt;br /&gt;
&lt;br /&gt;
Animation 3 starts at Frame 13 and plays for 15 frames.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is important to note that certain models can utilise only certain animation numbers:&lt;br /&gt;
* Static 3D Objects: No .ANI file required (or Animation 0 with start and end frames of 0 only).&lt;br /&gt;
* Weapons: Animation 1 is Idle, Animation 2 is Firing, Animation 3 is Reloading.&lt;br /&gt;
* Dismembered Limbs/Sepparts: Animation 1 is rotation, Animation 2 is landing.&lt;br /&gt;
* Monsters: Animation 0 is moving, Animation 2 is Idle, Animation 3 is second Idle, Animation 4 is third Idle, Animation 5 is Firing, Animation 6 is Left-Hand Punch, Animation 7 is Right-Hand Punch, Animation 8 is Headbutt, Animation 9 is Pain, Animation 10 is second Pain, Animation 11 is Right-Hand Dismember, Animation 12 is Left-Hand Dismember, Animation 13 is Head Dismember, Animation 14 is Respawn, Animation 15 is Celebrate (after killing aggressor), Animation 16 is Death, Animation 17 is second Death.&lt;br /&gt;
&lt;br /&gt;
Additional notes on Monster animations:&lt;br /&gt;
* If animations 0, 2, 16 are missing then the monster will not work.&lt;br /&gt;
* If animation 5 is missing, then the monster cannot Fire projectiles.&lt;br /&gt;
* If animation 6, 7, 8 are missing then the monster cannot Melee attack.&lt;br /&gt;
* If animation 11, 12, 13 are missing then the monster cannot be dismembered.&lt;br /&gt;
&lt;br /&gt;
Collision low and high points are determined from the lowest and highest geometry points in the first keyframe. For example, if you had a tall monster that shrinks down in animation, the collision heights will remain as those from the first frame, so although the monster has shrunk, it&#039;s hitbox will remain the same size as its first frame. Likewise, if you had a monster that grows in size, its hitbox will remain small rather than growing larger.&lt;br /&gt;
&lt;br /&gt;
[[Category:3D]]&lt;br /&gt;
[[Category:First-Person Shooter]]&lt;br /&gt;
[[Category:Action Forms]]&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Chasm:_The_Rift&amp;diff=12221</id>
		<title>Chasm: The Rift</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Chasm:_The_Rift&amp;diff=12221"/>
		<updated>2025-04-15T22:33:39Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: fixed original and modded images&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
{{Game Infobox&lt;br /&gt;
 | Title = Chasm- The Rift.png &amp;lt;!-- Only because of the colon --&amp;gt;&lt;br /&gt;
 | Modded = Mod-Chasm- The Rift.png&lt;br /&gt;
 | Levels = Edit&lt;br /&gt;
 | Tiles = Edit&lt;br /&gt;
 | Sprites = No&lt;br /&gt;
 | Fullscreen = No&lt;br /&gt;
 | Sound = No&lt;br /&gt;
 | Music = No&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = Edit&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
&#039;&#039;&#039;Chasm: The Rift&#039;&#039;&#039; is an FPS game from the twilight of the DOS era, developed by Action Forms Ltd. and released in 1997.  The engine, contrary to popularly spread misinformation, is not based on [[Quake]] but appears to be an original, and has some interesting features but is also, for its time, somewhat limited regarding the level geometry that can be created.&lt;br /&gt;
&lt;br /&gt;
A level editor is included on the game CD, and some enemy and weapon stats can be modified using a plain text configuration, but certain other aspects of modifying the game (such as the 3D models) remain poorly understood.&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = csm.bin&lt;br /&gt;
 | Format = [[BIN Format (Chasm)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Main data archive. Structure and archive formats differ between DOS (CSM.BIN) and the 2022 Remaster (csm.bin)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = chasm2.pal&lt;br /&gt;
 | Format = [[VGA Palette]] (6-bit version)&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Game palette&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = chasm.inf&lt;br /&gt;
 | Format = [[CHASM.INF]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Configures enemy and weapon stats&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.rgb&lt;br /&gt;
 | Format = 256x255 color index array&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Translucency tables&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.3o&lt;br /&gt;
 | Format = [[3O Format]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = 3D models (weapons, scenery)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.ani&lt;br /&gt;
 | Format = [[ANI Format (Chasm)]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = &#039;&#039;&#039;&#039;&#039;DOS:&#039;&#039;&#039;&#039;&#039; Data to animate models.  &#039;&#039;&#039;&#039;&#039;2022 Remaster:&#039;&#039;&#039;&#039;&#039; ASCII text to determine keyframes for animation.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.car&lt;br /&gt;
 | Format = [[CAR Format]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Contain data for &amp;quot;living&amp;quot; entities (player, monsters)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.obj&lt;br /&gt;
 | Format = [[OBJ Format (Chasm)]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Sprites {{TODO|Possibly multiple frames per file}}&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cel&lt;br /&gt;
 | Format = [[CEL Format (Chasm)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Textures and raster graphics&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.wav&lt;br /&gt;
 | Format = [[WAV Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sounds&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = resource.**&lt;br /&gt;
 | Format = [[RESOURCE (Chasm)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Level data (definitions)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = process.**&lt;br /&gt;
 | Format = [[PROCESS (Chasm)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Level data (action scripts)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = floors.**&lt;br /&gt;
 | Format = [[FLOORS (Chasm)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Floor graphics associated with level&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = map.**&lt;br /&gt;
 | Format = [[MAP (Chasm)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Level data&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = script.**&lt;br /&gt;
 | Format = [[SCRIPT (Chasm)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Level data (cutscene scripts, not present in every level)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.raw&lt;br /&gt;
 | Format = Raw PCM audio, unsigned 8-bit PCM, mono, little-endian, 11025 Hz&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound effects&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.pcm&lt;br /&gt;
 | Format = Raw PCM audio, unsigned 8-bit PCM, mono, little-endian, 11025 Hz&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound effects&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.sfx&lt;br /&gt;
 | Format = Raw PCM audio, unsigned 8-bit PCM, mono, little-endian, 11025 Hz&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound effects&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = chasm.r??&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = {{TODO|Likely recorded gameplay with ?? corresponding to level number}}&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = chasm.key&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = {{TODO|Appears to be related to keyboard layout}}&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = menu.txt&lt;br /&gt;
 | Format = Plain Text&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = {{TODO|Appears to configure aspects of the game menu (possibly useful for translation only?)}}&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.flac&lt;br /&gt;
 | Format = [[FLAC Format (Chasm)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = &#039;&#039;&#039;&#039;&#039;(2022 Remaster Only)&#039;&#039;&#039;&#039;&#039; music&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.gltf&lt;br /&gt;
 | Format = 3D Model [[GLTF Format (Chasm)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = &#039;&#039;&#039;&#039;&#039;(2022 Remaster Only)&#039;&#039;&#039;&#039;&#039; geometry, monster, character and item models&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.png&lt;br /&gt;
 | Format = Portable Network Graphics Image [[PNG Format (Chasm)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = &#039;&#039;&#039;&#039;&#039;(2022 Remaster Only)&#039;&#039;&#039;&#039;&#039; Textures used for walls, geometry models, item models and character models&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.ttf and *.otf&lt;br /&gt;
 | Format = [[Font (Chasm)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = &#039;&#039;&#039;&#039;&#039;(2022 Remaster Only)&#039;&#039;&#039;&#039;&#039; In-game fonts (accessibility mode only)&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
===Archive and addons===&lt;br /&gt;
====DOS====&lt;br /&gt;
Most of the files listed above are normally stored inside CSM.BIN.  However, an addon loaded with the &amp;quot;-addon:&amp;lt;addon_dir&amp;gt;&amp;quot; game parameter can read replacement files from an open directory structure, provided that they are placed in the correctly named subdirectory.&lt;br /&gt;
&lt;br /&gt;
====2022 Remaster====&lt;br /&gt;
Files are kept within [[BIN Format (Chasm)|csm.bin]] in the root directory of the game and within a specific file structure. The 2022 Remaster uses a .tar file renamed as .bin and can therefore be accessed easily via archiving software (such as 7Zip) or even [http://slade.mancubus.net SLADE]. Mods made for the 2022 Remaster should copy this file structure and file extension. Much like a [[WAD Format]] file (for Doom), not all folders and files are required to be present with a mod because anything not present is instead taken from csm.bin. A mod can be created by archiving the files into an uncompressed .tar archive and then manually renamed to .bin.&lt;br /&gt;
&lt;br /&gt;
===Levels, cutscenes===&lt;br /&gt;
Levels are not stored in a single file, but several files with an extension .01, .02 etc. corresponding to the level number.  The process.**, script.** and resource.** files are in plain text; process defines action scripts using a scripting language explained in the level editor documentation, script defines a cutscene for the level and resource defines level settings such as title, CD track to play for background music, 3O, CEL and WAV files used, etc.  The map.** and floors.** files contain binary data; floors contains graphics for the floors (and probably ceilings) and appears to use a mipmap system.&lt;br /&gt;
&lt;br /&gt;
Level 99 exists in CSM.BIN, but is not a playable level and cannot be warped to.  Instead, it is a special case use of the map format whose purpose is to provide the background scenes for the mission briefing cutscenes.  The &amp;quot;room&amp;quot; numbers in the script.** files correspond to the numbered player starts in level 99.&lt;br /&gt;
&lt;br /&gt;
===Translucency===&lt;br /&gt;
CHASM.RGB and CHASM60.RGB are almost identical in construction to the TINTTAB format used in [[Heretic]] and [[Hexen]] except that there is no 256th row for the final color (which in Chasm is a dummy/transparent color).  CHASM.RGB appears to be a 50-50 blend while CHASM60.RGB appears to have a stronger influence from one of the colors (perhaps 60-40, judging by the file name?)&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
The .CAR format is believed to be an early iteration of the format used by the Carnivores games for Windows (however, Chasm&#039;s .CAR data might be more closely related to the Chasm .3O files).  There is speculation where some believe .CAR refers to &#039;Caracter&#039; (per folder name) or &#039;Chasm Archive&#039;.  Part of the data contained within are sounds for the entity that the .CAR defines. These sounds can be heard at the end of the file if imported as raw data into audio software such as Audacity.&lt;br /&gt;
&lt;br /&gt;
===Source Ports and Reimplementations===&lt;br /&gt;
&lt;br /&gt;
====2022 Remaster====&lt;br /&gt;
An official remaster of the game was released in 2022 by General Arcade and SNEG for Windows (decent compatibility for Linux via Proton has been reported). This version of the game includes a new fully featured release of the game, the DOS version with DOSBox, a three level addon pack (including two additional monsters and a boss), and level editing software. &#039;Modding Manual.pdf&#039; is also included, which contains notes on how to modify parts of the game for this new version.&lt;br /&gt;
&lt;br /&gt;
The 2022 Remaster uses .gltf and .png files for easier modding, rather than the legacy file types from the DOS version. Having said this, the 2022 Remaster also has the ability to convert these legacy file types, making mods for the DOS version compatible with the rerelease.&lt;br /&gt;
&lt;br /&gt;
====DOS====&lt;br /&gt;
The original 1997 version of the game.&lt;br /&gt;
&lt;br /&gt;
====PanzerChasm====&lt;br /&gt;
PanzerChasm was a project to reverse-engineer and re-implement the game&#039;s engine, being worked on by Artöm &amp;quot;Panzerschrek&amp;quot; Kunz. It can be found at:&lt;br /&gt;
&lt;br /&gt;
https://github.com/Panzerschrek/Chasm-Reverse&lt;br /&gt;
&lt;br /&gt;
Due to some changes in the way PanzerChasm works, some map-packs and mods might have compatibility issues unless they were specifically designed for this source port.&lt;br /&gt;
&lt;br /&gt;
Panzerschrek has confirmed that PanzerChasm is no longer in active development and that elements of it were used, with permission, for the Remastered version of the game released in 2022. Panzerschrek is noted in the credits of the 2022 Remaster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:3D]]&lt;br /&gt;
[[Category:First-Person Shooter]]&lt;br /&gt;
[[Category:Action Forms, Ltd.]]&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=GEM_Font&amp;diff=12121</id>
		<title>GEM Font</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=GEM_Font&amp;diff=12121"/>
		<updated>2025-01-02T13:42:01Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Font Infobox&lt;br /&gt;
 | MaxGlyphs = 256&lt;br /&gt;
 | GlyphMinSize = 0&amp;amp;times;0&lt;br /&gt;
 | GlyphMaxSize = ?&lt;br /&gt;
 | Access = Indexed&lt;br /&gt;
 | Bitmap = Y&lt;br /&gt;
 | Vector = N&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Hidden = Y&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|3Fold}}&lt;br /&gt;
   {{Game|The Amazon Trail}}&lt;br /&gt;
   {{Game|The Ancient Art of War in the Skies}}&lt;br /&gt;
   {{Game|Barney Bear Goes to the Farm}}&lt;br /&gt;
   {{Game|Battles in Time}}&lt;br /&gt;
   {{Game|Bible Concentration}}&lt;br /&gt;
   {{Game|Bible Paint and Learn}}&lt;br /&gt;
   {{Game|Bobby Fischer Teaches Chess}}&lt;br /&gt;
   {{Game|Bridge Master}}&lt;br /&gt;
   {{Game|Burning Steel: Entscheidung im Nordatlantik}}&lt;br /&gt;
   {{Game|Christmas Matchup}}&lt;br /&gt;
   {{Game|The Dark Half}}&lt;br /&gt;
   {{Game|Davidic Matchup}}&lt;br /&gt;
   {{Game|Every Good and Perfect Gift}}&lt;br /&gt;
   {{Game|The Fall of Jericho!}}&lt;br /&gt;
   {{Game|Fiery Darts}}&lt;br /&gt;
   {{Game|Fireteam 2200}}&lt;br /&gt;
   {{Game|Forerunners}}&lt;br /&gt;
   {{Game|Fruit of the Spirit}}&lt;br /&gt;
   {{Game|GameBuilder Professional}}&lt;br /&gt;
   {{Game|Googol Math Games}}&lt;br /&gt;
   {{Game|Googol Review}}&lt;br /&gt;
   {{Game|The Grandest Fleet}}&lt;br /&gt;
   {{Game|The Grandest Fleet 2}}&lt;br /&gt;
   {{Game|Grandmaster Chess}}&lt;br /&gt;
   {{Game|Great Naval Battles: North Atlantic 1939-1943}}&lt;br /&gt;
   {{Game|Hopy-ONE}}&lt;br /&gt;
   {{Game|In Christ!}}&lt;br /&gt;
   {{Game|Jesus Matchup}}&lt;br /&gt;
   {{Game|Jin City: The Adventures of Deming}}&lt;br /&gt;
   {{Game|Journey to the Promised Land}}&lt;br /&gt;
   {{Game|Kingdom Keys}}&lt;br /&gt;
   {{Game|King&#039;s Glory Elite}}&lt;br /&gt;
   {{Game|La Mitad Oscura}}&lt;br /&gt;
   {{Game|Maker&#039;s Matchup}}&lt;br /&gt;
   {{Game|Men of Renown}}&lt;br /&gt;
   {{Game|Mental Math Games}}&lt;br /&gt;
   {{Game|Moses Matchup}}&lt;br /&gt;
   {{Game|My Cup}}&lt;br /&gt;
   {{Game|The Oregon Trail}}&lt;br /&gt;
   {{Game|NeoPaint}}&lt;br /&gt;
   {{Game|Number Munchers}}&lt;br /&gt;
   {{Game|Panoplia: The Full Armor of God}}&lt;br /&gt;
   {{Game|Pro League Baseball}}&lt;br /&gt;
   {{Game|Realm of the Paladin}}&lt;br /&gt;
   {{Game|Rhema}}&lt;br /&gt;
   {{Game|Sanctified Scrolls}}&lt;br /&gt;
   {{Game|The Secret Island of Dr. Quandry}}&lt;br /&gt;
   {{Game|Space Miner}}&lt;br /&gt;
   {{Game|Sparky&#039;s Math Adventure}}&lt;br /&gt;
   {{Game|Spellbound!}}&lt;br /&gt;
   {{Game|Strip Poker Professional}}&lt;br /&gt;
   {{Game|Super Munchers: The Challenge Continues}}&lt;br /&gt;
   {{Game|Sword of the Spirit}}&lt;br /&gt;
   {{Game|World Combat}}&lt;br /&gt;
   {{Game|Taglit: Nahesh Ota!}}&lt;br /&gt;
   {{Game|Wayne&#039;s World}}&lt;br /&gt;
   {{Game|Where&#039;s Noah?}}&lt;br /&gt;
   {{Game|Word Munchers}}&lt;br /&gt;
   {{Game|Yogi Bear&#039;s Math Adventure}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GEM Font&#039;&#039;&#039; is a bitmap font format used in GEM, the Atari ST operating environment. It typically has a *.gft or *.fnt file extension when used in DOS projects. It was incorporated in the Genus Microprogramming graphics library which was used for various DOS games. The DOS version of NeoPaint uses the format for drawing text into bitmaps.&lt;br /&gt;
&lt;br /&gt;
=== GEM Font Header ===&lt;br /&gt;
SoftType font format description taken from official Genus &#039;&#039;GX Development Series&#039;&#039; TXLIB.H header file.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || fid || Font ID.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || psize || Point size.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][32] || fntname || Font name.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || minch || Minimum character in [0..255] range.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || maxch || Maximum character in [0..255] range.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || topline || Top line distance.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || ascent || Ascent distance.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || halfline || Half line distance.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || descent || Descent distance.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || botline || Bottom line distance.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || maxwidth || Maximum character width.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || cellsize || Maximum cell size.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || leftofs || Left offset.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || rightofs || Right offset.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || thicken || Thicken pixels, for bolding.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || ulwidth || Underline width.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || lightmask || Lightening and...&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || skewmask || ...Skew masks.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || flags || Font flags.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT32LE]] || hotptr || Horiz Offset Table pointer.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT32LE]] || cotptr || Char Offset Table pointer.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT32LE]] || bufptr || Data Buffer pointer.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || fwidth || Sum of all character widths.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || fheight || Number of character rows.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To check if specified file is a correct file the following code can be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/* from official TXLIB.H header file */&lt;br /&gt;
&lt;br /&gt;
/* GEM Font Header */&lt;br /&gt;
#pragma pack(push, 1)&lt;br /&gt;
typedef struct gemheader {&lt;br /&gt;
  int16_t fid;       /* Font ID                     */&lt;br /&gt;
  int16_t psize;     /* Point size                  */&lt;br /&gt;
  char fntname[32];  /* Font name                   */&lt;br /&gt;
  int16_t minch;     /* Minimum character           */&lt;br /&gt;
  int16_t maxch;     /* Maximum character           */&lt;br /&gt;
  int16_t topline;   /* Top line distance           */&lt;br /&gt;
  int16_t ascent;    /* Ascent distance             */&lt;br /&gt;
  int16_t halfline;  /* Half line distance          */&lt;br /&gt;
  int16_t descent;   /* Descent distance            */&lt;br /&gt;
  int16_t botline;   /* Bottom line distance        */&lt;br /&gt;
  int16_t maxwidth;  /* Maximum character width     */&lt;br /&gt;
  int16_t cellsize;  /* Maximum cell size           */&lt;br /&gt;
  int16_t leftofs;   /* Left offset                 */&lt;br /&gt;
  int16_t rightofs;  /* Right offset                */&lt;br /&gt;
  int16_t thicken;   /* Thicken pixels, for bolding */&lt;br /&gt;
  int16_t ulwidth;   /* Underline width             */&lt;br /&gt;
  int16_t lightmask; /* Lightening and              */&lt;br /&gt;
  int16_t skewmask;  /* Skew masks                  */&lt;br /&gt;
  int16_t flags;     /* Font flags                  */&lt;br /&gt;
  int32_t hotptr;    /* Horiz Offset Table pointer  */&lt;br /&gt;
  int32_t cotptr;    /* Char Offset Table pointer   */&lt;br /&gt;
  int32_t bufptr;    /* Data Buffer pointer         */&lt;br /&gt;
  int16_t fwidth;    /* Sum of all character widths */&lt;br /&gt;
  int16_t fheight;   /* Number of character rows    */&lt;br /&gt;
} GEMHEADER; /* sizeof(GEMHEADER) == 84 bytes */&lt;br /&gt;
#pragma pack(pop)&lt;br /&gt;
&lt;br /&gt;
int txVerifyBuffer(GEMHEADER *gh) {&lt;br /&gt;
  if (&lt;br /&gt;
    (gh == NULL) ||&lt;br /&gt;
    /* from disassembled TX_??.LIB library code */&lt;br /&gt;
    (gh-&amp;gt;fheight == 0) ||&lt;br /&gt;
    (gh-&amp;gt;fheight &amp;lt; gh-&amp;gt;ascent) || (gh-&amp;gt;ascent &amp;lt; 0) ||&lt;br /&gt;
    (gh-&amp;gt;ascent &amp;lt; gh-&amp;gt;descent) || (gh-&amp;gt;descent &amp;lt; 0) ||&lt;br /&gt;
    ((gh-&amp;gt;ascent + gh-&amp;gt;descent) &amp;gt; gh-&amp;gt;fheight) ||&lt;br /&gt;
    (gh-&amp;gt;cellsize == 0) ||&lt;br /&gt;
    (gh-&amp;gt;maxch &amp;lt; gh-&amp;gt;minch) ||&lt;br /&gt;
    (gh-&amp;gt;maxch &amp;gt;= 256)&lt;br /&gt;
  ) {&lt;br /&gt;
    return(0);&lt;br /&gt;
  }&lt;br /&gt;
  return(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
This format was researched by [[User:TheAlmightyGuru|TheAlmightyGuru]] and [[User:CTPAX-X Team|CTPAX-X Team]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://justsolve.archiveteam.org/wiki/GEM_bitmap_font GEM bitmap font - Just Solve the File Format Problem]&lt;br /&gt;
* [https://www.atarimania.com/pgesoft.awp?version=28394 Atari ST font editor]&lt;br /&gt;
* [https://www.atari-forum.com/viewtopic.php?p=473688 GEM font viewer for Windows/Linux]&lt;br /&gt;
* [http://cd.textfiles.com/ataricompendium/BOOK/HTML/APPENDC.HTM#cnt The .FNT File Format]&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:CTPAX-X_Team&amp;diff=12115</id>
		<title>User talk:CTPAX-X Team</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:CTPAX-X_Team&amp;diff=12115"/>
		<updated>2024-12-31T19:18:07Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* GEM Font */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SLB/M3 tools ==&lt;br /&gt;
&lt;br /&gt;
Thanks for amplifying the page I created related to the M3/SLB format(s).&lt;br /&gt;
Are we aware of any tool to extract data from .SLB/.M3 formats yet ?&lt;br /&gt;
&lt;br /&gt;
- [[User:Elia1995 | Elìa1995]]&lt;br /&gt;
&lt;br /&gt;
: Added script to unpack archives. If you want to view images you can use IGC.EXE game program as a viewer (DOSBox). [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 19:20, 16 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== FileInfoRec on SelectWare Archive ==&lt;br /&gt;
&lt;br /&gt;
On the [[SelectWare Archive]] page, I&#039;m not sure if it is useful to replace the information on the folder ID by the link to the FileInfoRec. I don&#039;t doubt that it&#039;s correct, but the page you linked to just describes that whole start block as &amp;quot;reserved&amp;quot;, giving no information whatsoever about how a tool could distinguish files from folders and link them together correctly, while the previous information on the page did specify that. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:33, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
For more info on the problem, I refer to you the John Madden Football demo on [https://archive.org/details/cdrom-software-jukebox this CD]. It&#039;s the archive under the folder &amp;lt;tt&amp;gt;ELE15003&amp;lt;/tt&amp;gt;. In that archive, there is no difference in directory level between &amp;quot;GRAPHICS\MISC\MISC.BMS&amp;quot; file and the following &amp;quot;GRAPHICS\STANCES&amp;quot; folder; without looking at those folder IDs, there is no way to know if &amp;quot;STANCES&amp;quot; is a &amp;quot;GRAPHICS\STANCES&amp;quot; folder, or an empty &amp;quot;GRAPHICS\MISC\STANCES&amp;quot; file. Here&#039;s [https://i.imgur.com/62F8afM.png an image of the files tree]. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:52, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
[EDIT]&lt;br /&gt;
&lt;br /&gt;
Ah, I missed the fact there is a directory bit in the file attributes. With that, and the dir level from the entry, it is indeed completely possible without ever looking at that &amp;quot;reserved&amp;quot; information. Out of curiosity, does the SelectWare extractor actually look at that reserved block, or is its unpacking identical to your own? -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:32, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Sorry, messed up logic for folder level. Example code fixed (thanks for pointing out on &amp;lt;tt&amp;gt;ELE15003&amp;lt;/tt&amp;gt; example archive) - now it should be identical to how the SelectWare extractor works (rechecked disassembler code), except parts marked as TODO in comments. And yes, original code never use anything from reserved 21 byte block since it&#039;s undocumented DOS internals. Also it would be nice if someone ported to this Wiki information about FileInfoRec, DOS Packed Time/Date and DOS File Attributes, since there are few other file formats which uses this structures (except maybe FileInfoRec). [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 18:26, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: Thanks for confirming that the reserved  block is not used; it will come in handy when writing my code to save the archive type. I adapted my own reading code for the next version of the Librarian tool using the directory flag, and it&#039;s actually a lot simpler now. I also added a small section in the article now describing how to traverse the directory tree. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 22:02, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: One addition: the actual extractor code does not check the first filename character (it&#039;s just this implementation quirks), instead it checks that &amp;lt;tt&amp;gt;sizeof(swt_item)&amp;lt;/tt&amp;gt; bytes was sucessully read from input file. Also add subdirectories and remove hidden tag since can&#039;t imagine a way to hide something with this format. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 16:03, 11 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Black line at the bottom of Keen Dreams title ==&lt;br /&gt;
&lt;br /&gt;
Hello. Could you tell me what to do in this case? Since nobody can help me (yet), read my topic: https://keenmodding.org/viewtopic.php?p=36634#p36634 (Oh, and the black line appears at the right bottom corner of the screen.) [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 07:36, 7 September 2021 (GMT)&lt;br /&gt;
: TitleBuild was developed by [[User:Levellass|Levellass]] - you should ask for help there first. As for some suggestions - try to use nConvert:&lt;br /&gt;
: [https://www.xnview.com/en/nconvert/ nconvert.exe] -in -1 -out iff TITLESCR.BMP&lt;br /&gt;
: Rename output file &amp;quot;TITLESCR.IFF&amp;quot; to &amp;quot;TITLESCR.LBM&amp;quot; and pack it back with &amp;quot;SOFTLIB.EXE&amp;quot; to &amp;quot;KDREAMS.CMP&amp;quot;. Maybe it will work correctly this time. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 09:44, 7 September 2021 (GMT)&lt;br /&gt;
:: I have a little problem at the end. I did everything as you mentioned, but SOFTLIB said titlescr.lbm is not a SOFTLIB file and I&#039;m stopped. Please, tell me what can I do as it would be very important for me. [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 23:36, 7 September 2021 (GMT)&lt;br /&gt;
:: No success. I managed to pack it back, but still the same black line at the bottom. Maybe TitleBuilder is the guilty? [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 01:01, 8 September 2021 (GMT)&lt;br /&gt;
::: Do the following things (step-by-step):&lt;br /&gt;
::: 1. SOFTLIB.EXE E KDREAMS.CMP TITLESCR.LBM&lt;br /&gt;
::: 2. nConvert.exe -in -1 -out bmp TITLESCR.LBM&lt;br /&gt;
::: (edit output &amp;quot;TITLESCR.BMP&amp;quot; file here as you like)&lt;br /&gt;
::: 3. nConvert.exe -in -1 -c 1 -out iff TITLESCR.BMP&lt;br /&gt;
::: 4. del TITLESCR.LBM&lt;br /&gt;
::: 5. ren TITLESCR.IFF TITLESCR.LBM&lt;br /&gt;
::: 6. del KDREAMS.CMP&lt;br /&gt;
::: 7. SOFTLIB.EXE AC KDREAMS.CMP TITLESCR.LBM LZH&lt;br /&gt;
::: Just tested and everything works fine. Use DOSBox or any other DOS VM for running SOFTLIB.EXE. Do not use TileBuilder if you have issues with it. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 08:34, 8 September 2021 (GMT)&lt;br /&gt;
:::: Thanks! I will try it, too. [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 08:50, 8 September 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Keen 1 v1.34 EXE problem ==&lt;br /&gt;
&lt;br /&gt;
Hello! Could you help me? The EXE of Keen 1 v1.34 was compressed by PKLite, which I decompressed with UNP, so that I can use KeenGraph (Keen 1-6, Dreams graphic editor). While trying to extract the graphics, KeenGraph mentions that &#039;EGASPRIT.CK1 LZW-compressed, decompressing...&#039; &#039;EGALATCH.CK1 LZW-compressed, decompressing...&#039; And then nothing happens, but just hanging. Tell me how to decompress these LZW-compressed files. [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 22:52, 18 October 2021 (GMT)&lt;br /&gt;
: Sorry, not familiar with this game or modding tools, can&#039;t help. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 19:50, 20 October 2021 (GMT)&lt;br /&gt;
:: Alright, but any suggestions/tools on how to decompress LZW-decompressed files? [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 21:42, 20 October 2021 (GMT)&lt;br /&gt;
::: Try the [[LZW Compression]] page? Or ask [[User:Levellass|Levellass]], who actually made the KeenGraph tool. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 23:15, 20 October 2021 (GMT)&lt;br /&gt;
:::: I managed to decompress EGALATCH.CK1, but EGASPRIT.CK1 not. Here are the compressed values from EGASPRIT.CK1:&lt;br /&gt;
 0000  70 7B 00 00 0C 00 00 40&lt;br /&gt;
 0010  40 80 6C 00 3B 82 1D 0E&lt;br /&gt;
&lt;br /&gt;
Do you know how to decompress it? [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 20:25, 21 October 2021 (GMT)&lt;br /&gt;
: Sorry, not familiar with this game or modding tools, can&#039;t help. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 18:35, 30 November 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
== [[GEM Font]] ==&lt;br /&gt;
Thanks for helping me with this format! --[[User:TheAlmightyGuru|TheAlmightyGuru]] ([[User talk:TheAlmightyGuru|talk]]) 18:58, 31 December 2024 (GMT)&lt;br /&gt;
: You are welcome! Happy New Year! [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 19:17, 31 December 2024 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=GEM_Font&amp;diff=12103</id>
		<title>GEM Font</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=GEM_Font&amp;diff=12103"/>
		<updated>2024-12-31T18:12:52Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: some links with documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an as-of-yet unknown font format. The extension possibly stands for &amp;quot;graphic font&amp;quot;? I haven&#039;t been able to find any information on it, but, based on the file names and contents of the file, it appears to be a bitmap font format.&lt;br /&gt;
&lt;br /&gt;
It was used by MECC in multiple DOS games in the 1990s, so may be related to the [[Borland Graphics Interface]]. Several other games use the format as well. &lt;br /&gt;
&lt;br /&gt;
There also appears to be a format with the same extension that has similar looking binary data, but may be something else (I&#039;ve put a question mark at after the game titles).&lt;br /&gt;
&lt;br /&gt;
=== GEM Font Header ===&lt;br /&gt;
&lt;br /&gt;
SoftType font format description taken from official Genus &#039;&#039;GX Development Series&#039;&#039; TXLIB.H header file.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || fid || Font ID, must be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || psize || Point size.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][32] || fntname || Font name.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || minch || Minimum character in [0..255] range.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || maxch || Maximum character in [0..255] range.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || topline || Top line distance.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || ascent || Ascent distance.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || halfline || Half line distance.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || descent || Descent distance.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || botline || Bottom line distance.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || maxwidth || Maximum character width.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || cellsize || Maximum cell size.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || leftofs || Left offset.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || rightofs || Right offset.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || thicken || Thicken pixels, for bolding.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || ulwidth || Underline width.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || lightmask || Lightening and...&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || skewmask || ...Skew masks.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || flags || Font flags.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT32LE]] || hotptr || Horiz Offset Table pointer.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT32LE]] || cotptr || Char Offset Table pointer.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT32LE]] || bufptr || Data Buffer pointer.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || fwidth || Sum of all character widths.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || fheight || Number of character rows.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To check if specified file is a correct file the following code can be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/* from official TXLIB.H header file */&lt;br /&gt;
&lt;br /&gt;
/* GEM Font Header */&lt;br /&gt;
#pragma pack(push, 1)&lt;br /&gt;
typedef struct gemheader {&lt;br /&gt;
  int16_t fid;       /* Font ID                     */&lt;br /&gt;
  int16_t psize;     /* Point size                  */&lt;br /&gt;
  char fntname[32];  /* Font name                   */&lt;br /&gt;
  int16_t minch;     /* Minimum character           */&lt;br /&gt;
  int16_t maxch;     /* Maximum character           */&lt;br /&gt;
  int16_t topline;   /* Top line distance           */&lt;br /&gt;
  int16_t ascent;    /* Ascent distance             */&lt;br /&gt;
  int16_t halfline;  /* Half line distance          */&lt;br /&gt;
  int16_t descent;   /* Descent distance            */&lt;br /&gt;
  int16_t botline;   /* Bottom line distance        */&lt;br /&gt;
  int16_t maxwidth;  /* Maximum character width     */&lt;br /&gt;
  int16_t cellsize;  /* Maximum cell size           */&lt;br /&gt;
  int16_t leftofs;   /* Left offset                 */&lt;br /&gt;
  int16_t rightofs;  /* Right offset                */&lt;br /&gt;
  int16_t thicken;   /* Thicken pixels, for bolding */&lt;br /&gt;
  int16_t ulwidth;   /* Underline width             */&lt;br /&gt;
  int16_t lightmask; /* Lightening and              */&lt;br /&gt;
  int16_t skewmask;  /* Skew masks                  */&lt;br /&gt;
  int16_t flags;     /* Font flags                  */&lt;br /&gt;
  int32_t hotptr;    /* Horiz Offset Table pointer  */&lt;br /&gt;
  int32_t cotptr;    /* Char Offset Table pointer   */&lt;br /&gt;
  int32_t bufptr;    /* Data Buffer pointer         */&lt;br /&gt;
  int16_t fwidth;    /* Sum of all character widths */&lt;br /&gt;
  int16_t fheight;   /* Number of character rows    */&lt;br /&gt;
} GEMHEADER; /* sizeof(GEMHEADER) == 84 bytes */&lt;br /&gt;
#pragma pack(pop)&lt;br /&gt;
&lt;br /&gt;
int txVerifyBuffer(GEMHEADER *gh) {&lt;br /&gt;
  if (&lt;br /&gt;
    (gh == NULL) ||&lt;br /&gt;
    (gh-&amp;gt;fid != 0) ||&lt;br /&gt;
    /* from disassembled TX_??.LIB library code */&lt;br /&gt;
    (gh-&amp;gt;fheight == 0) ||&lt;br /&gt;
    (gh-&amp;gt;fheight &amp;lt; gh-&amp;gt;ascent) || (gh-&amp;gt;ascent &amp;lt; 0) ||&lt;br /&gt;
    (gh-&amp;gt;ascent &amp;lt; gh-&amp;gt;descent) || (gh-&amp;gt;descent &amp;lt; 0) ||&lt;br /&gt;
    ((gh-&amp;gt;ascent + gh-&amp;gt;descent) &amp;gt; gh-&amp;gt;fheight) ||&lt;br /&gt;
    (gh-&amp;gt;cellsize == 0) ||&lt;br /&gt;
    (gh-&amp;gt;maxch &amp;lt; gh-&amp;gt;minch) ||&lt;br /&gt;
    (gh-&amp;gt;maxch &amp;gt;= 256)&lt;br /&gt;
  ) {&lt;br /&gt;
    return(0);&lt;br /&gt;
  }&lt;br /&gt;
  return(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Games==&lt;br /&gt;
* [[The Amazon Trail]] ?&lt;br /&gt;
* [[The Ancient Art of War in the Skies]]&lt;br /&gt;
* [[Barney Bear Goes to the Farm]]&lt;br /&gt;
* [[Battles in Time]]&lt;br /&gt;
* [[Bible Concentration]]&lt;br /&gt;
* [[Bobby Fischer Teaches Chess]] ?&lt;br /&gt;
* [[Bridge Master]] ?&lt;br /&gt;
* [[The Dark Half]] ?&lt;br /&gt;
* [[The Fall of Jericho!]]&lt;br /&gt;
* [[Fireteam 2200]]&lt;br /&gt;
* [[GameBuilder Professional]] ?&lt;br /&gt;
* [[Googol Math Games]]&lt;br /&gt;
* [[Googol Review]]&lt;br /&gt;
* [[The Grandest Fleet]]&lt;br /&gt;
* [[The Grandest Fleet 2]]&lt;br /&gt;
* [[Grandmaster Chess]] ?&lt;br /&gt;
* [[Hopy-ONE]]&lt;br /&gt;
* [[In Christ!]] ?&lt;br /&gt;
* [[Jin City: The Adventures of Deming]] ?&lt;br /&gt;
* [[Journey to the Promised Land]]&lt;br /&gt;
* [[La Mitad Oscura]] ?&lt;br /&gt;
* [[Men of Renown]] ?&lt;br /&gt;
* [[Mental Math Games]] ?&lt;br /&gt;
* [[Number Munchers]]&lt;br /&gt;
* [[The Oregon Trail]]&lt;br /&gt;
* [[Panoplia: The Full Armor of God]] ?&lt;br /&gt;
* [[Pro League Baseball]] ?&lt;br /&gt;
* [[Realm of the Paladin]]&lt;br /&gt;
* [[Rhema]] ?&lt;br /&gt;
* [[Taglit: Nahesh Ota!]]&lt;br /&gt;
* [[Sanctified Scrolls]] ?&lt;br /&gt;
* [[The Secret Island of Dr. Quandry]] ?&lt;br /&gt;
* [[Space Miner]]&lt;br /&gt;
* [[Sparky&#039;s Math Adventure]] ?&lt;br /&gt;
* [[Spellbound!]] ?&lt;br /&gt;
* [[Strip Poker Professional]] ?&lt;br /&gt;
* [[Super Munchers]]&lt;br /&gt;
* [[Wayne&#039;s World]] ?&lt;br /&gt;
* [[Where&#039;s Noah?]]&lt;br /&gt;
* [[Word Munchers]]&lt;br /&gt;
* [[World Combat]]&lt;br /&gt;
* [[Yogi Bear&#039;s Math Adventure]] ?&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[http://justsolve.archiveteam.org/wiki/GEM_bitmap_font GEM bitmap font - Just Solve the File Format Problem]&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=GEM_Font&amp;diff=12102</id>
		<title>GEM Font</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=GEM_Font&amp;diff=12102"/>
		<updated>2024-12-31T18:07:03Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: bare minimum&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an as-of-yet unknown font format. The extension possibly stands for &amp;quot;graphic font&amp;quot;? I haven&#039;t been able to find any information on it, but, based on the file names and contents of the file, it appears to be a bitmap font format.&lt;br /&gt;
&lt;br /&gt;
It was used by MECC in multiple DOS games in the 1990s, so may be related to the [[Borland Graphics Interface]]. Several other games use the format as well. &lt;br /&gt;
&lt;br /&gt;
There also appears to be a format with the same extension that has similar looking binary data, but may be something else (I&#039;ve put a question mark at after the game titles).&lt;br /&gt;
&lt;br /&gt;
=== GEM Font Header ===&lt;br /&gt;
&lt;br /&gt;
SoftType font format description taken from official Genus &#039;&#039;GX Development Series&#039;&#039; TXLIB.H header file.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || fid || Font ID, must be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || psize || Point size.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][32] || fntname || Font name.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || minch || Minimum character in [0..255] range.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || maxch || Maximum character in [0..255] range.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || topline || Top line distance.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || ascent || Ascent distance.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || halfline || Half line distance.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || descent || Descent distance.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || botline || Bottom line distance.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || maxwidth || Maximum character width.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || cellsize || Maximum cell size.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || leftofs || Left offset.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || rightofs || Right offset.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || thicken || Thicken pixels, for bolding.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || ulwidth || Underline width.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || lightmask || Lightening and...&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || skewmask || ...Skew masks.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || flags || Font flags.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT32LE]] || hotptr || Horiz Offset Table pointer.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT32LE]] || cotptr || Char Offset Table pointer.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT32LE]] || bufptr || Data Buffer pointer.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || fwidth || Sum of all character widths.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || fheight || Number of character rows.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To check if specified file is a correct file the following code can be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/* from official TXLIB.H header file */&lt;br /&gt;
&lt;br /&gt;
/* GEM Font Header */&lt;br /&gt;
#pragma pack(push, 1)&lt;br /&gt;
typedef struct gemheader {&lt;br /&gt;
  int16_t fid;       /* Font ID                     */&lt;br /&gt;
  int16_t psize;     /* Point size                  */&lt;br /&gt;
  char fntname[32];  /* Font name                   */&lt;br /&gt;
  int16_t minch;     /* Minimum character           */&lt;br /&gt;
  int16_t maxch;     /* Maximum character           */&lt;br /&gt;
  int16_t topline;   /* Top line distance           */&lt;br /&gt;
  int16_t ascent;    /* Ascent distance             */&lt;br /&gt;
  int16_t halfline;  /* Half line distance          */&lt;br /&gt;
  int16_t descent;   /* Descent distance            */&lt;br /&gt;
  int16_t botline;   /* Bottom line distance        */&lt;br /&gt;
  int16_t maxwidth;  /* Maximum character width     */&lt;br /&gt;
  int16_t cellsize;  /* Maximum cell size           */&lt;br /&gt;
  int16_t leftofs;   /* Left offset                 */&lt;br /&gt;
  int16_t rightofs;  /* Right offset                */&lt;br /&gt;
  int16_t thicken;   /* Thicken pixels, for bolding */&lt;br /&gt;
  int16_t ulwidth;   /* Underline width             */&lt;br /&gt;
  int16_t lightmask; /* Lightening and              */&lt;br /&gt;
  int16_t skewmask;  /* Skew masks                  */&lt;br /&gt;
  int16_t flags;     /* Font flags                  */&lt;br /&gt;
  int32_t hotptr;    /* Horiz Offset Table pointer  */&lt;br /&gt;
  int32_t cotptr;    /* Char Offset Table pointer   */&lt;br /&gt;
  int32_t bufptr;    /* Data Buffer pointer         */&lt;br /&gt;
  int16_t fwidth;    /* Sum of all character widths */&lt;br /&gt;
  int16_t fheight;   /* Number of character rows    */&lt;br /&gt;
} GEMHEADER; /* sizeof(GEMHEADER) == 84 bytes */&lt;br /&gt;
#pragma pack(pop)&lt;br /&gt;
&lt;br /&gt;
int txVerifyBuffer(GEMHEADER *gh) {&lt;br /&gt;
  if (&lt;br /&gt;
    (gh == NULL) ||&lt;br /&gt;
    (gh-&amp;gt;fid != 0) ||&lt;br /&gt;
    /* from disassembled TX_??.LIB library code */&lt;br /&gt;
    (gh-&amp;gt;fheight == 0) ||&lt;br /&gt;
    (gh-&amp;gt;fheight &amp;lt; gh-&amp;gt;ascent) || (gh-&amp;gt;ascent &amp;lt; 0) ||&lt;br /&gt;
    (gh-&amp;gt;ascent &amp;lt; gh-&amp;gt;descent) || (gh-&amp;gt;descent &amp;lt; 0) ||&lt;br /&gt;
    ((gh-&amp;gt;ascent + gh-&amp;gt;descent) &amp;gt; gh-&amp;gt;fheight) ||&lt;br /&gt;
    (gh-&amp;gt;cellsize == 0) ||&lt;br /&gt;
    (gh-&amp;gt;maxch &amp;lt; gh-&amp;gt;minch) ||&lt;br /&gt;
    (gh-&amp;gt;maxch &amp;gt;= 256)&lt;br /&gt;
  ) {&lt;br /&gt;
    return(0);&lt;br /&gt;
  }&lt;br /&gt;
  return(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Games==&lt;br /&gt;
* [[The Amazon Trail]] ?&lt;br /&gt;
* [[The Ancient Art of War in the Skies]]&lt;br /&gt;
* [[Barney Bear Goes to the Farm]]&lt;br /&gt;
* [[Battles in Time]]&lt;br /&gt;
* [[Bible Concentration]]&lt;br /&gt;
* [[Bobby Fischer Teaches Chess]] ?&lt;br /&gt;
* [[Bridge Master]] ?&lt;br /&gt;
* [[The Dark Half]] ?&lt;br /&gt;
* [[The Fall of Jericho!]]&lt;br /&gt;
* [[Fireteam 2200]]&lt;br /&gt;
* [[GameBuilder Professional]] ?&lt;br /&gt;
* [[Googol Math Games]]&lt;br /&gt;
* [[Googol Review]]&lt;br /&gt;
* [[The Grandest Fleet]]&lt;br /&gt;
* [[The Grandest Fleet 2]]&lt;br /&gt;
* [[Grandmaster Chess]] ?&lt;br /&gt;
* [[Hopy-ONE]]&lt;br /&gt;
* [[In Christ!]] ?&lt;br /&gt;
* [[Jin City: The Adventures of Deming]] ?&lt;br /&gt;
* [[Journey to the Promised Land]]&lt;br /&gt;
* [[La Mitad Oscura]] ?&lt;br /&gt;
* [[Men of Renown]] ?&lt;br /&gt;
* [[Mental Math Games]] ?&lt;br /&gt;
* [[Number Munchers]]&lt;br /&gt;
* [[The Oregon Trail]]&lt;br /&gt;
* [[Panoplia: The Full Armor of God]] ?&lt;br /&gt;
* [[Pro League Baseball]] ?&lt;br /&gt;
* [[Realm of the Paladin]]&lt;br /&gt;
* [[Rhema]] ?&lt;br /&gt;
* [[Taglit: Nahesh Ota!]]&lt;br /&gt;
* [[Sanctified Scrolls]] ?&lt;br /&gt;
* [[The Secret Island of Dr. Quandry]] ?&lt;br /&gt;
* [[Space Miner]]&lt;br /&gt;
* [[Sparky&#039;s Math Adventure]] ?&lt;br /&gt;
* [[Spellbound!]] ?&lt;br /&gt;
* [[Strip Poker Professional]] ?&lt;br /&gt;
* [[Super Munchers]]&lt;br /&gt;
* [[Wayne&#039;s World]] ?&lt;br /&gt;
* [[Where&#039;s Noah?]]&lt;br /&gt;
* [[Word Munchers]]&lt;br /&gt;
* [[World Combat]]&lt;br /&gt;
* [[Yogi Bear&#039;s Math Adventure]] ?&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Malvineous&amp;diff=12071</id>
		<title>User talk:Malvineous</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Malvineous&amp;diff=12071"/>
		<updated>2024-11-26T18:53:27Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Upload limit */ some ideas&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Wolfenstein 3D -&amp;gt; Wolfenstein 3-D ==&lt;br /&gt;
I&#039;ve corrected the infamous 3D tyop in the names of several Wolf3D-related pages; can you please delete the following ones?&lt;br /&gt;
&lt;br /&gt;
[[:Category:Wolfenstein 3D]] -&amp;gt; Superseded by [[:Category:Wolfenstein 3-D]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[:Image:Wolfenstein_3D.png]] -&amp;gt; Superseded by [[:Image:Wolfenstein_3-D.png]]&lt;br /&gt;
&lt;br /&gt;
Thanks :) --De Zeurkous (zeurkous@zeurcomp.nichten.info), Thu Nov 22 08:18:42 UTC 2007&lt;br /&gt;
&lt;br /&gt;
:Haha, you&#039;ve certainly been busy.  Don&#039;t forget that this wiki isn&#039;t meant to be an encyclopaedia of the games, its main purpose is documenting the file formats and editing tools that can be used with the games, as opposed to how the games behave without any mods, or what they might be called if you forget to change the title screen :-) -- [[User:Malvineous|Malvineous]] 11:14, 22 November 2007 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Nah, I haven&#039;t forgotten. As we&#039;re reinventing the wheel for a semi-virgin wiki, the naming and something static like the cheats seemed like a good place to start :) --De Zeurkous (zeurkous@nichten.info), Thu Nov 22 12:20:04 UTC 2007&lt;br /&gt;
&lt;br /&gt;
== Jill of the Jungle palette ==&lt;br /&gt;
&lt;br /&gt;
Hi, I&#039;m currently working on a level viewer for [[Jill of the Jungle]] (maybe an editor later on). Some of the information I found here has been very useful, but there&#039;s one thing I&#039;m a bit stuck on. On the [[SHA Format]] page it says:&lt;br /&gt;
:&#039;&#039;Each array item contains 4 unsigned bytes, representing CGA, EGA and VGA, respectivley, and then a null value. [...] Each byte maps to the index of a colour in the palette. If there are no colours required, the tile set uses the default colours.&#039;&#039;&lt;br /&gt;
However, it doesn&#039;t say anywhere where the palette can be found. Is it stored in the EXE file? I hope you can help me on this :)&lt;br /&gt;
&lt;br /&gt;
Regards, [[User:Spinal|Spinal]] 13:00, 2 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
:Unfortunately I didn&#039;t write the JotJ SHA page, and I haven&#039;t yet had the time to figure this out.  For Xargon I&#039;ve taken the quick and dirty route and used a screenshot from within DOSBox as the source of the palette, until I can figure out where the palette is located.  If you find this out, don&#039;t forget to update the page! :-) -- [[User:Malvineous|Malvineous]] 22:02, 2 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Hey Spinal, sorry, I wrote the [[SHA Format]] page, so that was probably my bad. I wasn&#039;t able to find the palette either. I assume it&#039;s in the .EXE, however I spent a fair bit of time manually mapping it using a Wombat tool (http://www.szevvy.com/node/3). I was also writing a level viewer (initally in XHTML which turned out to be too slow, so then I moved to Flash 9). I tried to email you my findings, but the email bounced. I&#039;m not sure if they were 100% accurat, which is why I never added them to the documentation.&lt;br /&gt;
&lt;br /&gt;
::Hey Malvineous, it seems the Jill - [[DMA Format]] page has been removed. Do you have a log of what happened to it? I&#039;m sure it existed at some point.&lt;br /&gt;
&lt;br /&gt;
::- [[User:dheim|Daniel]] 20:00, 5 March 2008&lt;br /&gt;
&lt;br /&gt;
:::I don&#039;t ever remember seeing a DMA page - certainly there&#039;s nothing in the wiki logs about it being deleted or renamed.  Maybe you started working on it but never got around to saving it?  Or is it one of the Xargon pages that shares the same format as Jill?  (by the way, you can type &amp;lt;nowiki&amp;gt;~~~~&amp;lt;/nowiki&amp;gt; to automatically put in the signature in these messages.) -- [[User:Malvineous|Malvineous]] 11:28, 5 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::Sorry, it must have been the stuff in the [[SHA Format]] page that I was thinking of. I may have added the link to the [[DMA Format]] page, and never expanded on it. - [[User:Dheim|Daniel]] 02:46, 6 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::Hi guys. Sorry for the mistake, I mixed up the authors of the SHA and level formats. I&#039;ve written a level viewer in PHP the last week, by using static images instead of getting them from the actual files. This causes some problems for episode 2, which uses a different palette, but besides that it works great :) When everything is done I&#039;ll upload the maps to my server and the tile/object lists to this wiki.&lt;br /&gt;
:::::@Daniel: strange that it bounced, I confirmed my address so it should be working fine... You can mail it to spinal -at- zanderz -dot- net. Also, I saw on your Wombat page that you &amp;quot;have a vague idea of how to do&amp;quot; [[Hocus Pocus]]. Could you share your findings on this wiki? I&#039;d love to make maps, or even a level viewer/editor for that game :) -- [[User:Spinal|Spinal]] 00:32, 8 March 2008 (GMT)&lt;br /&gt;
:Okay, with help of [[User:Dheim|Daniel]] who send me the palette I found it! I&#039;ll put my findings on [[Jill of the Jungle palette]]. -- [[User:Spinal|Spinal]] 15:36, 13 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Halloween Harry/Alien Carnage ==&lt;br /&gt;
&lt;br /&gt;
Hi Malvineous. Thanks for your edits on the GMF article! I notice you mentioned there exist versions of the game which don&#039;t require exploding a BNK to get at the game data. What does the directory structure look like for the version you have? I&#039;m working on a map viewer (which will become a map editor at some point) and would like it to be able to work on whatever versions are out there. Thanks for any info. -[[User:Duckthing|Duckthing]] 04:41, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Hi Duckthing - no worries, Halloween Harry has long been an interest of mine, but my map editor sadly needs a lot more work before I can begin reverse engineering more file formats so I&#039;m glad you&#039;ve made a start!  AFAIK technically Halloween Harry has no compression, but for whatever reason (probably listed in the Apogee FAQ) they decided to swap episodes 1 and 3, compress the BNK file and then re-release it under the name Alien Carnage.  You can download all available versions (including registered versions since the game was released as freeware in 2007) from [http://www.classicdosgames.com/game/Alien_Carnage.html RGB Classic Games].  BTW not sure if you noticed but I also posted a couple of things on the GMF article&#039;s talk/discussion page. -- [[User:Malvineous|Malvineous]] 06:08, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: Thank you! Working with the uncompressed version will keep things less complicated. I did notice the GMF discussion you added, but haven&#039;t had a chance to really go through it yet. -- [[User:Duckthing|Duckthing]] 06:41, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: No worries.  If you&#039;re running Linux or MacOSX you should be able to compile [[Camoto|libgamearchive]] which will let you copy files in and out of the BNK files.  This is a library so it&#039;s also possible to use it in your own program for accessing and editing the map files while they&#039;re still inside the BNK, for instance.  (BTW the &#039;minor&#039; tickbox should only be used when the edit does not affect the information on the page - e.g. fixing a typo or a broken URL.  If you are changing the actual content on a page it is never a minor edit!) -- [[User:Malvineous|Malvineous]] 07:51, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dangerous Dave ==&lt;br /&gt;
&lt;br /&gt;
Working on this, does anyone have any info on the formats? The EGA graphics are 84KB and external, but CGA and VGA graphics unrelated to them are in the 174KB executable, apparently uncompressed, I don&#039;t know how this is possible. I&#039;ve found the levels and partially reverse engineered the format (The first 1000 bytes, a 100x10 array of tiles.) but each level is followed by ~280 bytes of variable and unknown data I assume is sprites. I have a list of internal files in the executable, looks like most of it is non-game code. Any help would be appreciated. -[[User:Levellass|Endian? What are you on about?]] 06:03, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Hmm, interesting.  All I can suggest for the levels is - as you&#039;re probably already familiar with - changing the values in a hex editor then loading the game to see what happens.  I would suspect that all the graphics would be in a similar format, so if there are any headers or structures used in the EGA graphics files perhaps they&#039;re duplicated for CGA/VGA?  Also John Romero seems pretty accessible, perhaps you could ask him directly?  Failing that, randomly writing data into the .exe until the images change could be used as a last resort! -- [[User:Malvineous|Malvineous]] 12:09, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Ha, that was easier than I expected - uncompressed VGA data is easy to find with a good hex editor ;-)  [http://www.shikadi.net/pics/ddave-vga-hexdump.png This looks like it] -- [[User:Malvineous|Malvineous]] 12:17, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Ok that was only the menu graphics.  At offset 0xC629 there&#039;s some sort of offset table which looks very similar to the contents of EGADAVE.DAV but there are extra bytes dotted all over the place - perhaps it&#039;s RLE encoded?  Actually just before that there&#039;s the number 0x6CAA.  If you go a bit less than 0x6CAA bytes after this you end up with another table, which to me suggests that 0x6CAA is the decompressed size of that first table. -- [[User:Malvineous|Malvineous]] 13:01, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:If I remember it correctly, the VGA sprites and tiles are RLE compressed and it&#039;s not too hard to decompress them. The positions of the enemies in the levels on the other hand are still a mystery to me. [[User:Calvero|Calvero]] 20:43, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Looking at the levels, which directly follow the VGA palette, they seem to contain 256 bytes of header data, then the 100x10 tiles, then eight bytes of lead-out data.  Then the next level&#039;s 256 bytes of header, 100x10 tiles, then eight bytes of lead-out.  Although I say &amp;quot;level&amp;quot;, the first &amp;quot;level&amp;quot; seems to contain both level 1 and 2, and this seems to be the way it works in the game - in some levels you can see through to others.  I&#039;m not sure what the 256 bytes of header data are for, but some levels have FF FF 00 00 repeated which seems to indicate two uint16 fields which are blanked out for those levels. -- [[User:Malvineous|Malvineous]] 13:15, 13 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
::First up, levels; where does level 1 start? It&#039;s possible I&#039;m reading the start of a level as the previous level&#039;s end, I looked for the start of tile data, which I assumed, like Keen 1, would be the level start.&lt;br /&gt;
&lt;br /&gt;
::Next, palette; I&#039;m assuming, as you said, it is located just before the level data?&lt;br /&gt;
&lt;br /&gt;
::There is VGA and CGA graphics in the executable, plus headers, but the bulk of graphics for CGA and VGA I haven&#039;t been able to locate. If the data is RLE compressed I should think it would use either Keen 1-3 fullscreen or Jazz Jackrabbit tile RLE, both of which I know well. I&#039;ll look into both of these options, cheers! -[[User:Levellass|Endian? What are you on about?]] 12:03, 20 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::I&#039;ve found the VGA and CGA data for the menu graphics.  It looks like the CGA data is stored in a series of 1-bit-per-pixel (monochrome) images.  Or it could be EGA data with the planes split out (e.g. red plane for all images, then green plane for all images, etc.)  I think I found three planes which means it&#039;s probably EGA, as CGA would have a max of two planes.  I&#039;ve also found the font graphics, this looks like 4bpp/16 colour EGA data.  Haven&#039;t seen level graphics yet.  I&#039;ve successfully modded the levels with a hex editor (putting the jetpack everywhere) so now I&#039;ve finally looked at all the levels!  The creatures are definitely not stored in the 100x10 tile data.  Putting random bytes in there revealed that the values are indices into the image files, because if you put the value in for fire it will animate, and the following three or so values show up as still frames from the fire animation.&lt;br /&gt;
&lt;br /&gt;
:::The VGA palette starts at 0x26B0A (I updated the main DDave page with this) + 768 bytes leads straight onto the start of level 1 at 0x26E0A.  So at 0x26E0A there are 256 bytes of data, then 100x10 tiles, then 24 bytes of footer data.  Some of this data (perhaps footer data) might be the level start coordinates, because Dave doesn&#039;t always start the level at the same place (e.g. the warp level when you climb the tree on level 5 and jump off the edge of the screen.) -- [[User:Malvineous|Malvineous]] 12:24, 20 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::I think I&#039;ve found all the files so far, I&#039;ve updated [[Dangerous Dave]] with the offsets of the files, including what appears to be CGA and VGA tiles.  I&#039;m not sure what sort of format they&#039;re in though, it looks like they might be compressed (and so the offsets in that list might be off by ~4, as I may have cut off the decompressed-size field.)  I&#039;ve also updated the map format page, I think it&#039;s pretty much fully reverse engineered now. -- [[User:Malvineous|Malvineous]] 05:13, 21 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Noahs Ark 3D and IMFs ==&lt;br /&gt;
&lt;br /&gt;
Been poking around Noah&#039;s Ark 3D, an adaption of the Wolfenstein game and found a few interesting things which I&#039;m hoping to confirm.&lt;br /&gt;
&lt;br /&gt;
First, the game uses MID files, not IMF files for music, second, the MIDI files have an extra word at the start of the file giving the file length. Third, the code uses the first word of the midi file as the length of data to read from the file and put into memory to play. After poking around a bit in Wolfenstein and Keen I believe this is the same with IMF files, that is, ALL IMF files are type 0 as it were and the type 1s are read just like type 0s by the games (The first word is read as the amount of IMF data to copy into memory to play, this is then read as type 0.) I&#039;m not quite sure what this does for the two types since type 1 is would essentially be a type 0 with a header and footer that are part of the AUDIO.xxx format, much like PC\adlib sounds can have the huffman lengths at the start. Are there any games that use &#039;individual&#039; type 1 IMFs (Even if included as part of a group file. All I&#039;ve seen are games like cosmo, where non-AUDIO IMFs are type 0.)&lt;br /&gt;
&lt;br /&gt;
Should there be a Noah&#039;s Ark 3D page and should we add the midi note to the AUDIO format page? It seems that the format can hold any type of music file the game can read, not just IMFs.  -- Levellass&lt;br /&gt;
&lt;br /&gt;
: Yes it is known that the type-1 header might really be part of the AUDIO.xxx format but alas there were many type-1 files floating around the place (incorrectly extracted, you could argue) before this was realised, so the format variant is here to stay.  It does have some advantages though (like tagging files with the song title) but I&#039;m not sure whether anyone has figured out definitively whether the header (and footer, in the case of the Wolf3D files) belongs to the IMF or the AUDIO file.  I guess you&#039;d have to browse the game source code and see how the game uses the data to know for sure.&lt;br /&gt;
&lt;br /&gt;
: As far as the MIDI goes, I believe the AUDIO.xxx file is just a container file like any other, capable of supporting any data at all.  It&#039;s up to the game to decide how to use it.  If anything this makes me think it would fit better if the AUDIO.xxx article was merely documenting the structure, with links to actual audio formats like PC SFX, Adlib SFX, IMF and MIDI and notes about which games make use of which formats.&lt;br /&gt;
&lt;br /&gt;
: Oh and yes, by all means create a page for the new game. -- [[User:Malvineous|Malvineous]] 08:41, 3 February 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Sound Files category ==&lt;br /&gt;
&lt;br /&gt;
I don’t know why there’s a Sound Files category and also an Audio Files category... it seems redundant. I left those categories the way they are though.&lt;br /&gt;
&lt;br /&gt;
Also, the [[File format data types]] page needs some signed ints, but I didn’t know what naming convention you wanted to use. I described something as an [[INT16LE]] on [[BMC Format]]. [[User:Yellowantphil|Yellowantphil]] 20:12, 11 September 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Not sure about the Sound vs Audio - I use the term &#039;audio&#039; to mean both sound and music, but you&#039;re right, if there are separate sound and music categories we don&#039;t really need an audio one as well.  Feel free to update.  [[INT16LE]] is perfectly fine too!  I added a note to the data types page. -- [[User:Malvineous|Malvineous]] 22:30, 11 September 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
== GamePage template ==&lt;br /&gt;
&lt;br /&gt;
Should the GamePage template add the page to its own category? It seems a little odd that [[Wacky Wheels]] is not in the Wacky Wheels category. [[User:Yellowantphil|Yellowantphil]] 04:51, 16 September 2011 (GMT)&lt;br /&gt;
: I decided against this because there is a link to the game&#039;s page in the category intro at the top of the page.  It seemed unnecessary having another link in amongst all the other pages.  This was also because the game page was really only meant to be a summary, there wasn&#039;t supposed to be a huge amount of detail on it, only links to other pages with the detail (which then would appear in the category list.)  I would imagine that, eventually, [[Wacky Wheels]] would be tweaked to move a lot of the content onto subpages. -- [[User:Malvineous|Malvineous]] 12:58, 16 September 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Scope of the wiki ==&lt;br /&gt;
&lt;br /&gt;
I don’t know how extensive you want the information to be on ModdingWiki... I added a few lists of audio and graphics files a while ago, and there will probably be other information that I’ll find out that’s potentially helpful for level editing but not directly related to it. I can move some information to my website if it starts to become out of scope for your wiki. I also sometimes end up documenting everything imaginable... there’s some minutiae on my website and possibly on your wiki that I ought to go through and delete. [[User:Yellowantphil|Yellowantphil]] 05:28, 10 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
:Hmm, that&#039;s a difficult one - I&#039;m always in favour of documenting more rather than less.  Generally speaking if it&#039;s related to a game and it would help either a programmer writing a utility or a someone trying to change a game manually then it should be documented.  About the only thing that comes to mind that&#039;s over documenting is when some small calculation is expressed in a couple of different programming languages, but I&#039;ve left that in so people can just copy it rather than trying to figure it out from the text.  But the [[Wacky Wheels]] page is probably the gold standard for what all wiki pages should look like :-)  Do you have anything in particular you&#039;re unsure of whether it would fit here? -- [[User:Malvineous|Malvineous]] 10:07, 10 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
::I was mainly thinking of the list of VOC files on [[Wacky Wheels Music and Sound Effects]] and the list of &amp;lt;tt&amp;gt;*.sp&amp;lt;/tt&amp;gt; files on [[Wacky Wheels Graphics Formats]]. I have an expanded list of the &amp;lt;tt&amp;gt;*.sp&amp;lt;/tt&amp;gt; files on my computer but it isn’t finished yet. I guess there isn’t all that much more Wacky Wheels information to be added to this wiki though. There is still some modding information on my website that ought to be moved over here, so that would take up another page or two. I’ve been lazy about doing Wacky Wheels stuff lately, but I might find some time for it this weekend.&lt;br /&gt;
&lt;br /&gt;
::By the way, I guess that guy from Cascadia Games emailed you. It’s pretty interesting that WW might become an iPhone app. He told me that he was going to be using his own game engine, which sounds a lot easier than trying to get a hold of the WW source code and porting it. —[[User:Yellowantphil|Yellowantphil]] 16:46, 15 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: I was going to say the list of VOCs might be overkill, but then the list of .sp files might be useful.  To be honest, it&#039;s the sort of thing that you could probably omit if you were feeling lazy, but likewise I don&#039;t mind at all if you choose to include it, so since it&#039;s already there I&#039;m happy to keep it.&lt;br /&gt;
&lt;br /&gt;
::: Yes I did get an e-mail from Cascadia, I was going to pass along your details but it sounds like you&#039;re already aware of it!  Using their own engine might make it a bit smoother than the original, as the jerkiness of turning is my only criticism of the game. -- [[User:Malvineous|Malvineous]] 00:14, 16 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
:I&#039;d like to document not only the format of some game archives but also their contents. This would be quite long lists of basically images, sprites and some minor stuff. I&#039;d also like to upload the actual images alongside but I&#039;m not sure whether that fits the scope of the wiki or if I should just put it somewhere on github. Any advice highly welcome :) -- [[User:Yetmorecode|Yetmorecode]] 15:25, 22 December 2020&lt;br /&gt;
&lt;br /&gt;
::That depends on what you mean with &amp;quot;their contents&amp;quot;. Documenting the used file formats is obviously in the scope of this wiki, since there&#039;s not much point in being able to extract/replace the files in those archives if you can&#039;t actually view those files or make those replacements. But dumping the whole list of all existing files in a game into a wiki article is usually not very useful. An article could highlight some specific files with special functions in the game (stuff like the remap-defining PALETTE.CPS in Red Alert 1 comes to mind; [[Westwood CPS Format|cps]] is a very normal image format in these games, but that specific file controls all recolouring of sprites that change to their owner&#039;s colour), but a list of all sprites and sound files and all their exact usages in the game doesn&#039;t seem like it&#039;d belong here; most of the time such things are pretty self-evident.&lt;br /&gt;
::PS: when you add something to a user talk page, use the signature code to give your note a clearly visible author and date stamp. There&#039;s a big red box on the top of the edit page telling you how to do that.&lt;br /&gt;
:: --[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:51, 22 December 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Alright that makes sense. Sorry about the signature I must have been blind. [[User:Yetmorecode|Yetmorecode]] ([[User talk:Yetmorecode|talk]]) 17:11, 22 December 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: Yes just to confirm this, an image or two is useful to illustrate a file format but we don&#039;t want to become an archive of all game material, not least of which because extracting this is often against the game&#039;s licence (and doesn&#039;t really come under &amp;quot;fair use&amp;quot;) so could open you up to legal trouble if the current copyright owner takes exception to it.  If you come across something hidden or undocumented you can put it on [https://tcrf.net/The_Cutting_Room_Floor The Cutting Room Floor] otherwise [https://pages.github.com/ GitHub Pages] may work as you&#039;ve suggested (if you fly under the copyright radar!) -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 07:08, 23 December 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Wacky Wheels ==&lt;br /&gt;
&lt;br /&gt;
Basically all of the WW modding information from my website is here now. I moved one page when I realized it should probably be capitalized to match the rest of the pages on this site... you can delete the redirect at [[Wacky Wheels high score files]] if you want to.&lt;br /&gt;
&lt;br /&gt;
Now, I need to remove most of the modding information from my website and refer people here. Then we’ll have reached the glorious future where all WW modding information is in one place. I’m going to keep those two text files of notes on my website though—the information in them is disorganized and I think not 100% accurate, but they might have some information that isn’t here yet.&lt;br /&gt;
&lt;br /&gt;
By the way, how’s Camoto going? I’m planning to use it to make a new WW level, but I won’t have time for it for a few more months. —[[User:Yellowantphil|Yellowantphil]]&lt;br /&gt;
&lt;br /&gt;
: Sounds good!  Thanks for all the effort you&#039;ve put in by moving it across.  I think Wacky Wheels is now the most completely documented game on the wiki!  Also can&#039;t hurt leaving your own info up - sometimes it&#039;s nice to go back to the original source if something is unclear.  Camoto&#039;s going well, but unfortunately I haven&#039;t had much time to work on it over the last few weeks.  You probably won&#039;t be able to make much of a level until I add in the ability to select a tile from the tileset, but that&#039;s in progress and hopefully will be ready by the time you are!  Keep me posted when you do start your level(s?) -- [[User:Malvineous|Malvineous]] 12:22, 2 February 2012 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Well, as I was reading some of the information on my website, I noticed that it isn’t written very well. I wrote those pages back when I had very little experience programming. Anyway, I’m planning to redesign my website soon, and this will save me from having to rewrite a few of those pages.&lt;br /&gt;
&lt;br /&gt;
::The tile editor in Camoto as it is now is still certainly useful—I can add new tile types to a level using a binary editor and then move them around in Camoto. I think that it shouldn’t be too hard to make a new WW level using the Gimp and Camoto plus some binary editing. I recall having some problems with the route editor for the computer players, but I didn’t look into it at the time—I’ll let you know when I’m working with Camoto again, and I’ll try to come up with some useful bug reports or fixes if I run into problems. —[[User:Yellowantphil|Yellowantphil]] 14:06, 2 February 2012 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Catacomb ==&lt;br /&gt;
&lt;br /&gt;
Hey [[User:Malvineous|Malvineous]], do you know anyone who has properly read the [[Inverse_Frequency_Sound_format|Inverse Sound Frequency]] file format and got the sound playing? I&#039;m struggling with some fine details in my game. Sounds play near what they should sound like, but the sound quality is all crackly and some sounds play totally incorrect. I followed a basic [http://web.archive.org/web/20000818033701/http://www.dd.chalmers.se/~f98anga/projects/keen/sounds2raw.c code sample] by Anders Gavare. Does your tool support this? Interested in helping me figure this out? My current code is available at [https://code.google.com/p/cataclone/source/browse/trunk/src/catacomb/catacomb_sound.c catacomb_sound.c] - [[User:Eros|Eros]] 11:57, 5 May 2012 (GMT)&lt;br /&gt;
: Should this be moved to my talk page? - [[User:Eros|Eros]] 11:59, 5 May 2012 (GMT)&lt;br /&gt;
:: Probably best to keep it on my talk page if you want me to respond in a timely manner :-)  I based my old utility off Anders&#039; one too, but it&#039;s been a long time since I looked at the code.  My latest utility doesn&#039;t support sound effects yet.  I know Levellass has written a few utilities to play and edit those sound files, so I think your best bet would probably be to post over at the [http://www.keenmodding.org Keen:Modding] forum.  Do note that PC Speaker effects do sound crackly at the best of times, though!  Also make sure you&#039;ve got the right audio format (8-bit vs 16-bit, signed vs unsigned) - I remember some inconsistencies there causing some very distorted results for me.  I love the name &#039;Cataclone&#039; - does your code compile under Linux? -- [[User:Malvineous|Malvineous]] 13:21, 5 May 2012 (GMT)&lt;br /&gt;
::: I currently compile the code using Code::Blocks with GCC 4.6 -std=gnu99. It *should* compile under Linux. But I haven&#039;t tested that out yet. [[Catacomb]] sounds also have flags attached to each one, It&#039;s not exactly the same specification as what it says @ the [[Inverse_Frequency_Sound_format|Inverse Sound Frequency]] format page. Perhaps the flags would make a difference to the sounds? I have the sound setup @ [https://code.google.com/p/cataclone/source/browse/trunk/src/sound_manager.c sound_manager.c] in the sound_manager_init() method. I use AUDIO_S16 (signed 16-bit) @ 22050 Hz with 2 channels. I have not added support for the priority of the sounds yet, I plan on doing that after I get them playing properly.&lt;br /&gt;
::: I found some information on the [[ROTT]] sound format here: [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/_rt_soun.h _rt_soun.h]. This format should be similar to Catacomb as ROTT was developed by [[Apogee]] using the [[Doom]] engine. Here are the flags for the sounds that they define:&lt;br /&gt;
 #define SD_OVERWRITE     0x01&lt;br /&gt;
 #define SD_WRITE         0x02&lt;br /&gt;
 #define SD_LOOP          0x04&lt;br /&gt;
 #define SD_PITCHSHIFTOFF 0x08&lt;br /&gt;
 #define SD_PLAYONCE      0x10&lt;br /&gt;
::: There are also many other sound files for ROTT: [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/rt_sound.c], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/rt_sound.h], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/snd_reg.h], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/snd_shar.h], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/sndcards.h]&lt;br /&gt;
:::: I tried it last night and I was able to get it to compile (after a few changes, like using &#039;/&#039; instead of &#039;\&#039; in a couple of #includes) but all I got was a black window and a beep sound, then nothing.  How far advanced is the project?  Should I expect more than that?  I would expect small variations in the file formats between games, but I would be surprised if the core sound data has changed over time. -- [[User:Malvineous|Malvineous]] 02:38, 6 May 2012 (GMT)&lt;br /&gt;
::::: On Windows, you can run around the levels, collide with walls, collect items, etc... I still need to implement monsters, AI and power shots. However, that beep means that the sounds playing. (see line 71 in main.c: catacomb_sounds_play(&amp;quot;foundsound&amp;quot;);). I just committed the catacomb_data.h file. Update it accordingly, you should now see much more than a black screen.&lt;br /&gt;
:::::: Oh wow, that works really well now!  I see what you mean by the sounds.  You might have to output the PCM data to a .wav/.raw file and look at it in a sound editor to see what&#039;s going on.  It sounds like there might be wrapping or something going on.  Also some sounds (like being blocked by a door) play multiple times over the top of themselves.  I guess this is what you meant by priority not being implemented (although maybe you wouldn&#039;t need to handle priority if you can play multiple sounds at the same time, unlike the real PC Speaker.)  One suggestion - if you do decide to support Linux, abstract the calls that open files so that they search for filenames instead - that way you don&#039;t have to rename all the Catacomb files to be uppercase, since Linux has a case-sensitive filesystem and most filenames are usually all lowercase. -- [[User:Malvineous|Malvineous]] 03:42, 6 May 2012 (GMT)&lt;br /&gt;
::::::: I have exported the raw data to a file, then imported the raw data into Audacity using various settings. All of them sound like they do in the game, crackly and sometimes distorted. I really think its some sort of post FX used by the flags. As for files, I&#039;ll code some sort of SafeFileOpen, SafeFileClose functions like the id codebase that open files regardless of case when i get around to implementing the Linux version. - [[User:Eros|Eros]] 03:54, 6 May 2012 (GMT)&lt;br /&gt;
:::::::: If you can e-mail me one of the files (preferably a &#039;quiet&#039; one that&#039;s not supposed to be crackly) I can take a look if you like - malvineous@shikadi.net -- [[User:Malvineous|Malvineous]] 03:57, 6 May 2012 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Merge ==&lt;br /&gt;
&lt;br /&gt;
Is there a way to tag two pages such that it is clear that they should be merged?&lt;br /&gt;
For example, [[Crystal Caves Tileset Format]] describes the same format as [[Duke 1 Tileset Graphics]].[[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 21:00, 15 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
: You can mention it on the talk page for one of the articles.  Any suggestions as to what we should call the merged page? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 03:09, 20 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Dark Ages is the first game that got released that uses this format, so &#039;&#039;Dark Ages Tileset Format&#039;&#039; could be the name, like all those formats that are named after Commander Keen 1-3.&lt;br /&gt;
::Or we name it after Duke Nukem 1, because that game is probably more popular than Dark Ages, Crystal Caves and Secret Agent, like [[Commander Keen 1-3 Level format]], although Slordax used it before Commander Keen 1-3 did.[[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 19:13, 20 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: Yes I was thinking along the same lines, naming it after the first game that used the format.  But then the release date doesn&#039;t necessarily indicate which game &amp;quot;invented&amp;quot; the format, if one game took longer to develop and was released late.  I was wondering whether there is a common thread amongst all these games, such as the same programmer or company we could use instead.  In many ways I would prefer a name like &amp;quot;Replogle tileset format&amp;quot; or &amp;quot;Apogee EGA tileset format&amp;quot;.  What do you think? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 23:36, 20 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: I&#039;ve read the [http://www.3drealms.com/news/2006/04/the_apogee_legacy_15.html | Apogee Legacy interview with Peder Jungck] again today. He wrote the ProGraphx Toolbox.&lt;br /&gt;
:::: DN1.EXE contains the string &#039;&#039;Version 1.0 EGA/VGAProGraphx EGA/VGA Toolbox&#039;&#039;,&lt;br /&gt;
:::: CC1.EXE contains the string &#039;&#039;Version 1.5 320x200 PAN EGA/VGAProGraphx EGA/VGA Toolbox&#039;&#039;,&lt;br /&gt;
:::: SAM1.EXE contains the string &#039;&#039;ProGraphx EGA/VGA Toolbox Version 2.0 320x200 EGA/VGA Copyright 1991 by Peder Jungck&#039;&#039; and&lt;br /&gt;
:::: DA3.EXE contains the string &#039;&#039;Version 1.0 EGA/VGAProGraphx EGA/VGA Toolbox&#039;&#039; (DA1.EXE and DA2.exe contain gibberish).&lt;br /&gt;
:::: So I would suggest &#039;&#039;ProGraphx Toolbox tileset format&#039;&#039;. Peder also wrote a book about the toolbox called &#039;&#039;Graphics Programming &amp;amp; Animation: Ultra-Fast Assembly Routines for EGA/VGA Graphics Animation&#039;&#039;. Maybe that book has a better name for the file format. [[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 11:03, 21 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: So we know of three different versions of the ProGraphx Toolbox. Dark Ages and Duke Nukem 1 use version 1.0. Each tileset is 8064 bytes long and is in a separate file. Crystal Caves uses version 1.5 and each tileset is 8003 bytes long, but they are all in the same file. Secret Agent uses version 2.0 Each tileset is again 8064 bytes long, they are all in the same file and the file is encrypted. [[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 17:00, 28 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::: Thanks for figuring all that out.  I&#039;ve merged the pages and changed the name to [[ProGraphx Toolbox tileset format]] as suggested.  Please feel free to correct anything I have missed. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 02:40, 4 August 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Guidelines for proper Wiki Editing ==&lt;br /&gt;
Dear Malvineous! Could you post the guidelines (or guide) for proper editing of the Wiki? [[User:The coder|The coder]] ([[User talk:The coder|talk]])&lt;br /&gt;
: Hmm, there isn&#039;t really one, it&#039;s more about finding a similar page and matching the style found there!  Copy and paste works well :-)  There is [[ModdingWiki:Contributing]] but it&#039;s not very detailed. (BTW please put &amp;lt;nowiki&amp;gt;~~~~&amp;lt;/nowiki&amp;gt; at the end of your messages, when you preview the page you will see this gets replaced with your name and the date automatically.) -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 21:59, 12 December 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
== VGFM Music Format ==&lt;br /&gt;
&lt;br /&gt;
Hello, Malvineous!&lt;br /&gt;
&lt;br /&gt;
I accidentally found that [[VGFM Music Format]] is absolutely similar to the [http://www.vgmpf.com/Wiki/index.php?title=MUS_(AdLib) MUS (AdLib)] format which I finished researching yesterday.&lt;br /&gt;
&lt;br /&gt;
And [[VGFM Instrument Format]] is similar to [http://www.vgmpf.com/Wiki/index.php?title=SND_(AdLib) SND (AdLib)].&lt;br /&gt;
&lt;br /&gt;
These formats were developed by Ad Lib Inc, I found the sources and documentation in the Ad Lib developer&#039;s manual downloaded from old BBS board site :)  And these formats are used not only in [[Vinyl Goddess From Mars]] game.&lt;br /&gt;
&lt;br /&gt;
--[[User:Binarymaster|Binarymaster]] ([[User talk:Binarymaster|talk]]) 02:05, 22 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Oh wow, what an interesting discovery!!  Do you have any links to the official documentation?  I&#039;d really like to see what else they have to say about the format.  And yes, we should definitely rename the articles here.  What do you think they should be called?  &amp;quot;Ad Lib Music Format&amp;quot; is probably a bit generic given they have a few, like .ROL... -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 09:45, 22 January 2015 (UTC)&lt;br /&gt;
:: Here it is: [http://files.mpoli.fi/software/programm/general/adlip.zip adlip.zip] - binaries and source code, probably from Ad Lib Programmer&#039;s Manual. MUS headers are described in CONVERT.C and CONVERT.H files. Fun fact that they also developed another similar format based on MIDI - [http://www.vgmpf.com/Wiki/index.php?title=MDI MDI]. It has similar musical features but stores all data in one file in MIDI format.&lt;br /&gt;
:: Well, I have no idea how to name it better, I think &amp;quot;Ad Lib Music Format&amp;quot; should be suitable for it :) --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 10:30, 22 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Many thanks!!  I&#039;ve updated the article pages with the info I could gain from the source code.  There are still a few unresolved issues (like what exactly the default percussion pitch is) but it has certainly answered a number of questions.  I called it &amp;quot;AdLib MIDI Format&amp;quot; because that&#039;s the name they use in one place in the source code, although it&#039;s not a very descriptive title!  Thanks again for letting me know about this excellent find :-) -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 12:48, 24 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: That&#039;s good! I think maybe this format should be named as &amp;quot;AdLib MIDI Format v1.0&amp;quot;, because there is also an improved version of it, probably v2.0 - [http://www.vgmpf.com/Wiki/index.php?title=MDI MDI] (I made a typo in previous posted link), it uses a single file in MIDI format.&lt;br /&gt;
:::: And about [[AdLib Timbre Bank Format]] article - BNK format originally was created in the 1987 with the first release of the [http://www.vgmpf.com/Wiki/index.php?title=AdLib_Visual_Composer AdLib Visual Composer], so actually Ad Lib Inc released its formats in this order:&lt;br /&gt;
:::: &#039;&#039;&#039;1)&#039;&#039;&#039; ROL &amp;amp; BNK (1987, with AdLib Visual Composer)&lt;br /&gt;
:::: &#039;&#039;&#039;2)&#039;&#039;&#039; MUS &amp;amp; SND/TIM (1988, with player and converter)&lt;br /&gt;
:::: &#039;&#039;&#039;3)&#039;&#039;&#039; MDI (1989, also with player and converter)&lt;br /&gt;
:::: Information about third format was placed [http://cd.textfiles.com/soundsensations/MISCPROG/AD-PROG/ here], though the link is not working now.&lt;br /&gt;
:::: --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 13:08, 24 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: Oh wow that&#039;s interesting too.  I think the MUS/SND/TIM format should stay as &amp;quot;AdLib MIDI Format&amp;quot; with no version number, because that file format does have version fields so it&#039;s possible to have v1.0, v2.3, etc. within that format.  The MDI article you linked to actually looks like conventional MIDI with some extra events for setting OPL instruments, so I think this belongs as one of the many backwards-compatible extensions of the [[MID Format]].&lt;br /&gt;
&lt;br /&gt;
::::: With the instrument bank formats that&#039;s really unusual if BNK came first!  It seems very odd for AdLib to produce the SND/TIM format if they already had the more efficient BNK format available.  I was going from the dates in the text files from the programmer&#039;s guide you kindly posted, and bkformat.txt says in Jan 1989 they are in the process of converting their software to use BNK.  Can you confirm there was BNK software earlier than this?  I&#039;m just thinking that Visual Composer may have come out in 1987, but maybe it didn&#039;t get BNK support added until later? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 01:30, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::::: Well, I&#039;m sure that first version of Visual Composer was released with AdLib music card, but I don&#039;t know exactly about BNK support. It&#039;s really strange that Ad Lib downgraded the format (BNK is better in structure), but the known formats has converters which converts BNK to X format, but not from X to BNK - this makes sense that BNK was the first format. Also Visual Composer doesn&#039;t support other bank formats, only BNK.&lt;br /&gt;
:::::: BNK creation date 1987 was contributed by [http://www.vgmpf.com/Wiki/index.php?title=User:TheAlmightyGuru Dean Tersigni], I&#039;ll ask him about it.&lt;br /&gt;
&lt;br /&gt;
:::::: Update: I also read information from bkformat.txt, and it seems you&#039;re right :)&lt;br /&gt;
:::::: So actually it was:&lt;br /&gt;
:::::: &#039;&#039;&#039;1)&#039;&#039;&#039; ROL &amp;amp; INS (1987, with AdLib Visual Composer v1.0)&lt;br /&gt;
:::::: &#039;&#039;&#039;2)&#039;&#039;&#039; MUS &amp;amp; SND/TIM (1988, with player and converter)&lt;br /&gt;
:::::: &#039;&#039;&#039;3)&#039;&#039;&#039; BNK (1989, with AdLib Visual Composer v1.5)&lt;br /&gt;
:::::: &#039;&#039;&#039;4)&#039;&#039;&#039; MDI (1989, also with player and converter)&lt;br /&gt;
:::::: Wow, that feel when restored original order of events! :D --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 01:51, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::::: That seems to make the most logical sense - there&#039;s a clear improvement with each new format.  I&#039;m glad you agree!  Note that when you say there&#039;s no conversion from &amp;quot;X to BNK&amp;quot; there is BANKMNG.EXE that comes with the programmer&#039;s manual which converts .ins files to .bnk. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 04:09, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::::::: True. I forgot about it :) Thanks! --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 12:02, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
== email ==&lt;br /&gt;
&lt;br /&gt;
Hello! Can&#039;t send you e-mail. Got this:&lt;br /&gt;
&lt;br /&gt;
 This message was created automatically by mail delivery software.&lt;br /&gt;
 A message that you sent could not be delivered to one or more of its&lt;br /&gt;
 recipients. This is a permanent error. The following address(es) failed:&lt;br /&gt;
 malvineous@shikadi.net&lt;br /&gt;
 host mail.shikadi.net [52.11.27.19]&lt;br /&gt;
 SMTP error from remote mail server after RCPT TO:&amp;lt;malvineous@shikadi.net&amp;gt;:&lt;br /&gt;
 550 invalid recipient&lt;br /&gt;
&lt;br /&gt;
[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 09:12, 11 March 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Whoops, moved my e-mail service to AWS and missed a step for that address!  Please resend, should work now :-)  Thanks for letting me know! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 11:34, 11 March 2017 (UTC)&lt;br /&gt;
::Yes, e-mail goes through this time. Hope you receive it. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 15:41, 11 March 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Duplicate RLE page ==&lt;br /&gt;
&lt;br /&gt;
After some edits to the [[RLE Compression]] page, I noticed that this was not the page linked from the [[:Category:Compression algorithms]] page. It seems there are in fact two of them; one with an uppercase &#039;c&#039;, and [[RLE compression|one with a lowercase &#039;c&#039;]]. The latter seems to be the better-written one, but since the LZW page was apparently moved from &amp;quot;LZW compression&amp;quot; to &amp;quot;LZW Compression&amp;quot;, I suggest the final name of the RLE page should likewise be the uppercase-&#039;c&#039; one.&lt;br /&gt;
&lt;br /&gt;
I have merged anything I deemed useful into the lowercase-&#039;c&#039; version. Could you make sure the uppercase-&#039;c&#039; duplicate is removed, and the other one is moved to its name?&lt;br /&gt;
&lt;br /&gt;
-[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:48, 4 October 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Done, many thanks for the clean up! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:38, 5 October 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Account rename? ==&lt;br /&gt;
Hi Malvineous,&lt;br /&gt;
&lt;br /&gt;
I am wondering if it&#039;s much of a hassle to rename accounts on this wiki.  I&#039;d kind of like to have my account use the same handle I&#039;m using just about everywhere else (ETTiNGRiNDER).  Don&#039;t sweat it too much if this is onerous to do, though.&lt;br /&gt;
&lt;br /&gt;
Thanks! - [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 20:42, 29 January 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
: I&#039;m not sure how it can be done.  If you can find out a quick way to rename a MediaWiki account then let me know!  At any rate all your comments would still be signed with your old name however. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:15, 4 February 2018 (UTC)&lt;br /&gt;
: P.S. the e-mail address in your account is bouncing -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:17, 4 February 2018 (UTC)&lt;br /&gt;
:: Ah, right, it was still set to that old e-mail.  Hushmail nuked that address on me years ago, I&#039;ve changed it to one that&#039;s current.  As for the renaming, I don&#039;t really know anything about wiki administration, though a quick search suggests that there&#039;s this thing: https://www.mediawiki.org/wiki/Extension:Renameuser&lt;br /&gt;
::If that&#039;s a bit much then no biggie. -- [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 14:43, 5 February 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Removal request ==&lt;br /&gt;
&lt;br /&gt;
It seems I made a page that was unnecessary; the [[Westwood Palette]] I documented turned out to be a known common format (6-bit RGB) already covered in the standard [[VGA Palette]] page. I have changed all links to link to the older page, but I don&#039;t think I have the user rights required to delete the Westwood Palette page. Can you take care of it? -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:56, 6 February 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Done!  I made you an admin too so you should have delete access now.  Thanks for your contributions! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 00:03, 7 February 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Hi-Octane ==&lt;br /&gt;
&lt;br /&gt;
Hi! &lt;br /&gt;
&lt;br /&gt;
I&#039;ve figured out the MUSIC.DAT container and I was wondering if you could shed out some light on what these song formats are, now that we know how to unpack it ?&lt;br /&gt;
&lt;br /&gt;
Thanks !!!&lt;br /&gt;
&lt;br /&gt;
: Yep, they&#039;re listed on the [[Hi Octane]] page, in the file format box. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:57, 14 March 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== ReCaptcha v1 problem ==&lt;br /&gt;
&lt;br /&gt;
It seems I can no longer add links in articles; the ReCaptcha test added when new links are detected uses ReCaptcha v1, which gives a warning that &amp;quot;reCAPTCHA 1 IS SHUTDOWN&amp;quot;. It does not allow the check to pass, so the page can never be submitted.&lt;br /&gt;
&lt;br /&gt;
The FAQ on the ReCaptcha docs (can&#039;t link to them, obviously) says that &amp;quot;&#039;&#039;&#039;Any calls to the v1 API will not work after March 31, 2018&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
-[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 09:26, 28 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Bio Menace patches ==&lt;br /&gt;
&lt;br /&gt;
Hey, I&#039;ll have Bio Menace 1 patches for the freeware release. Most of them are status window-related, but there are others as well.&lt;br /&gt;
Question: Could you create several other sections in All Bio Menace patches cathegory? Because I cannot submit them anywhere right now. Thanks! --[[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 00:57, 25 July 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
: The status window patches should go into [[:Category:Bio Menace interface patches]].  The others *should* fit into existing categories, but if you&#039;re not sure let me know! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 05:23, 29 July 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I&#039;ll need several categories from you as I checked there&#039;ll be other BM patch stuff as well. So I need the following categories: status screen, hostage, help menu, main menu, B800 screen (I even built the BIN file and I made patch for that!). And I&#039;ll even submit these for BM2 and 3. Please, create these. Oh, and I&#039;ll surely submit! --[[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 01:36, 1 August 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Status screen, hostage, help menu, main menu and B800 screen should all go into [[:Category:Bio Menace interface patches]] as they are all modifying the user interface.  I would like to keep the number of patch categories fairly small otherwise it will get a little out of control! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 01:48, 17 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Bio Menace patches on PCKF? ==&lt;br /&gt;
&lt;br /&gt;
Hey, how can I post my Bio Menace 1-3 patches on PCKF or keenmodding.org? I very want them to submit one of the forums!--[[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 23:11, 4 August 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Wombat File Reader updates! ==&lt;br /&gt;
&lt;br /&gt;
I think [[Wombat]]&#039;s title should be updated to show its full name, which now is &amp;quot;Wombat File Reader&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Also the supported games list has to be updated accordingly to the list on https://szevvy.com/ (the author&#039;s website, which was listed as &amp;quot;dead&amp;quot; in Wombat&#039;s info while the site is up and running again).&lt;br /&gt;
&lt;br /&gt;
It&#039;s also not a dead program at all, since its latest version is very recent (11 October 2018), and it&#039;d be a shame to have such old and deprecated information on this wiki of such a useful and powerful tool.&lt;br /&gt;
&lt;br /&gt;
-[[User:Elia1995|Elìa1995]] ([[User_talk:Elia1995|talk]]) 07:38, 15 October 2018‎ (UTC)&lt;br /&gt;
&lt;br /&gt;
: It&#039;s only just been updated recently after many years of no releases.  It&#039;s a bit unfair to say the wiki has old information when it&#039;s only a couple of weeks out of date, and it relies on people such as yourself to keep things up to date!  Please go ahead and correct as needed so we can keep the information current.  We are all doing this in our spare time so we need lots of help to keep things up to date.  Also, the page you link to lists it as &amp;quot;Wombat File Tools&amp;quot; rather than &amp;quot;Wombat File Reader&amp;quot;.  Everyone in the community refers to it as just &amp;quot;Wombat&amp;quot; however.  -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 23:27, 16 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I&#039;ve only just gotten my account here approved, and only just made new builds of Wombat (actually a complete rewrite) after (as Malvineous said) many many years of no releases.  It warms my heart to see people notice :) [[User:Szevvy|Szevvy]] ([[User talk:Szevvy|talk]]) 01:44, 17 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: I just noticed the 1.0.4 update, I&#039;ll work on updating the supported games list on the page according to the one on Szevvy&#039;s site; by the way, thanks for telling me how to &amp;quot;sign&amp;quot; these posts, I had no idea. [[User:Elia1995|Elia1995]] ([[User talk:Elia1995|talk]]) 08:08, 18 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== e-mail (again) ==&lt;br /&gt;
&lt;br /&gt;
Hello! Sent you e-mail 2019.02.19 about Prehistorik without any answer. Yesterday another e-mail was sent and since 24+ hours passed was forced to write here. Is there something wrong again with your e-mail account or spam filters (for mail.ru)? Thanks! [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 15:10, 1 March 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Content license ==&lt;br /&gt;
&lt;br /&gt;
Is the content of this wiki governed by a specific license? I&#039;d like to contribute information on &amp;quot;Nomad&amp;quot; file formats that I reverse engineered, which I&#039;d previously published on my personal web site under [http://creativecommons.org/licenses/by-sa/4.0/ Creative Commons SA 4.0]. This wiki certainly seems to be in the spirit of the Creative Commons licensing structure so I&#039;m guessing there would be no real conflict, but I just wanted to get some additional information on this. --[[User:Cmb|Cmb]] ([[User talk:Cmb|talk]]) 13:32, 6 May 2020 (UTC)&lt;br /&gt;
:Personally, I&#039;ve just [[RLE Compression#Source_code|added the license under which code was released]] myself. Then again I release everything under [[wp:WTFPL|WTFPL]], because I honestly don&#039;t mind people using anything I write for research purposes in any way they please, so license compatibility is a bit of a non-issue for me. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:04, 6 May 2020 (UTC)&lt;br /&gt;
:That said, though, given the current online climate, I do agree this is an issue that should be clarified here on the wiki. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:06, 6 May 2020 (UTC)&lt;br /&gt;
:: There is a licence specified somewhere but the short answer is anything you put here is basically in the public domain - because if someone steals it we don&#039;t have the resources to chase them, so if it&#039;s that valuable to you that you can&#039;t handle someone copying it without giving you credit, then don&#039;t post it here.  Having said that for &amp;quot;nice&amp;quot; users many of the pages ask for a mention if you find the content useful, but this is by no means a requirement.  I suppose legally speaking you&#039;ll have to dual-licence your Creative Commons content because some CC versions have additional restrictions, like you can&#039;t copy the content without giving credit.  The [https://creativecommons.org/choose/zero/ CC0 licence] pretty much covers it.  Putting a specific licence on code is fine (although no licence at all would be best so it inherits the wiki&#039;s general content licence), noting that any licence enforcement will be on you, but the content itself is always going to be CC0/public domain. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 05:48, 10 June 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Multiple Platforms ==&lt;br /&gt;
&lt;br /&gt;
Should anything special be done for games that are both DOS and Win95, like [[Warcraft II]] and [[Command &amp;amp; Conquer]]? As it is, the template only supports one &#039;Platform&#039;. I don&#039;t know enough about templates to make it accept lists, though a workaround would be to add the Win95 category to such games manually. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) &lt;br /&gt;
20:29, 17 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
: I&#039;m open to suggestions, but the purpose of the platform category is less about documenting all platforms a game runs on, and is more about identifying which games on the wiki don&#039;t work under DOS, since DOS is the wiki&#039;s main focus.  So think of it more as the &amp;quot;minimum&amp;quot; platform needed - i.e. a DOS game can also run inside Win3.x and Win95, a Win3.x game can also run under Win9x but not DOS, and a Win9x game can&#039;t run under DOS or Win3.x at all.  So for DOS/Windows games DOS would be the oldest platform needed to play the game, even if there is a native Windows version. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 00:26, 18 April 2022 (GMT)&lt;br /&gt;
::&#039;Minimum platform&#039; isn&#039;t really true anymore when going to the reality of getting stuff running on modern machines, though; 16-bit windows programs don&#039;t work on modern systems at all, and DOSBox can&#039;t emulate them. They&#039;re a pretty annoying in-between class. C&amp;amp;C95 has issues like that; while the game itself is 32-bit, its installer is a 16-bit Windows program. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:33, 18 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: That&#039;s true, but I wasn&#039;t thinking so much about modern systems.  If you&#039;re building a VM or setting up an old PC, knowing which games will work without Windows, or will work if you only install Win 3.1, might be useful.  I did think you could install Windows 3.1 in DOSBox though to run 16-bit apps.  At any rate, I more had in my mind which games required OS support for NE executables in order to play, and which ones required PE support. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 11:48, 18 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: Well, one of the specific cases I had in mind in this was the fact that the Win95 version of Command &amp;amp; Conquer uses PCX format for its title screen, while the DOS version doesn&#039;t. And while the basic modding of terrain and game objects is identical in both versions, all modding related to the game UI is different because of the different resolution. So, if more detailed information on that front would be added, it seems logical to also add the Win95 category somehow. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:17, 25 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: In that case it sounds almost like a different game that happens to share a lot of the same content, so I&#039;d be more inclined to list it as a separate game, e.g. on a page called &amp;quot;Command &amp;amp; Conquer (Windows version)&amp;quot;, and just put a note saying the file formats are the same as the DOS version with the following exceptions, then list the Windows-specific file formats. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 15:42, 25 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::: No, it&#039;s really just PCX, nothing else is new in terms of file formats. The UI is in the same sprites format used for the in-game sprites. So like 95% still the same. But yea, I guess if I do ever get around to writing a more in-depth modding guide, I could make a different page for the Win95 version. Most of the modding difference between the two games is just that the Win95 exe file has been researched a lot deeper, to the point that (with the released source code) pretty much anything in it can be changed nowadays. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:10, 25 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
==Empty Pages==&lt;br /&gt;
Not sure if you already noticed it, but user [[User:Parlortricks]] is creating a bunch of empty pages, I&#039;m assuming to be filled at a later date. --[[User:TheAlmightyGuru|TheAlmightyGuru]] ([[User talk:TheAlmightyGuru|talk]])&lt;br /&gt;
: I hadn&#039;t noticed, thanks for the heads up!  I updated [[ModdingWiki:Contributing]] to include some more points about when to create pages. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 04:31, 10 August 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
== File format category for copy-protection data. ==&lt;br /&gt;
&lt;br /&gt;
I can&#039;t find any suitable examples with a template that suits a file containing only the copy protection data.   &lt;br /&gt;
It&#039;s not text, but there don&#039;t seem to be any generic binary format templates. [[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 06:44, 17 April 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
: I&#039;m not really familiar with what copy protection data would contain.  What generic items would you think apply to this sort of data?  I&#039;m not so keen on adding a generic binary format category, it would be nice to have a specific one where possible. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 09:17, 17 April 2023 (GMT)&lt;br /&gt;
:: In this case, the file contains 750 passwords. They were printed on a piece of card in with the original game (in pale blue to thwart photocopying) and the game asks you for one of the passwords at random. I&#039;ll make a file without a specific category for now.[[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 12:31, 17 April 2023 (GMT)&lt;br /&gt;
::: If they&#039;re passwords, doesn&#039;t that make it a type of strings file? You said it&#039;s not &amp;quot;plain text&amp;quot;, but can it be converted/decoded to plain text? I&#039;ve dealt with encrypted text formats before; see [[Cover Girl Strip Poker Text]] -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:20, 17 April 2023 (GMT)&lt;br /&gt;
: There are lots of file formats of unspecified types. See stuff like [[Westwood Fading Table]]; it&#039;s basically a file storing special colour effects. I&#039;m not sure there&#039;s a point in making a template for every specific type like that; there&#039;s so many odd cases out there. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:17, 17 April 2023 (GMT)&lt;br /&gt;
:: Thanks.  I wasn&#039;t necessarily looking for a template. But I couldn&#039;t find an example of a file that wasn&#039;t already in an incorrect template. I&#039;ll base my page on the example you suggested.[[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 12:31, 17 April 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Wiki policy questions ==&lt;br /&gt;
&lt;br /&gt;
Hi, a couple questions I&#039;ve had lingering regarding how things should be done on the wiki / if they should be done at all.&lt;br /&gt;
* What should we do about game title disambiguation?  I think in cases like Warlords (SSG) vs. Warlords (Atari) where only one of the games was released as a DOS game, it&#039;s probably fine to just have a page for the one that&#039;s relevant and at most maybe have a note on its main page that it&#039;s not related to the other game, but I&#039;ve noticed that &amp;quot;Dungeon of Death&amp;quot; is a title that has the honor(?) of being used for two different games &#039;&#039;on DOS&#039;&#039;.  Is there a particular disambiguation format we should use when adding one of those?&lt;br /&gt;
* Is there any specific policy on games/mods with offensive content?  I know we have some strip poker type games referenced on the wiki, but one thing I&#039;m specifically thinking of is I know there was an old hack of the DOS version of Gauntlet 2 that&#039;s been floating around since the 90s, but is a fairly puerile affair that changes text/graphics to sexual and scatological references.  It also has a vulgar word in the mod title itself.  It might be useful to look at how it was done since it&#039;s clearly evidence that changing the text/graphics was attainable even back then, but do we want to document things like that, or is there a &amp;quot;too dirty&amp;quot; line where we should try to keep the wiki clean of references to certain games/mods due to title or content?&lt;br /&gt;
Thanks.-- [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 18:35, 3 October 2023 (GMT)&lt;br /&gt;
: Final decision on this is obviously on Malvineous, but here&#039;s my two cents on this: I don&#039;t think there&#039;s any restriction on making pages for covering games with explicit content, but it&#039;d be nice to keep the &#039;&#039;actual&#039;&#039; explicit content on the wiki to a minimum. As an example, the most daring thing I put on the wiki was the modded showcase image for [[Interactive Girls Club]], which, without the humorous covering, was indeed a straight up explicit image. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 19:23, 3 October 2023 (GMT)&lt;br /&gt;
:: Yep I agree.  The purpose of the wiki is for documentation, and just like a TV documentary, sometimes you may have to cover difficult subjects, so it&#039;s usually done in a tactful way without showing anything directly offensive.  So I think the same policy should apply here - no directly explicit/offensive content (e.g. images), but talking about it for the sake of documenting it is fine.  I would think avoiding offensive words in article titles would be a good idea as people are more likely to come across those by accident, but if you&#039;re browsing an article about a pornographic game and you encounter some dirty words, you have nobody to blame but yourself.  So listing that mod with an uncensored title is fine with me, but perhaps let&#039;s not create an article page for it unless the words are obscured with asterisks or similar just to be extra considerate to those who might be browsing through the lists of pages.&lt;br /&gt;
:: It would be good to make it clear when things are censored though.  In Nyerguds&#039; example I actually thought the &#039;censored&#039; image was part of the game, I didn&#039;t realise it was an addition.  So maybe it would be good to write &amp;quot;Censored by ModdingWiki&amp;quot; or something to that effect, to make it obvious that it&#039;s something we&#039;ve done and not part of the original game.  Likewise for an article title with asterisks in it, one of the first things on the page should be a note to say what the full uncensored article title actually is.&lt;br /&gt;
:: As for disambiguation I&#039;m open to suggestions.  Probably my first thought would be to include the year of release in brackets: &amp;quot;Example (1990)&amp;quot; like what was done for [[Shadow Warrior (1993 Beta)]] or if the year is the same, then perhaps the software developer: &amp;quot;Example (Microsoft)&amp;quot;.  I&#039;m not too fussed as it&#039;s probably more important that the part in brackets makes sense to readers rather than follows any hard and fast rule.  Either way a normal disambiguation page should be created for the name without any brackets, in the same style as the existing ones at [[:Category:Disambiguation]].  A disambiguation page wasn&#039;t created for Shadow Warrior as the beta version isn&#039;t really a competing game, so links on the respective article pages would suffice.  As always, use your best judgement, we can always change it later if we need to. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 06:10, 4 October 2023 (GMT)&lt;br /&gt;
::: The Interactive Girls Club image &#039;&#039;isn&#039;t&#039;&#039; censored for the sake of putting it on the wiki though. It&#039;s a showcase of the game being &#039;&#039;modded&#039;&#039;. I replaced the normal mouse cursor with that sign. I could&#039;ve taken a tamer scene to start with, but I thought this would be funny. I explained what was done to it [[:File:Mod-Interactive_Girls_Club.png|on the actual image page]]. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 07:34, 4 October 2023 (GMT)&lt;br /&gt;
:::: Ohh, I understand now!  Sorry it was completely lost on me, but that&#039;s probably because I&#039;ve never played the game before so I didn&#039;t know what changes to look out for! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:45, 4 October 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Pages linking to itself ==&lt;br /&gt;
&lt;br /&gt;
Hello! Merry Christmas and Happy New Year! Is it possible to check Wiki for pages that linked to itself and maybe autocorrect if possible? Like [https://moddingwiki.shikadi.net/w/index.php?title=Shakii_The_Wolf&amp;amp;curid=2343&amp;amp;diff=11369&amp;amp;oldid=11367 this] or [https://moddingwiki.shikadi.net/w/index.php?title=Pee_and_Gity&amp;amp;curid=2348&amp;amp;diff=11370&amp;amp;oldid=6789 that]? Sometimes this will result in redirect to itself (as in first example) or a red link indicating that page with this name was not created (as in second example). I&#039;ve checked and fixed all pages created by [[User:MartinVole|MartinVole]] but maybe there are more. Thank you! -[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 19:46, January 3, 2024‎ (GMT)&lt;br /&gt;
:I&#039;ve occasionally seen it used as shortcut to putting the page name in bold in the page intro, but yea, it&#039;s kind of odd. According to [[wikipedia:Help:Self_link|the official Wikipedia page on the subject]], &amp;quot;Self links are usually undesirable&amp;quot;. I immediately fixed it in the case of Shakii because, with it linking to a redirect page, it even created a real link. (PS: please sign your talk page addidions.) -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 20:26, 3 January 2024 (GMT)&lt;br /&gt;
:: Hello and Merry Christmas and Happy New Year to you too! Wow, you fixed so much pages already! That&#039;s why I was asking [[User:Malvineous|Malvineous]] for help - maybe there is a way to do it automatically. Or at least somehow get the list of the affected pages. (Thanks! I was sure I put four &amp;quot;~&amp;quot; characters but not sure what happend and why Talk page was not included.) -[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 22:35, 3 January 2024 (GMT)&lt;br /&gt;
::: Merry Christmas and happy 2024 to you too :) Yea, I&#039;m just going down the list of all articles, heh. By the way, your talk page was not included because there was nothing there; I fixed it by coping the timestamp from the History page and adding your name manually. On that note, maybe you should make an actual user page; it&#039;s still a red link. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 22:51, 3 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: I used to like using self-referential links as it meant the links would &amp;quot;work&amp;quot; again if the content was copied onto another page, but I agree once you start involving redirects it becomes a bit of an issue.  So no problems from me if you remove those.  There are some reports on [[Special:SpecialPages]] that list different types of page reports you can run, but I don&#039;t see one that picks up these links.  I can&#039;t remember whether a self-link automatically adds the page to a category or not, because that could be another place to check, in case there is a category of all pages with self links.  However I think it might have to be a case of just fixing them as we encounter them.  -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 00:35, 4 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: Yea, I dug around a little online and found no information about detecting / listing them, so instead I just opened [[Special:AllPages|the list of all pages]], and simply went through the whole bunch. Also fixed some pages that simply used &amp;amp;lt;b&amp;amp;gt; html tags instead of proper wiki formatting to make their titles bold, renamed a few pages that were missing apostrophes in their page titles, and noticed one page that still used old &amp;amp;lt;code&amp;amp;gt; tags. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 08:08, 4 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::: Wow that would&#039;ve been a big job, thanks very much! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 09:57, 4 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: Thank you for the answer and clarification! -[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 14:51, 4 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: Thank you for the great help with fixing the Wiki pages! Yes, user page created now, thanks! -[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 14:51, 4 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Tilesets with &amp;quot;hidden&amp;quot; data ==&lt;br /&gt;
&lt;br /&gt;
I was looking over the [[PAK Format (The Learning Company)]] and it made me wonder about this &amp;quot;Hidden&amp;quot; property in the Tileset Infobox template. Its function is to separate [[:Category:Dense tilesets|Dense tilesets]] from [[:Category:Sparse tilesets|Sparse tilesets]], and the main explanation given for Sparse tilesets seems to boil down to the fact that in formats that have a tiles index in their header, and some consistent way to determine the length of the data at each index, you can deliberately leave space between tiles. However, I&#039;m not entirely clear if you consider this category to also includes block-aligned formats. See, while the PAK format indeed has an index, so it&#039;s certainly sparse, it also aligns its indices to the next multiple of 16 bytes, meaning there is potentially a lot of open space inside the format anyway. But this is not deliberately created open space caused by meddling with the index; it&#039;s just a natural result of the file format. So would a format that &#039;&#039;only&#039;&#039; has such an aligning, but &#039;&#039;doesn&#039;t&#039;&#039; have an index, be considered &amp;quot;sparse&amp;quot; too?&lt;br /&gt;
&lt;br /&gt;
There&#039;s also many other ways to hide data inside a lot of formats; the simplest one being any format that uses RLE and doesn&#039;t complain about commands to repeat a given value 0 times. Does that affect the categorising? The name &amp;quot;Hidden&amp;quot; kind of gives a wrong impression in that aspect. I know it&#039;d be a lot of edits, but &amp;quot;Sparse&amp;quot; or &amp;quot;Dense&amp;quot; would probably have been a better name for it. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 19:38, 8 February 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
: My original reason for including that information (whether data can be hidden inside the format or not) was to highlight whether there might be a way for modding tools to store additional data in the files that the game would ignore.  This could be anything from a message about what program was used to generate the file, through to user comments, names/titles for items (like tiles or whole levels if the game doesn&#039;t store level names), or data that makes it easier to load the file in an editor (such as a time signature for music files that only store delays as a number of ticks, to make rendering the event list look more natural.)&lt;br /&gt;
&lt;br /&gt;
: So in this case the block-aligned formats would certainly qualify, as would RLE-encoded data.  I figured &amp;quot;Hidden&amp;quot; was suitable because the data was hidden from the game.  &amp;quot;Sparse&amp;quot; is also a little inaccurate for RLE because it&#039;s not a gap where you can put anything you want, you have to actually encode/embed the data in it.  Does it matter if we call it embedded data for RLE but sparse data for tilesets? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 04:00, 9 February 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: Well, block-aligned formats are actually probably too unreliable for really hiding in 3rd party metadata; you can never be &#039;&#039;sure&#039;&#039; there is enough space in there to reliable add extra data, since the actual data in these aligned blocks will vary. But I understand the intent better now, yes. thanks. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:47, 11 February 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
== FileFormatTool templates ==&lt;br /&gt;
&lt;br /&gt;
Could you add examples and a short explanation of all the types on the BeginFileFormatTools template? I&#039;ve seen pages that just use the wrong type altogether, and I&#039;m assuming this is caused by lack of documentation. It&#039;s not clear from the page whether a tileset format containing multiple images should use type &amp;quot;group&amp;quot; or &amp;quot;image&amp;quot;. I&#039;ve always used &amp;quot;image&amp;quot; for that, but I can understand the confusion. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:48, 11 February 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
: I&#039;ve added links to [[:Template:FileFormatTool]] but the tileset format is a bit of a tricky one because it&#039;s kind of both.  The way I&#039;ve handled it in my own code is always a compromise because there&#039;s so much overlap.  I&#039;ve ended up deciding that if the format can hold arbitrary data (like a .zip file can) then it&#039;s an archive/group file.  But many tilesets can only store image data (and often rely on headers in the tileset file to render the images within properly) so I figure those are too tightly bound together to be considered an archive.&lt;br /&gt;
&lt;br /&gt;
: After all, you can extract a .zip, move the files to another computer, then zip them up again and end up with a workable file.  But you often can&#039;t extract all the images in a tileset, move them to another computer, then bundle them all up into the original tileset again, as data has been lost (e.g. the size of all the images which was in the tileset file&#039;s header).  And you probably can&#039;t include a readme.txt in the tileset either.  So therefore, it&#039;s not a true archive format.  You also often can&#039;t extract an image to a file and then identify that file from its headers - tiles are often raw pixel data with no means of identification.  So it&#039;s hard to open an extracted tile file in an image editor, but usually the tileset as a whole can have its format automatically detected in some way, so it&#039;s more user friendly to keep the tiles inside the tileset file, and not permit them to be extracted as raw files (only if the images are converted to another format like .png or similar).  There are unfortunately still grey areas even with this definition so I&#039;m certainly open to ideas.&lt;br /&gt;
&lt;br /&gt;
: Do you think the clarification belongs on [[:Template:FileFormatTool]] with the rest of the info, or on [[:Template:BeginFileFormatTools]] (which links there already)?  Also as a side note, I have come to prefer the term &amp;quot;archive&amp;quot; over &amp;quot;group&amp;quot; so one of these days I may try to update everything to refer to &amp;quot;archive&amp;quot; instead. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 11:55, 11 February 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: I&#039;d add some text on the FileFormatTool page saying to look at the BeginFileFormatTools page for explanation on the types themselves, and then write the real stuff there. After all, the &amp;quot;Begin&amp;quot; template is the one that contains the type option, so that&#039;s where I would expect the explanation, as user.&lt;br /&gt;
:: And, yea, changing &amp;quot;group&amp;quot; to &amp;quot;archive&amp;quot; might be a good move; it makes it more distinct, and it&#039;s already used like that anyway. There will of course always be some edge cases, but there&#039;s not much we can do about that. It&#039;s generally archives containing mostly but not exclusively images, and which don&#039;t have names for their entries. [[All Dogs Archive Format]] comes to mind; despite the name, when writing the page I treated it as a tileset with one type of special non-image entries. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 18:17, 15 February 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: Done, hopefully that provides some better documentation.  Feel free to adjust as needed. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 06:12, 18 February 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: Absolutely beautiful. Great work on that. I might take some time referencing the relevant [[:Category:Infoboxes|Infoboxes]] for each one, in a &amp;quot;&#039;&#039;This type is generally used on pages using the xxxx and yyyy infoboxes&#039;&#039;&amp;quot; way, since these correspond pretty directly -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 08:57, 1 March 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Something wrong with the File History ==&lt;br /&gt;
&lt;br /&gt;
When I look at the file history of any file, the text above the file history table looks corrupted, and shows this text:&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&#039;Yi efo/eka&#039;e gwa ebo wo le nyangagi wuncin ye kamina wunga tinya nan&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Google Translate found no match for it, so I have no idea what this is. But it seems to have slipped into one of the internal wiki templates somehow.&lt;br /&gt;
&lt;br /&gt;
Open the page of literally any image on the wiki to see an example. I noticed it when looking at [[:File:Treasure_Mountain_Panning_Image_Format.png|this one]].&lt;br /&gt;
&lt;br /&gt;
--[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:38, 10 October 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:Okay, this is plain bizarre. I googled the sentence, and it seems hundreds of other wikis have the same issue. Some corruption in a recent update of MediaWiki itself maybe?&lt;br /&gt;
:--[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:42, 10 October 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: Nice catch! Looks like this is a [https://en.wikisource.org/wiki/Wikisource:Scriptorium/Archives/2024-05#File_History_vandalised MediaWiki issue] due to copy-pasted text. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 10:56, 10 October 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: Interesting!  I had to update MediaWiki recently because of some security issues so looks like they forgot to include that language fix in the 1.39 branch.  Hopefully it will get fixed in the next release and I can do another update. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 11:07, 10 October 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: Looks like it can be fixed by deleting the entries for &amp;quot;filehist-help&amp;quot;,  &amp;quot;filehist-datetime&amp;quot; and  &amp;quot;filehist-thumb&amp;quot; [https://github.com/wikimedia/mediawiki/commit/f4d953a7144b65183be82607a81c256460d4942a#diff-007f8b6baea4fb3f292c276dfa5fdb0eea6b409ced3166a5a9f3832c31fb7072L89 from &amp;quot;languages/i18n/en-gb.json&amp;quot;]; seems they&#039;re not supposed to have specific en-gb overrides at all. Though I dunno how easy it is for you to fix that kind of stuff manually. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 11:50, 10 October 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: There seems to be more corruption; in the page history I noticed the word &amp;quot;Ocak&amp;quot; [https://moddingwiki.shikadi.net/w/index.php?title=User:CTPAX-X_Team&amp;amp;oldid=11582 replacing one of the months]. Seems to be Turkish for January?. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 12:00, 10 October 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: It&#039;s a bit annoying because it&#039;s packaged up into a Docker container so you have to do any modifications like that with commands that run every time the container is built.  Probably easier to just report it as a MediaWiki bug if it hasn&#039;t been reported already.  I notice 1.39.10 has come out since I updated the other day but running it locally it still has the same issue, so maybe they aren&#039;t even aware of it. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 13:12, 10 October 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: Looks like it may have been reported here: https://phabricator.wikimedia.org/T375487 -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 13:15, 10 October 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Upload limit ==&lt;br /&gt;
&lt;br /&gt;
I tried replacing the image [[:file:Command &amp;amp; Conquer Mission Format.png]] with a new version that was about 1.1 mb, and got an error about the upload size being too large. The weird thing was, it wasn&#039;t a wiki error but a server error. The wiki upload page says the maximum is 2 mb, but it seems the actual server has some limits that are set lower.&lt;br /&gt;
&lt;br /&gt;
Note, the reason the new image was much larger was because it&#039;s made in a new (and better) map editor that does not export the map graphics in original 8-bit format, so I managed to fix it by simply loading the game&#039;s original palette into it. That slightly decreased the quality of some alpha-darkened elements (visible in the darkened cells with the &amp;quot;ATK4&amp;quot; text on them), but not to any problematic extent. Still, I thought it would be better to alert you that there is apparently a configuration problem there.&lt;br /&gt;
&lt;br /&gt;
(Funnily enough, the 1200px version generated by the wiki is 1.4mb; larger than even my original file.)&lt;br /&gt;
&lt;br /&gt;
-[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 18:18, 26 November 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
: While this is not exactly a right way but as temporary solution you may try to reduce PNG image size with [http://advsys.net/ken/utils.htm PNGOut] and [https://www.advancemame.it/download AdvPNG] (part of AdvanceCOMP). Hope this helps to upload that image to the site. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 18:53, 26 November 2024 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Malvineous&amp;diff=11984</id>
		<title>User talk:Malvineous</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Malvineous&amp;diff=11984"/>
		<updated>2024-10-10T10:56:04Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Something wrong with the File History */ issue&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Wolfenstein 3D -&amp;gt; Wolfenstein 3-D ==&lt;br /&gt;
I&#039;ve corrected the infamous 3D tyop in the names of several Wolf3D-related pages; can you please delete the following ones?&lt;br /&gt;
&lt;br /&gt;
[[:Category:Wolfenstein 3D]] -&amp;gt; Superseded by [[:Category:Wolfenstein 3-D]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[:Image:Wolfenstein_3D.png]] -&amp;gt; Superseded by [[:Image:Wolfenstein_3-D.png]]&lt;br /&gt;
&lt;br /&gt;
Thanks :) --De Zeurkous (zeurkous@zeurcomp.nichten.info), Thu Nov 22 08:18:42 UTC 2007&lt;br /&gt;
&lt;br /&gt;
:Haha, you&#039;ve certainly been busy.  Don&#039;t forget that this wiki isn&#039;t meant to be an encyclopaedia of the games, its main purpose is documenting the file formats and editing tools that can be used with the games, as opposed to how the games behave without any mods, or what they might be called if you forget to change the title screen :-) -- [[User:Malvineous|Malvineous]] 11:14, 22 November 2007 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Nah, I haven&#039;t forgotten. As we&#039;re reinventing the wheel for a semi-virgin wiki, the naming and something static like the cheats seemed like a good place to start :) --De Zeurkous (zeurkous@nichten.info), Thu Nov 22 12:20:04 UTC 2007&lt;br /&gt;
&lt;br /&gt;
== Jill of the Jungle palette ==&lt;br /&gt;
&lt;br /&gt;
Hi, I&#039;m currently working on a level viewer for [[Jill of the Jungle]] (maybe an editor later on). Some of the information I found here has been very useful, but there&#039;s one thing I&#039;m a bit stuck on. On the [[SHA Format]] page it says:&lt;br /&gt;
:&#039;&#039;Each array item contains 4 unsigned bytes, representing CGA, EGA and VGA, respectivley, and then a null value. [...] Each byte maps to the index of a colour in the palette. If there are no colours required, the tile set uses the default colours.&#039;&#039;&lt;br /&gt;
However, it doesn&#039;t say anywhere where the palette can be found. Is it stored in the EXE file? I hope you can help me on this :)&lt;br /&gt;
&lt;br /&gt;
Regards, [[User:Spinal|Spinal]] 13:00, 2 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
:Unfortunately I didn&#039;t write the JotJ SHA page, and I haven&#039;t yet had the time to figure this out.  For Xargon I&#039;ve taken the quick and dirty route and used a screenshot from within DOSBox as the source of the palette, until I can figure out where the palette is located.  If you find this out, don&#039;t forget to update the page! :-) -- [[User:Malvineous|Malvineous]] 22:02, 2 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Hey Spinal, sorry, I wrote the [[SHA Format]] page, so that was probably my bad. I wasn&#039;t able to find the palette either. I assume it&#039;s in the .EXE, however I spent a fair bit of time manually mapping it using a Wombat tool (http://www.szevvy.com/node/3). I was also writing a level viewer (initally in XHTML which turned out to be too slow, so then I moved to Flash 9). I tried to email you my findings, but the email bounced. I&#039;m not sure if they were 100% accurat, which is why I never added them to the documentation.&lt;br /&gt;
&lt;br /&gt;
::Hey Malvineous, it seems the Jill - [[DMA Format]] page has been removed. Do you have a log of what happened to it? I&#039;m sure it existed at some point.&lt;br /&gt;
&lt;br /&gt;
::- [[User:dheim|Daniel]] 20:00, 5 March 2008&lt;br /&gt;
&lt;br /&gt;
:::I don&#039;t ever remember seeing a DMA page - certainly there&#039;s nothing in the wiki logs about it being deleted or renamed.  Maybe you started working on it but never got around to saving it?  Or is it one of the Xargon pages that shares the same format as Jill?  (by the way, you can type &amp;lt;nowiki&amp;gt;~~~~&amp;lt;/nowiki&amp;gt; to automatically put in the signature in these messages.) -- [[User:Malvineous|Malvineous]] 11:28, 5 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::Sorry, it must have been the stuff in the [[SHA Format]] page that I was thinking of. I may have added the link to the [[DMA Format]] page, and never expanded on it. - [[User:Dheim|Daniel]] 02:46, 6 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::Hi guys. Sorry for the mistake, I mixed up the authors of the SHA and level formats. I&#039;ve written a level viewer in PHP the last week, by using static images instead of getting them from the actual files. This causes some problems for episode 2, which uses a different palette, but besides that it works great :) When everything is done I&#039;ll upload the maps to my server and the tile/object lists to this wiki.&lt;br /&gt;
:::::@Daniel: strange that it bounced, I confirmed my address so it should be working fine... You can mail it to spinal -at- zanderz -dot- net. Also, I saw on your Wombat page that you &amp;quot;have a vague idea of how to do&amp;quot; [[Hocus Pocus]]. Could you share your findings on this wiki? I&#039;d love to make maps, or even a level viewer/editor for that game :) -- [[User:Spinal|Spinal]] 00:32, 8 March 2008 (GMT)&lt;br /&gt;
:Okay, with help of [[User:Dheim|Daniel]] who send me the palette I found it! I&#039;ll put my findings on [[Jill of the Jungle palette]]. -- [[User:Spinal|Spinal]] 15:36, 13 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Halloween Harry/Alien Carnage ==&lt;br /&gt;
&lt;br /&gt;
Hi Malvineous. Thanks for your edits on the GMF article! I notice you mentioned there exist versions of the game which don&#039;t require exploding a BNK to get at the game data. What does the directory structure look like for the version you have? I&#039;m working on a map viewer (which will become a map editor at some point) and would like it to be able to work on whatever versions are out there. Thanks for any info. -[[User:Duckthing|Duckthing]] 04:41, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Hi Duckthing - no worries, Halloween Harry has long been an interest of mine, but my map editor sadly needs a lot more work before I can begin reverse engineering more file formats so I&#039;m glad you&#039;ve made a start!  AFAIK technically Halloween Harry has no compression, but for whatever reason (probably listed in the Apogee FAQ) they decided to swap episodes 1 and 3, compress the BNK file and then re-release it under the name Alien Carnage.  You can download all available versions (including registered versions since the game was released as freeware in 2007) from [http://www.classicdosgames.com/game/Alien_Carnage.html RGB Classic Games].  BTW not sure if you noticed but I also posted a couple of things on the GMF article&#039;s talk/discussion page. -- [[User:Malvineous|Malvineous]] 06:08, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: Thank you! Working with the uncompressed version will keep things less complicated. I did notice the GMF discussion you added, but haven&#039;t had a chance to really go through it yet. -- [[User:Duckthing|Duckthing]] 06:41, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: No worries.  If you&#039;re running Linux or MacOSX you should be able to compile [[Camoto|libgamearchive]] which will let you copy files in and out of the BNK files.  This is a library so it&#039;s also possible to use it in your own program for accessing and editing the map files while they&#039;re still inside the BNK, for instance.  (BTW the &#039;minor&#039; tickbox should only be used when the edit does not affect the information on the page - e.g. fixing a typo or a broken URL.  If you are changing the actual content on a page it is never a minor edit!) -- [[User:Malvineous|Malvineous]] 07:51, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dangerous Dave ==&lt;br /&gt;
&lt;br /&gt;
Working on this, does anyone have any info on the formats? The EGA graphics are 84KB and external, but CGA and VGA graphics unrelated to them are in the 174KB executable, apparently uncompressed, I don&#039;t know how this is possible. I&#039;ve found the levels and partially reverse engineered the format (The first 1000 bytes, a 100x10 array of tiles.) but each level is followed by ~280 bytes of variable and unknown data I assume is sprites. I have a list of internal files in the executable, looks like most of it is non-game code. Any help would be appreciated. -[[User:Levellass|Endian? What are you on about?]] 06:03, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Hmm, interesting.  All I can suggest for the levels is - as you&#039;re probably already familiar with - changing the values in a hex editor then loading the game to see what happens.  I would suspect that all the graphics would be in a similar format, so if there are any headers or structures used in the EGA graphics files perhaps they&#039;re duplicated for CGA/VGA?  Also John Romero seems pretty accessible, perhaps you could ask him directly?  Failing that, randomly writing data into the .exe until the images change could be used as a last resort! -- [[User:Malvineous|Malvineous]] 12:09, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Ha, that was easier than I expected - uncompressed VGA data is easy to find with a good hex editor ;-)  [http://www.shikadi.net/pics/ddave-vga-hexdump.png This looks like it] -- [[User:Malvineous|Malvineous]] 12:17, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Ok that was only the menu graphics.  At offset 0xC629 there&#039;s some sort of offset table which looks very similar to the contents of EGADAVE.DAV but there are extra bytes dotted all over the place - perhaps it&#039;s RLE encoded?  Actually just before that there&#039;s the number 0x6CAA.  If you go a bit less than 0x6CAA bytes after this you end up with another table, which to me suggests that 0x6CAA is the decompressed size of that first table. -- [[User:Malvineous|Malvineous]] 13:01, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:If I remember it correctly, the VGA sprites and tiles are RLE compressed and it&#039;s not too hard to decompress them. The positions of the enemies in the levels on the other hand are still a mystery to me. [[User:Calvero|Calvero]] 20:43, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Looking at the levels, which directly follow the VGA palette, they seem to contain 256 bytes of header data, then the 100x10 tiles, then eight bytes of lead-out data.  Then the next level&#039;s 256 bytes of header, 100x10 tiles, then eight bytes of lead-out.  Although I say &amp;quot;level&amp;quot;, the first &amp;quot;level&amp;quot; seems to contain both level 1 and 2, and this seems to be the way it works in the game - in some levels you can see through to others.  I&#039;m not sure what the 256 bytes of header data are for, but some levels have FF FF 00 00 repeated which seems to indicate two uint16 fields which are blanked out for those levels. -- [[User:Malvineous|Malvineous]] 13:15, 13 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
::First up, levels; where does level 1 start? It&#039;s possible I&#039;m reading the start of a level as the previous level&#039;s end, I looked for the start of tile data, which I assumed, like Keen 1, would be the level start.&lt;br /&gt;
&lt;br /&gt;
::Next, palette; I&#039;m assuming, as you said, it is located just before the level data?&lt;br /&gt;
&lt;br /&gt;
::There is VGA and CGA graphics in the executable, plus headers, but the bulk of graphics for CGA and VGA I haven&#039;t been able to locate. If the data is RLE compressed I should think it would use either Keen 1-3 fullscreen or Jazz Jackrabbit tile RLE, both of which I know well. I&#039;ll look into both of these options, cheers! -[[User:Levellass|Endian? What are you on about?]] 12:03, 20 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::I&#039;ve found the VGA and CGA data for the menu graphics.  It looks like the CGA data is stored in a series of 1-bit-per-pixel (monochrome) images.  Or it could be EGA data with the planes split out (e.g. red plane for all images, then green plane for all images, etc.)  I think I found three planes which means it&#039;s probably EGA, as CGA would have a max of two planes.  I&#039;ve also found the font graphics, this looks like 4bpp/16 colour EGA data.  Haven&#039;t seen level graphics yet.  I&#039;ve successfully modded the levels with a hex editor (putting the jetpack everywhere) so now I&#039;ve finally looked at all the levels!  The creatures are definitely not stored in the 100x10 tile data.  Putting random bytes in there revealed that the values are indices into the image files, because if you put the value in for fire it will animate, and the following three or so values show up as still frames from the fire animation.&lt;br /&gt;
&lt;br /&gt;
:::The VGA palette starts at 0x26B0A (I updated the main DDave page with this) + 768 bytes leads straight onto the start of level 1 at 0x26E0A.  So at 0x26E0A there are 256 bytes of data, then 100x10 tiles, then 24 bytes of footer data.  Some of this data (perhaps footer data) might be the level start coordinates, because Dave doesn&#039;t always start the level at the same place (e.g. the warp level when you climb the tree on level 5 and jump off the edge of the screen.) -- [[User:Malvineous|Malvineous]] 12:24, 20 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::I think I&#039;ve found all the files so far, I&#039;ve updated [[Dangerous Dave]] with the offsets of the files, including what appears to be CGA and VGA tiles.  I&#039;m not sure what sort of format they&#039;re in though, it looks like they might be compressed (and so the offsets in that list might be off by ~4, as I may have cut off the decompressed-size field.)  I&#039;ve also updated the map format page, I think it&#039;s pretty much fully reverse engineered now. -- [[User:Malvineous|Malvineous]] 05:13, 21 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Noahs Ark 3D and IMFs ==&lt;br /&gt;
&lt;br /&gt;
Been poking around Noah&#039;s Ark 3D, an adaption of the Wolfenstein game and found a few interesting things which I&#039;m hoping to confirm.&lt;br /&gt;
&lt;br /&gt;
First, the game uses MID files, not IMF files for music, second, the MIDI files have an extra word at the start of the file giving the file length. Third, the code uses the first word of the midi file as the length of data to read from the file and put into memory to play. After poking around a bit in Wolfenstein and Keen I believe this is the same with IMF files, that is, ALL IMF files are type 0 as it were and the type 1s are read just like type 0s by the games (The first word is read as the amount of IMF data to copy into memory to play, this is then read as type 0.) I&#039;m not quite sure what this does for the two types since type 1 is would essentially be a type 0 with a header and footer that are part of the AUDIO.xxx format, much like PC\adlib sounds can have the huffman lengths at the start. Are there any games that use &#039;individual&#039; type 1 IMFs (Even if included as part of a group file. All I&#039;ve seen are games like cosmo, where non-AUDIO IMFs are type 0.)&lt;br /&gt;
&lt;br /&gt;
Should there be a Noah&#039;s Ark 3D page and should we add the midi note to the AUDIO format page? It seems that the format can hold any type of music file the game can read, not just IMFs.  -- Levellass&lt;br /&gt;
&lt;br /&gt;
: Yes it is known that the type-1 header might really be part of the AUDIO.xxx format but alas there were many type-1 files floating around the place (incorrectly extracted, you could argue) before this was realised, so the format variant is here to stay.  It does have some advantages though (like tagging files with the song title) but I&#039;m not sure whether anyone has figured out definitively whether the header (and footer, in the case of the Wolf3D files) belongs to the IMF or the AUDIO file.  I guess you&#039;d have to browse the game source code and see how the game uses the data to know for sure.&lt;br /&gt;
&lt;br /&gt;
: As far as the MIDI goes, I believe the AUDIO.xxx file is just a container file like any other, capable of supporting any data at all.  It&#039;s up to the game to decide how to use it.  If anything this makes me think it would fit better if the AUDIO.xxx article was merely documenting the structure, with links to actual audio formats like PC SFX, Adlib SFX, IMF and MIDI and notes about which games make use of which formats.&lt;br /&gt;
&lt;br /&gt;
: Oh and yes, by all means create a page for the new game. -- [[User:Malvineous|Malvineous]] 08:41, 3 February 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Sound Files category ==&lt;br /&gt;
&lt;br /&gt;
I don’t know why there’s a Sound Files category and also an Audio Files category... it seems redundant. I left those categories the way they are though.&lt;br /&gt;
&lt;br /&gt;
Also, the [[File format data types]] page needs some signed ints, but I didn’t know what naming convention you wanted to use. I described something as an [[INT16LE]] on [[BMC Format]]. [[User:Yellowantphil|Yellowantphil]] 20:12, 11 September 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Not sure about the Sound vs Audio - I use the term &#039;audio&#039; to mean both sound and music, but you&#039;re right, if there are separate sound and music categories we don&#039;t really need an audio one as well.  Feel free to update.  [[INT16LE]] is perfectly fine too!  I added a note to the data types page. -- [[User:Malvineous|Malvineous]] 22:30, 11 September 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
== GamePage template ==&lt;br /&gt;
&lt;br /&gt;
Should the GamePage template add the page to its own category? It seems a little odd that [[Wacky Wheels]] is not in the Wacky Wheels category. [[User:Yellowantphil|Yellowantphil]] 04:51, 16 September 2011 (GMT)&lt;br /&gt;
: I decided against this because there is a link to the game&#039;s page in the category intro at the top of the page.  It seemed unnecessary having another link in amongst all the other pages.  This was also because the game page was really only meant to be a summary, there wasn&#039;t supposed to be a huge amount of detail on it, only links to other pages with the detail (which then would appear in the category list.)  I would imagine that, eventually, [[Wacky Wheels]] would be tweaked to move a lot of the content onto subpages. -- [[User:Malvineous|Malvineous]] 12:58, 16 September 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Scope of the wiki ==&lt;br /&gt;
&lt;br /&gt;
I don’t know how extensive you want the information to be on ModdingWiki... I added a few lists of audio and graphics files a while ago, and there will probably be other information that I’ll find out that’s potentially helpful for level editing but not directly related to it. I can move some information to my website if it starts to become out of scope for your wiki. I also sometimes end up documenting everything imaginable... there’s some minutiae on my website and possibly on your wiki that I ought to go through and delete. [[User:Yellowantphil|Yellowantphil]] 05:28, 10 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
:Hmm, that&#039;s a difficult one - I&#039;m always in favour of documenting more rather than less.  Generally speaking if it&#039;s related to a game and it would help either a programmer writing a utility or a someone trying to change a game manually then it should be documented.  About the only thing that comes to mind that&#039;s over documenting is when some small calculation is expressed in a couple of different programming languages, but I&#039;ve left that in so people can just copy it rather than trying to figure it out from the text.  But the [[Wacky Wheels]] page is probably the gold standard for what all wiki pages should look like :-)  Do you have anything in particular you&#039;re unsure of whether it would fit here? -- [[User:Malvineous|Malvineous]] 10:07, 10 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
::I was mainly thinking of the list of VOC files on [[Wacky Wheels Music and Sound Effects]] and the list of &amp;lt;tt&amp;gt;*.sp&amp;lt;/tt&amp;gt; files on [[Wacky Wheels Graphics Formats]]. I have an expanded list of the &amp;lt;tt&amp;gt;*.sp&amp;lt;/tt&amp;gt; files on my computer but it isn’t finished yet. I guess there isn’t all that much more Wacky Wheels information to be added to this wiki though. There is still some modding information on my website that ought to be moved over here, so that would take up another page or two. I’ve been lazy about doing Wacky Wheels stuff lately, but I might find some time for it this weekend.&lt;br /&gt;
&lt;br /&gt;
::By the way, I guess that guy from Cascadia Games emailed you. It’s pretty interesting that WW might become an iPhone app. He told me that he was going to be using his own game engine, which sounds a lot easier than trying to get a hold of the WW source code and porting it. —[[User:Yellowantphil|Yellowantphil]] 16:46, 15 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: I was going to say the list of VOCs might be overkill, but then the list of .sp files might be useful.  To be honest, it&#039;s the sort of thing that you could probably omit if you were feeling lazy, but likewise I don&#039;t mind at all if you choose to include it, so since it&#039;s already there I&#039;m happy to keep it.&lt;br /&gt;
&lt;br /&gt;
::: Yes I did get an e-mail from Cascadia, I was going to pass along your details but it sounds like you&#039;re already aware of it!  Using their own engine might make it a bit smoother than the original, as the jerkiness of turning is my only criticism of the game. -- [[User:Malvineous|Malvineous]] 00:14, 16 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
:I&#039;d like to document not only the format of some game archives but also their contents. This would be quite long lists of basically images, sprites and some minor stuff. I&#039;d also like to upload the actual images alongside but I&#039;m not sure whether that fits the scope of the wiki or if I should just put it somewhere on github. Any advice highly welcome :) -- [[User:Yetmorecode|Yetmorecode]] 15:25, 22 December 2020&lt;br /&gt;
&lt;br /&gt;
::That depends on what you mean with &amp;quot;their contents&amp;quot;. Documenting the used file formats is obviously in the scope of this wiki, since there&#039;s not much point in being able to extract/replace the files in those archives if you can&#039;t actually view those files or make those replacements. But dumping the whole list of all existing files in a game into a wiki article is usually not very useful. An article could highlight some specific files with special functions in the game (stuff like the remap-defining PALETTE.CPS in Red Alert 1 comes to mind; [[Westwood CPS Format|cps]] is a very normal image format in these games, but that specific file controls all recolouring of sprites that change to their owner&#039;s colour), but a list of all sprites and sound files and all their exact usages in the game doesn&#039;t seem like it&#039;d belong here; most of the time such things are pretty self-evident.&lt;br /&gt;
::PS: when you add something to a user talk page, use the signature code to give your note a clearly visible author and date stamp. There&#039;s a big red box on the top of the edit page telling you how to do that.&lt;br /&gt;
:: --[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:51, 22 December 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Alright that makes sense. Sorry about the signature I must have been blind. [[User:Yetmorecode|Yetmorecode]] ([[User talk:Yetmorecode|talk]]) 17:11, 22 December 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: Yes just to confirm this, an image or two is useful to illustrate a file format but we don&#039;t want to become an archive of all game material, not least of which because extracting this is often against the game&#039;s licence (and doesn&#039;t really come under &amp;quot;fair use&amp;quot;) so could open you up to legal trouble if the current copyright owner takes exception to it.  If you come across something hidden or undocumented you can put it on [https://tcrf.net/The_Cutting_Room_Floor The Cutting Room Floor] otherwise [https://pages.github.com/ GitHub Pages] may work as you&#039;ve suggested (if you fly under the copyright radar!) -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 07:08, 23 December 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Wacky Wheels ==&lt;br /&gt;
&lt;br /&gt;
Basically all of the WW modding information from my website is here now. I moved one page when I realized it should probably be capitalized to match the rest of the pages on this site... you can delete the redirect at [[Wacky Wheels high score files]] if you want to.&lt;br /&gt;
&lt;br /&gt;
Now, I need to remove most of the modding information from my website and refer people here. Then we’ll have reached the glorious future where all WW modding information is in one place. I’m going to keep those two text files of notes on my website though—the information in them is disorganized and I think not 100% accurate, but they might have some information that isn’t here yet.&lt;br /&gt;
&lt;br /&gt;
By the way, how’s Camoto going? I’m planning to use it to make a new WW level, but I won’t have time for it for a few more months. —[[User:Yellowantphil|Yellowantphil]]&lt;br /&gt;
&lt;br /&gt;
: Sounds good!  Thanks for all the effort you&#039;ve put in by moving it across.  I think Wacky Wheels is now the most completely documented game on the wiki!  Also can&#039;t hurt leaving your own info up - sometimes it&#039;s nice to go back to the original source if something is unclear.  Camoto&#039;s going well, but unfortunately I haven&#039;t had much time to work on it over the last few weeks.  You probably won&#039;t be able to make much of a level until I add in the ability to select a tile from the tileset, but that&#039;s in progress and hopefully will be ready by the time you are!  Keep me posted when you do start your level(s?) -- [[User:Malvineous|Malvineous]] 12:22, 2 February 2012 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Well, as I was reading some of the information on my website, I noticed that it isn’t written very well. I wrote those pages back when I had very little experience programming. Anyway, I’m planning to redesign my website soon, and this will save me from having to rewrite a few of those pages.&lt;br /&gt;
&lt;br /&gt;
::The tile editor in Camoto as it is now is still certainly useful—I can add new tile types to a level using a binary editor and then move them around in Camoto. I think that it shouldn’t be too hard to make a new WW level using the Gimp and Camoto plus some binary editing. I recall having some problems with the route editor for the computer players, but I didn’t look into it at the time—I’ll let you know when I’m working with Camoto again, and I’ll try to come up with some useful bug reports or fixes if I run into problems. —[[User:Yellowantphil|Yellowantphil]] 14:06, 2 February 2012 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Catacomb ==&lt;br /&gt;
&lt;br /&gt;
Hey [[User:Malvineous|Malvineous]], do you know anyone who has properly read the [[Inverse_Frequency_Sound_format|Inverse Sound Frequency]] file format and got the sound playing? I&#039;m struggling with some fine details in my game. Sounds play near what they should sound like, but the sound quality is all crackly and some sounds play totally incorrect. I followed a basic [http://web.archive.org/web/20000818033701/http://www.dd.chalmers.se/~f98anga/projects/keen/sounds2raw.c code sample] by Anders Gavare. Does your tool support this? Interested in helping me figure this out? My current code is available at [https://code.google.com/p/cataclone/source/browse/trunk/src/catacomb/catacomb_sound.c catacomb_sound.c] - [[User:Eros|Eros]] 11:57, 5 May 2012 (GMT)&lt;br /&gt;
: Should this be moved to my talk page? - [[User:Eros|Eros]] 11:59, 5 May 2012 (GMT)&lt;br /&gt;
:: Probably best to keep it on my talk page if you want me to respond in a timely manner :-)  I based my old utility off Anders&#039; one too, but it&#039;s been a long time since I looked at the code.  My latest utility doesn&#039;t support sound effects yet.  I know Levellass has written a few utilities to play and edit those sound files, so I think your best bet would probably be to post over at the [http://www.keenmodding.org Keen:Modding] forum.  Do note that PC Speaker effects do sound crackly at the best of times, though!  Also make sure you&#039;ve got the right audio format (8-bit vs 16-bit, signed vs unsigned) - I remember some inconsistencies there causing some very distorted results for me.  I love the name &#039;Cataclone&#039; - does your code compile under Linux? -- [[User:Malvineous|Malvineous]] 13:21, 5 May 2012 (GMT)&lt;br /&gt;
::: I currently compile the code using Code::Blocks with GCC 4.6 -std=gnu99. It *should* compile under Linux. But I haven&#039;t tested that out yet. [[Catacomb]] sounds also have flags attached to each one, It&#039;s not exactly the same specification as what it says @ the [[Inverse_Frequency_Sound_format|Inverse Sound Frequency]] format page. Perhaps the flags would make a difference to the sounds? I have the sound setup @ [https://code.google.com/p/cataclone/source/browse/trunk/src/sound_manager.c sound_manager.c] in the sound_manager_init() method. I use AUDIO_S16 (signed 16-bit) @ 22050 Hz with 2 channels. I have not added support for the priority of the sounds yet, I plan on doing that after I get them playing properly.&lt;br /&gt;
::: I found some information on the [[ROTT]] sound format here: [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/_rt_soun.h _rt_soun.h]. This format should be similar to Catacomb as ROTT was developed by [[Apogee]] using the [[Doom]] engine. Here are the flags for the sounds that they define:&lt;br /&gt;
 #define SD_OVERWRITE     0x01&lt;br /&gt;
 #define SD_WRITE         0x02&lt;br /&gt;
 #define SD_LOOP          0x04&lt;br /&gt;
 #define SD_PITCHSHIFTOFF 0x08&lt;br /&gt;
 #define SD_PLAYONCE      0x10&lt;br /&gt;
::: There are also many other sound files for ROTT: [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/rt_sound.c], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/rt_sound.h], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/snd_reg.h], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/snd_shar.h], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/sndcards.h]&lt;br /&gt;
:::: I tried it last night and I was able to get it to compile (after a few changes, like using &#039;/&#039; instead of &#039;\&#039; in a couple of #includes) but all I got was a black window and a beep sound, then nothing.  How far advanced is the project?  Should I expect more than that?  I would expect small variations in the file formats between games, but I would be surprised if the core sound data has changed over time. -- [[User:Malvineous|Malvineous]] 02:38, 6 May 2012 (GMT)&lt;br /&gt;
::::: On Windows, you can run around the levels, collide with walls, collect items, etc... I still need to implement monsters, AI and power shots. However, that beep means that the sounds playing. (see line 71 in main.c: catacomb_sounds_play(&amp;quot;foundsound&amp;quot;);). I just committed the catacomb_data.h file. Update it accordingly, you should now see much more than a black screen.&lt;br /&gt;
:::::: Oh wow, that works really well now!  I see what you mean by the sounds.  You might have to output the PCM data to a .wav/.raw file and look at it in a sound editor to see what&#039;s going on.  It sounds like there might be wrapping or something going on.  Also some sounds (like being blocked by a door) play multiple times over the top of themselves.  I guess this is what you meant by priority not being implemented (although maybe you wouldn&#039;t need to handle priority if you can play multiple sounds at the same time, unlike the real PC Speaker.)  One suggestion - if you do decide to support Linux, abstract the calls that open files so that they search for filenames instead - that way you don&#039;t have to rename all the Catacomb files to be uppercase, since Linux has a case-sensitive filesystem and most filenames are usually all lowercase. -- [[User:Malvineous|Malvineous]] 03:42, 6 May 2012 (GMT)&lt;br /&gt;
::::::: I have exported the raw data to a file, then imported the raw data into Audacity using various settings. All of them sound like they do in the game, crackly and sometimes distorted. I really think its some sort of post FX used by the flags. As for files, I&#039;ll code some sort of SafeFileOpen, SafeFileClose functions like the id codebase that open files regardless of case when i get around to implementing the Linux version. - [[User:Eros|Eros]] 03:54, 6 May 2012 (GMT)&lt;br /&gt;
:::::::: If you can e-mail me one of the files (preferably a &#039;quiet&#039; one that&#039;s not supposed to be crackly) I can take a look if you like - malvineous@shikadi.net -- [[User:Malvineous|Malvineous]] 03:57, 6 May 2012 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Merge ==&lt;br /&gt;
&lt;br /&gt;
Is there a way to tag two pages such that it is clear that they should be merged?&lt;br /&gt;
For example, [[Crystal Caves Tileset Format]] describes the same format as [[Duke 1 Tileset Graphics]].[[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 21:00, 15 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
: You can mention it on the talk page for one of the articles.  Any suggestions as to what we should call the merged page? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 03:09, 20 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Dark Ages is the first game that got released that uses this format, so &#039;&#039;Dark Ages Tileset Format&#039;&#039; could be the name, like all those formats that are named after Commander Keen 1-3.&lt;br /&gt;
::Or we name it after Duke Nukem 1, because that game is probably more popular than Dark Ages, Crystal Caves and Secret Agent, like [[Commander Keen 1-3 Level format]], although Slordax used it before Commander Keen 1-3 did.[[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 19:13, 20 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: Yes I was thinking along the same lines, naming it after the first game that used the format.  But then the release date doesn&#039;t necessarily indicate which game &amp;quot;invented&amp;quot; the format, if one game took longer to develop and was released late.  I was wondering whether there is a common thread amongst all these games, such as the same programmer or company we could use instead.  In many ways I would prefer a name like &amp;quot;Replogle tileset format&amp;quot; or &amp;quot;Apogee EGA tileset format&amp;quot;.  What do you think? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 23:36, 20 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: I&#039;ve read the [http://www.3drealms.com/news/2006/04/the_apogee_legacy_15.html | Apogee Legacy interview with Peder Jungck] again today. He wrote the ProGraphx Toolbox.&lt;br /&gt;
:::: DN1.EXE contains the string &#039;&#039;Version 1.0 EGA/VGAProGraphx EGA/VGA Toolbox&#039;&#039;,&lt;br /&gt;
:::: CC1.EXE contains the string &#039;&#039;Version 1.5 320x200 PAN EGA/VGAProGraphx EGA/VGA Toolbox&#039;&#039;,&lt;br /&gt;
:::: SAM1.EXE contains the string &#039;&#039;ProGraphx EGA/VGA Toolbox Version 2.0 320x200 EGA/VGA Copyright 1991 by Peder Jungck&#039;&#039; and&lt;br /&gt;
:::: DA3.EXE contains the string &#039;&#039;Version 1.0 EGA/VGAProGraphx EGA/VGA Toolbox&#039;&#039; (DA1.EXE and DA2.exe contain gibberish).&lt;br /&gt;
:::: So I would suggest &#039;&#039;ProGraphx Toolbox tileset format&#039;&#039;. Peder also wrote a book about the toolbox called &#039;&#039;Graphics Programming &amp;amp; Animation: Ultra-Fast Assembly Routines for EGA/VGA Graphics Animation&#039;&#039;. Maybe that book has a better name for the file format. [[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 11:03, 21 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: So we know of three different versions of the ProGraphx Toolbox. Dark Ages and Duke Nukem 1 use version 1.0. Each tileset is 8064 bytes long and is in a separate file. Crystal Caves uses version 1.5 and each tileset is 8003 bytes long, but they are all in the same file. Secret Agent uses version 2.0 Each tileset is again 8064 bytes long, they are all in the same file and the file is encrypted. [[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 17:00, 28 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::: Thanks for figuring all that out.  I&#039;ve merged the pages and changed the name to [[ProGraphx Toolbox tileset format]] as suggested.  Please feel free to correct anything I have missed. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 02:40, 4 August 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Guidelines for proper Wiki Editing ==&lt;br /&gt;
Dear Malvineous! Could you post the guidelines (or guide) for proper editing of the Wiki? [[User:The coder|The coder]] ([[User talk:The coder|talk]])&lt;br /&gt;
: Hmm, there isn&#039;t really one, it&#039;s more about finding a similar page and matching the style found there!  Copy and paste works well :-)  There is [[ModdingWiki:Contributing]] but it&#039;s not very detailed. (BTW please put &amp;lt;nowiki&amp;gt;~~~~&amp;lt;/nowiki&amp;gt; at the end of your messages, when you preview the page you will see this gets replaced with your name and the date automatically.) -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 21:59, 12 December 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
== VGFM Music Format ==&lt;br /&gt;
&lt;br /&gt;
Hello, Malvineous!&lt;br /&gt;
&lt;br /&gt;
I accidentally found that [[VGFM Music Format]] is absolutely similar to the [http://www.vgmpf.com/Wiki/index.php?title=MUS_(AdLib) MUS (AdLib)] format which I finished researching yesterday.&lt;br /&gt;
&lt;br /&gt;
And [[VGFM Instrument Format]] is similar to [http://www.vgmpf.com/Wiki/index.php?title=SND_(AdLib) SND (AdLib)].&lt;br /&gt;
&lt;br /&gt;
These formats were developed by Ad Lib Inc, I found the sources and documentation in the Ad Lib developer&#039;s manual downloaded from old BBS board site :)  And these formats are used not only in [[Vinyl Goddess From Mars]] game.&lt;br /&gt;
&lt;br /&gt;
--[[User:Binarymaster|Binarymaster]] ([[User talk:Binarymaster|talk]]) 02:05, 22 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Oh wow, what an interesting discovery!!  Do you have any links to the official documentation?  I&#039;d really like to see what else they have to say about the format.  And yes, we should definitely rename the articles here.  What do you think they should be called?  &amp;quot;Ad Lib Music Format&amp;quot; is probably a bit generic given they have a few, like .ROL... -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 09:45, 22 January 2015 (UTC)&lt;br /&gt;
:: Here it is: [http://files.mpoli.fi/software/programm/general/adlip.zip adlip.zip] - binaries and source code, probably from Ad Lib Programmer&#039;s Manual. MUS headers are described in CONVERT.C and CONVERT.H files. Fun fact that they also developed another similar format based on MIDI - [http://www.vgmpf.com/Wiki/index.php?title=MDI MDI]. It has similar musical features but stores all data in one file in MIDI format.&lt;br /&gt;
:: Well, I have no idea how to name it better, I think &amp;quot;Ad Lib Music Format&amp;quot; should be suitable for it :) --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 10:30, 22 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Many thanks!!  I&#039;ve updated the article pages with the info I could gain from the source code.  There are still a few unresolved issues (like what exactly the default percussion pitch is) but it has certainly answered a number of questions.  I called it &amp;quot;AdLib MIDI Format&amp;quot; because that&#039;s the name they use in one place in the source code, although it&#039;s not a very descriptive title!  Thanks again for letting me know about this excellent find :-) -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 12:48, 24 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: That&#039;s good! I think maybe this format should be named as &amp;quot;AdLib MIDI Format v1.0&amp;quot;, because there is also an improved version of it, probably v2.0 - [http://www.vgmpf.com/Wiki/index.php?title=MDI MDI] (I made a typo in previous posted link), it uses a single file in MIDI format.&lt;br /&gt;
:::: And about [[AdLib Timbre Bank Format]] article - BNK format originally was created in the 1987 with the first release of the [http://www.vgmpf.com/Wiki/index.php?title=AdLib_Visual_Composer AdLib Visual Composer], so actually Ad Lib Inc released its formats in this order:&lt;br /&gt;
:::: &#039;&#039;&#039;1)&#039;&#039;&#039; ROL &amp;amp; BNK (1987, with AdLib Visual Composer)&lt;br /&gt;
:::: &#039;&#039;&#039;2)&#039;&#039;&#039; MUS &amp;amp; SND/TIM (1988, with player and converter)&lt;br /&gt;
:::: &#039;&#039;&#039;3)&#039;&#039;&#039; MDI (1989, also with player and converter)&lt;br /&gt;
:::: Information about third format was placed [http://cd.textfiles.com/soundsensations/MISCPROG/AD-PROG/ here], though the link is not working now.&lt;br /&gt;
:::: --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 13:08, 24 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: Oh wow that&#039;s interesting too.  I think the MUS/SND/TIM format should stay as &amp;quot;AdLib MIDI Format&amp;quot; with no version number, because that file format does have version fields so it&#039;s possible to have v1.0, v2.3, etc. within that format.  The MDI article you linked to actually looks like conventional MIDI with some extra events for setting OPL instruments, so I think this belongs as one of the many backwards-compatible extensions of the [[MID Format]].&lt;br /&gt;
&lt;br /&gt;
::::: With the instrument bank formats that&#039;s really unusual if BNK came first!  It seems very odd for AdLib to produce the SND/TIM format if they already had the more efficient BNK format available.  I was going from the dates in the text files from the programmer&#039;s guide you kindly posted, and bkformat.txt says in Jan 1989 they are in the process of converting their software to use BNK.  Can you confirm there was BNK software earlier than this?  I&#039;m just thinking that Visual Composer may have come out in 1987, but maybe it didn&#039;t get BNK support added until later? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 01:30, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::::: Well, I&#039;m sure that first version of Visual Composer was released with AdLib music card, but I don&#039;t know exactly about BNK support. It&#039;s really strange that Ad Lib downgraded the format (BNK is better in structure), but the known formats has converters which converts BNK to X format, but not from X to BNK - this makes sense that BNK was the first format. Also Visual Composer doesn&#039;t support other bank formats, only BNK.&lt;br /&gt;
:::::: BNK creation date 1987 was contributed by [http://www.vgmpf.com/Wiki/index.php?title=User:TheAlmightyGuru Dean Tersigni], I&#039;ll ask him about it.&lt;br /&gt;
&lt;br /&gt;
:::::: Update: I also read information from bkformat.txt, and it seems you&#039;re right :)&lt;br /&gt;
:::::: So actually it was:&lt;br /&gt;
:::::: &#039;&#039;&#039;1)&#039;&#039;&#039; ROL &amp;amp; INS (1987, with AdLib Visual Composer v1.0)&lt;br /&gt;
:::::: &#039;&#039;&#039;2)&#039;&#039;&#039; MUS &amp;amp; SND/TIM (1988, with player and converter)&lt;br /&gt;
:::::: &#039;&#039;&#039;3)&#039;&#039;&#039; BNK (1989, with AdLib Visual Composer v1.5)&lt;br /&gt;
:::::: &#039;&#039;&#039;4)&#039;&#039;&#039; MDI (1989, also with player and converter)&lt;br /&gt;
:::::: Wow, that feel when restored original order of events! :D --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 01:51, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::::: That seems to make the most logical sense - there&#039;s a clear improvement with each new format.  I&#039;m glad you agree!  Note that when you say there&#039;s no conversion from &amp;quot;X to BNK&amp;quot; there is BANKMNG.EXE that comes with the programmer&#039;s manual which converts .ins files to .bnk. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 04:09, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::::::: True. I forgot about it :) Thanks! --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 12:02, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
== email ==&lt;br /&gt;
&lt;br /&gt;
Hello! Can&#039;t send you e-mail. Got this:&lt;br /&gt;
&lt;br /&gt;
 This message was created automatically by mail delivery software.&lt;br /&gt;
 A message that you sent could not be delivered to one or more of its&lt;br /&gt;
 recipients. This is a permanent error. The following address(es) failed:&lt;br /&gt;
 malvineous@shikadi.net&lt;br /&gt;
 host mail.shikadi.net [52.11.27.19]&lt;br /&gt;
 SMTP error from remote mail server after RCPT TO:&amp;lt;malvineous@shikadi.net&amp;gt;:&lt;br /&gt;
 550 invalid recipient&lt;br /&gt;
&lt;br /&gt;
[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 09:12, 11 March 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Whoops, moved my e-mail service to AWS and missed a step for that address!  Please resend, should work now :-)  Thanks for letting me know! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 11:34, 11 March 2017 (UTC)&lt;br /&gt;
::Yes, e-mail goes through this time. Hope you receive it. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 15:41, 11 March 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Duplicate RLE page ==&lt;br /&gt;
&lt;br /&gt;
After some edits to the [[RLE Compression]] page, I noticed that this was not the page linked from the [[:Category:Compression algorithms]] page. It seems there are in fact two of them; one with an uppercase &#039;c&#039;, and [[RLE compression|one with a lowercase &#039;c&#039;]]. The latter seems to be the better-written one, but since the LZW page was apparently moved from &amp;quot;LZW compression&amp;quot; to &amp;quot;LZW Compression&amp;quot;, I suggest the final name of the RLE page should likewise be the uppercase-&#039;c&#039; one.&lt;br /&gt;
&lt;br /&gt;
I have merged anything I deemed useful into the lowercase-&#039;c&#039; version. Could you make sure the uppercase-&#039;c&#039; duplicate is removed, and the other one is moved to its name?&lt;br /&gt;
&lt;br /&gt;
-[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:48, 4 October 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Done, many thanks for the clean up! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:38, 5 October 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Account rename? ==&lt;br /&gt;
Hi Malvineous,&lt;br /&gt;
&lt;br /&gt;
I am wondering if it&#039;s much of a hassle to rename accounts on this wiki.  I&#039;d kind of like to have my account use the same handle I&#039;m using just about everywhere else (ETTiNGRiNDER).  Don&#039;t sweat it too much if this is onerous to do, though.&lt;br /&gt;
&lt;br /&gt;
Thanks! - [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 20:42, 29 January 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
: I&#039;m not sure how it can be done.  If you can find out a quick way to rename a MediaWiki account then let me know!  At any rate all your comments would still be signed with your old name however. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:15, 4 February 2018 (UTC)&lt;br /&gt;
: P.S. the e-mail address in your account is bouncing -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:17, 4 February 2018 (UTC)&lt;br /&gt;
:: Ah, right, it was still set to that old e-mail.  Hushmail nuked that address on me years ago, I&#039;ve changed it to one that&#039;s current.  As for the renaming, I don&#039;t really know anything about wiki administration, though a quick search suggests that there&#039;s this thing: https://www.mediawiki.org/wiki/Extension:Renameuser&lt;br /&gt;
::If that&#039;s a bit much then no biggie. -- [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 14:43, 5 February 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Removal request ==&lt;br /&gt;
&lt;br /&gt;
It seems I made a page that was unnecessary; the [[Westwood Palette]] I documented turned out to be a known common format (6-bit RGB) already covered in the standard [[VGA Palette]] page. I have changed all links to link to the older page, but I don&#039;t think I have the user rights required to delete the Westwood Palette page. Can you take care of it? -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:56, 6 February 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Done!  I made you an admin too so you should have delete access now.  Thanks for your contributions! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 00:03, 7 February 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Hi-Octane ==&lt;br /&gt;
&lt;br /&gt;
Hi! &lt;br /&gt;
&lt;br /&gt;
I&#039;ve figured out the MUSIC.DAT container and I was wondering if you could shed out some light on what these song formats are, now that we know how to unpack it ?&lt;br /&gt;
&lt;br /&gt;
Thanks !!!&lt;br /&gt;
&lt;br /&gt;
: Yep, they&#039;re listed on the [[Hi Octane]] page, in the file format box. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:57, 14 March 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== ReCaptcha v1 problem ==&lt;br /&gt;
&lt;br /&gt;
It seems I can no longer add links in articles; the ReCaptcha test added when new links are detected uses ReCaptcha v1, which gives a warning that &amp;quot;reCAPTCHA 1 IS SHUTDOWN&amp;quot;. It does not allow the check to pass, so the page can never be submitted.&lt;br /&gt;
&lt;br /&gt;
The FAQ on the ReCaptcha docs (can&#039;t link to them, obviously) says that &amp;quot;&#039;&#039;&#039;Any calls to the v1 API will not work after March 31, 2018&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
-[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 09:26, 28 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Bio Menace patches ==&lt;br /&gt;
&lt;br /&gt;
Hey, I&#039;ll have Bio Menace 1 patches for the freeware release. Most of them are status window-related, but there are others as well.&lt;br /&gt;
Question: Could you create several other sections in All Bio Menace patches cathegory? Because I cannot submit them anywhere right now. Thanks! --[[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 00:57, 25 July 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
: The status window patches should go into [[:Category:Bio Menace interface patches]].  The others *should* fit into existing categories, but if you&#039;re not sure let me know! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 05:23, 29 July 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I&#039;ll need several categories from you as I checked there&#039;ll be other BM patch stuff as well. So I need the following categories: status screen, hostage, help menu, main menu, B800 screen (I even built the BIN file and I made patch for that!). And I&#039;ll even submit these for BM2 and 3. Please, create these. Oh, and I&#039;ll surely submit! --[[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 01:36, 1 August 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Status screen, hostage, help menu, main menu and B800 screen should all go into [[:Category:Bio Menace interface patches]] as they are all modifying the user interface.  I would like to keep the number of patch categories fairly small otherwise it will get a little out of control! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 01:48, 17 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Bio Menace patches on PCKF? ==&lt;br /&gt;
&lt;br /&gt;
Hey, how can I post my Bio Menace 1-3 patches on PCKF or keenmodding.org? I very want them to submit one of the forums!--[[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 23:11, 4 August 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Wombat File Reader updates! ==&lt;br /&gt;
&lt;br /&gt;
I think [[Wombat]]&#039;s title should be updated to show its full name, which now is &amp;quot;Wombat File Reader&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Also the supported games list has to be updated accordingly to the list on https://szevvy.com/ (the author&#039;s website, which was listed as &amp;quot;dead&amp;quot; in Wombat&#039;s info while the site is up and running again).&lt;br /&gt;
&lt;br /&gt;
It&#039;s also not a dead program at all, since its latest version is very recent (11 October 2018), and it&#039;d be a shame to have such old and deprecated information on this wiki of such a useful and powerful tool.&lt;br /&gt;
&lt;br /&gt;
-[[User:Elia1995|Elìa1995]] ([[User_talk:Elia1995|talk]]) 07:38, 15 October 2018‎ (UTC)&lt;br /&gt;
&lt;br /&gt;
: It&#039;s only just been updated recently after many years of no releases.  It&#039;s a bit unfair to say the wiki has old information when it&#039;s only a couple of weeks out of date, and it relies on people such as yourself to keep things up to date!  Please go ahead and correct as needed so we can keep the information current.  We are all doing this in our spare time so we need lots of help to keep things up to date.  Also, the page you link to lists it as &amp;quot;Wombat File Tools&amp;quot; rather than &amp;quot;Wombat File Reader&amp;quot;.  Everyone in the community refers to it as just &amp;quot;Wombat&amp;quot; however.  -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 23:27, 16 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I&#039;ve only just gotten my account here approved, and only just made new builds of Wombat (actually a complete rewrite) after (as Malvineous said) many many years of no releases.  It warms my heart to see people notice :) [[User:Szevvy|Szevvy]] ([[User talk:Szevvy|talk]]) 01:44, 17 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: I just noticed the 1.0.4 update, I&#039;ll work on updating the supported games list on the page according to the one on Szevvy&#039;s site; by the way, thanks for telling me how to &amp;quot;sign&amp;quot; these posts, I had no idea. [[User:Elia1995|Elia1995]] ([[User talk:Elia1995|talk]]) 08:08, 18 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== e-mail (again) ==&lt;br /&gt;
&lt;br /&gt;
Hello! Sent you e-mail 2019.02.19 about Prehistorik without any answer. Yesterday another e-mail was sent and since 24+ hours passed was forced to write here. Is there something wrong again with your e-mail account or spam filters (for mail.ru)? Thanks! [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 15:10, 1 March 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Content license ==&lt;br /&gt;
&lt;br /&gt;
Is the content of this wiki governed by a specific license? I&#039;d like to contribute information on &amp;quot;Nomad&amp;quot; file formats that I reverse engineered, which I&#039;d previously published on my personal web site under [http://creativecommons.org/licenses/by-sa/4.0/ Creative Commons SA 4.0]. This wiki certainly seems to be in the spirit of the Creative Commons licensing structure so I&#039;m guessing there would be no real conflict, but I just wanted to get some additional information on this. --[[User:Cmb|Cmb]] ([[User talk:Cmb|talk]]) 13:32, 6 May 2020 (UTC)&lt;br /&gt;
:Personally, I&#039;ve just [[RLE Compression#Source_code|added the license under which code was released]] myself. Then again I release everything under [[wp:WTFPL|WTFPL]], because I honestly don&#039;t mind people using anything I write for research purposes in any way they please, so license compatibility is a bit of a non-issue for me. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:04, 6 May 2020 (UTC)&lt;br /&gt;
:That said, though, given the current online climate, I do agree this is an issue that should be clarified here on the wiki. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:06, 6 May 2020 (UTC)&lt;br /&gt;
:: There is a licence specified somewhere but the short answer is anything you put here is basically in the public domain - because if someone steals it we don&#039;t have the resources to chase them, so if it&#039;s that valuable to you that you can&#039;t handle someone copying it without giving you credit, then don&#039;t post it here.  Having said that for &amp;quot;nice&amp;quot; users many of the pages ask for a mention if you find the content useful, but this is by no means a requirement.  I suppose legally speaking you&#039;ll have to dual-licence your Creative Commons content because some CC versions have additional restrictions, like you can&#039;t copy the content without giving credit.  The [https://creativecommons.org/choose/zero/ CC0 licence] pretty much covers it.  Putting a specific licence on code is fine (although no licence at all would be best so it inherits the wiki&#039;s general content licence), noting that any licence enforcement will be on you, but the content itself is always going to be CC0/public domain. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 05:48, 10 June 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Multiple Platforms ==&lt;br /&gt;
&lt;br /&gt;
Should anything special be done for games that are both DOS and Win95, like [[Warcraft II]] and [[Command &amp;amp; Conquer]]? As it is, the template only supports one &#039;Platform&#039;. I don&#039;t know enough about templates to make it accept lists, though a workaround would be to add the Win95 category to such games manually. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) &lt;br /&gt;
20:29, 17 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
: I&#039;m open to suggestions, but the purpose of the platform category is less about documenting all platforms a game runs on, and is more about identifying which games on the wiki don&#039;t work under DOS, since DOS is the wiki&#039;s main focus.  So think of it more as the &amp;quot;minimum&amp;quot; platform needed - i.e. a DOS game can also run inside Win3.x and Win95, a Win3.x game can also run under Win9x but not DOS, and a Win9x game can&#039;t run under DOS or Win3.x at all.  So for DOS/Windows games DOS would be the oldest platform needed to play the game, even if there is a native Windows version. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 00:26, 18 April 2022 (GMT)&lt;br /&gt;
::&#039;Minimum platform&#039; isn&#039;t really true anymore when going to the reality of getting stuff running on modern machines, though; 16-bit windows programs don&#039;t work on modern systems at all, and DOSBox can&#039;t emulate them. They&#039;re a pretty annoying in-between class. C&amp;amp;C95 has issues like that; while the game itself is 32-bit, its installer is a 16-bit Windows program. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:33, 18 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: That&#039;s true, but I wasn&#039;t thinking so much about modern systems.  If you&#039;re building a VM or setting up an old PC, knowing which games will work without Windows, or will work if you only install Win 3.1, might be useful.  I did think you could install Windows 3.1 in DOSBox though to run 16-bit apps.  At any rate, I more had in my mind which games required OS support for NE executables in order to play, and which ones required PE support. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 11:48, 18 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: Well, one of the specific cases I had in mind in this was the fact that the Win95 version of Command &amp;amp; Conquer uses PCX format for its title screen, while the DOS version doesn&#039;t. And while the basic modding of terrain and game objects is identical in both versions, all modding related to the game UI is different because of the different resolution. So, if more detailed information on that front would be added, it seems logical to also add the Win95 category somehow. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:17, 25 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: In that case it sounds almost like a different game that happens to share a lot of the same content, so I&#039;d be more inclined to list it as a separate game, e.g. on a page called &amp;quot;Command &amp;amp; Conquer (Windows version)&amp;quot;, and just put a note saying the file formats are the same as the DOS version with the following exceptions, then list the Windows-specific file formats. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 15:42, 25 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::: No, it&#039;s really just PCX, nothing else is new in terms of file formats. The UI is in the same sprites format used for the in-game sprites. So like 95% still the same. But yea, I guess if I do ever get around to writing a more in-depth modding guide, I could make a different page for the Win95 version. Most of the modding difference between the two games is just that the Win95 exe file has been researched a lot deeper, to the point that (with the released source code) pretty much anything in it can be changed nowadays. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:10, 25 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
==Empty Pages==&lt;br /&gt;
Not sure if you already noticed it, but user [[User:Parlortricks]] is creating a bunch of empty pages, I&#039;m assuming to be filled at a later date. --[[User:TheAlmightyGuru|TheAlmightyGuru]] ([[User talk:TheAlmightyGuru|talk]])&lt;br /&gt;
: I hadn&#039;t noticed, thanks for the heads up!  I updated [[ModdingWiki:Contributing]] to include some more points about when to create pages. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 04:31, 10 August 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
== File format category for copy-protection data. ==&lt;br /&gt;
&lt;br /&gt;
I can&#039;t find any suitable examples with a template that suits a file containing only the copy protection data.   &lt;br /&gt;
It&#039;s not text, but there don&#039;t seem to be any generic binary format templates. [[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 06:44, 17 April 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
: I&#039;m not really familiar with what copy protection data would contain.  What generic items would you think apply to this sort of data?  I&#039;m not so keen on adding a generic binary format category, it would be nice to have a specific one where possible. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 09:17, 17 April 2023 (GMT)&lt;br /&gt;
:: In this case, the file contains 750 passwords. They were printed on a piece of card in with the original game (in pale blue to thwart photocopying) and the game asks you for one of the passwords at random. I&#039;ll make a file without a specific category for now.[[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 12:31, 17 April 2023 (GMT)&lt;br /&gt;
::: If they&#039;re passwords, doesn&#039;t that make it a type of strings file? You said it&#039;s not &amp;quot;plain text&amp;quot;, but can it be converted/decoded to plain text? I&#039;ve dealt with encrypted text formats before; see [[Cover Girl Strip Poker Text]] -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:20, 17 April 2023 (GMT)&lt;br /&gt;
: There are lots of file formats of unspecified types. See stuff like [[Westwood Fading Table]]; it&#039;s basically a file storing special colour effects. I&#039;m not sure there&#039;s a point in making a template for every specific type like that; there&#039;s so many odd cases out there. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:17, 17 April 2023 (GMT)&lt;br /&gt;
:: Thanks.  I wasn&#039;t necessarily looking for a template. But I couldn&#039;t find an example of a file that wasn&#039;t already in an incorrect template. I&#039;ll base my page on the example you suggested.[[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 12:31, 17 April 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Wiki policy questions ==&lt;br /&gt;
&lt;br /&gt;
Hi, a couple questions I&#039;ve had lingering regarding how things should be done on the wiki / if they should be done at all.&lt;br /&gt;
* What should we do about game title disambiguation?  I think in cases like Warlords (SSG) vs. Warlords (Atari) where only one of the games was released as a DOS game, it&#039;s probably fine to just have a page for the one that&#039;s relevant and at most maybe have a note on its main page that it&#039;s not related to the other game, but I&#039;ve noticed that &amp;quot;Dungeon of Death&amp;quot; is a title that has the honor(?) of being used for two different games &#039;&#039;on DOS&#039;&#039;.  Is there a particular disambiguation format we should use when adding one of those?&lt;br /&gt;
* Is there any specific policy on games/mods with offensive content?  I know we have some strip poker type games referenced on the wiki, but one thing I&#039;m specifically thinking of is I know there was an old hack of the DOS version of Gauntlet 2 that&#039;s been floating around since the 90s, but is a fairly puerile affair that changes text/graphics to sexual and scatological references.  It also has a vulgar word in the mod title itself.  It might be useful to look at how it was done since it&#039;s clearly evidence that changing the text/graphics was attainable even back then, but do we want to document things like that, or is there a &amp;quot;too dirty&amp;quot; line where we should try to keep the wiki clean of references to certain games/mods due to title or content?&lt;br /&gt;
Thanks.-- [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 18:35, 3 October 2023 (GMT)&lt;br /&gt;
: Final decision on this is obviously on Malvineous, but here&#039;s my two cents on this: I don&#039;t think there&#039;s any restriction on making pages for covering games with explicit content, but it&#039;d be nice to keep the &#039;&#039;actual&#039;&#039; explicit content on the wiki to a minimum. As an example, the most daring thing I put on the wiki was the modded showcase image for [[Interactive Girls Club]], which, without the humorous covering, was indeed a straight up explicit image. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 19:23, 3 October 2023 (GMT)&lt;br /&gt;
:: Yep I agree.  The purpose of the wiki is for documentation, and just like a TV documentary, sometimes you may have to cover difficult subjects, so it&#039;s usually done in a tactful way without showing anything directly offensive.  So I think the same policy should apply here - no directly explicit/offensive content (e.g. images), but talking about it for the sake of documenting it is fine.  I would think avoiding offensive words in article titles would be a good idea as people are more likely to come across those by accident, but if you&#039;re browsing an article about a pornographic game and you encounter some dirty words, you have nobody to blame but yourself.  So listing that mod with an uncensored title is fine with me, but perhaps let&#039;s not create an article page for it unless the words are obscured with asterisks or similar just to be extra considerate to those who might be browsing through the lists of pages.&lt;br /&gt;
:: It would be good to make it clear when things are censored though.  In Nyerguds&#039; example I actually thought the &#039;censored&#039; image was part of the game, I didn&#039;t realise it was an addition.  So maybe it would be good to write &amp;quot;Censored by ModdingWiki&amp;quot; or something to that effect, to make it obvious that it&#039;s something we&#039;ve done and not part of the original game.  Likewise for an article title with asterisks in it, one of the first things on the page should be a note to say what the full uncensored article title actually is.&lt;br /&gt;
:: As for disambiguation I&#039;m open to suggestions.  Probably my first thought would be to include the year of release in brackets: &amp;quot;Example (1990)&amp;quot; like what was done for [[Shadow Warrior (1993 Beta)]] or if the year is the same, then perhaps the software developer: &amp;quot;Example (Microsoft)&amp;quot;.  I&#039;m not too fussed as it&#039;s probably more important that the part in brackets makes sense to readers rather than follows any hard and fast rule.  Either way a normal disambiguation page should be created for the name without any brackets, in the same style as the existing ones at [[:Category:Disambiguation]].  A disambiguation page wasn&#039;t created for Shadow Warrior as the beta version isn&#039;t really a competing game, so links on the respective article pages would suffice.  As always, use your best judgement, we can always change it later if we need to. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 06:10, 4 October 2023 (GMT)&lt;br /&gt;
::: The Interactive Girls Club image &#039;&#039;isn&#039;t&#039;&#039; censored for the sake of putting it on the wiki though. It&#039;s a showcase of the game being &#039;&#039;modded&#039;&#039;. I replaced the normal mouse cursor with that sign. I could&#039;ve taken a tamer scene to start with, but I thought this would be funny. I explained what was done to it [[:File:Mod-Interactive_Girls_Club.png|on the actual image page]]. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 07:34, 4 October 2023 (GMT)&lt;br /&gt;
:::: Ohh, I understand now!  Sorry it was completely lost on me, but that&#039;s probably because I&#039;ve never played the game before so I didn&#039;t know what changes to look out for! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:45, 4 October 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Pages linking to itself ==&lt;br /&gt;
&lt;br /&gt;
Hello! Merry Christmas and Happy New Year! Is it possible to check Wiki for pages that linked to itself and maybe autocorrect if possible? Like [https://moddingwiki.shikadi.net/w/index.php?title=Shakii_The_Wolf&amp;amp;curid=2343&amp;amp;diff=11369&amp;amp;oldid=11367 this] or [https://moddingwiki.shikadi.net/w/index.php?title=Pee_and_Gity&amp;amp;curid=2348&amp;amp;diff=11370&amp;amp;oldid=6789 that]? Sometimes this will result in redirect to itself (as in first example) or a red link indicating that page with this name was not created (as in second example). I&#039;ve checked and fixed all pages created by [[User:MartinVole|MartinVole]] but maybe there are more. Thank you! -[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 19:46, January 3, 2024‎ (GMT)&lt;br /&gt;
:I&#039;ve occasionally seen it used as shortcut to putting the page name in bold in the page intro, but yea, it&#039;s kind of odd. According to [[wikipedia:Help:Self_link|the official Wikipedia page on the subject]], &amp;quot;Self links are usually undesirable&amp;quot;. I immediately fixed it in the case of Shakii because, with it linking to a redirect page, it even created a real link. (PS: please sign your talk page addidions.) -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 20:26, 3 January 2024 (GMT)&lt;br /&gt;
:: Hello and Merry Christmas and Happy New Year to you too! Wow, you fixed so much pages already! That&#039;s why I was asking [[User:Malvineous|Malvineous]] for help - maybe there is a way to do it automatically. Or at least somehow get the list of the affected pages. (Thanks! I was sure I put four &amp;quot;~&amp;quot; characters but not sure what happend and why Talk page was not included.) -[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 22:35, 3 January 2024 (GMT)&lt;br /&gt;
::: Merry Christmas and happy 2024 to you too :) Yea, I&#039;m just going down the list of all articles, heh. By the way, your talk page was not included because there was nothing there; I fixed it by coping the timestamp from the History page and adding your name manually. On that note, maybe you should make an actual user page; it&#039;s still a red link. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 22:51, 3 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: I used to like using self-referential links as it meant the links would &amp;quot;work&amp;quot; again if the content was copied onto another page, but I agree once you start involving redirects it becomes a bit of an issue.  So no problems from me if you remove those.  There are some reports on [[Special:SpecialPages]] that list different types of page reports you can run, but I don&#039;t see one that picks up these links.  I can&#039;t remember whether a self-link automatically adds the page to a category or not, because that could be another place to check, in case there is a category of all pages with self links.  However I think it might have to be a case of just fixing them as we encounter them.  -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 00:35, 4 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: Yea, I dug around a little online and found no information about detecting / listing them, so instead I just opened [[Special:AllPages|the list of all pages]], and simply went through the whole bunch. Also fixed some pages that simply used &amp;amp;lt;b&amp;amp;gt; html tags instead of proper wiki formatting to make their titles bold, renamed a few pages that were missing apostrophes in their page titles, and noticed one page that still used old &amp;amp;lt;code&amp;amp;gt; tags. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 08:08, 4 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::: Wow that would&#039;ve been a big job, thanks very much! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 09:57, 4 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: Thank you for the answer and clarification! -[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 14:51, 4 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: Thank you for the great help with fixing the Wiki pages! Yes, user page created now, thanks! -[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 14:51, 4 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Tilesets with &amp;quot;hidden&amp;quot; data ==&lt;br /&gt;
&lt;br /&gt;
I was looking over the [[PAK Format (The Learning Company)]] and it made me wonder about this &amp;quot;Hidden&amp;quot; property in the Tileset Infobox template. Its function is to separate [[:Category:Dense tilesets|Dense tilesets]] from [[:Category:Sparse tilesets|Sparse tilesets]], and the main explanation given for Sparse tilesets seems to boil down to the fact that in formats that have a tiles index in their header, and some consistent way to determine the length of the data at each index, you can deliberately leave space between tiles. However, I&#039;m not entirely clear if you consider this category to also includes block-aligned formats. See, while the PAK format indeed has an index, so it&#039;s certainly sparse, it also aligns its indices to the next multiple of 16 bytes, meaning there is potentially a lot of open space inside the format anyway. But this is not deliberately created open space caused by meddling with the index; it&#039;s just a natural result of the file format. So would a format that &#039;&#039;only&#039;&#039; has such an aligning, but &#039;&#039;doesn&#039;t&#039;&#039; have an index, be considered &amp;quot;sparse&amp;quot; too?&lt;br /&gt;
&lt;br /&gt;
There&#039;s also many other ways to hide data inside a lot of formats; the simplest one being any format that uses RLE and doesn&#039;t complain about commands to repeat a given value 0 times. Does that affect the categorising? The name &amp;quot;Hidden&amp;quot; kind of gives a wrong impression in that aspect. I know it&#039;d be a lot of edits, but &amp;quot;Sparse&amp;quot; or &amp;quot;Dense&amp;quot; would probably have been a better name for it. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 19:38, 8 February 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
: My original reason for including that information (whether data can be hidden inside the format or not) was to highlight whether there might be a way for modding tools to store additional data in the files that the game would ignore.  This could be anything from a message about what program was used to generate the file, through to user comments, names/titles for items (like tiles or whole levels if the game doesn&#039;t store level names), or data that makes it easier to load the file in an editor (such as a time signature for music files that only store delays as a number of ticks, to make rendering the event list look more natural.)&lt;br /&gt;
&lt;br /&gt;
: So in this case the block-aligned formats would certainly qualify, as would RLE-encoded data.  I figured &amp;quot;Hidden&amp;quot; was suitable because the data was hidden from the game.  &amp;quot;Sparse&amp;quot; is also a little inaccurate for RLE because it&#039;s not a gap where you can put anything you want, you have to actually encode/embed the data in it.  Does it matter if we call it embedded data for RLE but sparse data for tilesets? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 04:00, 9 February 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: Well, block-aligned formats are actually probably too unreliable for really hiding in 3rd party metadata; you can never be &#039;&#039;sure&#039;&#039; there is enough space in there to reliable add extra data, since the actual data in these aligned blocks will vary. But I understand the intent better now, yes. thanks. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:47, 11 February 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
== FileFormatTool templates ==&lt;br /&gt;
&lt;br /&gt;
Could you add examples and a short explanation of all the types on the BeginFileFormatTools template? I&#039;ve seen pages that just use the wrong type altogether, and I&#039;m assuming this is caused by lack of documentation. It&#039;s not clear from the page whether a tileset format containing multiple images should use type &amp;quot;group&amp;quot; or &amp;quot;image&amp;quot;. I&#039;ve always used &amp;quot;image&amp;quot; for that, but I can understand the confusion. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:48, 11 February 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
: I&#039;ve added links to [[:Template:FileFormatTool]] but the tileset format is a bit of a tricky one because it&#039;s kind of both.  The way I&#039;ve handled it in my own code is always a compromise because there&#039;s so much overlap.  I&#039;ve ended up deciding that if the format can hold arbitrary data (like a .zip file can) then it&#039;s an archive/group file.  But many tilesets can only store image data (and often rely on headers in the tileset file to render the images within properly) so I figure those are too tightly bound together to be considered an archive.&lt;br /&gt;
&lt;br /&gt;
: After all, you can extract a .zip, move the files to another computer, then zip them up again and end up with a workable file.  But you often can&#039;t extract all the images in a tileset, move them to another computer, then bundle them all up into the original tileset again, as data has been lost (e.g. the size of all the images which was in the tileset file&#039;s header).  And you probably can&#039;t include a readme.txt in the tileset either.  So therefore, it&#039;s not a true archive format.  You also often can&#039;t extract an image to a file and then identify that file from its headers - tiles are often raw pixel data with no means of identification.  So it&#039;s hard to open an extracted tile file in an image editor, but usually the tileset as a whole can have its format automatically detected in some way, so it&#039;s more user friendly to keep the tiles inside the tileset file, and not permit them to be extracted as raw files (only if the images are converted to another format like .png or similar).  There are unfortunately still grey areas even with this definition so I&#039;m certainly open to ideas.&lt;br /&gt;
&lt;br /&gt;
: Do you think the clarification belongs on [[:Template:FileFormatTool]] with the rest of the info, or on [[:Template:BeginFileFormatTools]] (which links there already)?  Also as a side note, I have come to prefer the term &amp;quot;archive&amp;quot; over &amp;quot;group&amp;quot; so one of these days I may try to update everything to refer to &amp;quot;archive&amp;quot; instead. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 11:55, 11 February 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: I&#039;d add some text on the FileFormatTool page saying to look at the BeginFileFormatTools page for explanation on the types themselves, and then write the real stuff there. After all, the &amp;quot;Begin&amp;quot; template is the one that contains the type option, so that&#039;s where I would expect the explanation, as user.&lt;br /&gt;
:: And, yea, changing &amp;quot;group&amp;quot; to &amp;quot;archive&amp;quot; might be a good move; it makes it more distinct, and it&#039;s already used like that anyway. There will of course always be some edge cases, but there&#039;s not much we can do about that. It&#039;s generally archives containing mostly but not exclusively images, and which don&#039;t have names for their entries. [[All Dogs Archive Format]] comes to mind; despite the name, when writing the page I treated it as a tileset with one type of special non-image entries. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 18:17, 15 February 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: Done, hopefully that provides some better documentation.  Feel free to adjust as needed. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 06:12, 18 February 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: Absolutely beautiful. Great work on that. I might take some time referencing the relevant [[:Category:Infoboxes|Infoboxes]] for each one, in a &amp;quot;&#039;&#039;This type is generally used on pages using the xxxx and yyyy infoboxes&#039;&#039;&amp;quot; way, since these correspond pretty directly -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 08:57, 1 March 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Something wrong with the File History ==&lt;br /&gt;
&lt;br /&gt;
When I look at the file history of any file, the text above the file history table looks corrupted, and shows this text:&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&#039;Yi efo/eka&#039;e gwa ebo wo le nyangagi wuncin ye kamina wunga tinya nan&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Google Translate found no match for it, so I have no idea what this is. But it seems to have slipped into one of the internal wiki templates somehow.&lt;br /&gt;
&lt;br /&gt;
Open the page of literally any image on the wiki to see an example. I noticed it when looking at [[:File:Treasure_Mountain_Panning_Image_Format.png|this one]].&lt;br /&gt;
&lt;br /&gt;
--[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:38, 10 October 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:Okay, this is plain bizarre. I googled the sentence, and it seems hundreds of other wikis have the same issue. Some corruption in a recent update of MediaWiki itself maybe?&lt;br /&gt;
:--[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:42, 10 October 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: Nice catch! Looks like this is a [https://en.wikisource.org/wiki/Wikisource:Scriptorium/Archives/2024-05#File_History_vandalised MediaWiki issue] due to copy-pasted text. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 10:56, 10 October 2024 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11942</id>
		<title>BGI Stroked Font</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11942"/>
		<updated>2024-09-08T14:23:23Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Character Layout */ Hardcoded Borland scale size and fonts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Font Infobox&lt;br /&gt;
 | MaxGlyphs = 32,767&lt;br /&gt;
 | GlyphMinSize = Unlimited&lt;br /&gt;
 | GlyphMaxSize = Unlimited&lt;br /&gt;
 | Access = Indexed&lt;br /&gt;
 | Bitmap = N&lt;br /&gt;
 | Vector = Y&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Hidden = Y&lt;br /&gt;
 | Metadata = Name, Description&lt;br /&gt;
 | Games =&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;BGI Stroked Font&#039;&#039;&#039; is a vector font format created by Borland to work with their 1987 graphics API, [[Borland Graphics Interface]]. Since the format stores vector fonts, it can easily be scaled in size with little loss of fidelity. However, because the format only supports lines and not curves, scaling to larger sizes will make the characters look jagged. The font files typically have a *.CHR file extension.&lt;br /&gt;
&lt;br /&gt;
After 1987, Borland&#039;s C and Pascal programming languages shipped with 10 different BGI Stroked Fonts: Bold, Euro, Goth, Lcom, Litt, Sans, Scri, Simp, Trip, and Tscr. Due to the popularity of Borland&#039;s programming languages, and their graphic API, BGI Stroked Fonts were used in hundreds of DOS video games and software.&lt;br /&gt;
&lt;br /&gt;
The designers of the file format unfortunately used a file signature starting with &amp;quot;PK&amp;quot; which would later be used by PK Zip, so BGI Stroked Font files, despite having an extension of CHR, might be misidentified as zip archives if the identifier doesn&#039;t take into account the full PK Zip signature.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
=== Header ===&lt;br /&gt;
The header includes the font&#039;s name, version number, and description.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][2] || Signature || Must be 0x50 0x4B (&amp;quot;PK&amp;quot;). Probably initials of Borland founder [https://en.wikipedia.org/wiki/Philippe_Kahn Philippe Kahn].&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Description || User text. Borland&#039;s official fonts start with &amp;quot;BGI Stroked Font&amp;quot; with two 0x08 characters before to hide font file signature in case of use DOS &amp;quot;type&amp;quot; command on font file, then the version number, and ends with a copyright. The description is terminated with byte 0x1A which Borland font loader code search in first 256 bytes of the file (including two bytes of Signature above). In other words this field size can be from 0 (zero - no copyright text at all) to 253 bytes long (256 - 3).&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Header Start || Must be 0x1A.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Header Size || The size, in bytes, of the entire header.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || A 4-character font internal name.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Font Size || The size of the font&#039;s data block. The Header Size + Font Size should be the size of the file. &#039;&#039;&#039;See remarks according Font Size below.&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Major || Driver Version Information major number. Must be 1 (Borland font loader also accepts anything bigger but not 0, i.e. valid if &amp;quot;value &amp;gt;= 1&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Minor || Driver Version Information minor number. Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Major || BGI Revision Information major number. Must be 1 (Borland font loader also accepts 0 but halts on anything bigger than 1, i.e. valid if &amp;quot;value &amp;lt;= 1&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Minor || BGI Revision Information minor number. Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Padding || The rest of the header should be padded out to nulls based on the Header Size. All official Borland fonts use a header size of 0x80 (note that font editors may not work with fonts with different header size). This field must be at least 15 bytes long since Borland C code aligns Stroke Header to 16 byte bounday by moving Font Size bytes back inplace. &#039;&#039;&#039;See remarks according Font Size below.&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Correct Font Size field is crucial since Borland code moving font data inplace to align on 16 byte boundary based on this field value. User-made fonts with incorrect Font Size (less than it should be) and/or with Padding less than 15 bytes will be corrupted in memory and will not work properly! It doesn&#039;t matter if Stroke Header itself aligned in file to 16 byte boundary because code checks only actual memory address and it may be anything.&lt;br /&gt;
&lt;br /&gt;
To calculate proper Font Size do as follows:&lt;br /&gt;
# Find max offset in Character Stroke Offsets table (see Stroke Header definition below).&lt;br /&gt;
# Add Strokes Offset to get the Stroke Data offset for that character.&lt;br /&gt;
# Parse Stroke Data for that character until the stop command and sum all bytes including stop command itself.&lt;br /&gt;
# Use result value as Font Size.&lt;br /&gt;
# Do not foget that this Font Size must not include Font Header size.&lt;br /&gt;
&lt;br /&gt;
=== Stroke Header ===&lt;br /&gt;
This section contains general information about the font including how many characters are represented, the top of the highest ascender, bottom of the lowest descender, baseline, where in the file to find each character&#039;s instructions, and the width of each character.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Stroke Check || Must be 0x2B. Indicates this is a stroked font.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Character Count || Number of total characters stored in this font.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Starting Character || The index of the first character to have a glyph associated with it.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Strokes Offset || The file offset where stroke definitions begin relative from the start of this header.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Scan Flag || {{TODO|Borland&#039;s documentation calls this the &amp;quot;scan flag&amp;quot;, but doesn&#039;t explain what it is for (&amp;quot;set to 1 if set is scanable&amp;quot;).}}&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Ascender || The distance from the origin to the font&#039;s highest point.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Baseline || The distance from the origin to the font&#039;s baseline (typically 0). Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Descender || The distance from the origin to the font&#039;s lowest point. Note, you can derive the total character height by getting the distance from the Ascender to Descender.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || Borland&#039;s own documentation says &amp;quot;four character name of font&amp;quot;, but it&#039;s always all zero.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]][Character Count] || Character Stroke Offsets || An array of the offset to the stroke definitions for each character. To get the position in the file, you must add the Header Size and the Strokes Offset to this value.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][Character Count] || Character Widths || The unscaled width of each character.&lt;br /&gt;
|-&lt;br /&gt;
| Stroke Data || Character strokes || The stroke instructions for each character. See below for how to interpret them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Stroke Data ===&lt;br /&gt;
This section contains the actual instructions for drawing individual characters.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || X Instruction || Instructions for drawing the character and an X value.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || Y Instruction || Instructions for drawing the character and a Y value.&lt;br /&gt;
|-&lt;br /&gt;
| ... || Several possible instruction pairs per character.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Encoded in each two byte pair is a single stroke instruction, and an X and Y value. The most-significant bit in each byte is an opcode, the next seven bits represent a signed value. The first byte is the X value, the second byte is the Y value. See the diagram below.&lt;br /&gt;
&lt;br /&gt;
 7 6 543210 &lt;br /&gt;
 ^ ^ ^&lt;br /&gt;
 | | +----------- 6-Bit number.&lt;br /&gt;
 | +------------- Sign bit for number.&lt;br /&gt;
 +--------------- Opcode.&lt;br /&gt;
&lt;br /&gt;
The two opcodes determine the instruction.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Code 1 !! Code 2 !! Instruction&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || End of character stroke definition.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || Borland&#039;s documentation has this labeled as &amp;quot;do scan,&amp;quot; implying it&#039;s related to the Scan Flag. It&#039;s only used in their BOLD font on characters with multiple objects like the colon and equals sign. It doesn&#039;t appear to affect how the character is drawn. Borland font rendering code silently ignores this - checked in Turbo Pascal 7.1 (1997) and in Turbo C 2.01 (1988). {{TODO|More info is needed.}}&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || Move plotter to the specified X and Y coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || Draw a line from the previous X and Y coordinates and move plotter to the new X and Y coordinates.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Character Layout ==&lt;br /&gt;
[[Image:BGI Stroked Font - Layout Diagram.png|thumb|256x256px|Y-axis layout.]]&lt;br /&gt;
The Y values for each character are stored in a unique manner. Characters are drawn relative to the baseline started at 0 with Y-axis inverted to screen axis, in other words negative values goes below baseline and positive above. See the diagram to the right.&lt;br /&gt;
&lt;br /&gt;
== Borland font scale size ==&lt;br /&gt;
Borland font rendering code has internal font scale table for use as the third SetTextStyle() argument.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
static char chrscale[10][2] = {&lt;br /&gt;
  {00, 00}, /* apply custom scale coefficients */&lt;br /&gt;
  {03, 05},&lt;br /&gt;
  {02, 03},&lt;br /&gt;
  {03, 04},&lt;br /&gt;
  {01, 01}, /* charsize == 4 (as is) */&lt;br /&gt;
  {04, 03},&lt;br /&gt;
  {05, 03},&lt;br /&gt;
  {02, 01},&lt;br /&gt;
  {05, 02},&lt;br /&gt;
  {03, 01}&lt;br /&gt;
};&lt;br /&gt;
/*&lt;br /&gt;
How to apply:&lt;br /&gt;
X = (X * chrscale[charsize][0]) / chrscale[charsize][1];&lt;br /&gt;
Y = (Y * chrscale[charsize][0]) / chrscale[charsize][1];&lt;br /&gt;
Where:&lt;br /&gt;
charsize - font size as third argument for settextstyle()&lt;br /&gt;
X, Y - decoded Stroke Data coordinats&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
To display font characters as is without any scale set font size to 4. Custom character scale coefficients can be set via SetUserCharSize() routine.&lt;br /&gt;
&lt;br /&gt;
== Hardcoded Borland fonts ==&lt;br /&gt;
Borland graphics library GRAPHICS.LIB (C) and GRAPH.TPU (Pascal) has hardcoded font names table for using by number as the first SetTextStyle() argument. Only first five fonts (including default BIOS 8x8 raster font) has predefined names for them. Note that Borland Pascal was shipped with BOLD.CHR font file, but since its name missing in GRAPH.TPU (that&#039;s probably an oversight) you can use it only via InstallUserFont() routine as any other user font. User fonts can be installed only if file name matches the ????.CHR pattern and four character file name without extension matches Font Name field in font Header. In other words FONT.CHR will work but MYFONT.CHR or FNT.CHR will not.&lt;br /&gt;
&lt;br /&gt;
Also be aware that register(far)bgifont() function which was designed to utilize fonts linked with executable or memory buffered font files, will work only for hardcoded fonts below. This will checked internally by matching hardcoded font names against Font Name field from font Header. If you want to use any other user font file from memory or linked code - you&#039;ll need to replace Font Name in your font Header with any four character letters from hardcoded fonts. This can be done in memory to avoid confuse with the original Borland fonts. After that you can use appropriate number for font which name you&#039;re used for masking.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Number !! Name !! File !! Predefined name constant&lt;br /&gt;
|-&lt;br /&gt;
| 0 || - || - || DEFAULT_FONT (C) / DefaultFont (Pascal)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || TRIP || TRIP.CHR || TRIPLEX_FONT (C) / TriplexFont (Pascal)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || LITT || LITT.CHR || SMALL_FONT (C) / SmallFont (Pascal)&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SANS || SANS.CHR || SANS_SERIF_FONT (C) / SansSerifFont (Pascal)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GOTH || GOTH.CHR || GOTHIC_FONT (C) / GothicFont (Pascal)&lt;br /&gt;
|-&lt;br /&gt;
| 5 || SCRI || SCRI.CHR || -&lt;br /&gt;
|-&lt;br /&gt;
| 6 || SIMP || SIMP.CHR || -&lt;br /&gt;
|-&lt;br /&gt;
| 7 || TSCR || TSCR.CHR || -&lt;br /&gt;
|-&lt;br /&gt;
| 8 || LCOM || LCOM.CHR || -&lt;br /&gt;
|-&lt;br /&gt;
| 9 || EURO || EURO.CHR || -&lt;br /&gt;
|-&lt;br /&gt;
| 10 || BOLD || BOLD.CHR || Font missing in Pascal GRAPH.TPU library.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
=== Draw Stroke Data ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Copyright 2024 CTPAX-X Team&lt;br /&gt;
This source code licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;):&lt;br /&gt;
https://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
/* draws a character:&lt;br /&gt;
x, y - initial screen positon&lt;br /&gt;
b - buffer pointer to a Stroke Data for character */&lt;br /&gt;
void chr_draw_char(int x, int y, unsigned char *b) {&lt;br /&gt;
char m, dx, dy;&lt;br /&gt;
int xc, yc;&lt;br /&gt;
  /* initial position according to Stroke Header */&lt;br /&gt;
  y += origin_to_ascender - origin_to_descender;&lt;br /&gt;
  xc = x;&lt;br /&gt;
  yc = y;&lt;br /&gt;
  moveto(xc, yc);&lt;br /&gt;
  do {&lt;br /&gt;
    /* get mask */&lt;br /&gt;
    m = b[0] &amp;gt;&amp;gt; 7;&lt;br /&gt;
    m += m + (b[1] &amp;gt;&amp;gt; 7);&lt;br /&gt;
    /* 0 - stop; 1 - scan; 2 - move; 3 - draw */&lt;br /&gt;
    if (m &amp;gt; 1) {&lt;br /&gt;
      /* bit arithmetic (note dx/dy signed 8 bit type):&lt;br /&gt;
      if sign bit is set - expand to full signed value */&lt;br /&gt;
      dx = (b[0] &amp;amp; 0x7F) | ((b[0] &amp;amp; 0x40) &amp;lt;&amp;lt; 1);&lt;br /&gt;
      dy = (b[1] &amp;amp; 0x7F) | ((b[1] &amp;amp; 0x40) &amp;lt;&amp;lt; 1);&lt;br /&gt;
      dy = -dy;&lt;br /&gt;
      /* dx/dy relative to initial screen positon */&lt;br /&gt;
      xc = x + dx;&lt;br /&gt;
      yc = y + dy;&lt;br /&gt;
      if (m == 2) {&lt;br /&gt;
        moveto(xc, yc);&lt;br /&gt;
      } else {&lt;br /&gt;
        lineto(xc, yc);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    /* next byte pair */&lt;br /&gt;
    b += 2;&lt;br /&gt;
  } while (m);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Shape Viewer ===&lt;br /&gt;
This FreeBASIC program will draw all of the characters in the specified font, and give details about the font.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;freebasic&amp;quot;&amp;gt;&lt;br /&gt;
ScreenRes 800, 600, 4&lt;br /&gt;
&lt;br /&gt;
&#039; Open the font file.&lt;br /&gt;
Open &amp;quot;SANS.CHR&amp;quot; For Binary As #1&lt;br /&gt;
&lt;br /&gt;
&#039; Verify the signature.&lt;br /&gt;
Dim As String Check&lt;br /&gt;
Check = Space(4)&lt;br /&gt;
Get #1, , Check&lt;br /&gt;
If Check &amp;lt;&amp;gt; &amp;quot;PK&amp;quot; + Chr(8) + Chr(8) Then&lt;br /&gt;
	Print &amp;quot;Not a Borland CHR font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the Description&lt;br /&gt;
Dim As UByte Buffer&lt;br /&gt;
Dim As String Description&lt;br /&gt;
Do&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
	If Buffer &amp;lt;&amp;gt; &amp;amp;h1A Then&lt;br /&gt;
		Description = Description + Chr(Buffer)&lt;br /&gt;
	End If&lt;br /&gt;
Loop Until Buffer = &amp;amp;h1A&lt;br /&gt;
&lt;br /&gt;
&#039; Load the header size.&lt;br /&gt;
Dim As UShort HeaderSize&lt;br /&gt;
Get #1, , HeaderSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font id.&lt;br /&gt;
Dim As String FontId&lt;br /&gt;
FontId = Space(4)&lt;br /&gt;
Get #1, , FontId&lt;br /&gt;
&lt;br /&gt;
&#039; Load the data file size. (HeaderSize + DataSize should match the size of the file.)&lt;br /&gt;
Dim As UShort DataSize&lt;br /&gt;
Get #1, , DataSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font version number.&lt;br /&gt;
Dim As UShort FontMajorVersion&lt;br /&gt;
Get #1, , FontMajorVersion&lt;br /&gt;
Dim As UShort FontMinorVersion&lt;br /&gt;
Get #1, , FontMinorVersion&lt;br /&gt;
&lt;br /&gt;
&#039; Jump to the end of the header. The rest should be nulls anyway.&lt;br /&gt;
Get #1, HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Verify this is a BGI Stroked Font.&lt;br /&gt;
Dim As String StrokedFontCheck&lt;br /&gt;
StrokedFontCheck = Space(1)&lt;br /&gt;
Get #1, , StrokedFontCheck&lt;br /&gt;
If StrokedFontCheck &amp;lt;&amp;gt; &amp;quot;+&amp;quot; Then&lt;br /&gt;
	Print &amp;quot;Not a stroked font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the number of characters.&lt;br /&gt;
Dim As UShort CharacterCount&lt;br /&gt;
Get #1, , CharacterCount&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the starting charcter. This is the first character id to have a glyph associated to it.&lt;br /&gt;
Dim As UByte StartingChar&lt;br /&gt;
Get #1, , StartingChar&lt;br /&gt;
&lt;br /&gt;
&#039; Load the file offset where the stroke definitions begin.&lt;br /&gt;
Dim As UShort StrokeDefinitionOffset&lt;br /&gt;
Get #1, , StrokeDefinitionOffset&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the top of the capital letters.&lt;br /&gt;
Dim As Byte OriginToCapital&lt;br /&gt;
Get #1, , OriginToCapital&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the baseline.&lt;br /&gt;
Dim As Byte OriginToBaseline&lt;br /&gt;
Get #1, , OriginToBaseline&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the bottom of the descenders.&lt;br /&gt;
Dim As Byte OriginToDescender&lt;br /&gt;
Get #1, , OriginToDescender&lt;br /&gt;
&lt;br /&gt;
&#039; Skip remaining nulls.&lt;br /&gt;
Dim As Integer I&lt;br /&gt;
For I = 0 To 4&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load offset to characters definitions.&lt;br /&gt;
Dim As UShort CharacterDefinitionOffset(StartingChar To (StartingChar + CharacterCount - 1))&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount - 1)&lt;br /&gt;
	Get #1, , CharacterDefinitionOffset(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load character widths.&lt;br /&gt;
Dim As UByte CharacterWidths(StartingChar To (StartingChar + CharacterCount - 1))&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount - 1)&lt;br /&gt;
	Get #1, , CharacterWidths(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Dim As Integer CharacterHeight = OriginToCapital + (OriginToDescender * -1)&lt;br /&gt;
&lt;br /&gt;
Print &amp;quot;Font Id: &amp;quot;; FontId&lt;br /&gt;
Print &amp;quot;Description: &amp;quot;; Description&lt;br /&gt;
Print &amp;quot;Total Character Height: &amp;quot;; CharacterHeight&lt;br /&gt;
Print &amp;quot;Max Ascender: &amp;quot;; OriginToCapital&lt;br /&gt;
Print &amp;quot;Max Descender: &amp;quot;; OriginToDescender&lt;br /&gt;
Print &amp;quot;Total Characters: &amp;quot;; CharacterCount&lt;br /&gt;
Print &amp;quot;Starting Character: 0x&amp;quot;; Hex(StartingChar)&lt;br /&gt;
&lt;br /&gt;
Dim As UByte XByte, YByte, Finished&lt;br /&gt;
Dim As Integer XCurrent, YCurrent, XStart, YStart, XBuffer, YBuffer&lt;br /&gt;
Dim As Byte XNew, YNew, XOpcode, YOpcode, XSign, YSign&lt;br /&gt;
&lt;br /&gt;
XBuffer = 40&lt;br /&gt;
YBuffer = 32&lt;br /&gt;
&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount - 1)&lt;br /&gt;
	&#039; Jump to the starting offset of this character.&lt;br /&gt;
	Get #1, CharacterDefinitionOffset(I) + StrokeDefinitionOffset + HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
	&#039; Character position in 16x16 table.&lt;br /&gt;
	XStart = 80 + (I Mod 16) * XBuffer + ((XBuffer - CharacterWidths(I)) \ 2)&lt;br /&gt;
	YStart = 70 + ((I \ 16) * YBuffer) + CharacterHeight&lt;br /&gt;
&lt;br /&gt;
	&#039; Draw character bounding box.&lt;br /&gt;
	Line(XStart, YStart - OriginToCapital)-(XStart + CharacterWidths(I), YStart - OriginToDescender), 8, B&lt;br /&gt;
&lt;br /&gt;
	&#039; Load all of the drawing instructions and draw the character.&lt;br /&gt;
	Finished = 0&lt;br /&gt;
	Do&lt;br /&gt;
		&#039; Load the opcode/values. Two bytes, one for X, the other for Y.&lt;br /&gt;
		&#039; 7 6 543210&lt;br /&gt;
		&#039; ^ ^ ^&lt;br /&gt;
		&#039; | | +------ Start of 6-bit number.&lt;br /&gt;
		&#039; | +-------- Sign bit for number.&lt;br /&gt;
		&#039; +---------- Opcode bit.&lt;br /&gt;
		&lt;br /&gt;
		Get #1, , XByte		&#039; First opcode and X value.&lt;br /&gt;
		Get #1, , YByte		&#039; Second opcode and Y value.&lt;br /&gt;
&lt;br /&gt;
		&#039; Read the opcode bits.&lt;br /&gt;
		XOpcode = Bit(XByte, 7)&lt;br /&gt;
		YOpcode = Bit(YByte, 7)&lt;br /&gt;
		&#039; Clear the opcode bits.&lt;br /&gt;
		XByte = BitReset(XByte, 7)&lt;br /&gt;
		YByte = BitReset(YByte, 7)&lt;br /&gt;
		&#039; Set the values to negative if the signed bits are on.&lt;br /&gt;
		If Bit(XByte, 6) = True Then&lt;br /&gt;
			XByte = BitSet(XByte, 7)&lt;br /&gt;
		End If&lt;br /&gt;
		If Bit(YByte, 6) = True Then&lt;br /&gt;
			YByte = BitSet(YByte, 7)&lt;br /&gt;
		End If&lt;br /&gt;
&lt;br /&gt;
		XNew = XByte&lt;br /&gt;
		YNew = YByte&lt;br /&gt;
&lt;br /&gt;
		&#039; Normalize the Y position.&lt;br /&gt;
		YNew = -YNew&lt;br /&gt;
&lt;br /&gt;
		If XOpcode = 0 Then&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; End of character definition. Move to the next character.&lt;br /&gt;
				Finished = 1&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Not sure what this is for. It&#039;s only used in the BOLD font when a character has &lt;br /&gt;
				&#039; multiple separate objects like with the colon and equal sign. However, not all &lt;br /&gt;
				&#039; characters with broken up objects in the font use it, and leaving it out doesn&#039;t &lt;br /&gt;
				&#039; appear to mess up the drawing at all.&lt;br /&gt;
			End If&lt;br /&gt;
		Else&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; Move Pointer to X, Y.&lt;br /&gt;
				&#039; This happens below since both move and draw must change the position.&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Draw From Current Pointer to new X, Y.&lt;br /&gt;
				Line(XCurrent, YCurrent)-(XStart + XNew, YStart + YNew), 15&lt;br /&gt;
			End If&lt;br /&gt;
&lt;br /&gt;
			XCurrent = XStart + XNew&lt;br /&gt;
			YCurrent = YStart + YNew&lt;br /&gt;
		End If&lt;br /&gt;
	Loop Until Finished = 1&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Sleep&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
{{BeginFileFormatTools|Type=image}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland/bgifont.zip FE Stroke Font Editor]&lt;br /&gt;
| Platform = DOS&lt;br /&gt;
| canView = Yes&lt;br /&gt;
| canExport = Yes&lt;br /&gt;
| canImport = Yes&lt;br /&gt;
| editHidden = No&lt;br /&gt;
| editMetadata = Yes&lt;br /&gt;
| notes = Borland&#039;s in-house font Stroked Font editor.&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
This format was reverse engineered by [[User:TheAlmightyGuru|TheAlmightyGuru]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland] - Various tools for BGI fonts.&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11941</id>
		<title>BGI Stroked Font</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11941"/>
		<updated>2024-09-08T13:04:10Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Header */ Shortened, reworded, checked Pascal and it&amp;#039;s the same&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Font Infobox&lt;br /&gt;
 | MaxGlyphs = 32,767&lt;br /&gt;
 | GlyphMinSize = Unlimited&lt;br /&gt;
 | GlyphMaxSize = Unlimited&lt;br /&gt;
 | Access = Indexed&lt;br /&gt;
 | Bitmap = N&lt;br /&gt;
 | Vector = Y&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Hidden = Y&lt;br /&gt;
 | Metadata = Name, Description&lt;br /&gt;
 | Games =&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;BGI Stroked Font&#039;&#039;&#039; is a vector font format created by Borland to work with their 1987 graphics API, [[Borland Graphics Interface]]. Since the format stores vector fonts, it can easily be scaled in size with little loss of fidelity. However, because the format only supports lines and not curves, scaling to larger sizes will make the characters look jagged. The font files typically have a *.CHR file extension.&lt;br /&gt;
&lt;br /&gt;
After 1987, Borland&#039;s C and Pascal programming languages shipped with 10 different BGI Stroked Fonts: Bold, Euro, Goth, Lcom, Litt, Sans, Scri, Simp, Trip, and Tscr. Due to the popularity of Borland&#039;s programming languages, and their graphic API, BGI Stroked Fonts were used in hundreds of DOS video games and software.&lt;br /&gt;
&lt;br /&gt;
The designers of the file format unfortunately used a file signature starting with &amp;quot;PK&amp;quot; which would later be used by PK Zip, so BGI Stroked Font files, despite having an extension of CHR, might be misidentified as zip archives if the identifier doesn&#039;t take into account the full PK Zip signature.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
=== Header ===&lt;br /&gt;
The header includes the font&#039;s name, version number, and description.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][2] || Signature || Must be 0x50 0x4B (&amp;quot;PK&amp;quot;). Probably initials of Borland founder [https://en.wikipedia.org/wiki/Philippe_Kahn Philippe Kahn].&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Description || User text. Borland&#039;s official fonts start with &amp;quot;BGI Stroked Font&amp;quot; with two 0x08 characters before to hide font file signature in case of use DOS &amp;quot;type&amp;quot; command on font file, then the version number, and ends with a copyright. The description is terminated with byte 0x1A which Borland font loader code search in first 256 bytes of the file (including two bytes of Signature above). In other words this field size can be from 0 (zero - no copyright text at all) to 253 bytes long (256 - 3).&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Header Start || Must be 0x1A.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Header Size || The size, in bytes, of the entire header.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || A 4-character font internal name.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Font Size || The size of the font&#039;s data block. The Header Size + Font Size should be the size of the file. &#039;&#039;&#039;See remarks according Font Size below.&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Major || Driver Version Information major number. Must be 1 (Borland font loader also accepts anything bigger but not 0, i.e. valid if &amp;quot;value &amp;gt;= 1&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Minor || Driver Version Information minor number. Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Major || BGI Revision Information major number. Must be 1 (Borland font loader also accepts 0 but halts on anything bigger than 1, i.e. valid if &amp;quot;value &amp;lt;= 1&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Minor || BGI Revision Information minor number. Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Padding || The rest of the header should be padded out to nulls based on the Header Size. All official Borland fonts use a header size of 0x80 (note that font editors may not work with fonts with different header size). This field must be at least 15 bytes long since Borland C code aligns Stroke Header to 16 byte bounday by moving Font Size bytes back inplace. &#039;&#039;&#039;See remarks according Font Size below.&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Correct Font Size field is crucial since Borland code moving font data inplace to align on 16 byte boundary based on this field value. User-made fonts with incorrect Font Size (less than it should be) and/or with Padding less than 15 bytes will be corrupted in memory and will not work properly! It doesn&#039;t matter if Stroke Header itself aligned in file to 16 byte boundary because code checks only actual memory address and it may be anything.&lt;br /&gt;
&lt;br /&gt;
To calculate proper Font Size do as follows:&lt;br /&gt;
# Find max offset in Character Stroke Offsets table (see Stroke Header definition below).&lt;br /&gt;
# Add Strokes Offset to get the Stroke Data offset for that character.&lt;br /&gt;
# Parse Stroke Data for that character until the stop command and sum all bytes including stop command itself.&lt;br /&gt;
# Use result value as Font Size.&lt;br /&gt;
# Do not foget that this Font Size must not include Font Header size.&lt;br /&gt;
&lt;br /&gt;
=== Stroke Header ===&lt;br /&gt;
This section contains general information about the font including how many characters are represented, the top of the highest ascender, bottom of the lowest descender, baseline, where in the file to find each character&#039;s instructions, and the width of each character.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Stroke Check || Must be 0x2B. Indicates this is a stroked font.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Character Count || Number of total characters stored in this font.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Starting Character || The index of the first character to have a glyph associated with it.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Strokes Offset || The file offset where stroke definitions begin relative from the start of this header.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Scan Flag || {{TODO|Borland&#039;s documentation calls this the &amp;quot;scan flag&amp;quot;, but doesn&#039;t explain what it is for (&amp;quot;set to 1 if set is scanable&amp;quot;).}}&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Ascender || The distance from the origin to the font&#039;s highest point.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Baseline || The distance from the origin to the font&#039;s baseline (typically 0). Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Descender || The distance from the origin to the font&#039;s lowest point. Note, you can derive the total character height by getting the distance from the Ascender to Descender.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || Borland&#039;s own documentation says &amp;quot;four character name of font&amp;quot;, but it&#039;s always all zero.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]][Character Count] || Character Stroke Offsets || An array of the offset to the stroke definitions for each character. To get the position in the file, you must add the Header Size and the Strokes Offset to this value.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][Character Count] || Character Widths || The unscaled width of each character.&lt;br /&gt;
|-&lt;br /&gt;
| Stroke Data || Character strokes || The stroke instructions for each character. See below for how to interpret them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Stroke Data ===&lt;br /&gt;
This section contains the actual instructions for drawing individual characters.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || X Instruction || Instructions for drawing the character and an X value.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || Y Instruction || Instructions for drawing the character and a Y value.&lt;br /&gt;
|-&lt;br /&gt;
| ... || Several possible instruction pairs per character.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Encoded in each two byte pair is a single stroke instruction, and an X and Y value. The most-significant bit in each byte is an opcode, the next seven bits represent a signed value. The first byte is the X value, the second byte is the Y value. See the diagram below.&lt;br /&gt;
&lt;br /&gt;
 7 6 543210 &lt;br /&gt;
 ^ ^ ^&lt;br /&gt;
 | | +----------- 6-Bit number.&lt;br /&gt;
 | +------------- Sign bit for number.&lt;br /&gt;
 +--------------- Opcode.&lt;br /&gt;
&lt;br /&gt;
The two opcodes determine the instruction.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Code 1 !! Code 2 !! Instruction&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || End of character stroke definition.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || Borland&#039;s documentation has this labeled as &amp;quot;do scan,&amp;quot; implying it&#039;s related to the Scan Flag. It&#039;s only used in their BOLD font on characters with multiple objects like the colon and equals sign. It doesn&#039;t appear to affect how the character is drawn. Borland font rendering code silently ignores this - checked in Turbo Pascal 7.1 (1997) and in Turbo C 2.01 (1988). {{TODO|More info is needed.}}&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || Move plotter to the specified X and Y coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || Draw a line from the previous X and Y coordinates and move plotter to the new X and Y coordinates.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Character Layout ==&lt;br /&gt;
[[Image:BGI Stroked Font - Layout Diagram.png|thumb|256x256px|Y-axis layout.]]&lt;br /&gt;
The Y values for each character are stored in a unique manner. Characters are drawn relative to the baseline started at 0 with Y-axis inverted to screen axis, in other words negative values goes below baseline and positive above. See the diagram to the right.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
=== Draw Stroke Data ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Copyright 2024 CTPAX-X Team&lt;br /&gt;
This source code licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;):&lt;br /&gt;
https://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
/* draws a character:&lt;br /&gt;
x, y - initial screen positon&lt;br /&gt;
b - buffer pointer to a Stroke Data for character */&lt;br /&gt;
void chr_draw_char(int x, int y, unsigned char *b) {&lt;br /&gt;
char m, dx, dy;&lt;br /&gt;
int xc, yc;&lt;br /&gt;
  /* initial position according to Stroke Header */&lt;br /&gt;
  y += origin_to_ascender - origin_to_descender;&lt;br /&gt;
  xc = x;&lt;br /&gt;
  yc = y;&lt;br /&gt;
  moveto(xc, yc);&lt;br /&gt;
  do {&lt;br /&gt;
    /* get mask */&lt;br /&gt;
    m = b[0] &amp;gt;&amp;gt; 7;&lt;br /&gt;
    m += m + (b[1] &amp;gt;&amp;gt; 7);&lt;br /&gt;
    /* 0 - stop; 1 - scan; 2 - move; 3 - draw */&lt;br /&gt;
    if (m &amp;gt; 1) {&lt;br /&gt;
      /* bit arithmetic (note dx/dy signed 8 bit type):&lt;br /&gt;
      if sign bit is set - expand to full signed value */&lt;br /&gt;
      dx = (b[0] &amp;amp; 0x7F) | ((b[0] &amp;amp; 0x40) &amp;lt;&amp;lt; 1);&lt;br /&gt;
      dy = (b[1] &amp;amp; 0x7F) | ((b[1] &amp;amp; 0x40) &amp;lt;&amp;lt; 1);&lt;br /&gt;
      dy = -dy;&lt;br /&gt;
      /* dx/dy relative to initial screen positon */&lt;br /&gt;
      xc = x + dx;&lt;br /&gt;
      yc = y + dy;&lt;br /&gt;
      if (m == 2) {&lt;br /&gt;
        moveto(xc, yc);&lt;br /&gt;
      } else {&lt;br /&gt;
        lineto(xc, yc);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    /* next byte pair */&lt;br /&gt;
    b += 2;&lt;br /&gt;
  } while (m);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Shape Viewer ===&lt;br /&gt;
This FreeBASIC program will draw all of the characters in the specified font, and give details about the font.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;freebasic&amp;quot;&amp;gt;&lt;br /&gt;
ScreenRes 800, 600, 4&lt;br /&gt;
&lt;br /&gt;
&#039; Open the font file.&lt;br /&gt;
Open &amp;quot;SANS.CHR&amp;quot; For Binary As #1&lt;br /&gt;
&lt;br /&gt;
&#039; Verify the signature.&lt;br /&gt;
Dim As String Check&lt;br /&gt;
Check = Space(4)&lt;br /&gt;
Get #1, , Check&lt;br /&gt;
If Check &amp;lt;&amp;gt; &amp;quot;PK&amp;quot; + Chr(8) + Chr(8) Then&lt;br /&gt;
	Print &amp;quot;Not a Borland CHR font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the Description&lt;br /&gt;
Dim As UByte Buffer&lt;br /&gt;
Dim As String Description&lt;br /&gt;
Do&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
	If Buffer &amp;lt;&amp;gt; &amp;amp;h1A Then&lt;br /&gt;
		Description = Description + Chr(Buffer)&lt;br /&gt;
	End If&lt;br /&gt;
Loop Until Buffer = &amp;amp;h1A&lt;br /&gt;
&lt;br /&gt;
&#039; Load the header size.&lt;br /&gt;
Dim As UShort HeaderSize&lt;br /&gt;
Get #1, , HeaderSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font id.&lt;br /&gt;
Dim As String FontId&lt;br /&gt;
FontId = Space(4)&lt;br /&gt;
Get #1, , FontId&lt;br /&gt;
&lt;br /&gt;
&#039; Load the data file size. (HeaderSize + DataSize should match the size of the file.)&lt;br /&gt;
Dim As UShort DataSize&lt;br /&gt;
Get #1, , DataSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font version number.&lt;br /&gt;
Dim As UShort FontMajorVersion&lt;br /&gt;
Get #1, , FontMajorVersion&lt;br /&gt;
Dim As UShort FontMinorVersion&lt;br /&gt;
Get #1, , FontMinorVersion&lt;br /&gt;
&lt;br /&gt;
&#039; Jump to the end of the header. The rest should be nulls anyway.&lt;br /&gt;
Get #1, HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Verify this is a BGI Stroked Font.&lt;br /&gt;
Dim As String StrokedFontCheck&lt;br /&gt;
StrokedFontCheck = Space(1)&lt;br /&gt;
Get #1, , StrokedFontCheck&lt;br /&gt;
If StrokedFontCheck &amp;lt;&amp;gt; &amp;quot;+&amp;quot; Then&lt;br /&gt;
	Print &amp;quot;Not a stroked font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the number of characters.&lt;br /&gt;
Dim As UShort CharacterCount&lt;br /&gt;
Get #1, , CharacterCount&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the starting charcter. This is the first character id to have a glyph associated to it.&lt;br /&gt;
Dim As UByte StartingChar&lt;br /&gt;
Get #1, , StartingChar&lt;br /&gt;
&lt;br /&gt;
&#039; Load the file offset where the stroke definitions begin.&lt;br /&gt;
Dim As UShort StrokeDefinitionOffset&lt;br /&gt;
Get #1, , StrokeDefinitionOffset&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the top of the capital letters.&lt;br /&gt;
Dim As Byte OriginToCapital&lt;br /&gt;
Get #1, , OriginToCapital&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the baseline.&lt;br /&gt;
Dim As Byte OriginToBaseline&lt;br /&gt;
Get #1, , OriginToBaseline&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the bottom of the descenders.&lt;br /&gt;
Dim As Byte OriginToDescender&lt;br /&gt;
Get #1, , OriginToDescender&lt;br /&gt;
&lt;br /&gt;
&#039; Skip remaining nulls.&lt;br /&gt;
Dim As Integer I&lt;br /&gt;
For I = 0 To 4&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load offset to characters definitions.&lt;br /&gt;
Dim As UShort CharacterDefinitionOffset(StartingChar To (StartingChar + CharacterCount - 1))&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount - 1)&lt;br /&gt;
	Get #1, , CharacterDefinitionOffset(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load character widths.&lt;br /&gt;
Dim As UByte CharacterWidths(StartingChar To (StartingChar + CharacterCount - 1))&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount - 1)&lt;br /&gt;
	Get #1, , CharacterWidths(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Dim As Integer CharacterHeight = OriginToCapital + (OriginToDescender * -1)&lt;br /&gt;
&lt;br /&gt;
Print &amp;quot;Font Id: &amp;quot;; FontId&lt;br /&gt;
Print &amp;quot;Description: &amp;quot;; Description&lt;br /&gt;
Print &amp;quot;Total Character Height: &amp;quot;; CharacterHeight&lt;br /&gt;
Print &amp;quot;Max Ascender: &amp;quot;; OriginToCapital&lt;br /&gt;
Print &amp;quot;Max Descender: &amp;quot;; OriginToDescender&lt;br /&gt;
Print &amp;quot;Total Characters: &amp;quot;; CharacterCount&lt;br /&gt;
Print &amp;quot;Starting Character: 0x&amp;quot;; Hex(StartingChar)&lt;br /&gt;
&lt;br /&gt;
Dim As UByte XByte, YByte, Finished&lt;br /&gt;
Dim As Integer XCurrent, YCurrent, XStart, YStart, XBuffer, YBuffer&lt;br /&gt;
Dim As Byte XNew, YNew, XOpcode, YOpcode, XSign, YSign&lt;br /&gt;
&lt;br /&gt;
XBuffer = 40&lt;br /&gt;
YBuffer = 32&lt;br /&gt;
&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount - 1)&lt;br /&gt;
	&#039; Jump to the starting offset of this character.&lt;br /&gt;
	Get #1, CharacterDefinitionOffset(I) + StrokeDefinitionOffset + HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
	&#039; Character position in 16x16 table.&lt;br /&gt;
	XStart = 80 + (I Mod 16) * XBuffer + ((XBuffer - CharacterWidths(I)) \ 2)&lt;br /&gt;
	YStart = 70 + ((I \ 16) * YBuffer) + CharacterHeight&lt;br /&gt;
&lt;br /&gt;
	&#039; Draw character bounding box.&lt;br /&gt;
	Line(XStart, YStart - OriginToCapital)-(XStart + CharacterWidths(I), YStart - OriginToDescender), 8, B&lt;br /&gt;
&lt;br /&gt;
	&#039; Load all of the drawing instructions and draw the character.&lt;br /&gt;
	Finished = 0&lt;br /&gt;
	Do&lt;br /&gt;
		&#039; Load the opcode/values. Two bytes, one for X, the other for Y.&lt;br /&gt;
		&#039; 7 6 543210&lt;br /&gt;
		&#039; ^ ^ ^&lt;br /&gt;
		&#039; | | +------ Start of 6-bit number.&lt;br /&gt;
		&#039; | +-------- Sign bit for number.&lt;br /&gt;
		&#039; +---------- Opcode bit.&lt;br /&gt;
		&lt;br /&gt;
		Get #1, , XByte		&#039; First opcode and X value.&lt;br /&gt;
		Get #1, , YByte		&#039; Second opcode and Y value.&lt;br /&gt;
&lt;br /&gt;
		&#039; Read the opcode bits.&lt;br /&gt;
		XOpcode = Bit(XByte, 7)&lt;br /&gt;
		YOpcode = Bit(YByte, 7)&lt;br /&gt;
		&#039; Clear the opcode bits.&lt;br /&gt;
		XByte = BitReset(XByte, 7)&lt;br /&gt;
		YByte = BitReset(YByte, 7)&lt;br /&gt;
		&#039; Set the values to negative if the signed bits are on.&lt;br /&gt;
		If Bit(XByte, 6) = True Then&lt;br /&gt;
			XByte = BitSet(XByte, 7)&lt;br /&gt;
		End If&lt;br /&gt;
		If Bit(YByte, 6) = True Then&lt;br /&gt;
			YByte = BitSet(YByte, 7)&lt;br /&gt;
		End If&lt;br /&gt;
&lt;br /&gt;
		XNew = XByte&lt;br /&gt;
		YNew = YByte&lt;br /&gt;
&lt;br /&gt;
		&#039; Normalize the Y position.&lt;br /&gt;
		YNew = -YNew&lt;br /&gt;
&lt;br /&gt;
		If XOpcode = 0 Then&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; End of character definition. Move to the next character.&lt;br /&gt;
				Finished = 1&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Not sure what this is for. It&#039;s only used in the BOLD font when a character has &lt;br /&gt;
				&#039; multiple separate objects like with the colon and equal sign. However, not all &lt;br /&gt;
				&#039; characters with broken up objects in the font use it, and leaving it out doesn&#039;t &lt;br /&gt;
				&#039; appear to mess up the drawing at all.&lt;br /&gt;
			End If&lt;br /&gt;
		Else&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; Move Pointer to X, Y.&lt;br /&gt;
				&#039; This happens below since both move and draw must change the position.&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Draw From Current Pointer to new X, Y.&lt;br /&gt;
				Line(XCurrent, YCurrent)-(XStart + XNew, YStart + YNew), 15&lt;br /&gt;
			End If&lt;br /&gt;
&lt;br /&gt;
			XCurrent = XStart + XNew&lt;br /&gt;
			YCurrent = YStart + YNew&lt;br /&gt;
		End If&lt;br /&gt;
	Loop Until Finished = 1&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Sleep&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
{{BeginFileFormatTools|Type=image}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland/bgifont.zip FE Stroke Font Editor]&lt;br /&gt;
| Platform = DOS&lt;br /&gt;
| canView = Yes&lt;br /&gt;
| canExport = Yes&lt;br /&gt;
| canImport = Yes&lt;br /&gt;
| editHidden = No&lt;br /&gt;
| editMetadata = Yes&lt;br /&gt;
| notes = Borland&#039;s in-house font Stroked Font editor.&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
This format was reverse engineered by [[User:TheAlmightyGuru|TheAlmightyGuru]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland] - Various tools for BGI fonts.&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User:CTPAX-X_Team&amp;diff=11939</id>
		<title>User:CTPAX-X Team</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User:CTPAX-X_Team&amp;diff=11939"/>
		<updated>2024-08-19T12:54:48Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello! This is &#039;&#039;&#039;CTPAX-X Team&#039;&#039;&#039; account. For past 18 years (as of 2024) we released for free with source codes more than 170 of our tools for various games, which you can found here: [http://www.ctpax-x.org/ http://www.CTPAX-X.org/]. Use &#039;&#039;Translate this page to another language&#039;&#039; button at the page top to translate information on our site to your native language. Note that almost all of our tools implemented in CLI (Commad Line Interface) and have an English (International) or dual English/Russian language support. Have fun!&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11805</id>
		<title>BGI Stroked Font</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11805"/>
		<updated>2024-02-29T09:20:02Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: correct description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Font Infobox&lt;br /&gt;
 | MaxGlyphs = 32,767&lt;br /&gt;
 | GlyphMinSize = Unlimited&lt;br /&gt;
 | GlyphMaxSize = Unlimited&lt;br /&gt;
 | Access = Indexed&lt;br /&gt;
 | Bitmap = N&lt;br /&gt;
 | Vector = Y&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Hidden = Y&lt;br /&gt;
 | Metadata = Name, Description&lt;br /&gt;
 | Games =&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;BGI Stroked Font&#039;&#039;&#039; is a vector font format created by Borland to work with their 1987 graphics API, [[Borland Graphics Interface]]. Since the format stores vector fonts, it can easily be scaled in size with little loss of fidelity. However, because the format only supports lines and not curves, scaling to larger sizes will make the characters look jagged. The font files typically have a *.CHR file extension.&lt;br /&gt;
&lt;br /&gt;
After 1987, Borland&#039;s C and Pascal programming languages shipped with 10 different BGI Stroked Fonts: Bold, Euro, Goth, Lcom, Litt, Sans, Scri, Simp, Trip, and Tscr. Due to the popularity of Borland&#039;s programming languages, and their graphic API, BGI Stroked Fonts were used in hundreds of DOS video games and software.&lt;br /&gt;
&lt;br /&gt;
The designers of the file format unfortunately used a file signature starting with &amp;quot;PK&amp;quot; which would later be used by PK Zip, so BGI Stroked Font files, despite having an extension of CHR, might be misidentified as zip archives if the identifier doesn&#039;t take into account the full PK Zip signature.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
=== Header ===&lt;br /&gt;
The header includes the font&#039;s name, version number, and description.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][2] || Signature || Must be 0x50 0x4B (&amp;quot;PK&amp;quot;). Probably initials of Borland founder [https://en.wikipedia.org/wiki/Philippe_Kahn Philippe Kahn].&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Description || User text. Borland&#039;s official fonts start with &amp;quot;BGI Stroked Font&amp;quot; with two 0x08 characters before to hide font file signature in case of use DOS &amp;quot;type&amp;quot; command on font file, then the version number, and ends with a copyright. The description is terminated with byte 0x1A which Borland font loader code search in first 256 bytes of the file (including two bytes of Signature above). In other words this field size can be from 0 (zero - no copyright text at all) to 253 bytes long (256 - 3).&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Header Start || Must be 0x1A.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Header Size || The size, in bytes, of the entire header.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || A 4-character font internal name.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Font Size || The size of the font&#039;s data block. The Header Size + Font Size should be the size of the file. &#039;&#039;&#039;See remarks according Font Size below.&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Major || Driver Version Information major number. Must be 1 (Borland font loader also accepts anything bigger but not 0, i.e. valid if &amp;quot;value &amp;gt;= 1&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Minor || Driver Version Information minor number. Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Major || BGI Revision Information major number. Must be 1 (Borland font loader also accepts 0 but halts on anything bigger than 1, i.e. valid if &amp;quot;value &amp;lt;= 1&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Minor || BGI Revision Information minor number. Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Padding || The rest of the header should be padded out to nulls based on the Header Size. All official Borland fonts use a header size of 0x80 (note that font editors may not work with fonts with different header size). This field must be at least 15 bytes long since Borland C code aligns Stroke Header to 16 byte bounday by moving Font Size bytes back inplace. &#039;&#039;&#039;See remarks according Font Size below.&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Correct Font Size field may not be important for Borland Pascal but is crucial for Borlad C since their library function &#039;&#039;register(far)bgifont&#039;&#039; moving font data inplace to align on 16 byte boundary based on this field value. User-made fonts with incorrect Font Size (less than it should be) and/or with Padding less than 15 bytes may be corrupted in memory and will not work properly under Borland C! It doesn&#039;t matter if Stroke Header itself aligned in file to 16 byte boundary because Borland C code checks only actual memory address (it may be anything).&lt;br /&gt;
&lt;br /&gt;
To calculate proper Font Size do as follows:&lt;br /&gt;
# Find max offset in Character Stroke Offsets table (see Stroke Header definition below).&lt;br /&gt;
# Add Strokes Offset to get the Stroke Data offset for that character.&lt;br /&gt;
# Parse Stroke Data for that character until the stop command and sum all bytes including stop command itself.&lt;br /&gt;
# Use result value as Font Size.&lt;br /&gt;
# Do not foget that this Font Size must not include Font Header size.&lt;br /&gt;
&lt;br /&gt;
=== Stroke Header ===&lt;br /&gt;
This section contains general information about the font including how many characters are represented, the top of the highest ascender, bottom of the lowest descender, baseline, where in the file to find each character&#039;s instructions, and the width of each character.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Stroke Check || Must be 0x2B. Indicates this is a stroked font.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Character Count || Number of total characters stored in this font.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Starting Character || The index of the first character to have a glyph associated with it.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Strokes Offset || The file offset where stroke definitions begin relative from the start of this header.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Scan Flag || {{TODO|Borland&#039;s documentation calls this the &amp;quot;scan flag&amp;quot;, but doesn&#039;t explain what it is for (&amp;quot;set to 1 if set is scanable&amp;quot;).}}&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Ascender || The distance from the origin to the font&#039;s highest point.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Baseline || The distance from the origin to the font&#039;s baseline (typically 0). Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Descender || The distance from the origin to the font&#039;s lowest point. Note, you can derive the total character height by getting the distance from the Ascender to Descender.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || Borland&#039;s own documentation says &amp;quot;four character name of font&amp;quot;, but it&#039;s always all zero.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]][Character Count] || Character Stroke Offsets || An array of the offset to the stroke definitions for each character. To get the position in the file, you must add the Header Size and the Strokes Offset to this value.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][Character Count] || Character Widths || The unscaled width of each character.&lt;br /&gt;
|-&lt;br /&gt;
| Stroke Data || Character strokes || The stroke instructions for each character. See below for how to interpret them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Stroke Data ===&lt;br /&gt;
This section contains the actual instructions for drawing individual characters.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || X Instruction || Instructions for drawing the character and an X value.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || Y Instruction || Instructions for drawing the character and a Y value.&lt;br /&gt;
|-&lt;br /&gt;
| ... || Several possible instruction pairs per character.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Encoded in each two byte pair is a single stroke instruction, and an X and Y value. The most-significant bit in each byte is an opcode, the next seven bits represent a signed value. The first byte is the X value, the second byte is the Y value. See the diagram below.&lt;br /&gt;
&lt;br /&gt;
 7 6 543210 &lt;br /&gt;
 ^ ^ ^&lt;br /&gt;
 | | +----------- 6-Bit number.&lt;br /&gt;
 | +------------- Sign bit for number.&lt;br /&gt;
 +--------------- Opcode.&lt;br /&gt;
&lt;br /&gt;
The two opcodes determine the instruction.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Code 1 !! Code 2 !! Instruction&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || End of character stroke definition.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || Borland&#039;s documentation has this labeled as &amp;quot;do scan,&amp;quot; implying it&#039;s related to the Scan Flag. It&#039;s only used in their BOLD font on characters with multiple objects like the colon and equals sign. It doesn&#039;t appear to affect how the character is drawn. Borland font rendering code silently ignores this - checked in Turbo Pascal 7.1 (1997) and in Turbo C 2.01 (1988). {{TODO|More info is needed.}}&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || Move plotter to the specified X and Y coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || Draw a line from the previous X and Y coordinates and move plotter to the new X and Y coordinates.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Character Layout ==&lt;br /&gt;
[[Image:BGI Stroked Font - Layout Diagram.png|thumb|256x256px|Y-axis layout.]]&lt;br /&gt;
The Y values for each character are stored in a unique manner. Characters are drawn relative to the baseline started at 0 with Y-axis inverted to screen axis, in other words negative values goes below baseline and positive above. See the diagram to the right.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
=== Draw Stroke Data ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Copyright 2024 CTPAX-X Team&lt;br /&gt;
This source code licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;):&lt;br /&gt;
https://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
/* draws a character:&lt;br /&gt;
x, y - initial screen positon&lt;br /&gt;
b - buffer pointer to a Stroke Data for character */&lt;br /&gt;
void chr_draw_char(int x, int y, unsigned char *b) {&lt;br /&gt;
char m, dx, dy;&lt;br /&gt;
int xc, yc;&lt;br /&gt;
  /* initial position according to Stroke Header */&lt;br /&gt;
  y += origin_to_ascender - origin_to_descender;&lt;br /&gt;
  xc = x;&lt;br /&gt;
  yc = y;&lt;br /&gt;
  moveto(xc, yc);&lt;br /&gt;
  do {&lt;br /&gt;
    /* get mask */&lt;br /&gt;
    m = b[0] &amp;gt;&amp;gt; 7;&lt;br /&gt;
    m += m + (b[1] &amp;gt;&amp;gt; 7);&lt;br /&gt;
    /* 0 - stop; 1 - scan; 2 - move; 3 - draw */&lt;br /&gt;
    if (m &amp;gt; 1) {&lt;br /&gt;
      /* bit arithmetic (note dx/dy signed 8 bit type):&lt;br /&gt;
      if sign bit is set - expand to full signed value */&lt;br /&gt;
      dx = (b[0] &amp;amp; 0x7F) | ((b[0] &amp;amp; 0x40) &amp;lt;&amp;lt; 1);&lt;br /&gt;
      dy = (b[1] &amp;amp; 0x7F) | ((b[1] &amp;amp; 0x40) &amp;lt;&amp;lt; 1);&lt;br /&gt;
      dy = -dy;&lt;br /&gt;
      /* dx/dy relative to initial screen positon */&lt;br /&gt;
      xc = x + dx;&lt;br /&gt;
      yc = y + dy;&lt;br /&gt;
      if (m == 2) {&lt;br /&gt;
        moveto(xc, yc);&lt;br /&gt;
      } else {&lt;br /&gt;
        lineto(xc, yc);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    /* next byte pair */&lt;br /&gt;
    b += 2;&lt;br /&gt;
  } while (m);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Shape Viewer ===&lt;br /&gt;
This FreeBASIC program will draw all of the characters in the specified font, and give details about the font.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;freebasic&amp;quot;&amp;gt;&lt;br /&gt;
ScreenRes 800, 600, 4&lt;br /&gt;
&lt;br /&gt;
&#039; Open the font file.&lt;br /&gt;
Open &amp;quot;SANS.CHR&amp;quot; For Binary As #1&lt;br /&gt;
&lt;br /&gt;
&#039; Verify the signature.&lt;br /&gt;
Dim As String Check&lt;br /&gt;
Check = Space(4)&lt;br /&gt;
Get #1, , Check&lt;br /&gt;
If Check &amp;lt;&amp;gt; &amp;quot;PK&amp;quot; + Chr(8) + Chr(8) Then&lt;br /&gt;
	Print &amp;quot;Not a Borland CHR font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the Description&lt;br /&gt;
Dim As UByte Buffer&lt;br /&gt;
Dim As String Description&lt;br /&gt;
Do&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
	If Buffer &amp;lt;&amp;gt; &amp;amp;h1A Then&lt;br /&gt;
		Description = Description + Chr(Buffer)&lt;br /&gt;
	End If&lt;br /&gt;
Loop Until Buffer = &amp;amp;h1A&lt;br /&gt;
&lt;br /&gt;
&#039; Load the header size.&lt;br /&gt;
Dim As UShort HeaderSize&lt;br /&gt;
Get #1, , HeaderSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font id.&lt;br /&gt;
Dim As String FontId&lt;br /&gt;
FontId = Space(4)&lt;br /&gt;
Get #1, , FontId&lt;br /&gt;
&lt;br /&gt;
&#039; Load the data file size. (HeaderSize + DataSize should match the size of the file.)&lt;br /&gt;
Dim As UShort DataSize&lt;br /&gt;
Get #1, , DataSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font version number.&lt;br /&gt;
Dim As UShort FontMajorVersion&lt;br /&gt;
Get #1, , FontMajorVersion&lt;br /&gt;
Dim As UShort FontMinorVersion&lt;br /&gt;
Get #1, , FontMinorVersion&lt;br /&gt;
&lt;br /&gt;
&#039; Jump to the end of the header. The rest should be nulls anyway.&lt;br /&gt;
Get #1, HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Verify this is a BGI Stroked Font.&lt;br /&gt;
Dim As String StrokedFontCheck&lt;br /&gt;
StrokedFontCheck = Space(1)&lt;br /&gt;
Get #1, , StrokedFontCheck&lt;br /&gt;
If StrokedFontCheck &amp;lt;&amp;gt; &amp;quot;+&amp;quot; Then&lt;br /&gt;
	Print &amp;quot;Not a stroked font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the number of characters.&lt;br /&gt;
Dim As UShort CharacterCount&lt;br /&gt;
Get #1, , CharacterCount&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the starting charcter. This is the first character id to have a glyph associated to it.&lt;br /&gt;
Dim As UByte StartingChar&lt;br /&gt;
Get #1, , StartingChar&lt;br /&gt;
&lt;br /&gt;
&#039; Load the file offset where the stroke definitions begin.&lt;br /&gt;
Dim As UShort StrokeDefinitionOffset&lt;br /&gt;
Get #1, , StrokeDefinitionOffset&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the top of the capital letters.&lt;br /&gt;
Dim As Byte OriginToCapital&lt;br /&gt;
Get #1, , OriginToCapital&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the baseline.&lt;br /&gt;
Dim As Byte OriginToBaseline&lt;br /&gt;
Get #1, , OriginToBaseline&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the bottom of the descenders.&lt;br /&gt;
Dim As Byte OriginToDescender&lt;br /&gt;
Get #1, , OriginToDescender&lt;br /&gt;
&lt;br /&gt;
&#039; Skip remaining nulls.&lt;br /&gt;
Dim As Integer I&lt;br /&gt;
For I = 0 To 4&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load offset to characters definitions.&lt;br /&gt;
Dim As UShort CharacterDefinitionOffset(StartingChar To (StartingChar + CharacterCount - 1))&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount - 1)&lt;br /&gt;
	Get #1, , CharacterDefinitionOffset(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load character widths.&lt;br /&gt;
Dim As UByte CharacterWidths(StartingChar To (StartingChar + CharacterCount - 1))&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount - 1)&lt;br /&gt;
	Get #1, , CharacterWidths(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Dim As Integer CharacterHeight = OriginToCapital + (OriginToDescender * -1)&lt;br /&gt;
&lt;br /&gt;
Print &amp;quot;Font Id: &amp;quot;; FontId&lt;br /&gt;
Print &amp;quot;Description: &amp;quot;; Description&lt;br /&gt;
Print &amp;quot;Total Character Height: &amp;quot;; CharacterHeight&lt;br /&gt;
Print &amp;quot;Max Ascender: &amp;quot;; OriginToCapital&lt;br /&gt;
Print &amp;quot;Max Descender: &amp;quot;; OriginToDescender&lt;br /&gt;
Print &amp;quot;Total Characters: &amp;quot;; CharacterCount&lt;br /&gt;
Print &amp;quot;Starting Character: 0x&amp;quot;; Hex(StartingChar)&lt;br /&gt;
&lt;br /&gt;
Dim As UByte XByte, YByte, Finished&lt;br /&gt;
Dim As Integer XCurrent, YCurrent, XStart, YStart, XBuffer, YBuffer&lt;br /&gt;
Dim As Byte XNew, YNew, XOpcode, YOpcode, XSign, YSign&lt;br /&gt;
&lt;br /&gt;
XBuffer = 40&lt;br /&gt;
YBuffer = 32&lt;br /&gt;
&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount - 1)&lt;br /&gt;
	&#039; Jump to the starting offset of this character.&lt;br /&gt;
	Get #1, CharacterDefinitionOffset(I) + StrokeDefinitionOffset + HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
	&#039; Character position in 16x16 table.&lt;br /&gt;
	XStart = 80 + (I Mod 16) * XBuffer + ((XBuffer - CharacterWidths(I)) \ 2)&lt;br /&gt;
	YStart = 70 + ((I \ 16) * YBuffer) + CharacterHeight&lt;br /&gt;
&lt;br /&gt;
	&#039; Draw character bounding box.&lt;br /&gt;
	Line(XStart, YStart - OriginToCapital)-(XStart + CharacterWidths(I), YStart - OriginToDescender), 8, B&lt;br /&gt;
&lt;br /&gt;
	&#039; Load all of the drawing instructions and draw the character.&lt;br /&gt;
	Finished = 0&lt;br /&gt;
	Do&lt;br /&gt;
		&#039; Load the opcode/values. Two bytes, one for X, the other for Y.&lt;br /&gt;
		&#039; 7 6 543210&lt;br /&gt;
		&#039; ^ ^ ^&lt;br /&gt;
		&#039; | | +------ Start of 6-bit number.&lt;br /&gt;
		&#039; | +-------- Sign bit for number.&lt;br /&gt;
		&#039; +---------- Opcode bit.&lt;br /&gt;
		&lt;br /&gt;
		Get #1, , XByte		&#039; First opcode and X value.&lt;br /&gt;
		Get #1, , YByte		&#039; Second opcode and Y value.&lt;br /&gt;
&lt;br /&gt;
		&#039; Read the opcode bits.&lt;br /&gt;
		XOpcode = Bit(XByte, 7)&lt;br /&gt;
		YOpcode = Bit(YByte, 7)&lt;br /&gt;
		&#039; Clear the opcode bits.&lt;br /&gt;
		XByte = BitReset(XByte, 7)&lt;br /&gt;
		YByte = BitReset(YByte, 7)&lt;br /&gt;
		&#039; Set the values to negative if the signed bits are on.&lt;br /&gt;
		If Bit(XByte, 6) = True Then&lt;br /&gt;
			XByte = BitSet(XByte, 7)&lt;br /&gt;
		End If&lt;br /&gt;
		If Bit(YByte, 6) = True Then&lt;br /&gt;
			YByte = BitSet(YByte, 7)&lt;br /&gt;
		End If&lt;br /&gt;
&lt;br /&gt;
		XNew = XByte&lt;br /&gt;
		YNew = YByte&lt;br /&gt;
&lt;br /&gt;
		&#039; Normalize the Y position.&lt;br /&gt;
		YNew = -YNew&lt;br /&gt;
&lt;br /&gt;
		If XOpcode = 0 Then&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; End of character definition. Move to the next character.&lt;br /&gt;
				Finished = 1&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Not sure what this is for. It&#039;s only used in the BOLD font when a character has &lt;br /&gt;
				&#039; multiple separate objects like with the colon and equal sign. However, not all &lt;br /&gt;
				&#039; characters with broken up objects in the font use it, and leaving it out doesn&#039;t &lt;br /&gt;
				&#039; appear to mess up the drawing at all.&lt;br /&gt;
			End If&lt;br /&gt;
		Else&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; Move Pointer to X, Y.&lt;br /&gt;
				&#039; This happens below since both move and draw must change the position.&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Draw From Current Pointer to new X, Y.&lt;br /&gt;
				Line(XCurrent, YCurrent)-(XStart + XNew, YStart + YNew), 15&lt;br /&gt;
			End If&lt;br /&gt;
&lt;br /&gt;
			XCurrent = XStart + XNew&lt;br /&gt;
			YCurrent = YStart + YNew&lt;br /&gt;
		End If&lt;br /&gt;
	Loop Until Finished = 1&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Sleep&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
{{BeginFileFormatTools|Type=image}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland/bgifont.zip FE Stroke Font Editor]&lt;br /&gt;
| Platform = DOS&lt;br /&gt;
| canView = Yes&lt;br /&gt;
| canExport = Yes&lt;br /&gt;
| canImport = Yes&lt;br /&gt;
| editHidden = No&lt;br /&gt;
| editMetadata = Yes&lt;br /&gt;
| notes = Borland&#039;s in-house font Stroked Font editor.&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
This format was reverse engineered by [[User:TheAlmightyGuru|TheAlmightyGuru]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland] - Various tools for BGI fonts.&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11793</id>
		<title>BGI Stroked Font</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11793"/>
		<updated>2024-02-25T18:09:58Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: warning about align&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Font Infobox&lt;br /&gt;
 | MaxGlyphs = 32,767&lt;br /&gt;
 | GlyphMinSize = Unlimited&lt;br /&gt;
 | GlyphMaxSize = Unlimited&lt;br /&gt;
 | Access = Indexed&lt;br /&gt;
 | Bitmap = N&lt;br /&gt;
 | Vector = Y&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Hidden = Y&lt;br /&gt;
 | Metadata = Name, Description&lt;br /&gt;
 | Games =&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;BGI Stroked Font&#039;&#039;&#039; is a vector font created by Borland to work with their 1987 graphics API, [[Borland Graphics Interface]]. Since the format stores vector fonts, it can easily be scaled in size with little loss of fidelity. However, because the format only supports lines and not curves, scaling to larger sizes will make the characters look jagged. The font files typically have a *.CHR file extension.&lt;br /&gt;
&lt;br /&gt;
After 1987, Borland&#039;s C and Pascal programming languages shipped with 10 different BGI Stroked Fonts: Bold, Euro, Goth, Lcom, Litt, Sans, Scri, Simp, Trip, and Tscr. Due to the popularity of Borland&#039;s programming languages, and their graphic API, BGI Stroked Fonts were used in hundreds of DOS video games.&lt;br /&gt;
&lt;br /&gt;
The designers of the file format unfortunately used a file signature starting with &amp;quot;PK&amp;quot; which would later be used by PK Zip, so BGI Stroked Font files, despite having an extension of CHR, might be misidentified as zip archives if the identifier doesn&#039;t take into account the full PK Zip signature.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
=== Header ===&lt;br /&gt;
The header includes the font&#039;s name, version number, and description.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][2] || Signature || Must be 0x50 0x4B (&amp;quot;PK&amp;quot;). Probably initials of Borland founder [https://en.wikipedia.org/wiki/Philippe_Kahn Philippe Kahn].&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Description || User text. Borland&#039;s official fonts start with &amp;quot;BGI Stroked Font&amp;quot; with two 0x08 characters before to hide font file signature in case of use DOS &amp;quot;type&amp;quot; command on font file, then the version number, and ends with a copyright. The description is terminated with byte 0x1A which Borland font loader code search in first 256 bytes of the file (including two bytes of Signature above). In other words this field size can be from 0 (zero - no copyright text at all) to 253 bytes long (256 - 3).&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Header Start || Must be 0x1A.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Header Size || The size, in bytes, of the entire header.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || A 4-character font internal name.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Font Size || The size of the font&#039;s data block. The Header Size + Font Size should be the size of the file. &#039;&#039;&#039;See remarks according Font Size below.&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Major || Driver Version Information major number. Must be 1 (Borland font loader also accepts anything bigger but not 0, i.e. valid if &amp;quot;value &amp;gt;= 1&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Minor || Driver Version Information minor number. Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Major || BGI Revision Information major number. Must be 1 (Borland font loader also accepts 0 but halts on anything bigger than 1, i.e. valid if &amp;quot;value &amp;lt;= 1&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Minor || BGI Revision Information minor number. Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Padding || The rest of the header should be padded out to nulls based on the Header Size. All official Borland fonts use a header size of 0x80 (note that font editors may not work with fonts with different header size). This field must be at least 15 bytes long since Borland C code aligns Stroke Header to 16 byte bounday by moving Font Size bytes back inplace. &#039;&#039;&#039;See remarks according Font Size below.&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Correct Font Size field may not be important for Borland Pascal but is crucial for Borlad C since their library function &#039;&#039;register(far)bgifont&#039;&#039; moving font data inplace to align on 16 byte boundary based on this field value. User-made fonts with incorrect Font Size (less than it should be) and/or with Padding less than 15 bytes may be corrupted in memory and will not work properly under Borland C! It doesn&#039;t matter if Stroke Header itself aligned in file to 16 byte boundary because Borland C code checks only actual memory address (it may be anything).&lt;br /&gt;
&lt;br /&gt;
To calculate proper Font Size do as follows:&lt;br /&gt;
# Find max offset in Character Stroke Offsets table (see Stroke Header definition below).&lt;br /&gt;
# Add Strokes Offset to get the Stroke Data offset for that character.&lt;br /&gt;
# Parse Stroke Data for that character until the stop command and sum all bytes including stop command itself.&lt;br /&gt;
# Use result value as Font Size.&lt;br /&gt;
# Do not foget that this Font Size must not include Font Header size.&lt;br /&gt;
&lt;br /&gt;
=== Stroke Header ===&lt;br /&gt;
This section contains general information about the font including how many characters are represented, the top of the highest ascender, bottom of the lowest descender, baseline, where in the file to find each character&#039;s instructions, and the width of each character.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Stroke Check || Must be 0x2B. Indicates this is a stroked font.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Character Count || Number of total characters stored in this font.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Starting Character || The index of the first character to have a glyph associated with it.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Strokes Offset || The file offset where stroke definitions begin relative from the start of this header.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Scan Flag || {{TODO|Borland&#039;s documentation calls this the &amp;quot;scan flag&amp;quot;, but doesn&#039;t explain what it is for (&amp;quot;set to 1 if set is scanable&amp;quot;).}}&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Ascender || The distance from the origin to the font&#039;s highest point.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Baseline || The distance from the origin to the font&#039;s baseline (typically 0). Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Descender || The distance from the origin to the font&#039;s lowest point. Note, you can derive the total character height by getting the distance from the Ascender to Descender.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || Borland&#039;s own documentation says &amp;quot;four character name of font&amp;quot;, but it&#039;s always all zero.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]][Character Count] || Character Stroke Offsets || An array of the offset to the stroke definitions for each character. To get the position in the file, you must add the Header Size and the Strokes Offset to this value.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][Character Count] || Character Widths || The unscaled width of each character.&lt;br /&gt;
|-&lt;br /&gt;
| Stroke Data || Character strokes || The stroke instructions for each character. See below for how to interpret them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Stroke Data ===&lt;br /&gt;
This section contains the actual instructions for drawing individual characters.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || X Instruction || Instructions for drawing the character and an X value.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || Y Instruction || Instructions for drawing the character and a Y value.&lt;br /&gt;
|-&lt;br /&gt;
| ... || Several possible instruction pairs per character.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Encoded in each two byte pair is a single stroke instruction, and an X and Y value. The most-significant bit in each byte is an opcode, the next seven bits represent a signed value. The first byte is the X value, the second byte is the Y value. See the diagram below.&lt;br /&gt;
&lt;br /&gt;
 7 6 543210 &lt;br /&gt;
 ^ ^ ^&lt;br /&gt;
 | | +----------- 6-Bit number.&lt;br /&gt;
 | +------------- Sign bit for number.&lt;br /&gt;
 +--------------- Opcode.&lt;br /&gt;
&lt;br /&gt;
The two opcodes determine the instruction.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Code 1 !! Code 2 !! Instruction&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || End of character stroke definition.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || Borland&#039;s documentation has this labeled as &amp;quot;do scan,&amp;quot; implying it&#039;s related to the Scan Flag. It&#039;s only used in their BOLD font on characters with multiple objects like the colon and equals sign. It doesn&#039;t appear to affect how the character is drawn. Borland font rendering code silently ignores this - checked in Turbo Pascal 7.1 (1997) and in Turbo C 2.01 (1988). {{TODO|More info is needed.}}&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || Move plotter to the specified X and Y coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || Draw a line from the previous X and Y coordinates and move plotter to the new X and Y coordinates.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Character Layout ==&lt;br /&gt;
[[Image:BGI Stroked Font - Layout Diagram.png|thumb|256x256px|Y-axis layout. {{TODO|Replace with correct example - see chr_draw_char() routine below.}}]]&lt;br /&gt;
The Y values for each character are stored in a unique manner. Characters are drawn relative to the baseline, but, rather than put the baseline at 0, the half above the baseline starts at 64 and decreases toward 0 as you move away from the baseline, while the half below the baseline starts at -64 and increases toward -1. See the diagram to the right.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
=== Draw Stroke Data ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Copyright 2024 CTPAX-X Team&lt;br /&gt;
This source code licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;):&lt;br /&gt;
https://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
/* draws a character:&lt;br /&gt;
x, y - initial screen positon&lt;br /&gt;
b - buffer pointer to a Stroke Data for character */&lt;br /&gt;
void chr_draw_char(int x, int y, unsigned char *b) {&lt;br /&gt;
char m, dx, dy;&lt;br /&gt;
int xc, yc;&lt;br /&gt;
  /* initial position according to Stroke Header */&lt;br /&gt;
  y += origin_to_ascender - origin_to_descender;&lt;br /&gt;
  xc = x;&lt;br /&gt;
  yc = y;&lt;br /&gt;
  moveto(xc, yc);&lt;br /&gt;
  do {&lt;br /&gt;
    /* get mask */&lt;br /&gt;
    m = b[0] &amp;gt;&amp;gt; 7;&lt;br /&gt;
    m += m + (b[1] &amp;gt;&amp;gt; 7);&lt;br /&gt;
    /* 0 - stop; 1 - scan; 2 - move; 3 - draw */&lt;br /&gt;
    if (m &amp;gt; 1) {&lt;br /&gt;
      /* bit arithmetic (note dx/dy signed 8 bit type):&lt;br /&gt;
      if sign bit is set - expand to full signed value */&lt;br /&gt;
      dx = (b[0] &amp;amp; 0x7F) | ((b[0] &amp;amp; 0x40) &amp;lt;&amp;lt; 1);&lt;br /&gt;
      dy = (b[1] &amp;amp; 0x7F) | ((b[1] &amp;amp; 0x40) &amp;lt;&amp;lt; 1);&lt;br /&gt;
      dy = -dy;&lt;br /&gt;
      /* dx/dy relative to initial screen positon */&lt;br /&gt;
      xc = x + dx;&lt;br /&gt;
      yc = y + dy;&lt;br /&gt;
      if (m == 2) {&lt;br /&gt;
        moveto(xc, yc);&lt;br /&gt;
      } else {&lt;br /&gt;
        lineto(xc, yc);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    /* next byte pair */&lt;br /&gt;
    b += 2;&lt;br /&gt;
  } while (m);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Shape Viewer ===&lt;br /&gt;
This FreeBASIC program will draw all of the characters in the specified font, and give details about the font.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;freebasic&amp;quot;&amp;gt;&lt;br /&gt;
ScreenRes 800, 600, 4&lt;br /&gt;
&lt;br /&gt;
&#039; Open the font file.&lt;br /&gt;
Open &amp;quot;SANS.CHR&amp;quot; For Binary As #1&lt;br /&gt;
&lt;br /&gt;
&#039; Verify the signature.&lt;br /&gt;
Dim As String Check&lt;br /&gt;
Check = Space(4)&lt;br /&gt;
Get #1, , Check&lt;br /&gt;
If Check &amp;lt;&amp;gt; &amp;quot;PK&amp;quot; + Chr(8) + Chr(8) Then&lt;br /&gt;
	Print &amp;quot;Not a Borland CHR font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the Description&lt;br /&gt;
Dim As UByte Buffer&lt;br /&gt;
Dim As String Description&lt;br /&gt;
Do&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
	If Buffer &amp;lt;&amp;gt; &amp;amp;h1A Then&lt;br /&gt;
		Description = Description + Chr(Buffer)&lt;br /&gt;
	End If&lt;br /&gt;
Loop Until Buffer = &amp;amp;h1A&lt;br /&gt;
&lt;br /&gt;
&#039; Load the header size.&lt;br /&gt;
Dim As UShort HeaderSize&lt;br /&gt;
Get #1, , HeaderSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font id.&lt;br /&gt;
Dim As String FontId&lt;br /&gt;
FontId = Space(4)&lt;br /&gt;
Get #1, , FontId&lt;br /&gt;
&lt;br /&gt;
&#039; Load the data file size. (HeaderSize + DataSize should match the size of the file.)&lt;br /&gt;
Dim As UShort DataSize&lt;br /&gt;
Get #1, , DataSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font version number.&lt;br /&gt;
Dim As UShort FontMajorVersion&lt;br /&gt;
Get #1, , FontMajorVersion&lt;br /&gt;
Dim As UShort FontMinorVersion&lt;br /&gt;
Get #1, , FontMinorVersion&lt;br /&gt;
&lt;br /&gt;
&#039; Jump to the end of the header. The rest should be nulls anyway.&lt;br /&gt;
Get #1, HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Verify this is a BGI Stroked Font.&lt;br /&gt;
Dim As String StrokedFontCheck&lt;br /&gt;
StrokedFontCheck = Space(1)&lt;br /&gt;
Get #1, , StrokedFontCheck&lt;br /&gt;
If StrokedFontCheck &amp;lt;&amp;gt; &amp;quot;+&amp;quot; Then&lt;br /&gt;
	Print &amp;quot;Not a stroked font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the number of characters.&lt;br /&gt;
Dim As UShort CharacterCount&lt;br /&gt;
Get #1, , CharacterCount&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the starting charcter. This is the first character id to have a glyph associated to it.&lt;br /&gt;
Dim As UByte StartingChar&lt;br /&gt;
Get #1, , StartingChar&lt;br /&gt;
&lt;br /&gt;
&#039; Load the file offset where the stroke definitions begin.&lt;br /&gt;
Dim As UShort StrokeDefinitionOffset&lt;br /&gt;
Get #1, , StrokeDefinitionOffset&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the top of the capital letters.&lt;br /&gt;
Dim As Byte OriginToCapital&lt;br /&gt;
Get #1, , OriginToCapital&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the baseline.&lt;br /&gt;
Dim As Byte OriginToBaseline&lt;br /&gt;
Get #1, , OriginToBaseline&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the bottom of the descenders.&lt;br /&gt;
Dim As Byte OriginToDescender&lt;br /&gt;
Get #1, , OriginToDescender&lt;br /&gt;
&lt;br /&gt;
&#039; Skip remaining nulls.&lt;br /&gt;
Dim As Integer I&lt;br /&gt;
For I = 0 To 4&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load offset to characters definitions.&lt;br /&gt;
Dim As UShort CharacterDefinitionOffset(StartingChar To (StartingChar + CharacterCount - 1))&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount - 1)&lt;br /&gt;
	Get #1, , CharacterDefinitionOffset(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load character widths.&lt;br /&gt;
Dim As UByte CharacterWidths(StartingChar To (StartingChar + CharacterCount - 1))&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount - 1)&lt;br /&gt;
	Get #1, , CharacterWidths(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Dim As Integer CharacterHeight = OriginToCapital + (OriginToDescender * -1)&lt;br /&gt;
&lt;br /&gt;
Print &amp;quot;Font Id: &amp;quot;; FontId&lt;br /&gt;
Print &amp;quot;Description: &amp;quot;; Description&lt;br /&gt;
Print &amp;quot;Total Character Height: &amp;quot;; CharacterHeight&lt;br /&gt;
Print &amp;quot;Max Ascender: &amp;quot;; OriginToCapital&lt;br /&gt;
Print &amp;quot;Max Descender: &amp;quot;; OriginToDescender&lt;br /&gt;
Print &amp;quot;Total Characters: &amp;quot;; CharacterCount&lt;br /&gt;
Print &amp;quot;Starting Character: 0x&amp;quot;; Hex(StartingChar)&lt;br /&gt;
&lt;br /&gt;
Dim As UByte XByte, YByte, Finished&lt;br /&gt;
Dim As Integer XCurrent, YCurrent, XStart, YStart, XBuffer, YBuffer&lt;br /&gt;
Dim As Byte XNew, YNew, XOpcode, YOpcode, XSign, YSign&lt;br /&gt;
&lt;br /&gt;
XBuffer = 40&lt;br /&gt;
YBuffer = 32&lt;br /&gt;
&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount - 1)&lt;br /&gt;
	&#039; Jump to the starting offset of this character.&lt;br /&gt;
	Get #1, CharacterDefinitionOffset(I) + StrokeDefinitionOffset + HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
	&#039; Character position in 16x16 table.&lt;br /&gt;
	XStart = 80 + (I Mod 16) * XBuffer + ((XBuffer - CharacterWidths(I)) \ 2)&lt;br /&gt;
	YStart = 70 + ((I \ 16) * YBuffer) + CharacterHeight&lt;br /&gt;
&lt;br /&gt;
	&#039; Draw character bounding box.&lt;br /&gt;
	Line(XStart, YStart - OriginToCapital)-(XStart + CharacterWidths(I), YStart - OriginToDescender), 8, B&lt;br /&gt;
&lt;br /&gt;
	&#039; Load all of the drawing instructions and draw the character.&lt;br /&gt;
	Finished = 0&lt;br /&gt;
	Do&lt;br /&gt;
		&#039; Load the opcode/values. Two bytes, one for X, the other for Y.&lt;br /&gt;
		&#039; 7 6 543210&lt;br /&gt;
		&#039; ^ ^ ^&lt;br /&gt;
		&#039; | | +------ Start of 6-bit number.&lt;br /&gt;
		&#039; | +-------- Sign bit for number.&lt;br /&gt;
		&#039; +---------- Opcode bit.&lt;br /&gt;
		&lt;br /&gt;
		Get #1, , XByte		&#039; First opcode and X value.&lt;br /&gt;
		Get #1, , YByte		&#039; Second opcode and Y value.&lt;br /&gt;
&lt;br /&gt;
		&#039; Read the opcode bits.&lt;br /&gt;
		XOpcode = Bit(XByte, 7)&lt;br /&gt;
		YOpcode = Bit(YByte, 7)&lt;br /&gt;
		&#039; Clear the opcode bits.&lt;br /&gt;
		XByte = BitReset(XByte, 7)&lt;br /&gt;
		YByte = BitReset(YByte, 7)&lt;br /&gt;
		&#039; Set the values to negative if the signed bits are on.&lt;br /&gt;
		If Bit(XByte, 6) = True Then&lt;br /&gt;
			XByte = BitSet(XByte, 7)&lt;br /&gt;
		End If&lt;br /&gt;
		If Bit(YByte, 6) = True Then&lt;br /&gt;
			YByte = BitSet(YByte, 7)&lt;br /&gt;
		End If&lt;br /&gt;
&lt;br /&gt;
		XNew = XByte&lt;br /&gt;
		YNew = YByte&lt;br /&gt;
&lt;br /&gt;
		&#039; Normalize the Y position.&lt;br /&gt;
		YNew = -YNew&lt;br /&gt;
&lt;br /&gt;
		If XOpcode = 0 Then&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; End of character definition. Move to the next character.&lt;br /&gt;
				Finished = 1&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Not sure what this is for. It&#039;s only used in the BOLD font when a character has &lt;br /&gt;
				&#039; multiple separate objects like with the colon and equal sign. However, not all &lt;br /&gt;
				&#039; characters with broken up objects in the font use it, and leaving it out doesn&#039;t &lt;br /&gt;
				&#039; appear to mess up the drawing at all.&lt;br /&gt;
			End If&lt;br /&gt;
		Else&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; Move Pointer to X, Y.&lt;br /&gt;
				&#039; This happens below since both move and draw must change the position.&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Draw From Current Pointer to new X, Y.&lt;br /&gt;
				Line(XCurrent, YCurrent)-(XStart + XNew, YStart + YNew), 15&lt;br /&gt;
			End If&lt;br /&gt;
&lt;br /&gt;
			XCurrent = XStart + XNew&lt;br /&gt;
			YCurrent = YStart + YNew&lt;br /&gt;
		End If&lt;br /&gt;
	Loop Until Finished = 1&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Sleep&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
{{BeginFileFormatTools|Type=image}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland/bgifont.zip FE Stroke Font Editor]&lt;br /&gt;
| Platform = DOS&lt;br /&gt;
| canView = Yes&lt;br /&gt;
| canExport = Yes&lt;br /&gt;
| canImport = Yes&lt;br /&gt;
| editHidden = No&lt;br /&gt;
| editMetadata = Yes&lt;br /&gt;
| notes = Borland&#039;s in-house font Stroked Font editor.&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
This format was reverse engineered by [[User:TheAlmightyGuru|TheAlmightyGuru]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland] - Various tools for BGI fonts.&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11792</id>
		<title>BGI Stroked Font</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11792"/>
		<updated>2024-02-24T17:54:12Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: fixed FreeBasic code, note on &amp;quot;PK&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Font Infobox&lt;br /&gt;
 | MaxGlyphs = 32,767&lt;br /&gt;
 | GlyphMinSize = Unlimited&lt;br /&gt;
 | GlyphMaxSize = Unlimited&lt;br /&gt;
 | Access = Indexed&lt;br /&gt;
 | Bitmap = N&lt;br /&gt;
 | Vector = Y&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Hidden = Y&lt;br /&gt;
 | Metadata = Name, Description&lt;br /&gt;
 | Games =&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;BGI Stroked Font&#039;&#039;&#039; is a vector font created by Borland to work with their 1987 graphics API, [[Borland Graphics Interface]]. Since the format stores vector fonts, it can easily be scaled in size with little loss of fidelity. However, because the format only supports lines and not curves, scaling to larger sizes will make the characters look jagged. The font files typically have a *.CHR file extension.&lt;br /&gt;
&lt;br /&gt;
After 1987, Borland&#039;s C and Pascal programming languages shipped with 10 different BGI Stroked Fonts: Bold, Euro, Goth, Lcom, Litt, Sans, Scri, Simp, Trip, and Tscr. Due to the popularity of Borland&#039;s programming languages, and their graphic API, BGI Stroked Fonts were used in hundreds of DOS video games.&lt;br /&gt;
&lt;br /&gt;
The designers of the file format unfortunately used a file signature starting with &amp;quot;PK&amp;quot; which would later be used by PK Zip, so BGI Stroked Font files, despite having an extension of CHR, might be misidentified as zip archives if the identifier doesn&#039;t take into account the full PK Zip signature.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
=== Header ===&lt;br /&gt;
The header includes the font&#039;s name, version number, and description.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][2] || Signature || Must be 0x50 0x4B (&amp;quot;PK&amp;quot;). Probably initials of Borland founder [https://en.wikipedia.org/wiki/Philippe_Kahn Philippe Kahn].&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Description || User text. Borland&#039;s official fonts start with &amp;quot;BGI Stroked Font&amp;quot; with two 0x08 characters before to hide font file signature in case of use DOS &amp;quot;type&amp;quot; command on font file, then the version number, and ends with a copyright. The description is terminated with byte 0x1A which Borland font loader code search in first 256 bytes of the file (including two bytes of Signature above). In other words this field size can be from 0 (zero - no copyright text at all) to 253 bytes long (256 - 3).&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Header Start || Must be 0x1A.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Header Size || The size, in bytes, of the entire header.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || A 4-character font internal name.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Font Size || The size of the font&#039;s data block. The Header Size + Font Size should be the size of the file. &#039;&#039;&#039;See remarks according Font Size below.&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Major || Driver Version Information major number. Must be 1 (Borland font loader also accepts anything bigger but not 0, i.e. valid if &amp;quot;value &amp;gt;= 1&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Minor || Driver Version Information minor number. Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Major || BGI Revision Information major number. Must be 1 (Borland font loader also accepts 0 but halts on anything bigger than 1, i.e. valid if &amp;quot;value &amp;lt;= 1&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Minor || BGI Revision Information minor number. Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Padding || The rest of the header should be padded out to nulls based on the Header Size. All official Borland fonts use a header size of 0x80 (note that font editors may not work with fonts with different header size).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Correct Font Size field may not be important for Borland Pascal but is crucial for Borlad C since their library function &#039;&#039;register(far)bgifont&#039;&#039; for some reason moving font data inplace based on this field value. User-made fonts with incorrect Font Size (less than it should be) will not work properly under Borland C!&lt;br /&gt;
&lt;br /&gt;
To calculate proper Font Size do as follows:&lt;br /&gt;
# Find max offset in Character Stroke Offsets table (see Stroke Header definition below).&lt;br /&gt;
# Add Strokes Offset to get the Stroke Data offset for that character.&lt;br /&gt;
# Parse Stroke Data for that character until the stop command and sum all bytes including stop command itself.&lt;br /&gt;
# Use result value as Font Size.&lt;br /&gt;
# Do not foget that this Font Size must not include Font Header size.&lt;br /&gt;
&lt;br /&gt;
=== Stroke Header ===&lt;br /&gt;
This section contains general information about the font including how many characters are represented, the top of the highest ascender, bottom of the lowest descender, baseline, where in the file to find each character&#039;s instructions, and the width of each character.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Stroke Check || Must be 0x2B. Indicates this is a stroked font.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Character Count || Number of total characters stored in this font.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Starting Character || The index of the first character to have a glyph associated with it.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Strokes Offset || The file offset where stroke definitions begin relative from the start of this header.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Scan Flag || {{TODO|Borland&#039;s documentation calls this the &amp;quot;scan flag&amp;quot;, but doesn&#039;t explain what it is for (&amp;quot;set to 1 if set is scanable&amp;quot;).}}&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Ascender || The distance from the origin to the font&#039;s highest point.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Baseline || The distance from the origin to the font&#039;s baseline (typically 0).&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Descender || The distance from the origin to the font&#039;s lowest point. Note, you can derive the total character height by getting the distance from the Ascender to Descender.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || Borland&#039;s own documentation says &amp;quot;four character name of font&amp;quot;, but it&#039;s always all zero.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]][Character Count] || Character Stroke Offsets || An array of the offset to the stroke definitions for each character. To get the position in the file, you must add the Header Size and the Strokes Offset to this value.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][Character Count] || Character Widths || The unscaled width of each character.&lt;br /&gt;
|-&lt;br /&gt;
| Stroke Data || Character strokes || The stroke instructions for each character. See below for how to interpret them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Stroke Data ===&lt;br /&gt;
This section contains the actual instructions for drawing individual characters.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || X Instruction || Instructions for drawing the character and an X value.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || Y Instruction || Instructions for drawing the character and a Y value.&lt;br /&gt;
|-&lt;br /&gt;
| ... || Several possible instruction pairs per character.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Encoded in each two byte pair is a single stroke instruction, and an X and Y value. The most-significant bit in each byte is an opcode, the next seven bits represent a signed value. The first byte is the X value, the second byte is the Y value. See the diagram below.&lt;br /&gt;
&lt;br /&gt;
 7 6 543210 &lt;br /&gt;
 ^ ^ ^&lt;br /&gt;
 | | +----------- 6-Bit number.&lt;br /&gt;
 | +------------- Sign bit for number.&lt;br /&gt;
 +--------------- Opcode.&lt;br /&gt;
&lt;br /&gt;
The two opcodes determine the instruction.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Code 1 !! Code 2 !! Instruction&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || End of character stroke definition.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || Borland&#039;s documentation has this labeled as &amp;quot;do scan,&amp;quot; implying it&#039;s related to the Scan Flag. It&#039;s only used in their BOLD font on characters with multiple objects like the colon and equals sign. It doesn&#039;t appear to affect how the character is drawn. Borland font rendering code silently ignores this - checked in Turbo Pascal 7.1 (1997) and in Turbo C 2.01 (1988). {{TODO|More info is needed.}}&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || Move plotter to the specified X and Y coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || Draw a line from the previous X and Y coordinates and move plotter to the new X and Y coordinates.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Character Layout ==&lt;br /&gt;
[[Image:BGI Stroked Font - Layout Diagram.png|thumb|256x256px|Y-axis layout. {{TODO|Replace with correct example - see chr_draw_char() routine below.}}]]&lt;br /&gt;
The Y values for each character are stored in a unique manner. Characters are drawn relative to the baseline, but, rather than put the baseline at 0, the half above the baseline starts at 64 and decreases toward 0 as you move away from the baseline, while the half below the baseline starts at -64 and increases toward -1. See the diagram to the right.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
=== Draw Stroke Data ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Copyright 2024 CTPAX-X Team&lt;br /&gt;
This source code licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;):&lt;br /&gt;
https://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
/* draws a character:&lt;br /&gt;
x, y - initial screen positon&lt;br /&gt;
b - buffer pointer to a Stroke Data for character */&lt;br /&gt;
void chr_draw_char(int x, int y, unsigned char *b) {&lt;br /&gt;
char m, dx, dy;&lt;br /&gt;
int xc, yc;&lt;br /&gt;
  /* initial position according to Stroke Header */&lt;br /&gt;
  y += origin_to_ascender - origin_to_descender;&lt;br /&gt;
  xc = x;&lt;br /&gt;
  yc = y;&lt;br /&gt;
  moveto(xc, yc);&lt;br /&gt;
  do {&lt;br /&gt;
    /* get mask */&lt;br /&gt;
    m = b[0] &amp;gt;&amp;gt; 7;&lt;br /&gt;
    m += m + (b[1] &amp;gt;&amp;gt; 7);&lt;br /&gt;
    /* 0 - stop; 1 - scan; 2 - move; 3 - draw */&lt;br /&gt;
    if (m &amp;gt; 1) {&lt;br /&gt;
      /* bit arithmetic (note dx/dy signed 8 bit type):&lt;br /&gt;
      if sign bit is set - expand to full signed value */&lt;br /&gt;
      dx = (b[0] &amp;amp; 0x7F) | ((b[0] &amp;amp; 0x40) &amp;lt;&amp;lt; 1);&lt;br /&gt;
      dy = (b[1] &amp;amp; 0x7F) | ((b[1] &amp;amp; 0x40) &amp;lt;&amp;lt; 1);&lt;br /&gt;
      dy = -dy;&lt;br /&gt;
      /* dx/dy relative to initial screen positon */&lt;br /&gt;
      xc = x + dx;&lt;br /&gt;
      yc = y + dy;&lt;br /&gt;
      if (m == 2) {&lt;br /&gt;
        moveto(xc, yc);&lt;br /&gt;
      } else {&lt;br /&gt;
        lineto(xc, yc);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    /* next byte pair */&lt;br /&gt;
    b += 2;&lt;br /&gt;
  } while (m);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Shape Viewer ===&lt;br /&gt;
This FreeBASIC program will draw all of the characters in the specified font, and give details about the font.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;freebasic&amp;quot;&amp;gt;&lt;br /&gt;
ScreenRes 800, 600, 4&lt;br /&gt;
&lt;br /&gt;
&#039; Open the font file.&lt;br /&gt;
Open &amp;quot;SANS.CHR&amp;quot; For Binary As #1&lt;br /&gt;
&lt;br /&gt;
&#039; Verify the signature.&lt;br /&gt;
Dim As String Check&lt;br /&gt;
Check = Space(4)&lt;br /&gt;
Get #1, , Check&lt;br /&gt;
If Check &amp;lt;&amp;gt; &amp;quot;PK&amp;quot; + Chr(8) + Chr(8) Then&lt;br /&gt;
	Print &amp;quot;Not a Borland CHR font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the Description&lt;br /&gt;
Dim As UByte Buffer&lt;br /&gt;
Dim As String Description&lt;br /&gt;
Do&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
	If Buffer &amp;lt;&amp;gt; &amp;amp;h1A Then&lt;br /&gt;
		Description = Description + Chr(Buffer)&lt;br /&gt;
	End If&lt;br /&gt;
Loop Until Buffer = &amp;amp;h1A&lt;br /&gt;
&lt;br /&gt;
&#039; Load the header size.&lt;br /&gt;
Dim As UShort HeaderSize&lt;br /&gt;
Get #1, , HeaderSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font id.&lt;br /&gt;
Dim As String FontId&lt;br /&gt;
FontId = Space(4)&lt;br /&gt;
Get #1, , FontId&lt;br /&gt;
&lt;br /&gt;
&#039; Load the data file size. (HeaderSize + DataSize should match the size of the file.)&lt;br /&gt;
Dim As UShort DataSize&lt;br /&gt;
Get #1, , DataSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font version number.&lt;br /&gt;
Dim As UShort FontMajorVersion&lt;br /&gt;
Get #1, , FontMajorVersion&lt;br /&gt;
Dim As UShort FontMinorVersion&lt;br /&gt;
Get #1, , FontMinorVersion&lt;br /&gt;
&lt;br /&gt;
&#039; Jump to the end of the header. The rest should be nulls anyway.&lt;br /&gt;
Get #1, HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Verify this is a BGI Stroked Font.&lt;br /&gt;
Dim As String StrokedFontCheck&lt;br /&gt;
StrokedFontCheck = Space(1)&lt;br /&gt;
Get #1, , StrokedFontCheck&lt;br /&gt;
If StrokedFontCheck &amp;lt;&amp;gt; &amp;quot;+&amp;quot; Then&lt;br /&gt;
	Print &amp;quot;Not a stroked font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the number of characters.&lt;br /&gt;
Dim As UShort CharacterCount&lt;br /&gt;
Get #1, , CharacterCount&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the starting charcter. This is the first character id to have a glyph associated to it.&lt;br /&gt;
Dim As UByte StartingChar&lt;br /&gt;
Get #1, , StartingChar&lt;br /&gt;
&lt;br /&gt;
&#039; Load the file offset where the stroke definitions begin.&lt;br /&gt;
Dim As UShort StrokeDefinitionOffset&lt;br /&gt;
Get #1, , StrokeDefinitionOffset&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the top of the capital letters.&lt;br /&gt;
Dim As Byte OriginToCapital&lt;br /&gt;
Get #1, , OriginToCapital&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the baseline.&lt;br /&gt;
Dim As Byte OriginToBaseline&lt;br /&gt;
Get #1, , OriginToBaseline&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the bottom of the descenders.&lt;br /&gt;
Dim As Byte OriginToDescender&lt;br /&gt;
Get #1, , OriginToDescender&lt;br /&gt;
&lt;br /&gt;
&#039; Skip remaining nulls.&lt;br /&gt;
Dim As Integer I&lt;br /&gt;
For I = 0 To 4&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load offset to characters definitions.&lt;br /&gt;
Dim As UShort CharacterDefinitionOffset(StartingChar To (StartingChar + CharacterCount - 1))&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount - 1)&lt;br /&gt;
	Get #1, , CharacterDefinitionOffset(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load character widths.&lt;br /&gt;
Dim As UByte CharacterWidths(StartingChar To (StartingChar + CharacterCount - 1))&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount - 1)&lt;br /&gt;
	Get #1, , CharacterWidths(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Dim As Integer CharacterHeight = OriginToCapital + (OriginToDescender * -1)&lt;br /&gt;
&lt;br /&gt;
Print &amp;quot;Font Id: &amp;quot;; FontId&lt;br /&gt;
Print &amp;quot;Description: &amp;quot;; Description&lt;br /&gt;
Print &amp;quot;Total Character Height: &amp;quot;; CharacterHeight&lt;br /&gt;
Print &amp;quot;Max Ascender: &amp;quot;; OriginToCapital&lt;br /&gt;
Print &amp;quot;Max Descender: &amp;quot;; OriginToDescender&lt;br /&gt;
Print &amp;quot;Total Characters: &amp;quot;; CharacterCount&lt;br /&gt;
Print &amp;quot;Starting Character: 0x&amp;quot;; Hex(StartingChar)&lt;br /&gt;
&lt;br /&gt;
Dim As UByte XByte, YByte, Finished&lt;br /&gt;
Dim As Integer XCurrent, YCurrent, XStart, YStart, XBuffer, YBuffer&lt;br /&gt;
Dim As Byte XNew, YNew, XOpcode, YOpcode, XSign, YSign&lt;br /&gt;
&lt;br /&gt;
XBuffer = 40&lt;br /&gt;
YBuffer = 32&lt;br /&gt;
&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount - 1)&lt;br /&gt;
	&#039; Jump to the starting offset of this character.&lt;br /&gt;
	Get #1, CharacterDefinitionOffset(I) + StrokeDefinitionOffset + HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
	&#039; Character position in 16x16 table.&lt;br /&gt;
	XStart = 80 + (I Mod 16) * XBuffer + ((XBuffer - CharacterWidths(I)) \ 2)&lt;br /&gt;
	YStart = 70 + ((I \ 16) * YBuffer) + CharacterHeight&lt;br /&gt;
&lt;br /&gt;
	&#039; Draw character bounding box.&lt;br /&gt;
	Line(XStart, YStart - OriginToCapital)-(XStart + CharacterWidths(I), YStart - OriginToDescender), 8, B&lt;br /&gt;
&lt;br /&gt;
	&#039; Load all of the drawing instructions and draw the character.&lt;br /&gt;
	Finished = 0&lt;br /&gt;
	Do&lt;br /&gt;
		&#039; Load the opcode/values. Two bytes, one for X, the other for Y.&lt;br /&gt;
		&#039; 7 6 543210&lt;br /&gt;
		&#039; ^ ^ ^&lt;br /&gt;
		&#039; | | +------ Start of 6-bit number.&lt;br /&gt;
		&#039; | +-------- Sign bit for number.&lt;br /&gt;
		&#039; +---------- Opcode bit.&lt;br /&gt;
		&lt;br /&gt;
		Get #1, , XByte		&#039; First opcode and X value.&lt;br /&gt;
		Get #1, , YByte		&#039; Second opcode and Y value.&lt;br /&gt;
&lt;br /&gt;
		&#039; Read the opcode bits.&lt;br /&gt;
		XOpcode = Bit(XByte, 7)&lt;br /&gt;
		YOpcode = Bit(YByte, 7)&lt;br /&gt;
		&#039; Clear the opcode bits.&lt;br /&gt;
		XByte = BitReset(XByte, 7)&lt;br /&gt;
		YByte = BitReset(YByte, 7)&lt;br /&gt;
		&#039; Set the values to negative if the signed bits are on.&lt;br /&gt;
		If Bit(XByte, 6) = True Then&lt;br /&gt;
			XByte = BitSet(XByte, 7)&lt;br /&gt;
		End If&lt;br /&gt;
		If Bit(YByte, 6) = True Then&lt;br /&gt;
			YByte = BitSet(YByte, 7)&lt;br /&gt;
		End If&lt;br /&gt;
&lt;br /&gt;
		XNew = XByte&lt;br /&gt;
		YNew = YByte&lt;br /&gt;
&lt;br /&gt;
		&#039; Normalize the Y position.&lt;br /&gt;
		YNew = -YNew&lt;br /&gt;
&lt;br /&gt;
		If XOpcode = 0 Then&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; End of character definition. Move to the next character.&lt;br /&gt;
				Finished = 1&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Not sure what this is for. It&#039;s only used in the BOLD font when a character has &lt;br /&gt;
				&#039; multiple separate objects like with the colon and equal sign. However, not all &lt;br /&gt;
				&#039; characters with broken up objects in the font use it, and leaving it out doesn&#039;t &lt;br /&gt;
				&#039; appear to mess up the drawing at all.&lt;br /&gt;
			End If&lt;br /&gt;
		Else&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; Move Pointer to X, Y.&lt;br /&gt;
				&#039; This happens below since both move and draw must change the position.&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Draw From Current Pointer to new X, Y.&lt;br /&gt;
				Line(XCurrent, YCurrent)-(XStart + XNew, YStart + YNew), 15&lt;br /&gt;
			End If&lt;br /&gt;
&lt;br /&gt;
			XCurrent = XStart + XNew&lt;br /&gt;
			YCurrent = YStart + YNew&lt;br /&gt;
		End If&lt;br /&gt;
	Loop Until Finished = 1&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Sleep&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
{{BeginFileFormatTools|Type=image}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland/bgifont.zip FE Stroke Font Editor]&lt;br /&gt;
| Platform = DOS&lt;br /&gt;
| canView = Yes&lt;br /&gt;
| canExport = Yes&lt;br /&gt;
| canImport = Yes&lt;br /&gt;
| editHidden = No&lt;br /&gt;
| editMetadata = Yes&lt;br /&gt;
| notes = Borland&#039;s in-house font Stroked Font editor.&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
This format was reverse engineered by [[User:TheAlmightyGuru|TheAlmightyGuru]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland] - Various tools for BGI fonts.&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11734</id>
		<title>BGI Stroked Font</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11734"/>
		<updated>2024-02-17T16:37:11Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Header */ warning&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Font Infobox&lt;br /&gt;
 | MaxGlyphs = 32,767&lt;br /&gt;
 | GlyphMinSize = Unlimited&lt;br /&gt;
 | GlyphMaxSize = Unlimited&lt;br /&gt;
 | Access = Indexed&lt;br /&gt;
 | Bitmap = N&lt;br /&gt;
 | Vector = Y&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Hidden = Y&lt;br /&gt;
 | Metadata = Name, Description&lt;br /&gt;
 | Games =&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;BGI Stroked Font&#039;&#039;&#039; is a vector font created by Borland to work with their 1987 graphics API, [[Borland Graphics Interface]]. Since the format stores vector fonts, it can easily be scaled in size with little loss of fidelity. However, because the format only supports lines and not curves, scaling to larger sizes will make the characters look jagged. The font files typically have a *.CHR file extension.&lt;br /&gt;
&lt;br /&gt;
After 1987, Borland&#039;s C and Pascal programming languages shipped with 10 different BGI Stroked Fonts: Bold, Euro, Goth, Lcom, Litt, Sans, Scri, Simp, Trip, and Tscr. Due to the popularity of Borland&#039;s programming languages, and their graphic API, BGI Stroked Fonts were used in hundreds of DOS video games.&lt;br /&gt;
&lt;br /&gt;
The designers of the file format unfortunately used a file signature starting with &amp;quot;PK&amp;quot; which would later be used by PK Zip, so BGI Stroked Font files, despite having an extension of CHR, might be misidentified as zip archives if the identifier doesn&#039;t take into account the full PK Zip signature.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
=== Header ===&lt;br /&gt;
The header includes the font&#039;s name, version number, and description.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][2] || Signature || Must be 0x50 0x4B (&amp;quot;PK&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Description || User text. Borland&#039;s official fonts start with &amp;quot;BGI Stroked Font&amp;quot; with two 0x08 characters before to hide font file signature in case of use DOS &amp;quot;type&amp;quot; command on font file, then the version number, and ends with a copyright. The description is terminated with byte 0x1A which Borland font loader code search in first 256 bytes of the file (including two bytes of Signature above). In other words this field size can be from 0 (zero - no copyright text at all) to 253 bytes long (256 - 3).&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Header Start || Must be 0x1A.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Header Size || The size, in bytes, of the entire header.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || A 4-character font internal name.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Font Size || The size of the font&#039;s data block. The Header Size + Font Size should be the size of the file. &#039;&#039;&#039;See remarks according Font Size below.&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Major || Driver Version Information major number. Must be 1 (Borland font loader also accepts anything bigger but not 0, i.e. valid if &amp;quot;value &amp;gt;= 1&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Minor || Driver Version Information minor number. Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Major || BGI Revision Information major number. Must be 1 (Borland font loader also accepts 0 but halts on anything bigger than 1, i.e. valid if &amp;quot;value &amp;lt;= 1&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Minor || BGI Revision Information minor number. Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Padding || The rest of the header should be padded out to nulls based on the Header Size. All official Borland fonts use a header size of 0x80 (note that font editors may not work with fonts with different header size).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Correct Font Size field may not be important for Borland Pascal but is crucial for Borlad C since their library function &#039;&#039;register(far)bgifont&#039;&#039; for some reason moving font data inplace based on this field value. User-made fonts with incorrect Font Size (less than it should be) will not work properly under Borland C!&lt;br /&gt;
&lt;br /&gt;
To calculate proper Font Size do as follows:&lt;br /&gt;
# Find max offset in Character Stroke Offsets table (see Stroke Header definition below).&lt;br /&gt;
# Add Strokes Offset to get the Stroke Data offset for that character.&lt;br /&gt;
# Parse Stroke Data for that character until the stop command and sum all bytes including stop command itself.&lt;br /&gt;
# Use result value as Font Size.&lt;br /&gt;
# Do not foget that this Font Size must not include Font Header size.&lt;br /&gt;
&lt;br /&gt;
=== Stroke Header ===&lt;br /&gt;
This section contains general information about the font including how many characters are represented, the top of the highest ascender, bottom of the lowest descender, baseline, where in the file to find each character&#039;s instructions, and the width of each character.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Stroke Check || Must be 0x2B. Indicates this is a stroked font.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Character Count || Number of total characters stored in this font.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Starting Character || The index of the first character to have a glyph associated with it.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Strokes Offset || The file offset where stroke definitions begin relative from the start of this header.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Scan Flag || {{TODO|Borland&#039;s documentation calls this the &amp;quot;scan flag&amp;quot;, but doesn&#039;t explain what it is for (&amp;quot;set to 1 if set is scanable&amp;quot;).}}&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Ascender || The distance from the origin to the font&#039;s highest point.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Baseline || The distance from the origin to the font&#039;s baseline (typically 0).&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Descender || The distance from the origin to the font&#039;s lowest point. Note, you can derive the total character height by getting the distance from the Ascender to Descender.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || Borland&#039;s own documentation says &amp;quot;four character name of font&amp;quot;, but it&#039;s always all zero.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]][Character Count] || Character Stroke Offsets || An array of the offset to the stroke definitions for each character. To get the position in the file, you must add the Header Size and the Strokes Offset to this value.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][Character Count] || Character Widths || The unscaled width of each character.&lt;br /&gt;
|-&lt;br /&gt;
| Stroke Data || Character strokes || The stroke instructions for each character. See below for how to interpret them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Stroke Data ===&lt;br /&gt;
This section contains the actual instructions for drawing individual characters.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || X Instruction || Instructions for drawing the character and an X value.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || Y Instruction || Instructions for drawing the character and a Y value.&lt;br /&gt;
|-&lt;br /&gt;
| ... || Several possible instruction pairs per character.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Encoded in each two byte pair is a single stroke instruction, and an X and Y value. The most-significant bit in each byte is an opcode, the next seven bits represent a signed value. The first byte is the X value, the second byte is the Y value. See the diagram below.&lt;br /&gt;
&lt;br /&gt;
 7 6 543210 &lt;br /&gt;
 ^ ^ ^&lt;br /&gt;
 | | +----------- 6-Bit number.&lt;br /&gt;
 | +------------- Sign bit for number.&lt;br /&gt;
 +--------------- Opcode.&lt;br /&gt;
&lt;br /&gt;
The two opcodes determine the instruction.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Code 1 !! Code 2 !! Instruction&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || End of character stroke definition.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || Borland&#039;s documentation has this labeled as &amp;quot;do scan,&amp;quot; implying it&#039;s related to the Scan Flag. It&#039;s only used in their BOLD font on characters with multiple objects like the colon and equals sign. It doesn&#039;t appear to affect how the character is drawn. Borland font rendering code silently ignores this - checked in Turbo Pascal 7.1 (1997) and in Turbo C 2.01 (1988). {{TODO|More info is needed.}}&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || Move plotter to the specified X and Y coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || Draw a line from the previous X and Y coordinates and move plotter to the new X and Y coordinates.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Character Layout ==&lt;br /&gt;
[[Image:BGI Stroked Font - Layout Diagram.png|thumb|256x256px|Y-axis layout. {{TODO|Replace with correct example - see chr_draw_char() routine below.}}]]&lt;br /&gt;
The Y values for each character are stored in a unique manner. Characters are drawn relative to the baseline, but, rather than put the baseline at 0, the half above the baseline starts at 64 and decreases toward 0 as you move away from the baseline, while the half below the baseline starts at -64 and increases toward -1. See the diagram to the right.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
=== Draw Stroke Data ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Copyright 2024 CTPAX-X Team&lt;br /&gt;
This source code licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;):&lt;br /&gt;
https://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
/* draws a character:&lt;br /&gt;
x, y - initial screen positon&lt;br /&gt;
b - buffer pointer to a Stroke Data for character */&lt;br /&gt;
void chr_draw_char(int x, int y, unsigned char *b) {&lt;br /&gt;
char m, dx, dy;&lt;br /&gt;
int xc, yc;&lt;br /&gt;
  /* initial position according to Stroke Header */&lt;br /&gt;
  y += origin_to_ascender - origin_to_descender;&lt;br /&gt;
  xc = x;&lt;br /&gt;
  yc = y;&lt;br /&gt;
  moveto(xc, yc);&lt;br /&gt;
  do {&lt;br /&gt;
    /* get mask */&lt;br /&gt;
    m = b[0] &amp;gt;&amp;gt; 7;&lt;br /&gt;
    m += m + (b[1] &amp;gt;&amp;gt; 7);&lt;br /&gt;
    /* 0 - stop; 1 - scan; 2 - move; 3 - draw */&lt;br /&gt;
    if (m &amp;gt; 1) {&lt;br /&gt;
      /* bit arithmetic (note dx/dy signed 8 bit type):&lt;br /&gt;
      if sign bit is set - expand to full signed value */&lt;br /&gt;
      dx = (b[0] &amp;amp; 0x7F) | ((b[0] &amp;amp; 0x40) &amp;lt;&amp;lt; 1);&lt;br /&gt;
      dy = (b[1] &amp;amp; 0x7F) | ((b[1] &amp;amp; 0x40) &amp;lt;&amp;lt; 1);&lt;br /&gt;
      dy = -dy;&lt;br /&gt;
      /* dx/dy relative to initial screen positon */&lt;br /&gt;
      xc = x + dx;&lt;br /&gt;
      yc = y + dy;&lt;br /&gt;
      if (m == 2) {&lt;br /&gt;
        moveto(xc, yc);&lt;br /&gt;
      } else {&lt;br /&gt;
        lineto(xc, yc);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    /* next byte pair */&lt;br /&gt;
    b += 2;&lt;br /&gt;
  } while (m);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Shape Viewer ===&lt;br /&gt;
This FreeBASIC program will draw all of the characters in the specified font, and give details about the font.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;freebasic&amp;quot;&amp;gt;&lt;br /&gt;
ScreenRes 1000, 800, 32&lt;br /&gt;
&lt;br /&gt;
&#039; Open the font file.&lt;br /&gt;
Open &amp;quot;SANS.CHR&amp;quot; For Binary As #1&lt;br /&gt;
&lt;br /&gt;
&#039; Verify the signature.&lt;br /&gt;
Dim As String Check&lt;br /&gt;
Check = Space(4)&lt;br /&gt;
Get #1, , Check&lt;br /&gt;
If Check &amp;lt;&amp;gt; &amp;quot;PK&amp;quot; + Chr(8) + Chr(8) Then&lt;br /&gt;
	Print &amp;quot;Not a Borland CHR font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the Description&lt;br /&gt;
Dim As UByte Buffer&lt;br /&gt;
Dim As String Description&lt;br /&gt;
Do&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
	If Buffer &amp;lt;&amp;gt; &amp;amp;h1A Then&lt;br /&gt;
		Description = Description + Chr(Buffer)&lt;br /&gt;
	End If&lt;br /&gt;
Loop Until Buffer = &amp;amp;h1A&lt;br /&gt;
&lt;br /&gt;
&#039; Load the header size.&lt;br /&gt;
Dim As UShort HeaderSize&lt;br /&gt;
Get #1, , HeaderSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font id.&lt;br /&gt;
Dim As String FontId&lt;br /&gt;
FontId = Space(4)&lt;br /&gt;
Get #1, , FontId&lt;br /&gt;
&lt;br /&gt;
&#039; Load the data file size. (HeaderSize + DataSize should match the size of the file.)&lt;br /&gt;
Dim As UShort DataSize&lt;br /&gt;
Get #1, , DataSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font version number.&lt;br /&gt;
Dim As UShort FontMajorVersion&lt;br /&gt;
Get #1, , FontMajorVersion&lt;br /&gt;
Dim As UShort FontMinorVersion&lt;br /&gt;
Get #1, , FontMinorVersion&lt;br /&gt;
&lt;br /&gt;
&#039; Jump to the end of the header. The rest should be nulls anyway.&lt;br /&gt;
Get #1, HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Verify this is a BGI Stroked Font.&lt;br /&gt;
Dim As String StrokedFontCheck&lt;br /&gt;
StrokedFontCheck = Space(1)&lt;br /&gt;
Get #1, , StrokedFontCheck&lt;br /&gt;
If StrokedFontCheck &amp;lt;&amp;gt; &amp;quot;+&amp;quot; Then&lt;br /&gt;
	Print &amp;quot;Not a stroked font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the number of characters.&lt;br /&gt;
Dim As UShort CharacterCount&lt;br /&gt;
Get #1, , CharacterCount&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the starting charcter. This is the first character id to have a glyph associated to it.&lt;br /&gt;
Dim As UByte StartingChar&lt;br /&gt;
Get #1, , StartingChar&lt;br /&gt;
&lt;br /&gt;
&#039; Load the file offset where the stroke definitions begin.&lt;br /&gt;
Dim As UShort StrokeDefinitionOffset&lt;br /&gt;
Get #1, , StrokeDefinitionOffset&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the top of the capital letters.&lt;br /&gt;
Dim As Byte OriginToCapital&lt;br /&gt;
Get #1, , OriginToCapital&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the baseline.&lt;br /&gt;
Dim As Byte OriginToBaseline&lt;br /&gt;
Get #1, , OriginToBaseline&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the bottom of the descenders.&lt;br /&gt;
Dim As Byte OriginToDescender&lt;br /&gt;
Get #1, , OriginToDescender&lt;br /&gt;
&lt;br /&gt;
&#039; Skip remaining nulls.&lt;br /&gt;
Dim As Integer I&lt;br /&gt;
For I = 0 To 4&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load offset to characters definitions.&lt;br /&gt;
Dim As UShort CharacterDefinitionOffset(StartingChar To (StartingChar + CharacterCount) - 1)&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount) - 1&lt;br /&gt;
	Get #1, , CharacterDefinitionOffset(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load character widths.&lt;br /&gt;
Dim As UByte CharacterWidths(StartingChar To (StartingChar + CharacterCount) - 1)&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount) - 1&lt;br /&gt;
	Get #1, , CharacterWidths(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Dim As Integer CharacterHeight = OriginToCapital + (OriginToDescender * -1)&lt;br /&gt;
&lt;br /&gt;
Print &amp;quot;Font Id: &amp;quot;; FontId&lt;br /&gt;
Print &amp;quot;Description: &amp;quot;; Description&lt;br /&gt;
Print &amp;quot;Total Character Height: &amp;quot;; CharacterHeight&lt;br /&gt;
Print &amp;quot;Max Ascender: &amp;quot;; OriginToCapital&lt;br /&gt;
Print &amp;quot;Max Descender: &amp;quot;; OriginToDescender&lt;br /&gt;
Print &amp;quot;Total Characters: &amp;quot;; CharacterCount&lt;br /&gt;
Print &amp;quot;Starting Character: 0x&amp;quot;; Hex(StartingChar)&lt;br /&gt;
&lt;br /&gt;
Dim As UByte XByte, YByte, Finished&lt;br /&gt;
Dim As Integer XCurrent, YCurrent, XStart, YStart, XBuffer, YBuffer&lt;br /&gt;
Dim As Byte XNew, YNew, XOpcode, YOpcode, XSign, YSign&lt;br /&gt;
&lt;br /&gt;
XStart = 10&lt;br /&gt;
YStart = 130&lt;br /&gt;
XBuffer = 5&lt;br /&gt;
YBuffer = 10&lt;br /&gt;
&lt;br /&gt;
For I = StartingChar To (CharacterCount - StartingChar) - 1&lt;br /&gt;
	&#039; Jump to the starting offset of this character.&lt;br /&gt;
	Get #1, CharacterDefinitionOffset(I) + StrokeDefinitionOffset + HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
	&#039; Load all of the drawing instructions and draw the character.&lt;br /&gt;
	Finished = 0&lt;br /&gt;
	Do&lt;br /&gt;
		&#039; Load the opcode/values. Two bytes, one for X, the other for Y.&lt;br /&gt;
		&#039; 7 6 543210&lt;br /&gt;
		&#039; ^ ^ ^&lt;br /&gt;
		&#039; | | +------ Start of 6-bit number.&lt;br /&gt;
		&#039; | +-------- Sign bit for number.&lt;br /&gt;
		&#039; +---------- Opcode bit.&lt;br /&gt;
		&lt;br /&gt;
		Get #1, , XByte		&#039; First opcode and X value.&lt;br /&gt;
		Get #1, , YByte		&#039; Second opcode and Y value.&lt;br /&gt;
&lt;br /&gt;
		&#039; Read the opcode and sign bits.&lt;br /&gt;
		XOpcode = Bit(XByte, 7)&lt;br /&gt;
		YOpcode = Bit(YByte, 7)&lt;br /&gt;
		XSign = Bit(XByte, 6)&lt;br /&gt;
		YSign = Bit(YByte, 6)&lt;br /&gt;
&lt;br /&gt;
		&#039; Clear the opcode bits and the sign bits.&lt;br /&gt;
		XByte = BitReset(XByte, 7)&lt;br /&gt;
		XByte = BitReset(XByte, 6)&lt;br /&gt;
		YByte = BitReset(YByte, 7)&lt;br /&gt;
		YByte = BitReset(YByte, 6)&lt;br /&gt;
&lt;br /&gt;
		XNew = XByte&lt;br /&gt;
		YNew = YByte&lt;br /&gt;
&lt;br /&gt;
		&#039; Set the values to negative if the signed bits are on.&lt;br /&gt;
		If XSign = True Then&lt;br /&gt;
			XNew = XNew * -1&lt;br /&gt;
		End If&lt;br /&gt;
		If YSign = True Then&lt;br /&gt;
			YNew = (64 - YNew)		&#039; Normalize the descender&#039;s value.&lt;br /&gt;
			YNew = YNew * -1&lt;br /&gt;
		End If&lt;br /&gt;
&lt;br /&gt;
		&#039; Normalize the Y position.&lt;br /&gt;
		YNew = (64 - YNew)&lt;br /&gt;
&lt;br /&gt;
		If XOpcode = 0 Then&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; End of character definition. Move to the next character.&lt;br /&gt;
				XStart = XStart + CharacterWidths(I) + XBuffer&lt;br /&gt;
				If XStart &amp;gt; 950 Then&lt;br /&gt;
					XStart = 10&lt;br /&gt;
					YStart = YStart + CharacterHeight + YBuffer&lt;br /&gt;
				End If&lt;br /&gt;
				Finished = 1&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Not sure what this is for. It&#039;s only used in the BOLD font when a character has &lt;br /&gt;
				&#039; multiple separate objects like with the colon and equal sign. However, not all &lt;br /&gt;
				&#039; characters with broken up objects in the font use it, and leaving it out doesn&#039;t &lt;br /&gt;
				&#039; appear to mess up the drawing at all.&lt;br /&gt;
			End If&lt;br /&gt;
		Else&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; Move Pointer to X, Y.&lt;br /&gt;
				&#039; This happens below since both move and draw must change the position.&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Draw From Current Pointer to new X, Y.&lt;br /&gt;
				Line(XCurrent, YCurrent)-(XStart + XNew, YStart + YNew), RGB(255, 255, 255)&lt;br /&gt;
			End If&lt;br /&gt;
&lt;br /&gt;
			XCurrent = XStart + XNew&lt;br /&gt;
			YCurrent = YStart + YNew&lt;br /&gt;
		End If&lt;br /&gt;
	Loop Until Finished = 1&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Sleep&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
{{BeginFileFormatTools|Type=image}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland/bgifont.zip FE Stroke Font Editor]&lt;br /&gt;
| Platform = DOS&lt;br /&gt;
| canView = Yes&lt;br /&gt;
| canExport = Yes&lt;br /&gt;
| canImport = Yes&lt;br /&gt;
| editHidden = No&lt;br /&gt;
| editMetadata = Yes&lt;br /&gt;
| notes = Borland&#039;s in-house font Stroked Font editor.&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
This format was reverse engineered by [[User:TheAlmightyGuru|TheAlmightyGuru]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland] - Various tools for BGI fonts.&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Talk:BGI_Stroked_Font&amp;diff=11733</id>
		<title>Talk:BGI Stroked Font</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Talk:BGI_Stroked_Font&amp;diff=11733"/>
		<updated>2024-02-17T11:54:10Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* character layout */ forgot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= character layout =&lt;br /&gt;
The numbers in the description and diagram include 64, and for the above the baseline it ranges from 0 to 64, which is too large a range for a 6-bit number. Do we know enough detail to clarify the range, and to determine if the negative values are simply signed or 2s complement? [[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 08:26, 21 December 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Looking at the FreeBASIC code, it looks as though the X values is simply signed, and has a range from -63 to +63 with both -ve and +ve 0; while the Y value is a 2s complement with a range of -64 to 63. [[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 08:26, 21 December 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: There was a reason why I wrote it out that way, but it&#039;s been so long since I worked on it, I don&#039;t remember. I think it had something to do with the baseline counting as a line when it came time to render the character, but not in the file, so the ascender had a range of 63, but +1 because of the baseline. I had the renderer working almost perfectly, but there were still a couple fonts that gave odd results, but I had gotten bored of the format. I did end up compiling a large collection of [http://www.thealmightyguru.com/Wiki/index.php?title=File:BGI_Fonts.zip BGI fonts] which you can use if you want to test with. --[[User:TheAlmightyGuru|TheAlmightyGuru]] ([[User talk:TheAlmightyGuru|talk]]) 13:41, 21 December 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: Disassembled Borland code and found out how everything works - see chr_draw_char() code example. Would somebody please replace &amp;quot;Y-axis layout&amp;quot; image with the correct example? Thanks! [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 11:48, 17 February 2024 (GMT)&lt;br /&gt;
::: Also &amp;quot;Character Layout&amp;quot; explanation should be rewritten. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 11:53, 17 February 2024 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Talk:BGI_Stroked_Font&amp;diff=11732</id>
		<title>Talk:BGI Stroked Font</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Talk:BGI_Stroked_Font&amp;diff=11732"/>
		<updated>2024-02-17T11:49:16Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* character layout */ figured it out&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= character layout =&lt;br /&gt;
The numbers in the description and diagram include 64, and for the above the baseline it ranges from 0 to 64, which is too large a range for a 6-bit number. Do we know enough detail to clarify the range, and to determine if the negative values are simply signed or 2s complement? [[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 08:26, 21 December 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Looking at the FreeBASIC code, it looks as though the X values is simply signed, and has a range from -63 to +63 with both -ve and +ve 0; while the Y value is a 2s complement with a range of -64 to 63. [[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 08:26, 21 December 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: There was a reason why I wrote it out that way, but it&#039;s been so long since I worked on it, I don&#039;t remember. I think it had something to do with the baseline counting as a line when it came time to render the character, but not in the file, so the ascender had a range of 63, but +1 because of the baseline. I had the renderer working almost perfectly, but there were still a couple fonts that gave odd results, but I had gotten bored of the format. I did end up compiling a large collection of [http://www.thealmightyguru.com/Wiki/index.php?title=File:BGI_Fonts.zip BGI fonts] which you can use if you want to test with. --[[User:TheAlmightyGuru|TheAlmightyGuru]] ([[User talk:TheAlmightyGuru|talk]]) 13:41, 21 December 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: Disassembled Borland code and found out how everything works - see chr_draw_char() code example. Would somebody please replace &amp;quot;Y-axis layout&amp;quot; image with the correct example? Thanks! [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 11:48, 17 February 2024 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11731</id>
		<title>BGI Stroked Font</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11731"/>
		<updated>2024-02-17T11:43:59Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: working example (better than disassembled Borland code)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Font Infobox&lt;br /&gt;
 | MaxGlyphs = 32,767&lt;br /&gt;
 | GlyphMinSize = Unlimited&lt;br /&gt;
 | GlyphMaxSize = Unlimited&lt;br /&gt;
 | Access = Indexed&lt;br /&gt;
 | Bitmap = N&lt;br /&gt;
 | Vector = Y&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Hidden = Y&lt;br /&gt;
 | Metadata = Name, Description&lt;br /&gt;
 | Games =&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;BGI Stroked Font&#039;&#039;&#039; is a vector font created by Borland to work with their 1987 graphics API, [[Borland Graphics Interface]]. Since the format stores vector fonts, it can easily be scaled in size with little loss of fidelity. However, because the format only supports lines and not curves, scaling to larger sizes will make the characters look jagged. The font files typically have a *.CHR file extension.&lt;br /&gt;
&lt;br /&gt;
After 1987, Borland&#039;s C and Pascal programming languages shipped with 10 different BGI Stroked Fonts: Bold, Euro, Goth, Lcom, Litt, Sans, Scri, Simp, Trip, and Tscr. Due to the popularity of Borland&#039;s programming languages, and their graphic API, BGI Stroked Fonts were used in hundreds of DOS video games.&lt;br /&gt;
&lt;br /&gt;
The designers of the file format unfortunately used a file signature starting with &amp;quot;PK&amp;quot; which would later be used by PK Zip, so BGI Stroked Font files, despite having an extension of CHR, might be misidentified as zip archives if the identifier doesn&#039;t take into account the full PK Zip signature.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
=== Header ===&lt;br /&gt;
The header includes the font&#039;s name, version number, and description.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][2] || Signature || Must be 0x50 0x4B (&amp;quot;PK&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Description || User text. Borland&#039;s official fonts start with &amp;quot;BGI Stroked Font&amp;quot; with two 0x08 characters before to hide font file signature in case of use DOS &amp;quot;type&amp;quot; command on font file, then the version number, and ends with a copyright. The description is terminated with byte 0x1A which Borland font loader code search in first 256 bytes of the file (including two bytes of Signature above). In other words this field size can be from 0 (zero - no copyright text at all) to 253 bytes long (256 - 3).&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Header Start || Must be 0x1A.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Header Size || The size, in bytes, of the entire header.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || A 4-character font internal name.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Font Size || The size of the font&#039;s data block. The Header Size + Data Size should be the size of the file. Note that user-made fonts may have incorrect size here (for example less than it should be).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Major || Driver Version Information major number. Must be 1 (Borland font loader also accepts anything bigger but not 0, i.e. valid if &amp;quot;value &amp;gt;= 1&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Minor || Driver Version Information minor number. Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Major || BGI Revision Information major number. Must be 1 (Borland font loader also accepts 0 but halts on anything bigger than 1, i.e. valid if &amp;quot;value &amp;lt;= 1&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Minor || BGI Revision Information minor number. Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Padding || The rest of the header should be padded out to nulls based on the Header Size. All official Borland fonts use a header size of 0x80 (note that font editors may not work with fonts with different header size).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Stroke Header ===&lt;br /&gt;
This section contains general information about the font including how many characters are represented, the top of the highest ascender, bottom of the lowest descender, baseline, where in the file to find each character&#039;s instructions, and the width of each character.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Stroke Check || Must be 0x2B. Indicates this is a stroked font.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Character Count || Number of total characters stored in this font.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Starting Character || The index of the first character to have a glyph associated with it.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Strokes Offset || The file offset where stroke definitions begin relative from the start of this header.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Scan Flag || {{TODO|Borland&#039;s documentation calls this the &amp;quot;scan flag&amp;quot;, but doesn&#039;t explain what it is for (&amp;quot;set to 1 if set is scanable&amp;quot;).}}&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Ascender || The distance from the origin to the font&#039;s highest point.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Baseline || The distance from the origin to the font&#039;s baseline (typically 0).&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Descender || The distance from the origin to the font&#039;s lowest point. Note, you can derive the total character height by getting the distance from the Ascender to Descender.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || Borland&#039;s own documentation says &amp;quot;four character name of font&amp;quot;, but it&#039;s always all zero.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]][Character Count] || Character Stroke Offsets || An array of the offset to the stroke definitions for each character. To get the position in the file, you must add the Header Size and the Strokes Offset to this value.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][Character Count] || Character Widths || The unscaled width of each character.&lt;br /&gt;
|-&lt;br /&gt;
| Stroke Data || Character strokes || The stroke instructions for each character. See below for how to interpret them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Stroke Data ===&lt;br /&gt;
This section contains the actual instructions for drawing individual characters.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || X Instruction || Instructions for drawing the character and an X value.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || Y Instruction || Instructions for drawing the character and a Y value.&lt;br /&gt;
|-&lt;br /&gt;
| ... || Several possible instruction pairs per character.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Encoded in each two byte pair is a single stroke instruction, and an X and Y value. The most-significant bit in each byte is an opcode, the next seven bits represent a signed value. The first byte is the X value, the second byte is the Y value. See the diagram below.&lt;br /&gt;
&lt;br /&gt;
 7 6 543210 &lt;br /&gt;
 ^ ^ ^&lt;br /&gt;
 | | +----------- 6-Bit number.&lt;br /&gt;
 | +------------- Sign bit for number.&lt;br /&gt;
 +--------------- Opcode.&lt;br /&gt;
&lt;br /&gt;
The two opcodes determine the instruction.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Code 1 !! Code 2 !! Instruction&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || End of character stroke definition.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || Borland&#039;s documentation has this labeled as &amp;quot;do scan,&amp;quot; implying it&#039;s related to the Scan Flag. It&#039;s only used in their BOLD font on characters with multiple objects like the colon and equals sign. It doesn&#039;t appear to affect how the character is drawn. Borland font rendering code silently ignores this - checked in Turbo Pascal 7.1 (1997) and in Turbo C 2.01 (1988). {{TODO|More info is needed.}}&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || Move plotter to the specified X and Y coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || Draw a line from the previous X and Y coordinates and move plotter to the new X and Y coordinates.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Character Layout ==&lt;br /&gt;
[[Image:BGI Stroked Font - Layout Diagram.png|thumb|256x256px|Y-axis layout. {{TODO|Replace with correct example - see chr_draw_char() routine below.}}]]&lt;br /&gt;
The Y values for each character are stored in a unique manner. Characters are drawn relative to the baseline, but, rather than put the baseline at 0, the half above the baseline starts at 64 and decreases toward 0 as you move away from the baseline, while the half below the baseline starts at -64 and increases toward -1. See the diagram to the right.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
=== Draw Stroke Data ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Copyright 2024 CTPAX-X Team&lt;br /&gt;
This source code licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;):&lt;br /&gt;
https://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
/* draws a character:&lt;br /&gt;
x, y - initial screen positon&lt;br /&gt;
b - buffer pointer to a Stroke Data for character */&lt;br /&gt;
void chr_draw_char(int x, int y, unsigned char *b) {&lt;br /&gt;
char m, dx, dy;&lt;br /&gt;
int xc, yc;&lt;br /&gt;
  /* initial position according to Stroke Header */&lt;br /&gt;
  y += origin_to_ascender - origin_to_descender;&lt;br /&gt;
  xc = x;&lt;br /&gt;
  yc = y;&lt;br /&gt;
  moveto(xc, yc);&lt;br /&gt;
  do {&lt;br /&gt;
    /* get mask */&lt;br /&gt;
    m = b[0] &amp;gt;&amp;gt; 7;&lt;br /&gt;
    m += m + (b[1] &amp;gt;&amp;gt; 7);&lt;br /&gt;
    /* 0 - stop; 1 - scan; 2 - move; 3 - draw */&lt;br /&gt;
    if (m &amp;gt; 1) {&lt;br /&gt;
      /* bit arithmetic (note dx/dy signed 8 bit type):&lt;br /&gt;
      if sign bit is set - expand to full signed value */&lt;br /&gt;
      dx = (b[0] &amp;amp; 0x7F) | ((b[0] &amp;amp; 0x40) &amp;lt;&amp;lt; 1);&lt;br /&gt;
      dy = (b[1] &amp;amp; 0x7F) | ((b[1] &amp;amp; 0x40) &amp;lt;&amp;lt; 1);&lt;br /&gt;
      dy = -dy;&lt;br /&gt;
      /* dx/dy relative to initial screen positon */&lt;br /&gt;
      xc = x + dx;&lt;br /&gt;
      yc = y + dy;&lt;br /&gt;
      if (m == 2) {&lt;br /&gt;
        moveto(xc, yc);&lt;br /&gt;
      } else {&lt;br /&gt;
        lineto(xc, yc);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    /* next byte pair */&lt;br /&gt;
    b += 2;&lt;br /&gt;
  } while (m);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Shape Viewer ===&lt;br /&gt;
This FreeBASIC program will draw all of the characters in the specified font, and give details about the font.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;freebasic&amp;quot;&amp;gt;&lt;br /&gt;
ScreenRes 1000, 800, 32&lt;br /&gt;
&lt;br /&gt;
&#039; Open the font file.&lt;br /&gt;
Open &amp;quot;SANS.CHR&amp;quot; For Binary As #1&lt;br /&gt;
&lt;br /&gt;
&#039; Verify the signature.&lt;br /&gt;
Dim As String Check&lt;br /&gt;
Check = Space(4)&lt;br /&gt;
Get #1, , Check&lt;br /&gt;
If Check &amp;lt;&amp;gt; &amp;quot;PK&amp;quot; + Chr(8) + Chr(8) Then&lt;br /&gt;
	Print &amp;quot;Not a Borland CHR font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the Description&lt;br /&gt;
Dim As UByte Buffer&lt;br /&gt;
Dim As String Description&lt;br /&gt;
Do&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
	If Buffer &amp;lt;&amp;gt; &amp;amp;h1A Then&lt;br /&gt;
		Description = Description + Chr(Buffer)&lt;br /&gt;
	End If&lt;br /&gt;
Loop Until Buffer = &amp;amp;h1A&lt;br /&gt;
&lt;br /&gt;
&#039; Load the header size.&lt;br /&gt;
Dim As UShort HeaderSize&lt;br /&gt;
Get #1, , HeaderSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font id.&lt;br /&gt;
Dim As String FontId&lt;br /&gt;
FontId = Space(4)&lt;br /&gt;
Get #1, , FontId&lt;br /&gt;
&lt;br /&gt;
&#039; Load the data file size. (HeaderSize + DataSize should match the size of the file.)&lt;br /&gt;
Dim As UShort DataSize&lt;br /&gt;
Get #1, , DataSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font version number.&lt;br /&gt;
Dim As UShort FontMajorVersion&lt;br /&gt;
Get #1, , FontMajorVersion&lt;br /&gt;
Dim As UShort FontMinorVersion&lt;br /&gt;
Get #1, , FontMinorVersion&lt;br /&gt;
&lt;br /&gt;
&#039; Jump to the end of the header. The rest should be nulls anyway.&lt;br /&gt;
Get #1, HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Verify this is a BGI Stroked Font.&lt;br /&gt;
Dim As String StrokedFontCheck&lt;br /&gt;
StrokedFontCheck = Space(1)&lt;br /&gt;
Get #1, , StrokedFontCheck&lt;br /&gt;
If StrokedFontCheck &amp;lt;&amp;gt; &amp;quot;+&amp;quot; Then&lt;br /&gt;
	Print &amp;quot;Not a stroked font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the number of characters.&lt;br /&gt;
Dim As UShort CharacterCount&lt;br /&gt;
Get #1, , CharacterCount&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the starting charcter. This is the first character id to have a glyph associated to it.&lt;br /&gt;
Dim As UByte StartingChar&lt;br /&gt;
Get #1, , StartingChar&lt;br /&gt;
&lt;br /&gt;
&#039; Load the file offset where the stroke definitions begin.&lt;br /&gt;
Dim As UShort StrokeDefinitionOffset&lt;br /&gt;
Get #1, , StrokeDefinitionOffset&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the top of the capital letters.&lt;br /&gt;
Dim As Byte OriginToCapital&lt;br /&gt;
Get #1, , OriginToCapital&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the baseline.&lt;br /&gt;
Dim As Byte OriginToBaseline&lt;br /&gt;
Get #1, , OriginToBaseline&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the bottom of the descenders.&lt;br /&gt;
Dim As Byte OriginToDescender&lt;br /&gt;
Get #1, , OriginToDescender&lt;br /&gt;
&lt;br /&gt;
&#039; Skip remaining nulls.&lt;br /&gt;
Dim As Integer I&lt;br /&gt;
For I = 0 To 4&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load offset to characters definitions.&lt;br /&gt;
Dim As UShort CharacterDefinitionOffset(StartingChar To (StartingChar + CharacterCount) - 1)&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount) - 1&lt;br /&gt;
	Get #1, , CharacterDefinitionOffset(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load character widths.&lt;br /&gt;
Dim As UByte CharacterWidths(StartingChar To (StartingChar + CharacterCount) - 1)&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount) - 1&lt;br /&gt;
	Get #1, , CharacterWidths(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Dim As Integer CharacterHeight = OriginToCapital + (OriginToDescender * -1)&lt;br /&gt;
&lt;br /&gt;
Print &amp;quot;Font Id: &amp;quot;; FontId&lt;br /&gt;
Print &amp;quot;Description: &amp;quot;; Description&lt;br /&gt;
Print &amp;quot;Total Character Height: &amp;quot;; CharacterHeight&lt;br /&gt;
Print &amp;quot;Max Ascender: &amp;quot;; OriginToCapital&lt;br /&gt;
Print &amp;quot;Max Descender: &amp;quot;; OriginToDescender&lt;br /&gt;
Print &amp;quot;Total Characters: &amp;quot;; CharacterCount&lt;br /&gt;
Print &amp;quot;Starting Character: 0x&amp;quot;; Hex(StartingChar)&lt;br /&gt;
&lt;br /&gt;
Dim As UByte XByte, YByte, Finished&lt;br /&gt;
Dim As Integer XCurrent, YCurrent, XStart, YStart, XBuffer, YBuffer&lt;br /&gt;
Dim As Byte XNew, YNew, XOpcode, YOpcode, XSign, YSign&lt;br /&gt;
&lt;br /&gt;
XStart = 10&lt;br /&gt;
YStart = 130&lt;br /&gt;
XBuffer = 5&lt;br /&gt;
YBuffer = 10&lt;br /&gt;
&lt;br /&gt;
For I = StartingChar To (CharacterCount - StartingChar) - 1&lt;br /&gt;
	&#039; Jump to the starting offset of this character.&lt;br /&gt;
	Get #1, CharacterDefinitionOffset(I) + StrokeDefinitionOffset + HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
	&#039; Load all of the drawing instructions and draw the character.&lt;br /&gt;
	Finished = 0&lt;br /&gt;
	Do&lt;br /&gt;
		&#039; Load the opcode/values. Two bytes, one for X, the other for Y.&lt;br /&gt;
		&#039; 7 6 543210&lt;br /&gt;
		&#039; ^ ^ ^&lt;br /&gt;
		&#039; | | +------ Start of 6-bit number.&lt;br /&gt;
		&#039; | +-------- Sign bit for number.&lt;br /&gt;
		&#039; +---------- Opcode bit.&lt;br /&gt;
		&lt;br /&gt;
		Get #1, , XByte		&#039; First opcode and X value.&lt;br /&gt;
		Get #1, , YByte		&#039; Second opcode and Y value.&lt;br /&gt;
&lt;br /&gt;
		&#039; Read the opcode and sign bits.&lt;br /&gt;
		XOpcode = Bit(XByte, 7)&lt;br /&gt;
		YOpcode = Bit(YByte, 7)&lt;br /&gt;
		XSign = Bit(XByte, 6)&lt;br /&gt;
		YSign = Bit(YByte, 6)&lt;br /&gt;
&lt;br /&gt;
		&#039; Clear the opcode bits and the sign bits.&lt;br /&gt;
		XByte = BitReset(XByte, 7)&lt;br /&gt;
		XByte = BitReset(XByte, 6)&lt;br /&gt;
		YByte = BitReset(YByte, 7)&lt;br /&gt;
		YByte = BitReset(YByte, 6)&lt;br /&gt;
&lt;br /&gt;
		XNew = XByte&lt;br /&gt;
		YNew = YByte&lt;br /&gt;
&lt;br /&gt;
		&#039; Set the values to negative if the signed bits are on.&lt;br /&gt;
		If XSign = True Then&lt;br /&gt;
			XNew = XNew * -1&lt;br /&gt;
		End If&lt;br /&gt;
		If YSign = True Then&lt;br /&gt;
			YNew = (64 - YNew)		&#039; Normalize the descender&#039;s value.&lt;br /&gt;
			YNew = YNew * -1&lt;br /&gt;
		End If&lt;br /&gt;
&lt;br /&gt;
		&#039; Normalize the Y position.&lt;br /&gt;
		YNew = (64 - YNew)&lt;br /&gt;
&lt;br /&gt;
		If XOpcode = 0 Then&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; End of character definition. Move to the next character.&lt;br /&gt;
				XStart = XStart + CharacterWidths(I) + XBuffer&lt;br /&gt;
				If XStart &amp;gt; 950 Then&lt;br /&gt;
					XStart = 10&lt;br /&gt;
					YStart = YStart + CharacterHeight + YBuffer&lt;br /&gt;
				End If&lt;br /&gt;
				Finished = 1&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Not sure what this is for. It&#039;s only used in the BOLD font when a character has &lt;br /&gt;
				&#039; multiple separate objects like with the colon and equal sign. However, not all &lt;br /&gt;
				&#039; characters with broken up objects in the font use it, and leaving it out doesn&#039;t &lt;br /&gt;
				&#039; appear to mess up the drawing at all.&lt;br /&gt;
			End If&lt;br /&gt;
		Else&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; Move Pointer to X, Y.&lt;br /&gt;
				&#039; This happens below since both move and draw must change the position.&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Draw From Current Pointer to new X, Y.&lt;br /&gt;
				Line(XCurrent, YCurrent)-(XStart + XNew, YStart + YNew), RGB(255, 255, 255)&lt;br /&gt;
			End If&lt;br /&gt;
&lt;br /&gt;
			XCurrent = XStart + XNew&lt;br /&gt;
			YCurrent = YStart + YNew&lt;br /&gt;
		End If&lt;br /&gt;
	Loop Until Finished = 1&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Sleep&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
{{BeginFileFormatTools|Type=image}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland/bgifont.zip FE Stroke Font Editor]&lt;br /&gt;
| Platform = DOS&lt;br /&gt;
| canView = Yes&lt;br /&gt;
| canExport = Yes&lt;br /&gt;
| canImport = Yes&lt;br /&gt;
| editHidden = No&lt;br /&gt;
| editMetadata = Yes&lt;br /&gt;
| notes = Borland&#039;s in-house font Stroked Font editor.&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
This format was reverse engineered by [[User:TheAlmightyGuru|TheAlmightyGuru]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland] - Various tools for BGI fonts.&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11730</id>
		<title>BGI Stroked Font</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11730"/>
		<updated>2024-02-16T15:56:53Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Header */ corrections&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Font Infobox&lt;br /&gt;
 | MaxGlyphs = 32,767&lt;br /&gt;
 | GlyphMinSize = Unlimited&lt;br /&gt;
 | GlyphMaxSize = Unlimited&lt;br /&gt;
 | Access = Indexed&lt;br /&gt;
 | Bitmap = N&lt;br /&gt;
 | Vector = Y&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Hidden = Y&lt;br /&gt;
 | Metadata = ID, Description&lt;br /&gt;
 | Games =&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;BGI Stroked Font&#039;&#039;&#039; is a vector font created by Borland to work with their 1987 graphics API, [[Borland Graphics Interface]]. Since the format stores vector fonts, it can easily be scaled in size with little loss of fidelity. However, because the format only supports lines and not curves, scaling to larger sizes will make the characters look jagged. The font files typically have a *.CHR file extension.&lt;br /&gt;
&lt;br /&gt;
After 1987, Borland&#039;s C and Pascal programming languages shipped with 10 different BGI Stroked Fonts: Bold, Euro, Goth, Lcom, Litt, Sans, Scri, Simp, Trip, and Tscr. Due to the popularity of Borland&#039;s programming languages, and their graphic API, BGI Stroked Fonts were used in hundreds of DOS video games.&lt;br /&gt;
&lt;br /&gt;
The designers of the file format unfortunately used a file signature starting with &amp;quot;PK&amp;quot; which would later be used by PK Zip, so BGI Stroked Font files, despite having an extension of CHR, might be misidentified as zip archives if the identifier doesn&#039;t take into account the full PK Zip signature.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
=== Header ===&lt;br /&gt;
The header includes the font&#039;s name, version number, and description.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][2] || Signature || Must be 0x50 0x4B (&amp;quot;PK&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Description || User text. Borland&#039;s official fonts start with &amp;quot;BGI Stroked Font&amp;quot; with two 0x08 characters before to hide font file signature in case of use DOS &amp;quot;type&amp;quot; command on font file, then the version number, and ends with a copyright. The description is terminated with byte 0x1A which Borland font loader code search in first 256 bytes of the file (including two bytes of Signature above). In other words this field size can be from 0 (zero - no copyright text at all) to 253 bytes long (256 - 3).&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Header Start || Must be 0x1A.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Header Size || The size, in bytes, of the entire header.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || A 4-character font internal name.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Font Size || The size of the font&#039;s data block. The Header Size + Data Size should be the size of the file. Note that user-made fonts may have incorrect size here (for example less than it should be).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Major || Driver Version Information major number. Must be 1 (Borland font loader also accepts anything bigger but not 0, i.e. valid if &amp;quot;value &amp;gt;= 1&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Minor || Driver Version Information minor number. Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Major || BGI Revision Information major number. Must be 1 (Borland font loader also accepts 0 but halts on anything bigger than 1, i.e. valid if &amp;quot;value &amp;lt;= 1&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Minor || BGI Revision Information minor number. Ignored, should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Padding || The rest of the header should be padded out to nulls based on the Header Size. All official Borland fonts use a header size of 0x80 (note that font editors may not work with fonts with different header size).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Stroke Header ===&lt;br /&gt;
This section contains general information about the font including how many characters are represented, the top of the highest ascender, bottom of the lowest descender, baseline, where in the file to find each character&#039;s instructions, and the width of each character.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Stroke Check || Must be 0x2B. Indicates this is a stroked font.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Character Count || Number of total characters stored in this font.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Starting Character || The index of the first character to have a glyph associated with it.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Strokes Offset || The file offset where stroke definitions begin relative from the start of this header.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Scan Flag || {{TODO|Borland&#039;s documentation calls this the &amp;quot;scan flag&amp;quot;, but doesn&#039;t explain what it is for (&amp;quot;set to 1 if set is scanable&amp;quot;).}}&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Ascender || The distance from the origin to the font&#039;s highest point.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Baseline || The distance from the origin to the font&#039;s baseline (typically 0).&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Descender || The distance from the origin to the font&#039;s lowest point. Note, you can derive the total character height by getting the distance from the Ascender to Descender.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || Borland&#039;s own documentation says &amp;quot;four character name of font&amp;quot;, but it&#039;s always all zero.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]][Character Count] || Character Stroke Offsets || An array of the offset to the stroke definitions for each character. To get the position in the file, you must add the Header Size and the Strokes Offset to this value.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][Character Count] || Character Widths || The unscaled width of each character.&lt;br /&gt;
|-&lt;br /&gt;
| Stroke Data || Character strokes || The stroke instructions for each character. See below for how to interpret them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Stroke Data ===&lt;br /&gt;
This section contains the actual instructions for drawing individual characters.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || X Instruction || Instructions for drawing the character and an X value.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || Y Instruction || Instructions for drawing the character and a Y value.&lt;br /&gt;
|-&lt;br /&gt;
| ... || Several possible instruction pairs per character.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Encoded in each two byte pair is a single stroke instruction, and an X and Y value. The most-significant bit in each byte is an opcode, the next seven bits represent a signed value. The first byte is the X value, the second byte is the Y value. See the diagram below.&lt;br /&gt;
&lt;br /&gt;
 7 6 543210 &lt;br /&gt;
 ^ ^ ^&lt;br /&gt;
 | | +----------- 6-Bit number.&lt;br /&gt;
 | +------------- Sign bit for number.&lt;br /&gt;
 +--------------- Opcode.&lt;br /&gt;
&lt;br /&gt;
The two opcodes determine the instruction.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Code 1 !! Code 2 !! Instruction&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || End of character stroke definition.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || Borland&#039;s documentation has this labeled as &amp;quot;do scan,&amp;quot; implying it&#039;s related to the Scan Flag. It&#039;s only used in their BOLD font on characters with multiple objects like the colon and equals sign. It doesn&#039;t appear to affect how the character is drawn. Borland font rendering code silently ignores this - checked in Turbo Pascal 7.1 (1997) and in Turbo C 2.01 (1988). {{TODO|More info is needed.}}&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || Move plotter to the specified X and Y coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || Draw a line from the previous X and Y coordinates and move plotter to the new X and Y coordinates.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Character Layout ==&lt;br /&gt;
[[Image:BGI Stroked Font - Layout Diagram.png|thumb|256x256px|Y-axis layout.]]&lt;br /&gt;
The Y values for each character are stored in a unique manner. Characters are drawn relative to the baseline, but, rather than put the baseline at 0, the half above the baseline starts at 64 and decreases toward 0 as you move away from the baseline, while the half below the baseline starts at -64 and increases toward -1. See the diagram to the right.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
=== Shape Viewer ===&lt;br /&gt;
This FreeBASIC program will draw all of the characters in the specified font, and give details about the font.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;freebasic&amp;quot;&amp;gt;&lt;br /&gt;
ScreenRes 1000, 800, 32&lt;br /&gt;
&lt;br /&gt;
&#039; Open the font file.&lt;br /&gt;
Open &amp;quot;SANS.CHR&amp;quot; For Binary As #1&lt;br /&gt;
&lt;br /&gt;
&#039; Verify the signature.&lt;br /&gt;
Dim As String Check&lt;br /&gt;
Check = Space(4)&lt;br /&gt;
Get #1, , Check&lt;br /&gt;
If Check &amp;lt;&amp;gt; &amp;quot;PK&amp;quot; + Chr(8) + Chr(8) Then&lt;br /&gt;
	Print &amp;quot;Not a Borland CHR font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the Description&lt;br /&gt;
Dim As UByte Buffer&lt;br /&gt;
Dim As String Description&lt;br /&gt;
Do&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
	If Buffer &amp;lt;&amp;gt; &amp;amp;h1A Then&lt;br /&gt;
		Description = Description + Chr(Buffer)&lt;br /&gt;
	End If&lt;br /&gt;
Loop Until Buffer = &amp;amp;h1A&lt;br /&gt;
&lt;br /&gt;
&#039; Load the header size.&lt;br /&gt;
Dim As UShort HeaderSize&lt;br /&gt;
Get #1, , HeaderSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font id.&lt;br /&gt;
Dim As String FontId&lt;br /&gt;
FontId = Space(4)&lt;br /&gt;
Get #1, , FontId&lt;br /&gt;
&lt;br /&gt;
&#039; Load the data file size. (HeaderSize + DataSize should match the size of the file.)&lt;br /&gt;
Dim As UShort DataSize&lt;br /&gt;
Get #1, , DataSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font version number.&lt;br /&gt;
Dim As UShort FontMajorVersion&lt;br /&gt;
Get #1, , FontMajorVersion&lt;br /&gt;
Dim As UShort FontMinorVersion&lt;br /&gt;
Get #1, , FontMinorVersion&lt;br /&gt;
&lt;br /&gt;
&#039; Jump to the end of the header. The rest should be nulls anyway.&lt;br /&gt;
Get #1, HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Verify this is a BGI Stroked Font.&lt;br /&gt;
Dim As String StrokedFontCheck&lt;br /&gt;
StrokedFontCheck = Space(1)&lt;br /&gt;
Get #1, , StrokedFontCheck&lt;br /&gt;
If StrokedFontCheck &amp;lt;&amp;gt; &amp;quot;+&amp;quot; Then&lt;br /&gt;
	Print &amp;quot;Not a stroked font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the number of characters.&lt;br /&gt;
Dim As UShort CharacterCount&lt;br /&gt;
Get #1, , CharacterCount&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the starting charcter. This is the first character id to have a glyph associated to it.&lt;br /&gt;
Dim As UByte StartingChar&lt;br /&gt;
Get #1, , StartingChar&lt;br /&gt;
&lt;br /&gt;
&#039; Load the file offset where the stroke definitions begin.&lt;br /&gt;
Dim As UShort StrokeDefinitionOffset&lt;br /&gt;
Get #1, , StrokeDefinitionOffset&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the top of the capital letters.&lt;br /&gt;
Dim As Byte OriginToCapital&lt;br /&gt;
Get #1, , OriginToCapital&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the baseline.&lt;br /&gt;
Dim As Byte OriginToBaseline&lt;br /&gt;
Get #1, , OriginToBaseline&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the bottom of the descenders.&lt;br /&gt;
Dim As Byte OriginToDescender&lt;br /&gt;
Get #1, , OriginToDescender&lt;br /&gt;
&lt;br /&gt;
&#039; Skip remaining nulls.&lt;br /&gt;
Dim As Integer I&lt;br /&gt;
For I = 0 To 4&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load offset to characters definitions.&lt;br /&gt;
Dim As UShort CharacterDefinitionOffset(StartingChar To (StartingChar + CharacterCount) - 1)&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount) - 1&lt;br /&gt;
	Get #1, , CharacterDefinitionOffset(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load character widths.&lt;br /&gt;
Dim As UByte CharacterWidths(StartingChar To (StartingChar + CharacterCount) - 1)&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount) - 1&lt;br /&gt;
	Get #1, , CharacterWidths(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Dim As Integer CharacterHeight = OriginToCapital + (OriginToDescender * -1)&lt;br /&gt;
&lt;br /&gt;
Print &amp;quot;Font Id: &amp;quot;; FontId&lt;br /&gt;
Print &amp;quot;Description: &amp;quot;; Description&lt;br /&gt;
Print &amp;quot;Total Character Height: &amp;quot;; CharacterHeight&lt;br /&gt;
Print &amp;quot;Max Ascender: &amp;quot;; OriginToCapital&lt;br /&gt;
Print &amp;quot;Max Descender: &amp;quot;; OriginToDescender&lt;br /&gt;
Print &amp;quot;Total Characters: &amp;quot;; CharacterCount&lt;br /&gt;
Print &amp;quot;Starting Character: 0x&amp;quot;; Hex(StartingChar)&lt;br /&gt;
&lt;br /&gt;
Dim As UByte XByte, YByte, Finished&lt;br /&gt;
Dim As Integer XCurrent, YCurrent, XStart, YStart, XBuffer, YBuffer&lt;br /&gt;
Dim As Byte XNew, YNew, XOpcode, YOpcode, XSign, YSign&lt;br /&gt;
&lt;br /&gt;
XStart = 10&lt;br /&gt;
YStart = 130&lt;br /&gt;
XBuffer = 5&lt;br /&gt;
YBuffer = 10&lt;br /&gt;
&lt;br /&gt;
For I = StartingChar To (CharacterCount - StartingChar) - 1&lt;br /&gt;
	&#039; Jump to the starting offset of this character.&lt;br /&gt;
	Get #1, CharacterDefinitionOffset(I) + StrokeDefinitionOffset + HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
	&#039; Load all of the drawing instructions and draw the character.&lt;br /&gt;
	Finished = 0&lt;br /&gt;
	Do&lt;br /&gt;
		&#039; Load the opcode/values. Two bytes, one for X, the other for Y.&lt;br /&gt;
		&#039; 7 6 543210&lt;br /&gt;
		&#039; ^ ^ ^&lt;br /&gt;
		&#039; | | +------ Start of 6-bit number.&lt;br /&gt;
		&#039; | +-------- Sign bit for number.&lt;br /&gt;
		&#039; +---------- Opcode bit.&lt;br /&gt;
		&lt;br /&gt;
		Get #1, , XByte		&#039; First opcode and X value.&lt;br /&gt;
		Get #1, , YByte		&#039; Second opcode and Y value.&lt;br /&gt;
&lt;br /&gt;
		&#039; Read the opcode and sign bits.&lt;br /&gt;
		XOpcode = Bit(XByte, 7)&lt;br /&gt;
		YOpcode = Bit(YByte, 7)&lt;br /&gt;
		XSign = Bit(XByte, 6)&lt;br /&gt;
		YSign = Bit(YByte, 6)&lt;br /&gt;
&lt;br /&gt;
		&#039; Clear the opcode bits and the sign bits.&lt;br /&gt;
		XByte = BitReset(XByte, 7)&lt;br /&gt;
		XByte = BitReset(XByte, 6)&lt;br /&gt;
		YByte = BitReset(YByte, 7)&lt;br /&gt;
		YByte = BitReset(YByte, 6)&lt;br /&gt;
&lt;br /&gt;
		XNew = XByte&lt;br /&gt;
		YNew = YByte&lt;br /&gt;
&lt;br /&gt;
		&#039; Set the values to negative if the signed bits are on.&lt;br /&gt;
		If XSign = True Then&lt;br /&gt;
			XNew = XNew * -1&lt;br /&gt;
		End If&lt;br /&gt;
		If YSign = True Then&lt;br /&gt;
			YNew = (64 - YNew)		&#039; Normalize the descender&#039;s value.&lt;br /&gt;
			YNew = YNew * -1&lt;br /&gt;
		End If&lt;br /&gt;
&lt;br /&gt;
		&#039; Normalize the Y position.&lt;br /&gt;
		YNew = (64 - YNew)&lt;br /&gt;
&lt;br /&gt;
		If XOpcode = 0 Then&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; End of character definition. Move to the next character.&lt;br /&gt;
				XStart = XStart + CharacterWidths(I) + XBuffer&lt;br /&gt;
				If XStart &amp;gt; 950 Then&lt;br /&gt;
					XStart = 10&lt;br /&gt;
					YStart = YStart + CharacterHeight + YBuffer&lt;br /&gt;
				End If&lt;br /&gt;
				Finished = 1&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Not sure what this is for. It&#039;s only used in the BOLD font when a character has &lt;br /&gt;
				&#039; multiple separate objects like with the colon and equal sign. However, not all &lt;br /&gt;
				&#039; characters with broken up objects in the font use it, and leaving it out doesn&#039;t &lt;br /&gt;
				&#039; appear to mess up the drawing at all.&lt;br /&gt;
			End If&lt;br /&gt;
		Else&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; Move Pointer to X, Y.&lt;br /&gt;
				&#039; This happens below since both move and draw must change the position.&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Draw From Current Pointer to new X, Y.&lt;br /&gt;
				Line(XCurrent, YCurrent)-(XStart + XNew, YStart + YNew), RGB(255, 255, 255)&lt;br /&gt;
			End If&lt;br /&gt;
&lt;br /&gt;
			XCurrent = XStart + XNew&lt;br /&gt;
			YCurrent = YStart + YNew&lt;br /&gt;
		End If&lt;br /&gt;
	Loop Until Finished = 1&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Sleep&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
{{BeginFileFormatTools|Type=image}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland/bgifont.zip FE Stroke Font Editor]&lt;br /&gt;
| Platform = DOS&lt;br /&gt;
| canView = Yes&lt;br /&gt;
| canExport = Yes&lt;br /&gt;
| canImport = Yes&lt;br /&gt;
| editHidden = No&lt;br /&gt;
| editMetadata = Yes&lt;br /&gt;
| notes = Borland&#039;s in-house font Stroked Font editor.&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
This format was reverse engineered by [[User:TheAlmightyGuru|TheAlmightyGuru]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland] - Various tools for BGI fonts.&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11729</id>
		<title>BGI Stroked Font</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=BGI_Stroked_Font&amp;diff=11729"/>
		<updated>2024-02-16T14:28:33Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Format */ according Borland disassembled font loader and official FONT.H sample&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Font Infobox&lt;br /&gt;
 | MaxGlyphs = 32,767&lt;br /&gt;
 | GlyphMinSize = Unlimited&lt;br /&gt;
 | GlyphMaxSize = Unlimited&lt;br /&gt;
 | Access = Indexed&lt;br /&gt;
 | Bitmap = N&lt;br /&gt;
 | Vector = Y&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Hidden = Y&lt;br /&gt;
 | Metadata = ID, Description&lt;br /&gt;
 | Games =&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;BGI Stroked Font&#039;&#039;&#039; is a vector font created by Borland to work with their 1987 graphics API, [[Borland Graphics Interface]]. Since the format stores vector fonts, it can easily be scaled in size with little loss of fidelity. However, because the format only supports lines and not curves, scaling to larger sizes will make the characters look jagged. The font files typically have a *.CHR file extension.&lt;br /&gt;
&lt;br /&gt;
After 1987, Borland&#039;s C and Pascal programming languages shipped with 10 different BGI Stroked Fonts: Bold, Euro, Goth, Lcom, Litt, Sans, Scri, Simp, Trip, and Tscr. Due to the popularity of Borland&#039;s programming languages, and their graphic API, BGI Stroked Fonts were used in hundreds of DOS video games.&lt;br /&gt;
&lt;br /&gt;
The designers of the file format unfortunately used a file signature starting with &amp;quot;PK&amp;quot; which would later be used by PK Zip, so BGI Stroked Font files, despite having an extension of CHR, might be misidentified as zip archives if the identifier doesn&#039;t take into account the full PK Zip signature.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
=== Header ===&lt;br /&gt;
The header includes the font&#039;s id, version number, and description.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][2] || Signature || Must be 0x50 0x4B.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Description || User text. Borland&#039;s official fonts start with &amp;quot;BGI Stroked Font&amp;quot; with two 0x08 characters before to hide font file signature in case of use DOS &amp;quot;type&amp;quot; command on font file, then the version number, and ends with a copyright. The description is terminated with byte 0x1A which Borland font loader code search in first 256 bytes of the file (including two bytes of Signature above). In other words this field size can be from 0 (zero - no copyright text at all) to 253 bytes long (256 - 3).&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Header Start || Must be 0x1A.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Header Size || The size, in bytes, of the entire header.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || A 4-character font internal name.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Font Size || The size of the font&#039;s data block. The Header Size + Data Size should be the size of the file. Note that user made fonts may have incorrect size here (for example less than it should be).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Major || Driver Version Information. Must be at least 1 (Borland font loader accepts bigger numbers, but not zero).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Font Minor || Driver Version Information. Should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Major || BGI Revision Information. Should be 1.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Revision Minor || BGI Revision Information. Should be 0.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...] || Padding || The rest of the header should be padded out to nulls based on the Header Size. All official Borland fonts use a header size of 0x80 (note that font editors may not work with fonts with different header size).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Stroke Header ===&lt;br /&gt;
This section contains general information about the font including how many characters are represented, the top of the highest ascender, bottom of the lowest descender, baseline, where in the file to find each character&#039;s instructions, and the width of each character.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Stroke Check || Must be 0x2B. Indicates this is a stroked font.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Character Count || Number of total characters stored in this font.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Starting Character || The index of the first character to have a glyph associated with it.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || Strokes Offset || The file offset where stroke definitions begin relative from the start of this header.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Scan Flag || {{TODO|Borland&#039;s documentation calls this the &amp;quot;scan flag&amp;quot;, but doesn&#039;t explain what it is for (&amp;quot;set to 1 if set is scanable&amp;quot;).}}&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Ascender || The distance from the origin to the font&#039;s highest point.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Baseline || The distance from the origin to the font&#039;s baseline (typically 0).&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]] || Origin to Descender || The distance from the origin to the font&#039;s lowest point. Note, you can derive the total character height by getting the distance from the Ascender to Descender.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4] || Font Name || Borland&#039;s own documentation says &amp;quot;four character name of font&amp;quot;, but it&#039;s always all zero.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]] || Undefined || Borland&#039;s own documentation labels this as &amp;quot;undefined&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]][Character Count] || Character Stroke Offsets || An array of the offset to the stroke definitions for each character. To get the position in the file, you must add the Header Size and the Strokes Offset to this value.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT8]][Character Count] || Character Widths || The unscaled width of each character.&lt;br /&gt;
|-&lt;br /&gt;
| Stroke Data || Character strokes || The stroke instructions for each character. See below for how to interpret them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Stroke Data ===&lt;br /&gt;
This section contains the actual instructions for drawing individual characters.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || X Instruction || Instructions for drawing the character and an X value.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || Y Instruction || Instructions for drawing the character and a Y value.&lt;br /&gt;
|-&lt;br /&gt;
| ... || Several possible instruction pairs per character.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Encoded in each two byte pair is a single stroke instruction, and an X and Y value. The most-significant bit in each byte is an opcode, the next seven bits represent a signed value. The first byte is the X value, the second byte is the Y value. See the diagram below.&lt;br /&gt;
&lt;br /&gt;
 7 6 543210 &lt;br /&gt;
 ^ ^ ^&lt;br /&gt;
 | | +----------- 6-Bit number.&lt;br /&gt;
 | +------------- Sign bit for number.&lt;br /&gt;
 +--------------- Opcode.&lt;br /&gt;
&lt;br /&gt;
The two opcodes determine the instruction.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Code 1 !! Code 2 !! Instruction&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || End of character stroke definition.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || Borland&#039;s documentation has this labeled as &amp;quot;do scan,&amp;quot; implying it&#039;s related to the Scan Flag. It&#039;s only used in their BOLD font on characters with multiple objects like the colon and equals sign. It doesn&#039;t appear to affect how the character is drawn. Borland font rendering code silently ignores this - checked in Turbo Pascal 7.1 (1997) and in Turbo C 2.01 (1988). {{TODO|More info is needed.}}&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || Move plotter to the specified X and Y coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || Draw a line from the previous X and Y coordinates and move plotter to the new X and Y coordinates.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Character Layout ==&lt;br /&gt;
[[Image:BGI Stroked Font - Layout Diagram.png|thumb|256x256px|Y-axis layout.]]&lt;br /&gt;
The Y values for each character are stored in a unique manner. Characters are drawn relative to the baseline, but, rather than put the baseline at 0, the half above the baseline starts at 64 and decreases toward 0 as you move away from the baseline, while the half below the baseline starts at -64 and increases toward -1. See the diagram to the right.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
=== Shape Viewer ===&lt;br /&gt;
This FreeBASIC program will draw all of the characters in the specified font, and give details about the font.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;freebasic&amp;quot;&amp;gt;&lt;br /&gt;
ScreenRes 1000, 800, 32&lt;br /&gt;
&lt;br /&gt;
&#039; Open the font file.&lt;br /&gt;
Open &amp;quot;SANS.CHR&amp;quot; For Binary As #1&lt;br /&gt;
&lt;br /&gt;
&#039; Verify the signature.&lt;br /&gt;
Dim As String Check&lt;br /&gt;
Check = Space(4)&lt;br /&gt;
Get #1, , Check&lt;br /&gt;
If Check &amp;lt;&amp;gt; &amp;quot;PK&amp;quot; + Chr(8) + Chr(8) Then&lt;br /&gt;
	Print &amp;quot;Not a Borland CHR font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the Description&lt;br /&gt;
Dim As UByte Buffer&lt;br /&gt;
Dim As String Description&lt;br /&gt;
Do&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
	If Buffer &amp;lt;&amp;gt; &amp;amp;h1A Then&lt;br /&gt;
		Description = Description + Chr(Buffer)&lt;br /&gt;
	End If&lt;br /&gt;
Loop Until Buffer = &amp;amp;h1A&lt;br /&gt;
&lt;br /&gt;
&#039; Load the header size.&lt;br /&gt;
Dim As UShort HeaderSize&lt;br /&gt;
Get #1, , HeaderSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font id.&lt;br /&gt;
Dim As String FontId&lt;br /&gt;
FontId = Space(4)&lt;br /&gt;
Get #1, , FontId&lt;br /&gt;
&lt;br /&gt;
&#039; Load the data file size. (HeaderSize + DataSize should match the size of the file.)&lt;br /&gt;
Dim As UShort DataSize&lt;br /&gt;
Get #1, , DataSize&lt;br /&gt;
&lt;br /&gt;
&#039; Load the font version number.&lt;br /&gt;
Dim As UShort FontMajorVersion&lt;br /&gt;
Get #1, , FontMajorVersion&lt;br /&gt;
Dim As UShort FontMinorVersion&lt;br /&gt;
Get #1, , FontMinorVersion&lt;br /&gt;
&lt;br /&gt;
&#039; Jump to the end of the header. The rest should be nulls anyway.&lt;br /&gt;
Get #1, HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Verify this is a BGI Stroked Font.&lt;br /&gt;
Dim As String StrokedFontCheck&lt;br /&gt;
StrokedFontCheck = Space(1)&lt;br /&gt;
Get #1, , StrokedFontCheck&lt;br /&gt;
If StrokedFontCheck &amp;lt;&amp;gt; &amp;quot;+&amp;quot; Then&lt;br /&gt;
	Print &amp;quot;Not a stroked font.&amp;quot;&lt;br /&gt;
	End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039; Load the number of characters.&lt;br /&gt;
Dim As UShort CharacterCount&lt;br /&gt;
Get #1, , CharacterCount&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the starting charcter. This is the first character id to have a glyph associated to it.&lt;br /&gt;
Dim As UByte StartingChar&lt;br /&gt;
Get #1, , StartingChar&lt;br /&gt;
&lt;br /&gt;
&#039; Load the file offset where the stroke definitions begin.&lt;br /&gt;
Dim As UShort StrokeDefinitionOffset&lt;br /&gt;
Get #1, , StrokeDefinitionOffset&lt;br /&gt;
&lt;br /&gt;
&#039; Skip an unknown byte.&lt;br /&gt;
Get #1, , Buffer&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the top of the capital letters.&lt;br /&gt;
Dim As Byte OriginToCapital&lt;br /&gt;
Get #1, , OriginToCapital&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the baseline.&lt;br /&gt;
Dim As Byte OriginToBaseline&lt;br /&gt;
Get #1, , OriginToBaseline&lt;br /&gt;
&lt;br /&gt;
&#039; Load the distance from the origin to the bottom of the descenders.&lt;br /&gt;
Dim As Byte OriginToDescender&lt;br /&gt;
Get #1, , OriginToDescender&lt;br /&gt;
&lt;br /&gt;
&#039; Skip remaining nulls.&lt;br /&gt;
Dim As Integer I&lt;br /&gt;
For I = 0 To 4&lt;br /&gt;
	Get #1, , Buffer&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load offset to characters definitions.&lt;br /&gt;
Dim As UShort CharacterDefinitionOffset(StartingChar To (StartingChar + CharacterCount) - 1)&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount) - 1&lt;br /&gt;
	Get #1, , CharacterDefinitionOffset(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
&#039; Load character widths.&lt;br /&gt;
Dim As UByte CharacterWidths(StartingChar To (StartingChar + CharacterCount) - 1)&lt;br /&gt;
For I = StartingChar To (StartingChar + CharacterCount) - 1&lt;br /&gt;
	Get #1, , CharacterWidths(I)&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Dim As Integer CharacterHeight = OriginToCapital + (OriginToDescender * -1)&lt;br /&gt;
&lt;br /&gt;
Print &amp;quot;Font Id: &amp;quot;; FontId&lt;br /&gt;
Print &amp;quot;Description: &amp;quot;; Description&lt;br /&gt;
Print &amp;quot;Total Character Height: &amp;quot;; CharacterHeight&lt;br /&gt;
Print &amp;quot;Max Ascender: &amp;quot;; OriginToCapital&lt;br /&gt;
Print &amp;quot;Max Descender: &amp;quot;; OriginToDescender&lt;br /&gt;
Print &amp;quot;Total Characters: &amp;quot;; CharacterCount&lt;br /&gt;
Print &amp;quot;Starting Character: 0x&amp;quot;; Hex(StartingChar)&lt;br /&gt;
&lt;br /&gt;
Dim As UByte XByte, YByte, Finished&lt;br /&gt;
Dim As Integer XCurrent, YCurrent, XStart, YStart, XBuffer, YBuffer&lt;br /&gt;
Dim As Byte XNew, YNew, XOpcode, YOpcode, XSign, YSign&lt;br /&gt;
&lt;br /&gt;
XStart = 10&lt;br /&gt;
YStart = 130&lt;br /&gt;
XBuffer = 5&lt;br /&gt;
YBuffer = 10&lt;br /&gt;
&lt;br /&gt;
For I = StartingChar To (CharacterCount - StartingChar) - 1&lt;br /&gt;
	&#039; Jump to the starting offset of this character.&lt;br /&gt;
	Get #1, CharacterDefinitionOffset(I) + StrokeDefinitionOffset + HeaderSize, Buffer&lt;br /&gt;
&lt;br /&gt;
	&#039; Load all of the drawing instructions and draw the character.&lt;br /&gt;
	Finished = 0&lt;br /&gt;
	Do&lt;br /&gt;
		&#039; Load the opcode/values. Two bytes, one for X, the other for Y.&lt;br /&gt;
		&#039; 7 6 543210&lt;br /&gt;
		&#039; ^ ^ ^&lt;br /&gt;
		&#039; | | +------ Start of 6-bit number.&lt;br /&gt;
		&#039; | +-------- Sign bit for number.&lt;br /&gt;
		&#039; +---------- Opcode bit.&lt;br /&gt;
		&lt;br /&gt;
		Get #1, , XByte		&#039; First opcode and X value.&lt;br /&gt;
		Get #1, , YByte		&#039; Second opcode and Y value.&lt;br /&gt;
&lt;br /&gt;
		&#039; Read the opcode and sign bits.&lt;br /&gt;
		XOpcode = Bit(XByte, 7)&lt;br /&gt;
		YOpcode = Bit(YByte, 7)&lt;br /&gt;
		XSign = Bit(XByte, 6)&lt;br /&gt;
		YSign = Bit(YByte, 6)&lt;br /&gt;
&lt;br /&gt;
		&#039; Clear the opcode bits and the sign bits.&lt;br /&gt;
		XByte = BitReset(XByte, 7)&lt;br /&gt;
		XByte = BitReset(XByte, 6)&lt;br /&gt;
		YByte = BitReset(YByte, 7)&lt;br /&gt;
		YByte = BitReset(YByte, 6)&lt;br /&gt;
&lt;br /&gt;
		XNew = XByte&lt;br /&gt;
		YNew = YByte&lt;br /&gt;
&lt;br /&gt;
		&#039; Set the values to negative if the signed bits are on.&lt;br /&gt;
		If XSign = True Then&lt;br /&gt;
			XNew = XNew * -1&lt;br /&gt;
		End If&lt;br /&gt;
		If YSign = True Then&lt;br /&gt;
			YNew = (64 - YNew)		&#039; Normalize the descender&#039;s value.&lt;br /&gt;
			YNew = YNew * -1&lt;br /&gt;
		End If&lt;br /&gt;
&lt;br /&gt;
		&#039; Normalize the Y position.&lt;br /&gt;
		YNew = (64 - YNew)&lt;br /&gt;
&lt;br /&gt;
		If XOpcode = 0 Then&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; End of character definition. Move to the next character.&lt;br /&gt;
				XStart = XStart + CharacterWidths(I) + XBuffer&lt;br /&gt;
				If XStart &amp;gt; 950 Then&lt;br /&gt;
					XStart = 10&lt;br /&gt;
					YStart = YStart + CharacterHeight + YBuffer&lt;br /&gt;
				End If&lt;br /&gt;
				Finished = 1&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Not sure what this is for. It&#039;s only used in the BOLD font when a character has &lt;br /&gt;
				&#039; multiple separate objects like with the colon and equal sign. However, not all &lt;br /&gt;
				&#039; characters with broken up objects in the font use it, and leaving it out doesn&#039;t &lt;br /&gt;
				&#039; appear to mess up the drawing at all.&lt;br /&gt;
			End If&lt;br /&gt;
		Else&lt;br /&gt;
			If YOpcode = 0 Then&lt;br /&gt;
				&#039; Move Pointer to X, Y.&lt;br /&gt;
				&#039; This happens below since both move and draw must change the position.&lt;br /&gt;
			Else&lt;br /&gt;
				&#039; Draw From Current Pointer to new X, Y.&lt;br /&gt;
				Line(XCurrent, YCurrent)-(XStart + XNew, YStart + YNew), RGB(255, 255, 255)&lt;br /&gt;
			End If&lt;br /&gt;
&lt;br /&gt;
			XCurrent = XStart + XNew&lt;br /&gt;
			YCurrent = YStart + YNew&lt;br /&gt;
		End If&lt;br /&gt;
	Loop Until Finished = 1&lt;br /&gt;
Next I&lt;br /&gt;
&lt;br /&gt;
Sleep&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
{{BeginFileFormatTools|Type=image}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland/bgifont.zip FE Stroke Font Editor]&lt;br /&gt;
| Platform = DOS&lt;br /&gt;
| canView = Yes&lt;br /&gt;
| canExport = Yes&lt;br /&gt;
| canImport = Yes&lt;br /&gt;
| editHidden = No&lt;br /&gt;
| editMetadata = Yes&lt;br /&gt;
| notes = Borland&#039;s in-house font Stroked Font editor.&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
This format was reverse engineered by [[User:TheAlmightyGuru|TheAlmightyGuru]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland] - Various tools for BGI fonts.&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Malvineous&amp;diff=11583</id>
		<title>User talk:Malvineous</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Malvineous&amp;diff=11583"/>
		<updated>2024-01-04T14:51:25Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Pages linking to itself */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Wolfenstein 3D -&amp;gt; Wolfenstein 3-D ==&lt;br /&gt;
I&#039;ve corrected the infamous 3D tyop in the names of several Wolf3D-related pages; can you please delete the following ones?&lt;br /&gt;
&lt;br /&gt;
[[:Category:Wolfenstein 3D]] -&amp;gt; Superseded by [[:Category:Wolfenstein 3-D]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[:Image:Wolfenstein_3D.png]] -&amp;gt; Superseded by [[:Image:Wolfenstein_3-D.png]]&lt;br /&gt;
&lt;br /&gt;
Thanks :) --De Zeurkous (zeurkous@zeurcomp.nichten.info), Thu Nov 22 08:18:42 UTC 2007&lt;br /&gt;
&lt;br /&gt;
:Haha, you&#039;ve certainly been busy.  Don&#039;t forget that this wiki isn&#039;t meant to be an encyclopaedia of the games, its main purpose is documenting the file formats and editing tools that can be used with the games, as opposed to how the games behave without any mods, or what they might be called if you forget to change the title screen :-) -- [[User:Malvineous|Malvineous]] 11:14, 22 November 2007 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Nah, I haven&#039;t forgotten. As we&#039;re reinventing the wheel for a semi-virgin wiki, the naming and something static like the cheats seemed like a good place to start :) --De Zeurkous (zeurkous@nichten.info), Thu Nov 22 12:20:04 UTC 2007&lt;br /&gt;
&lt;br /&gt;
== Jill of the Jungle palette ==&lt;br /&gt;
&lt;br /&gt;
Hi, I&#039;m currently working on a level viewer for [[Jill of the Jungle]] (maybe an editor later on). Some of the information I found here has been very useful, but there&#039;s one thing I&#039;m a bit stuck on. On the [[SHA Format]] page it says:&lt;br /&gt;
:&#039;&#039;Each array item contains 4 unsigned bytes, representing CGA, EGA and VGA, respectivley, and then a null value. [...] Each byte maps to the index of a colour in the palette. If there are no colours required, the tile set uses the default colours.&#039;&#039;&lt;br /&gt;
However, it doesn&#039;t say anywhere where the palette can be found. Is it stored in the EXE file? I hope you can help me on this :)&lt;br /&gt;
&lt;br /&gt;
Regards, [[User:Spinal|Spinal]] 13:00, 2 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
:Unfortunately I didn&#039;t write the JotJ SHA page, and I haven&#039;t yet had the time to figure this out.  For Xargon I&#039;ve taken the quick and dirty route and used a screenshot from within DOSBox as the source of the palette, until I can figure out where the palette is located.  If you find this out, don&#039;t forget to update the page! :-) -- [[User:Malvineous|Malvineous]] 22:02, 2 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Hey Spinal, sorry, I wrote the [[SHA Format]] page, so that was probably my bad. I wasn&#039;t able to find the palette either. I assume it&#039;s in the .EXE, however I spent a fair bit of time manually mapping it using a Wombat tool (http://www.szevvy.com/node/3). I was also writing a level viewer (initally in XHTML which turned out to be too slow, so then I moved to Flash 9). I tried to email you my findings, but the email bounced. I&#039;m not sure if they were 100% accurat, which is why I never added them to the documentation.&lt;br /&gt;
&lt;br /&gt;
::Hey Malvineous, it seems the Jill - [[DMA Format]] page has been removed. Do you have a log of what happened to it? I&#039;m sure it existed at some point.&lt;br /&gt;
&lt;br /&gt;
::- [[User:dheim|Daniel]] 20:00, 5 March 2008&lt;br /&gt;
&lt;br /&gt;
:::I don&#039;t ever remember seeing a DMA page - certainly there&#039;s nothing in the wiki logs about it being deleted or renamed.  Maybe you started working on it but never got around to saving it?  Or is it one of the Xargon pages that shares the same format as Jill?  (by the way, you can type &amp;lt;nowiki&amp;gt;~~~~&amp;lt;/nowiki&amp;gt; to automatically put in the signature in these messages.) -- [[User:Malvineous|Malvineous]] 11:28, 5 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::Sorry, it must have been the stuff in the [[SHA Format]] page that I was thinking of. I may have added the link to the [[DMA Format]] page, and never expanded on it. - [[User:Dheim|Daniel]] 02:46, 6 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::Hi guys. Sorry for the mistake, I mixed up the authors of the SHA and level formats. I&#039;ve written a level viewer in PHP the last week, by using static images instead of getting them from the actual files. This causes some problems for episode 2, which uses a different palette, but besides that it works great :) When everything is done I&#039;ll upload the maps to my server and the tile/object lists to this wiki.&lt;br /&gt;
:::::@Daniel: strange that it bounced, I confirmed my address so it should be working fine... You can mail it to spinal -at- zanderz -dot- net. Also, I saw on your Wombat page that you &amp;quot;have a vague idea of how to do&amp;quot; [[Hocus Pocus]]. Could you share your findings on this wiki? I&#039;d love to make maps, or even a level viewer/editor for that game :) -- [[User:Spinal|Spinal]] 00:32, 8 March 2008 (GMT)&lt;br /&gt;
:Okay, with help of [[User:Dheim|Daniel]] who send me the palette I found it! I&#039;ll put my findings on [[Jill of the Jungle palette]]. -- [[User:Spinal|Spinal]] 15:36, 13 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Halloween Harry/Alien Carnage ==&lt;br /&gt;
&lt;br /&gt;
Hi Malvineous. Thanks for your edits on the GMF article! I notice you mentioned there exist versions of the game which don&#039;t require exploding a BNK to get at the game data. What does the directory structure look like for the version you have? I&#039;m working on a map viewer (which will become a map editor at some point) and would like it to be able to work on whatever versions are out there. Thanks for any info. -[[User:Duckthing|Duckthing]] 04:41, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Hi Duckthing - no worries, Halloween Harry has long been an interest of mine, but my map editor sadly needs a lot more work before I can begin reverse engineering more file formats so I&#039;m glad you&#039;ve made a start!  AFAIK technically Halloween Harry has no compression, but for whatever reason (probably listed in the Apogee FAQ) they decided to swap episodes 1 and 3, compress the BNK file and then re-release it under the name Alien Carnage.  You can download all available versions (including registered versions since the game was released as freeware in 2007) from [http://www.classicdosgames.com/game/Alien_Carnage.html RGB Classic Games].  BTW not sure if you noticed but I also posted a couple of things on the GMF article&#039;s talk/discussion page. -- [[User:Malvineous|Malvineous]] 06:08, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: Thank you! Working with the uncompressed version will keep things less complicated. I did notice the GMF discussion you added, but haven&#039;t had a chance to really go through it yet. -- [[User:Duckthing|Duckthing]] 06:41, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: No worries.  If you&#039;re running Linux or MacOSX you should be able to compile [[Camoto|libgamearchive]] which will let you copy files in and out of the BNK files.  This is a library so it&#039;s also possible to use it in your own program for accessing and editing the map files while they&#039;re still inside the BNK, for instance.  (BTW the &#039;minor&#039; tickbox should only be used when the edit does not affect the information on the page - e.g. fixing a typo or a broken URL.  If you are changing the actual content on a page it is never a minor edit!) -- [[User:Malvineous|Malvineous]] 07:51, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dangerous Dave ==&lt;br /&gt;
&lt;br /&gt;
Working on this, does anyone have any info on the formats? The EGA graphics are 84KB and external, but CGA and VGA graphics unrelated to them are in the 174KB executable, apparently uncompressed, I don&#039;t know how this is possible. I&#039;ve found the levels and partially reverse engineered the format (The first 1000 bytes, a 100x10 array of tiles.) but each level is followed by ~280 bytes of variable and unknown data I assume is sprites. I have a list of internal files in the executable, looks like most of it is non-game code. Any help would be appreciated. -[[User:Levellass|Endian? What are you on about?]] 06:03, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Hmm, interesting.  All I can suggest for the levels is - as you&#039;re probably already familiar with - changing the values in a hex editor then loading the game to see what happens.  I would suspect that all the graphics would be in a similar format, so if there are any headers or structures used in the EGA graphics files perhaps they&#039;re duplicated for CGA/VGA?  Also John Romero seems pretty accessible, perhaps you could ask him directly?  Failing that, randomly writing data into the .exe until the images change could be used as a last resort! -- [[User:Malvineous|Malvineous]] 12:09, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Ha, that was easier than I expected - uncompressed VGA data is easy to find with a good hex editor ;-)  [http://www.shikadi.net/pics/ddave-vga-hexdump.png This looks like it] -- [[User:Malvineous|Malvineous]] 12:17, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Ok that was only the menu graphics.  At offset 0xC629 there&#039;s some sort of offset table which looks very similar to the contents of EGADAVE.DAV but there are extra bytes dotted all over the place - perhaps it&#039;s RLE encoded?  Actually just before that there&#039;s the number 0x6CAA.  If you go a bit less than 0x6CAA bytes after this you end up with another table, which to me suggests that 0x6CAA is the decompressed size of that first table. -- [[User:Malvineous|Malvineous]] 13:01, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:If I remember it correctly, the VGA sprites and tiles are RLE compressed and it&#039;s not too hard to decompress them. The positions of the enemies in the levels on the other hand are still a mystery to me. [[User:Calvero|Calvero]] 20:43, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Looking at the levels, which directly follow the VGA palette, they seem to contain 256 bytes of header data, then the 100x10 tiles, then eight bytes of lead-out data.  Then the next level&#039;s 256 bytes of header, 100x10 tiles, then eight bytes of lead-out.  Although I say &amp;quot;level&amp;quot;, the first &amp;quot;level&amp;quot; seems to contain both level 1 and 2, and this seems to be the way it works in the game - in some levels you can see through to others.  I&#039;m not sure what the 256 bytes of header data are for, but some levels have FF FF 00 00 repeated which seems to indicate two uint16 fields which are blanked out for those levels. -- [[User:Malvineous|Malvineous]] 13:15, 13 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
::First up, levels; where does level 1 start? It&#039;s possible I&#039;m reading the start of a level as the previous level&#039;s end, I looked for the start of tile data, which I assumed, like Keen 1, would be the level start.&lt;br /&gt;
&lt;br /&gt;
::Next, palette; I&#039;m assuming, as you said, it is located just before the level data?&lt;br /&gt;
&lt;br /&gt;
::There is VGA and CGA graphics in the executable, plus headers, but the bulk of graphics for CGA and VGA I haven&#039;t been able to locate. If the data is RLE compressed I should think it would use either Keen 1-3 fullscreen or Jazz Jackrabbit tile RLE, both of which I know well. I&#039;ll look into both of these options, cheers! -[[User:Levellass|Endian? What are you on about?]] 12:03, 20 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::I&#039;ve found the VGA and CGA data for the menu graphics.  It looks like the CGA data is stored in a series of 1-bit-per-pixel (monochrome) images.  Or it could be EGA data with the planes split out (e.g. red plane for all images, then green plane for all images, etc.)  I think I found three planes which means it&#039;s probably EGA, as CGA would have a max of two planes.  I&#039;ve also found the font graphics, this looks like 4bpp/16 colour EGA data.  Haven&#039;t seen level graphics yet.  I&#039;ve successfully modded the levels with a hex editor (putting the jetpack everywhere) so now I&#039;ve finally looked at all the levels!  The creatures are definitely not stored in the 100x10 tile data.  Putting random bytes in there revealed that the values are indices into the image files, because if you put the value in for fire it will animate, and the following three or so values show up as still frames from the fire animation.&lt;br /&gt;
&lt;br /&gt;
:::The VGA palette starts at 0x26B0A (I updated the main DDave page with this) + 768 bytes leads straight onto the start of level 1 at 0x26E0A.  So at 0x26E0A there are 256 bytes of data, then 100x10 tiles, then 24 bytes of footer data.  Some of this data (perhaps footer data) might be the level start coordinates, because Dave doesn&#039;t always start the level at the same place (e.g. the warp level when you climb the tree on level 5 and jump off the edge of the screen.) -- [[User:Malvineous|Malvineous]] 12:24, 20 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::I think I&#039;ve found all the files so far, I&#039;ve updated [[Dangerous Dave]] with the offsets of the files, including what appears to be CGA and VGA tiles.  I&#039;m not sure what sort of format they&#039;re in though, it looks like they might be compressed (and so the offsets in that list might be off by ~4, as I may have cut off the decompressed-size field.)  I&#039;ve also updated the map format page, I think it&#039;s pretty much fully reverse engineered now. -- [[User:Malvineous|Malvineous]] 05:13, 21 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Noahs Ark 3D and IMFs ==&lt;br /&gt;
&lt;br /&gt;
Been poking around Noah&#039;s Ark 3D, an adaption of the Wolfenstein game and found a few interesting things which I&#039;m hoping to confirm.&lt;br /&gt;
&lt;br /&gt;
First, the game uses MID files, not IMF files for music, second, the MIDI files have an extra word at the start of the file giving the file length. Third, the code uses the first word of the midi file as the length of data to read from the file and put into memory to play. After poking around a bit in Wolfenstein and Keen I believe this is the same with IMF files, that is, ALL IMF files are type 0 as it were and the type 1s are read just like type 0s by the games (The first word is read as the amount of IMF data to copy into memory to play, this is then read as type 0.) I&#039;m not quite sure what this does for the two types since type 1 is would essentially be a type 0 with a header and footer that are part of the AUDIO.xxx format, much like PC\adlib sounds can have the huffman lengths at the start. Are there any games that use &#039;individual&#039; type 1 IMFs (Even if included as part of a group file. All I&#039;ve seen are games like cosmo, where non-AUDIO IMFs are type 0.)&lt;br /&gt;
&lt;br /&gt;
Should there be a Noah&#039;s Ark 3D page and should we add the midi note to the AUDIO format page? It seems that the format can hold any type of music file the game can read, not just IMFs.  -- Levellass&lt;br /&gt;
&lt;br /&gt;
: Yes it is known that the type-1 header might really be part of the AUDIO.xxx format but alas there were many type-1 files floating around the place (incorrectly extracted, you could argue) before this was realised, so the format variant is here to stay.  It does have some advantages though (like tagging files with the song title) but I&#039;m not sure whether anyone has figured out definitively whether the header (and footer, in the case of the Wolf3D files) belongs to the IMF or the AUDIO file.  I guess you&#039;d have to browse the game source code and see how the game uses the data to know for sure.&lt;br /&gt;
&lt;br /&gt;
: As far as the MIDI goes, I believe the AUDIO.xxx file is just a container file like any other, capable of supporting any data at all.  It&#039;s up to the game to decide how to use it.  If anything this makes me think it would fit better if the AUDIO.xxx article was merely documenting the structure, with links to actual audio formats like PC SFX, Adlib SFX, IMF and MIDI and notes about which games make use of which formats.&lt;br /&gt;
&lt;br /&gt;
: Oh and yes, by all means create a page for the new game. -- [[User:Malvineous|Malvineous]] 08:41, 3 February 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Sound Files category ==&lt;br /&gt;
&lt;br /&gt;
I don’t know why there’s a Sound Files category and also an Audio Files category... it seems redundant. I left those categories the way they are though.&lt;br /&gt;
&lt;br /&gt;
Also, the [[File format data types]] page needs some signed ints, but I didn’t know what naming convention you wanted to use. I described something as an [[INT16LE]] on [[BMC Format]]. [[User:Yellowantphil|Yellowantphil]] 20:12, 11 September 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Not sure about the Sound vs Audio - I use the term &#039;audio&#039; to mean both sound and music, but you&#039;re right, if there are separate sound and music categories we don&#039;t really need an audio one as well.  Feel free to update.  [[INT16LE]] is perfectly fine too!  I added a note to the data types page. -- [[User:Malvineous|Malvineous]] 22:30, 11 September 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
== GamePage template ==&lt;br /&gt;
&lt;br /&gt;
Should the GamePage template add the page to its own category? It seems a little odd that [[Wacky Wheels]] is not in the Wacky Wheels category. [[User:Yellowantphil|Yellowantphil]] 04:51, 16 September 2011 (GMT)&lt;br /&gt;
: I decided against this because there is a link to the game&#039;s page in the category intro at the top of the page.  It seemed unnecessary having another link in amongst all the other pages.  This was also because the game page was really only meant to be a summary, there wasn&#039;t supposed to be a huge amount of detail on it, only links to other pages with the detail (which then would appear in the category list.)  I would imagine that, eventually, [[Wacky Wheels]] would be tweaked to move a lot of the content onto subpages. -- [[User:Malvineous|Malvineous]] 12:58, 16 September 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Scope of the wiki ==&lt;br /&gt;
&lt;br /&gt;
I don’t know how extensive you want the information to be on ModdingWiki... I added a few lists of audio and graphics files a while ago, and there will probably be other information that I’ll find out that’s potentially helpful for level editing but not directly related to it. I can move some information to my website if it starts to become out of scope for your wiki. I also sometimes end up documenting everything imaginable... there’s some minutiae on my website and possibly on your wiki that I ought to go through and delete. [[User:Yellowantphil|Yellowantphil]] 05:28, 10 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
:Hmm, that&#039;s a difficult one - I&#039;m always in favour of documenting more rather than less.  Generally speaking if it&#039;s related to a game and it would help either a programmer writing a utility or a someone trying to change a game manually then it should be documented.  About the only thing that comes to mind that&#039;s over documenting is when some small calculation is expressed in a couple of different programming languages, but I&#039;ve left that in so people can just copy it rather than trying to figure it out from the text.  But the [[Wacky Wheels]] page is probably the gold standard for what all wiki pages should look like :-)  Do you have anything in particular you&#039;re unsure of whether it would fit here? -- [[User:Malvineous|Malvineous]] 10:07, 10 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
::I was mainly thinking of the list of VOC files on [[Wacky Wheels Music and Sound Effects]] and the list of &amp;lt;tt&amp;gt;*.sp&amp;lt;/tt&amp;gt; files on [[Wacky Wheels Graphics Formats]]. I have an expanded list of the &amp;lt;tt&amp;gt;*.sp&amp;lt;/tt&amp;gt; files on my computer but it isn’t finished yet. I guess there isn’t all that much more Wacky Wheels information to be added to this wiki though. There is still some modding information on my website that ought to be moved over here, so that would take up another page or two. I’ve been lazy about doing Wacky Wheels stuff lately, but I might find some time for it this weekend.&lt;br /&gt;
&lt;br /&gt;
::By the way, I guess that guy from Cascadia Games emailed you. It’s pretty interesting that WW might become an iPhone app. He told me that he was going to be using his own game engine, which sounds a lot easier than trying to get a hold of the WW source code and porting it. —[[User:Yellowantphil|Yellowantphil]] 16:46, 15 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: I was going to say the list of VOCs might be overkill, but then the list of .sp files might be useful.  To be honest, it&#039;s the sort of thing that you could probably omit if you were feeling lazy, but likewise I don&#039;t mind at all if you choose to include it, so since it&#039;s already there I&#039;m happy to keep it.&lt;br /&gt;
&lt;br /&gt;
::: Yes I did get an e-mail from Cascadia, I was going to pass along your details but it sounds like you&#039;re already aware of it!  Using their own engine might make it a bit smoother than the original, as the jerkiness of turning is my only criticism of the game. -- [[User:Malvineous|Malvineous]] 00:14, 16 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
:I&#039;d like to document not only the format of some game archives but also their contents. This would be quite long lists of basically images, sprites and some minor stuff. I&#039;d also like to upload the actual images alongside but I&#039;m not sure whether that fits the scope of the wiki or if I should just put it somewhere on github. Any advice highly welcome :) -- [[User:Yetmorecode|Yetmorecode]] 15:25, 22 December 2020&lt;br /&gt;
&lt;br /&gt;
::That depends on what you mean with &amp;quot;their contents&amp;quot;. Documenting the used file formats is obviously in the scope of this wiki, since there&#039;s not much point in being able to extract/replace the files in those archives if you can&#039;t actually view those files or make those replacements. But dumping the whole list of all existing files in a game into a wiki article is usually not very useful. An article could highlight some specific files with special functions in the game (stuff like the remap-defining PALETTE.CPS in Red Alert 1 comes to mind; [[Westwood CPS Format|cps]] is a very normal image format in these games, but that specific file controls all recolouring of sprites that change to their owner&#039;s colour), but a list of all sprites and sound files and all their exact usages in the game doesn&#039;t seem like it&#039;d belong here; most of the time such things are pretty self-evident.&lt;br /&gt;
::PS: when you add something to a user talk page, use the signature code to give your note a clearly visible author and date stamp. There&#039;s a big red box on the top of the edit page telling you how to do that.&lt;br /&gt;
:: --[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:51, 22 December 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Alright that makes sense. Sorry about the signature I must have been blind. [[User:Yetmorecode|Yetmorecode]] ([[User talk:Yetmorecode|talk]]) 17:11, 22 December 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: Yes just to confirm this, an image or two is useful to illustrate a file format but we don&#039;t want to become an archive of all game material, not least of which because extracting this is often against the game&#039;s licence (and doesn&#039;t really come under &amp;quot;fair use&amp;quot;) so could open you up to legal trouble if the current copyright owner takes exception to it.  If you come across something hidden or undocumented you can put it on [https://tcrf.net/The_Cutting_Room_Floor The Cutting Room Floor] otherwise [https://pages.github.com/ GitHub Pages] may work as you&#039;ve suggested (if you fly under the copyright radar!) -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 07:08, 23 December 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Wacky Wheels ==&lt;br /&gt;
&lt;br /&gt;
Basically all of the WW modding information from my website is here now. I moved one page when I realized it should probably be capitalized to match the rest of the pages on this site... you can delete the redirect at [[Wacky Wheels high score files]] if you want to.&lt;br /&gt;
&lt;br /&gt;
Now, I need to remove most of the modding information from my website and refer people here. Then we’ll have reached the glorious future where all WW modding information is in one place. I’m going to keep those two text files of notes on my website though—the information in them is disorganized and I think not 100% accurate, but they might have some information that isn’t here yet.&lt;br /&gt;
&lt;br /&gt;
By the way, how’s Camoto going? I’m planning to use it to make a new WW level, but I won’t have time for it for a few more months. —[[User:Yellowantphil|Yellowantphil]]&lt;br /&gt;
&lt;br /&gt;
: Sounds good!  Thanks for all the effort you&#039;ve put in by moving it across.  I think Wacky Wheels is now the most completely documented game on the wiki!  Also can&#039;t hurt leaving your own info up - sometimes it&#039;s nice to go back to the original source if something is unclear.  Camoto&#039;s going well, but unfortunately I haven&#039;t had much time to work on it over the last few weeks.  You probably won&#039;t be able to make much of a level until I add in the ability to select a tile from the tileset, but that&#039;s in progress and hopefully will be ready by the time you are!  Keep me posted when you do start your level(s?) -- [[User:Malvineous|Malvineous]] 12:22, 2 February 2012 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Well, as I was reading some of the information on my website, I noticed that it isn’t written very well. I wrote those pages back when I had very little experience programming. Anyway, I’m planning to redesign my website soon, and this will save me from having to rewrite a few of those pages.&lt;br /&gt;
&lt;br /&gt;
::The tile editor in Camoto as it is now is still certainly useful—I can add new tile types to a level using a binary editor and then move them around in Camoto. I think that it shouldn’t be too hard to make a new WW level using the Gimp and Camoto plus some binary editing. I recall having some problems with the route editor for the computer players, but I didn’t look into it at the time—I’ll let you know when I’m working with Camoto again, and I’ll try to come up with some useful bug reports or fixes if I run into problems. —[[User:Yellowantphil|Yellowantphil]] 14:06, 2 February 2012 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Catacomb ==&lt;br /&gt;
&lt;br /&gt;
Hey [[User:Malvineous|Malvineous]], do you know anyone who has properly read the [[Inverse_Frequency_Sound_format|Inverse Sound Frequency]] file format and got the sound playing? I&#039;m struggling with some fine details in my game. Sounds play near what they should sound like, but the sound quality is all crackly and some sounds play totally incorrect. I followed a basic [http://web.archive.org/web/20000818033701/http://www.dd.chalmers.se/~f98anga/projects/keen/sounds2raw.c code sample] by Anders Gavare. Does your tool support this? Interested in helping me figure this out? My current code is available at [https://code.google.com/p/cataclone/source/browse/trunk/src/catacomb/catacomb_sound.c catacomb_sound.c] - [[User:Eros|Eros]] 11:57, 5 May 2012 (GMT)&lt;br /&gt;
: Should this be moved to my talk page? - [[User:Eros|Eros]] 11:59, 5 May 2012 (GMT)&lt;br /&gt;
:: Probably best to keep it on my talk page if you want me to respond in a timely manner :-)  I based my old utility off Anders&#039; one too, but it&#039;s been a long time since I looked at the code.  My latest utility doesn&#039;t support sound effects yet.  I know Levellass has written a few utilities to play and edit those sound files, so I think your best bet would probably be to post over at the [http://www.keenmodding.org Keen:Modding] forum.  Do note that PC Speaker effects do sound crackly at the best of times, though!  Also make sure you&#039;ve got the right audio format (8-bit vs 16-bit, signed vs unsigned) - I remember some inconsistencies there causing some very distorted results for me.  I love the name &#039;Cataclone&#039; - does your code compile under Linux? -- [[User:Malvineous|Malvineous]] 13:21, 5 May 2012 (GMT)&lt;br /&gt;
::: I currently compile the code using Code::Blocks with GCC 4.6 -std=gnu99. It *should* compile under Linux. But I haven&#039;t tested that out yet. [[Catacomb]] sounds also have flags attached to each one, It&#039;s not exactly the same specification as what it says @ the [[Inverse_Frequency_Sound_format|Inverse Sound Frequency]] format page. Perhaps the flags would make a difference to the sounds? I have the sound setup @ [https://code.google.com/p/cataclone/source/browse/trunk/src/sound_manager.c sound_manager.c] in the sound_manager_init() method. I use AUDIO_S16 (signed 16-bit) @ 22050 Hz with 2 channels. I have not added support for the priority of the sounds yet, I plan on doing that after I get them playing properly.&lt;br /&gt;
::: I found some information on the [[ROTT]] sound format here: [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/_rt_soun.h _rt_soun.h]. This format should be similar to Catacomb as ROTT was developed by [[Apogee]] using the [[Doom]] engine. Here are the flags for the sounds that they define:&lt;br /&gt;
 #define SD_OVERWRITE     0x01&lt;br /&gt;
 #define SD_WRITE         0x02&lt;br /&gt;
 #define SD_LOOP          0x04&lt;br /&gt;
 #define SD_PITCHSHIFTOFF 0x08&lt;br /&gt;
 #define SD_PLAYONCE      0x10&lt;br /&gt;
::: There are also many other sound files for ROTT: [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/rt_sound.c], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/rt_sound.h], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/snd_reg.h], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/snd_shar.h], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/sndcards.h]&lt;br /&gt;
:::: I tried it last night and I was able to get it to compile (after a few changes, like using &#039;/&#039; instead of &#039;\&#039; in a couple of #includes) but all I got was a black window and a beep sound, then nothing.  How far advanced is the project?  Should I expect more than that?  I would expect small variations in the file formats between games, but I would be surprised if the core sound data has changed over time. -- [[User:Malvineous|Malvineous]] 02:38, 6 May 2012 (GMT)&lt;br /&gt;
::::: On Windows, you can run around the levels, collide with walls, collect items, etc... I still need to implement monsters, AI and power shots. However, that beep means that the sounds playing. (see line 71 in main.c: catacomb_sounds_play(&amp;quot;foundsound&amp;quot;);). I just committed the catacomb_data.h file. Update it accordingly, you should now see much more than a black screen.&lt;br /&gt;
:::::: Oh wow, that works really well now!  I see what you mean by the sounds.  You might have to output the PCM data to a .wav/.raw file and look at it in a sound editor to see what&#039;s going on.  It sounds like there might be wrapping or something going on.  Also some sounds (like being blocked by a door) play multiple times over the top of themselves.  I guess this is what you meant by priority not being implemented (although maybe you wouldn&#039;t need to handle priority if you can play multiple sounds at the same time, unlike the real PC Speaker.)  One suggestion - if you do decide to support Linux, abstract the calls that open files so that they search for filenames instead - that way you don&#039;t have to rename all the Catacomb files to be uppercase, since Linux has a case-sensitive filesystem and most filenames are usually all lowercase. -- [[User:Malvineous|Malvineous]] 03:42, 6 May 2012 (GMT)&lt;br /&gt;
::::::: I have exported the raw data to a file, then imported the raw data into Audacity using various settings. All of them sound like they do in the game, crackly and sometimes distorted. I really think its some sort of post FX used by the flags. As for files, I&#039;ll code some sort of SafeFileOpen, SafeFileClose functions like the id codebase that open files regardless of case when i get around to implementing the Linux version. - [[User:Eros|Eros]] 03:54, 6 May 2012 (GMT)&lt;br /&gt;
:::::::: If you can e-mail me one of the files (preferably a &#039;quiet&#039; one that&#039;s not supposed to be crackly) I can take a look if you like - malvineous@shikadi.net -- [[User:Malvineous|Malvineous]] 03:57, 6 May 2012 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Merge ==&lt;br /&gt;
&lt;br /&gt;
Is there a way to tag two pages such that it is clear that they should be merged?&lt;br /&gt;
For example, [[Crystal Caves Tileset Format]] describes the same format as [[Duke 1 Tileset Graphics]].[[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 21:00, 15 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
: You can mention it on the talk page for one of the articles.  Any suggestions as to what we should call the merged page? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 03:09, 20 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Dark Ages is the first game that got released that uses this format, so &#039;&#039;Dark Ages Tileset Format&#039;&#039; could be the name, like all those formats that are named after Commander Keen 1-3.&lt;br /&gt;
::Or we name it after Duke Nukem 1, because that game is probably more popular than Dark Ages, Crystal Caves and Secret Agent, like [[Commander Keen 1-3 Level format]], although Slordax used it before Commander Keen 1-3 did.[[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 19:13, 20 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: Yes I was thinking along the same lines, naming it after the first game that used the format.  But then the release date doesn&#039;t necessarily indicate which game &amp;quot;invented&amp;quot; the format, if one game took longer to develop and was released late.  I was wondering whether there is a common thread amongst all these games, such as the same programmer or company we could use instead.  In many ways I would prefer a name like &amp;quot;Replogle tileset format&amp;quot; or &amp;quot;Apogee EGA tileset format&amp;quot;.  What do you think? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 23:36, 20 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: I&#039;ve read the [http://www.3drealms.com/news/2006/04/the_apogee_legacy_15.html | Apogee Legacy interview with Peder Jungck] again today. He wrote the ProGraphx Toolbox.&lt;br /&gt;
:::: DN1.EXE contains the string &#039;&#039;Version 1.0 EGA/VGAProGraphx EGA/VGA Toolbox&#039;&#039;,&lt;br /&gt;
:::: CC1.EXE contains the string &#039;&#039;Version 1.5 320x200 PAN EGA/VGAProGraphx EGA/VGA Toolbox&#039;&#039;,&lt;br /&gt;
:::: SAM1.EXE contains the string &#039;&#039;ProGraphx EGA/VGA Toolbox Version 2.0 320x200 EGA/VGA Copyright 1991 by Peder Jungck&#039;&#039; and&lt;br /&gt;
:::: DA3.EXE contains the string &#039;&#039;Version 1.0 EGA/VGAProGraphx EGA/VGA Toolbox&#039;&#039; (DA1.EXE and DA2.exe contain gibberish).&lt;br /&gt;
:::: So I would suggest &#039;&#039;ProGraphx Toolbox tileset format&#039;&#039;. Peder also wrote a book about the toolbox called &#039;&#039;Graphics Programming &amp;amp; Animation: Ultra-Fast Assembly Routines for EGA/VGA Graphics Animation&#039;&#039;. Maybe that book has a better name for the file format. [[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 11:03, 21 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: So we know of three different versions of the ProGraphx Toolbox. Dark Ages and Duke Nukem 1 use version 1.0. Each tileset is 8064 bytes long and is in a separate file. Crystal Caves uses version 1.5 and each tileset is 8003 bytes long, but they are all in the same file. Secret Agent uses version 2.0 Each tileset is again 8064 bytes long, they are all in the same file and the file is encrypted. [[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 17:00, 28 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::: Thanks for figuring all that out.  I&#039;ve merged the pages and changed the name to [[ProGraphx Toolbox tileset format]] as suggested.  Please feel free to correct anything I have missed. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 02:40, 4 August 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Guidelines for proper Wiki Editing ==&lt;br /&gt;
Dear Malvineous! Could you post the guidelines (or guide) for proper editing of the Wiki? [[User:The coder|The coder]] ([[User talk:The coder|talk]])&lt;br /&gt;
: Hmm, there isn&#039;t really one, it&#039;s more about finding a similar page and matching the style found there!  Copy and paste works well :-)  There is [[ModdingWiki:Contributing]] but it&#039;s not very detailed. (BTW please put &amp;lt;nowiki&amp;gt;~~~~&amp;lt;/nowiki&amp;gt; at the end of your messages, when you preview the page you will see this gets replaced with your name and the date automatically.) -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 21:59, 12 December 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
== VGFM Music Format ==&lt;br /&gt;
&lt;br /&gt;
Hello, Malvineous!&lt;br /&gt;
&lt;br /&gt;
I accidentally found that [[VGFM Music Format]] is absolutely similar to the [http://www.vgmpf.com/Wiki/index.php?title=MUS_(AdLib) MUS (AdLib)] format which I finished researching yesterday.&lt;br /&gt;
&lt;br /&gt;
And [[VGFM Instrument Format]] is similar to [http://www.vgmpf.com/Wiki/index.php?title=SND_(AdLib) SND (AdLib)].&lt;br /&gt;
&lt;br /&gt;
These formats were developed by Ad Lib Inc, I found the sources and documentation in the Ad Lib developer&#039;s manual downloaded from old BBS board site :)  And these formats are used not only in [[Vinyl Goddess From Mars]] game.&lt;br /&gt;
&lt;br /&gt;
--[[User:Binarymaster|Binarymaster]] ([[User talk:Binarymaster|talk]]) 02:05, 22 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Oh wow, what an interesting discovery!!  Do you have any links to the official documentation?  I&#039;d really like to see what else they have to say about the format.  And yes, we should definitely rename the articles here.  What do you think they should be called?  &amp;quot;Ad Lib Music Format&amp;quot; is probably a bit generic given they have a few, like .ROL... -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 09:45, 22 January 2015 (UTC)&lt;br /&gt;
:: Here it is: [http://files.mpoli.fi/software/programm/general/adlip.zip adlip.zip] - binaries and source code, probably from Ad Lib Programmer&#039;s Manual. MUS headers are described in CONVERT.C and CONVERT.H files. Fun fact that they also developed another similar format based on MIDI - [http://www.vgmpf.com/Wiki/index.php?title=MDI MDI]. It has similar musical features but stores all data in one file in MIDI format.&lt;br /&gt;
:: Well, I have no idea how to name it better, I think &amp;quot;Ad Lib Music Format&amp;quot; should be suitable for it :) --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 10:30, 22 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Many thanks!!  I&#039;ve updated the article pages with the info I could gain from the source code.  There are still a few unresolved issues (like what exactly the default percussion pitch is) but it has certainly answered a number of questions.  I called it &amp;quot;AdLib MIDI Format&amp;quot; because that&#039;s the name they use in one place in the source code, although it&#039;s not a very descriptive title!  Thanks again for letting me know about this excellent find :-) -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 12:48, 24 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: That&#039;s good! I think maybe this format should be named as &amp;quot;AdLib MIDI Format v1.0&amp;quot;, because there is also an improved version of it, probably v2.0 - [http://www.vgmpf.com/Wiki/index.php?title=MDI MDI] (I made a typo in previous posted link), it uses a single file in MIDI format.&lt;br /&gt;
:::: And about [[AdLib Timbre Bank Format]] article - BNK format originally was created in the 1987 with the first release of the [http://www.vgmpf.com/Wiki/index.php?title=AdLib_Visual_Composer AdLib Visual Composer], so actually Ad Lib Inc released its formats in this order:&lt;br /&gt;
:::: &#039;&#039;&#039;1)&#039;&#039;&#039; ROL &amp;amp; BNK (1987, with AdLib Visual Composer)&lt;br /&gt;
:::: &#039;&#039;&#039;2)&#039;&#039;&#039; MUS &amp;amp; SND/TIM (1988, with player and converter)&lt;br /&gt;
:::: &#039;&#039;&#039;3)&#039;&#039;&#039; MDI (1989, also with player and converter)&lt;br /&gt;
:::: Information about third format was placed [http://cd.textfiles.com/soundsensations/MISCPROG/AD-PROG/ here], though the link is not working now.&lt;br /&gt;
:::: --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 13:08, 24 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: Oh wow that&#039;s interesting too.  I think the MUS/SND/TIM format should stay as &amp;quot;AdLib MIDI Format&amp;quot; with no version number, because that file format does have version fields so it&#039;s possible to have v1.0, v2.3, etc. within that format.  The MDI article you linked to actually looks like conventional MIDI with some extra events for setting OPL instruments, so I think this belongs as one of the many backwards-compatible extensions of the [[MID Format]].&lt;br /&gt;
&lt;br /&gt;
::::: With the instrument bank formats that&#039;s really unusual if BNK came first!  It seems very odd for AdLib to produce the SND/TIM format if they already had the more efficient BNK format available.  I was going from the dates in the text files from the programmer&#039;s guide you kindly posted, and bkformat.txt says in Jan 1989 they are in the process of converting their software to use BNK.  Can you confirm there was BNK software earlier than this?  I&#039;m just thinking that Visual Composer may have come out in 1987, but maybe it didn&#039;t get BNK support added until later? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 01:30, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::::: Well, I&#039;m sure that first version of Visual Composer was released with AdLib music card, but I don&#039;t know exactly about BNK support. It&#039;s really strange that Ad Lib downgraded the format (BNK is better in structure), but the known formats has converters which converts BNK to X format, but not from X to BNK - this makes sense that BNK was the first format. Also Visual Composer doesn&#039;t support other bank formats, only BNK.&lt;br /&gt;
:::::: BNK creation date 1987 was contributed by [http://www.vgmpf.com/Wiki/index.php?title=User:TheAlmightyGuru Dean Tersigni], I&#039;ll ask him about it.&lt;br /&gt;
&lt;br /&gt;
:::::: Update: I also read information from bkformat.txt, and it seems you&#039;re right :)&lt;br /&gt;
:::::: So actually it was:&lt;br /&gt;
:::::: &#039;&#039;&#039;1)&#039;&#039;&#039; ROL &amp;amp; INS (1987, with AdLib Visual Composer v1.0)&lt;br /&gt;
:::::: &#039;&#039;&#039;2)&#039;&#039;&#039; MUS &amp;amp; SND/TIM (1988, with player and converter)&lt;br /&gt;
:::::: &#039;&#039;&#039;3)&#039;&#039;&#039; BNK (1989, with AdLib Visual Composer v1.5)&lt;br /&gt;
:::::: &#039;&#039;&#039;4)&#039;&#039;&#039; MDI (1989, also with player and converter)&lt;br /&gt;
:::::: Wow, that feel when restored original order of events! :D --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 01:51, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::::: That seems to make the most logical sense - there&#039;s a clear improvement with each new format.  I&#039;m glad you agree!  Note that when you say there&#039;s no conversion from &amp;quot;X to BNK&amp;quot; there is BANKMNG.EXE that comes with the programmer&#039;s manual which converts .ins files to .bnk. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 04:09, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::::::: True. I forgot about it :) Thanks! --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 12:02, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
== email ==&lt;br /&gt;
&lt;br /&gt;
Hello! Can&#039;t send you e-mail. Got this:&lt;br /&gt;
&lt;br /&gt;
 This message was created automatically by mail delivery software.&lt;br /&gt;
 A message that you sent could not be delivered to one or more of its&lt;br /&gt;
 recipients. This is a permanent error. The following address(es) failed:&lt;br /&gt;
 malvineous@shikadi.net&lt;br /&gt;
 host mail.shikadi.net [52.11.27.19]&lt;br /&gt;
 SMTP error from remote mail server after RCPT TO:&amp;lt;malvineous@shikadi.net&amp;gt;:&lt;br /&gt;
 550 invalid recipient&lt;br /&gt;
&lt;br /&gt;
[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 09:12, 11 March 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Whoops, moved my e-mail service to AWS and missed a step for that address!  Please resend, should work now :-)  Thanks for letting me know! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 11:34, 11 March 2017 (UTC)&lt;br /&gt;
::Yes, e-mail goes through this time. Hope you receive it. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 15:41, 11 March 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Duplicate RLE page ==&lt;br /&gt;
&lt;br /&gt;
After some edits to the [[RLE Compression]] page, I noticed that this was not the page linked from the [[:Category:Compression algorithms]] page. It seems there are in fact two of them; one with an uppercase &#039;c&#039;, and [[RLE compression|one with a lowercase &#039;c&#039;]]. The latter seems to be the better-written one, but since the LZW page was apparently moved from &amp;quot;LZW compression&amp;quot; to &amp;quot;LZW Compression&amp;quot;, I suggest the final name of the RLE page should likewise be the uppercase-&#039;c&#039; one.&lt;br /&gt;
&lt;br /&gt;
I have merged anything I deemed useful into the lowercase-&#039;c&#039; version. Could you make sure the uppercase-&#039;c&#039; duplicate is removed, and the other one is moved to its name?&lt;br /&gt;
&lt;br /&gt;
-[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:48, 4 October 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Done, many thanks for the clean up! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:38, 5 October 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Account rename? ==&lt;br /&gt;
Hi Malvineous,&lt;br /&gt;
&lt;br /&gt;
I am wondering if it&#039;s much of a hassle to rename accounts on this wiki.  I&#039;d kind of like to have my account use the same handle I&#039;m using just about everywhere else (ETTiNGRiNDER).  Don&#039;t sweat it too much if this is onerous to do, though.&lt;br /&gt;
&lt;br /&gt;
Thanks! - [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 20:42, 29 January 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
: I&#039;m not sure how it can be done.  If you can find out a quick way to rename a MediaWiki account then let me know!  At any rate all your comments would still be signed with your old name however. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:15, 4 February 2018 (UTC)&lt;br /&gt;
: P.S. the e-mail address in your account is bouncing -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:17, 4 February 2018 (UTC)&lt;br /&gt;
:: Ah, right, it was still set to that old e-mail.  Hushmail nuked that address on me years ago, I&#039;ve changed it to one that&#039;s current.  As for the renaming, I don&#039;t really know anything about wiki administration, though a quick search suggests that there&#039;s this thing: https://www.mediawiki.org/wiki/Extension:Renameuser&lt;br /&gt;
::If that&#039;s a bit much then no biggie. -- [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 14:43, 5 February 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Removal request ==&lt;br /&gt;
&lt;br /&gt;
It seems I made a page that was unnecessary; the [[Westwood Palette]] I documented turned out to be a known common format (6-bit RGB) already covered in the standard [[VGA Palette]] page. I have changed all links to link to the older page, but I don&#039;t think I have the user rights required to delete the Westwood Palette page. Can you take care of it? -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:56, 6 February 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Done!  I made you an admin too so you should have delete access now.  Thanks for your contributions! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 00:03, 7 February 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Hi-Octane ==&lt;br /&gt;
&lt;br /&gt;
Hi! &lt;br /&gt;
&lt;br /&gt;
I&#039;ve figured out the MUSIC.DAT container and I was wondering if you could shed out some light on what these song formats are, now that we know how to unpack it ?&lt;br /&gt;
&lt;br /&gt;
Thanks !!!&lt;br /&gt;
&lt;br /&gt;
: Yep, they&#039;re listed on the [[Hi Octane]] page, in the file format box. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:57, 14 March 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== ReCaptcha v1 problem ==&lt;br /&gt;
&lt;br /&gt;
It seems I can no longer add links in articles; the ReCaptcha test added when new links are detected uses ReCaptcha v1, which gives a warning that &amp;quot;reCAPTCHA 1 IS SHUTDOWN&amp;quot;. It does not allow the check to pass, so the page can never be submitted.&lt;br /&gt;
&lt;br /&gt;
The FAQ on the ReCaptcha docs (can&#039;t link to them, obviously) says that &amp;quot;&#039;&#039;&#039;Any calls to the v1 API will not work after March 31, 2018&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
-[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 09:26, 28 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Bio Menace patches ==&lt;br /&gt;
&lt;br /&gt;
Hey, I&#039;ll have Bio Menace 1 patches for the freeware release. Most of them are status window-related, but there are others as well.&lt;br /&gt;
Question: Could you create several other sections in All Bio Menace patches cathegory? Because I cannot submit them anywhere right now. Thanks! --[[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 00:57, 25 July 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
: The status window patches should go into [[:Category:Bio Menace interface patches]].  The others *should* fit into existing categories, but if you&#039;re not sure let me know! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 05:23, 29 July 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I&#039;ll need several categories from you as I checked there&#039;ll be other BM patch stuff as well. So I need the following categories: status screen, hostage, help menu, main menu, B800 screen (I even built the BIN file and I made patch for that!). And I&#039;ll even submit these for BM2 and 3. Please, create these. Oh, and I&#039;ll surely submit! --[[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 01:36, 1 August 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Status screen, hostage, help menu, main menu and B800 screen should all go into [[:Category:Bio Menace interface patches]] as they are all modifying the user interface.  I would like to keep the number of patch categories fairly small otherwise it will get a little out of control! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 01:48, 17 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Bio Menace patches on PCKF? ==&lt;br /&gt;
&lt;br /&gt;
Hey, how can I post my Bio Menace 1-3 patches on PCKF or keenmodding.org? I very want them to submit one of the forums!--[[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 23:11, 4 August 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Wombat File Reader updates! ==&lt;br /&gt;
&lt;br /&gt;
I think [[Wombat]]&#039;s title should be updated to show its full name, which now is &amp;quot;Wombat File Reader&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Also the supported games list has to be updated accordingly to the list on https://szevvy.com/ (the author&#039;s website, which was listed as &amp;quot;dead&amp;quot; in Wombat&#039;s info while the site is up and running again).&lt;br /&gt;
&lt;br /&gt;
It&#039;s also not a dead program at all, since its latest version is very recent (11 October 2018), and it&#039;d be a shame to have such old and deprecated information on this wiki of such a useful and powerful tool.&lt;br /&gt;
&lt;br /&gt;
-[[User:Elia1995|Elìa1995]] ([[User_talk:Elia1995|talk]]) 07:38, 15 October 2018‎ (UTC)&lt;br /&gt;
&lt;br /&gt;
: It&#039;s only just been updated recently after many years of no releases.  It&#039;s a bit unfair to say the wiki has old information when it&#039;s only a couple of weeks out of date, and it relies on people such as yourself to keep things up to date!  Please go ahead and correct as needed so we can keep the information current.  We are all doing this in our spare time so we need lots of help to keep things up to date.  Also, the page you link to lists it as &amp;quot;Wombat File Tools&amp;quot; rather than &amp;quot;Wombat File Reader&amp;quot;.  Everyone in the community refers to it as just &amp;quot;Wombat&amp;quot; however.  -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 23:27, 16 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I&#039;ve only just gotten my account here approved, and only just made new builds of Wombat (actually a complete rewrite) after (as Malvineous said) many many years of no releases.  It warms my heart to see people notice :) [[User:Szevvy|Szevvy]] ([[User talk:Szevvy|talk]]) 01:44, 17 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: I just noticed the 1.0.4 update, I&#039;ll work on updating the supported games list on the page according to the one on Szevvy&#039;s site; by the way, thanks for telling me how to &amp;quot;sign&amp;quot; these posts, I had no idea. [[User:Elia1995|Elia1995]] ([[User talk:Elia1995|talk]]) 08:08, 18 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== e-mail (again) ==&lt;br /&gt;
&lt;br /&gt;
Hello! Sent you e-mail 2019.02.19 about Prehistorik without any answer. Yesterday another e-mail was sent and since 24+ hours passed was forced to write here. Is there something wrong again with your e-mail account or spam filters (for mail.ru)? Thanks! [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 15:10, 1 March 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Content license ==&lt;br /&gt;
&lt;br /&gt;
Is the content of this wiki governed by a specific license? I&#039;d like to contribute information on &amp;quot;Nomad&amp;quot; file formats that I reverse engineered, which I&#039;d previously published on my personal web site under [http://creativecommons.org/licenses/by-sa/4.0/ Creative Commons SA 4.0]. This wiki certainly seems to be in the spirit of the Creative Commons licensing structure so I&#039;m guessing there would be no real conflict, but I just wanted to get some additional information on this. --[[User:Cmb|Cmb]] ([[User talk:Cmb|talk]]) 13:32, 6 May 2020 (UTC)&lt;br /&gt;
:Personally, I&#039;ve just [[RLE Compression#Source_code|added the license under which code was released]] myself. Then again I release everything under [[wp:WTFPL|WTFPL]], because I honestly don&#039;t mind people using anything I write for research purposes in any way they please, so license compatibility is a bit of a non-issue for me. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:04, 6 May 2020 (UTC)&lt;br /&gt;
:That said, though, given the current online climate, I do agree this is an issue that should be clarified here on the wiki. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:06, 6 May 2020 (UTC)&lt;br /&gt;
:: There is a licence specified somewhere but the short answer is anything you put here is basically in the public domain - because if someone steals it we don&#039;t have the resources to chase them, so if it&#039;s that valuable to you that you can&#039;t handle someone copying it without giving you credit, then don&#039;t post it here.  Having said that for &amp;quot;nice&amp;quot; users many of the pages ask for a mention if you find the content useful, but this is by no means a requirement.  I suppose legally speaking you&#039;ll have to dual-licence your Creative Commons content because some CC versions have additional restrictions, like you can&#039;t copy the content without giving credit.  The [https://creativecommons.org/choose/zero/ CC0 licence] pretty much covers it.  Putting a specific licence on code is fine (although no licence at all would be best so it inherits the wiki&#039;s general content licence), noting that any licence enforcement will be on you, but the content itself is always going to be CC0/public domain. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 05:48, 10 June 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Multiple Platforms ==&lt;br /&gt;
&lt;br /&gt;
Should anything special be done for games that are both DOS and Win95, like [[Warcraft II]] and [[Command &amp;amp; Conquer]]? As it is, the template only supports one &#039;Platform&#039;. I don&#039;t know enough about templates to make it accept lists, though a workaround would be to add the Win95 category to such games manually. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) &lt;br /&gt;
20:29, 17 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
: I&#039;m open to suggestions, but the purpose of the platform category is less about documenting all platforms a game runs on, and is more about identifying which games on the wiki don&#039;t work under DOS, since DOS is the wiki&#039;s main focus.  So think of it more as the &amp;quot;minimum&amp;quot; platform needed - i.e. a DOS game can also run inside Win3.x and Win95, a Win3.x game can also run under Win9x but not DOS, and a Win9x game can&#039;t run under DOS or Win3.x at all.  So for DOS/Windows games DOS would be the oldest platform needed to play the game, even if there is a native Windows version. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 00:26, 18 April 2022 (GMT)&lt;br /&gt;
::&#039;Minimum platform&#039; isn&#039;t really true anymore when going to the reality of getting stuff running on modern machines, though; 16-bit windows programs don&#039;t work on modern systems at all, and DOSBox can&#039;t emulate them. They&#039;re a pretty annoying in-between class. C&amp;amp;C95 has issues like that; while the game itself is 32-bit, its installer is a 16-bit Windows program. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:33, 18 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: That&#039;s true, but I wasn&#039;t thinking so much about modern systems.  If you&#039;re building a VM or setting up an old PC, knowing which games will work without Windows, or will work if you only install Win 3.1, might be useful.  I did think you could install Windows 3.1 in DOSBox though to run 16-bit apps.  At any rate, I more had in my mind which games required OS support for NE executables in order to play, and which ones required PE support. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 11:48, 18 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: Well, one of the specific cases I had in mind in this was the fact that the Win95 version of Command &amp;amp; Conquer uses PCX format for its title screen, while the DOS version doesn&#039;t. And while the basic modding of terrain and game objects is identical in both versions, all modding related to the game UI is different because of the different resolution. So, if more detailed information on that front would be added, it seems logical to also add the Win95 category somehow. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:17, 25 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: In that case it sounds almost like a different game that happens to share a lot of the same content, so I&#039;d be more inclined to list it as a separate game, e.g. on a page called &amp;quot;Command &amp;amp; Conquer (Windows version)&amp;quot;, and just put a note saying the file formats are the same as the DOS version with the following exceptions, then list the Windows-specific file formats. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 15:42, 25 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::: No, it&#039;s really just PCX, nothing else is new in terms of file formats. The UI is in the same sprites format used for the in-game sprites. So like 95% still the same. But yea, I guess if I do ever get around to writing a more in-depth modding guide, I could make a different page for the Win95 version. Most of the modding difference between the two games is just that the Win95 exe file has been researched a lot deeper, to the point that (with the released source code) pretty much anything in it can be changed nowadays. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:10, 25 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
==Empty Pages==&lt;br /&gt;
Not sure if you already noticed it, but user [[User:Parlortricks]] is creating a bunch of empty pages, I&#039;m assuming to be filled at a later date. --[[User:TheAlmightyGuru|TheAlmightyGuru]] ([[User talk:TheAlmightyGuru|talk]])&lt;br /&gt;
: I hadn&#039;t noticed, thanks for the heads up!  I updated [[ModdingWiki:Contributing]] to include some more points about when to create pages. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 04:31, 10 August 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
== File format category for copy-protection data. ==&lt;br /&gt;
&lt;br /&gt;
I can&#039;t find any suitable examples with a template that suits a file containing only the copy protection data.   &lt;br /&gt;
It&#039;s not text, but there don&#039;t seem to be any generic binary format templates. [[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 06:44, 17 April 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
: I&#039;m not really familiar with what copy protection data would contain.  What generic items would you think apply to this sort of data?  I&#039;m not so keen on adding a generic binary format category, it would be nice to have a specific one where possible. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 09:17, 17 April 2023 (GMT)&lt;br /&gt;
:: In this case, the file contains 750 passwords. They were printed on a piece of card in with the original game (in pale blue to thwart photocopying) and the game asks you for one of the passwords at random. I&#039;ll make a file without a specific category for now.[[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 12:31, 17 April 2023 (GMT)&lt;br /&gt;
::: If they&#039;re passwords, doesn&#039;t that make it a type of strings file? You said it&#039;s not &amp;quot;plain text&amp;quot;, but can it be converted/decoded to plain text? I&#039;ve dealt with encrypted text formats before; see [[Cover Girl Strip Poker Text]] -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:20, 17 April 2023 (GMT)&lt;br /&gt;
: There are lots of file formats of unspecified types. See stuff like [[Westwood Fading Table]]; it&#039;s basically a file storing special colour effects. I&#039;m not sure there&#039;s a point in making a template for every specific type like that; there&#039;s so many odd cases out there. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:17, 17 April 2023 (GMT)&lt;br /&gt;
:: Thanks.  I wasn&#039;t necessarily looking for a template. But I couldn&#039;t find an example of a file that wasn&#039;t already in an incorrect template. I&#039;ll base my page on the example you suggested.[[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 12:31, 17 April 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Wiki policy questions ==&lt;br /&gt;
&lt;br /&gt;
Hi, a couple questions I&#039;ve had lingering regarding how things should be done on the wiki / if they should be done at all.&lt;br /&gt;
* What should we do about game title disambiguation?  I think in cases like Warlords (SSG) vs. Warlords (Atari) where only one of the games was released as a DOS game, it&#039;s probably fine to just have a page for the one that&#039;s relevant and at most maybe have a note on its main page that it&#039;s not related to the other game, but I&#039;ve noticed that &amp;quot;Dungeon of Death&amp;quot; is a title that has the honor(?) of being used for two different games &#039;&#039;on DOS&#039;&#039;.  Is there a particular disambiguation format we should use when adding one of those?&lt;br /&gt;
* Is there any specific policy on games/mods with offensive content?  I know we have some strip poker type games referenced on the wiki, but one thing I&#039;m specifically thinking of is I know there was an old hack of the DOS version of Gauntlet 2 that&#039;s been floating around since the 90s, but is a fairly puerile affair that changes text/graphics to sexual and scatological references.  It also has a vulgar word in the mod title itself.  It might be useful to look at how it was done since it&#039;s clearly evidence that changing the text/graphics was attainable even back then, but do we want to document things like that, or is there a &amp;quot;too dirty&amp;quot; line where we should try to keep the wiki clean of references to certain games/mods due to title or content?&lt;br /&gt;
Thanks.-- [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 18:35, 3 October 2023 (GMT)&lt;br /&gt;
: Final decision on this is obviously on Malvineous, but here&#039;s my two cents on this: I don&#039;t think there&#039;s any restriction on making pages for covering games with explicit content, but it&#039;d be nice to keep the &#039;&#039;actual&#039;&#039; explicit content on the wiki to a minimum. As an example, the most daring thing I put on the wiki was the modded showcase image for [[Interactive Girls Club]], which, without the humorous covering, was indeed a straight up explicit image. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 19:23, 3 October 2023 (GMT)&lt;br /&gt;
:: Yep I agree.  The purpose of the wiki is for documentation, and just like a TV documentary, sometimes you may have to cover difficult subjects, so it&#039;s usually done in a tactful way without showing anything directly offensive.  So I think the same policy should apply here - no directly explicit/offensive content (e.g. images), but talking about it for the sake of documenting it is fine.  I would think avoiding offensive words in article titles would be a good idea as people are more likely to come across those by accident, but if you&#039;re browsing an article about a pornographic game and you encounter some dirty words, you have nobody to blame but yourself.  So listing that mod with an uncensored title is fine with me, but perhaps let&#039;s not create an article page for it unless the words are obscured with asterisks or similar just to be extra considerate to those who might be browsing through the lists of pages.&lt;br /&gt;
:: It would be good to make it clear when things are censored though.  In Nyerguds&#039; example I actually thought the &#039;censored&#039; image was part of the game, I didn&#039;t realise it was an addition.  So maybe it would be good to write &amp;quot;Censored by ModdingWiki&amp;quot; or something to that effect, to make it obvious that it&#039;s something we&#039;ve done and not part of the original game.  Likewise for an article title with asterisks in it, one of the first things on the page should be a note to say what the full uncensored article title actually is.&lt;br /&gt;
:: As for disambiguation I&#039;m open to suggestions.  Probably my first thought would be to include the year of release in brackets: &amp;quot;Example (1990)&amp;quot; like what was done for [[Shadow Warrior (1993 Beta)]] or if the year is the same, then perhaps the software developer: &amp;quot;Example (Microsoft)&amp;quot;.  I&#039;m not too fussed as it&#039;s probably more important that the part in brackets makes sense to readers rather than follows any hard and fast rule.  Either way a normal disambiguation page should be created for the name without any brackets, in the same style as the existing ones at [[:Category:Disambiguation]].  A disambiguation page wasn&#039;t created for Shadow Warrior as the beta version isn&#039;t really a competing game, so links on the respective article pages would suffice.  As always, use your best judgement, we can always change it later if we need to. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 06:10, 4 October 2023 (GMT)&lt;br /&gt;
::: The Interactive Girls Club image &#039;&#039;isn&#039;t&#039;&#039; censored for the sake of putting it on the wiki though. It&#039;s a showcase of the game being &#039;&#039;modded&#039;&#039;. I replaced the normal mouse cursor with that sign. I could&#039;ve taken a tamer scene to start with, but I thought this would be funny. I explained what was done to it [[:File:Mod-Interactive_Girls_Club.png|on the actual image page]]. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 07:34, 4 October 2023 (GMT)&lt;br /&gt;
:::: Ohh, I understand now!  Sorry it was completely lost on me, but that&#039;s probably because I&#039;ve never played the game before so I didn&#039;t know what changes to look out for! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:45, 4 October 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Pages linking to itself ==&lt;br /&gt;
&lt;br /&gt;
Hello! Merry Christmas and Happy New Year! Is it possible to check Wiki for pages that linked to itself and maybe autocorrect if possible? Like [https://moddingwiki.shikadi.net/w/index.php?title=Shakii_The_Wolf&amp;amp;curid=2343&amp;amp;diff=11369&amp;amp;oldid=11367 this] or [https://moddingwiki.shikadi.net/w/index.php?title=Pee_and_Gity&amp;amp;curid=2348&amp;amp;diff=11370&amp;amp;oldid=6789 that]? Sometimes this will result in redirect to itself (as in first example) or a red link indicating that page with this name was not created (as in second example). I&#039;ve checked and fixed all pages created by [[User:MartinVole|MartinVole]] but maybe there are more. Thank you! -[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 19:46, January 3, 2024‎ (GMT)&lt;br /&gt;
:I&#039;ve occasionally seen it used as shortcut to putting the page name in bold in the page intro, but yea, it&#039;s kind of odd. According to [[wikipedia:Help:Self_link|the official Wikipedia page on the subject]], &amp;quot;Self links are usually undesirable&amp;quot;. I immediately fixed it in the case of Shakii because, with it linking to a redirect page, it even created a real link. (PS: please sign your talk page addidions.) -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 20:26, 3 January 2024 (GMT)&lt;br /&gt;
:: Hello and Merry Christmas and Happy New Year to you too! Wow, you fixed so much pages already! That&#039;s why I was asking [[User:Malvineous|Malvineous]] for help - maybe there is a way to do it automatically. Or at least somehow get the list of the affected pages. (Thanks! I was sure I put four &amp;quot;~&amp;quot; characters but not sure what happend and why Talk page was not included.) -[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 22:35, 3 January 2024 (GMT)&lt;br /&gt;
::: Merry Christmas and happy 2024 to you too :) Yea, I&#039;m just going down the list of all articles, heh. By the way, your talk page was not included because there was nothing there; I fixed it by coping the timestamp from the History page and adding your name manually. On that note, maybe you should make an actual user page; it&#039;s still a red link. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 22:51, 3 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: I used to like using self-referential links as it meant the links would &amp;quot;work&amp;quot; again if the content was copied onto another page, but I agree once you start involving redirects it becomes a bit of an issue.  So no problems from me if you remove those.  There are some reports on [[Special:SpecialPages]] that list different types of page reports you can run, but I don&#039;t see one that picks up these links.  I can&#039;t remember whether a self-link automatically adds the page to a category or not, because that could be another place to check, in case there is a category of all pages with self links.  However I think it might have to be a case of just fixing them as we encounter them.  -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 00:35, 4 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: Yea, I dug around a little online and found no information about detecting / listing them, so instead I just opened [[Special:AllPages|the list of all pages]], and simply went through the whole bunch. Also fixed some pages that simply used &amp;amp;lt;b&amp;amp;gt; html tags instead of proper wiki formatting to make their titles bold, renamed a few pages that were missing apostrophes in their page titles, and noticed one page that still used old &amp;amp;lt;code&amp;amp;gt; tags. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 08:08, 4 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::: Wow that would&#039;ve been a big job, thanks very much! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 09:57, 4 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: Thank you for the answer and clarification! -[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 14:51, 4 January 2024 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: Thank you for the great help with fixing the Wiki pages! Yes, user page created now, thanks! -[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 14:51, 4 January 2024 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User:CTPAX-X_Team&amp;diff=11582</id>
		<title>User:CTPAX-X Team</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User:CTPAX-X_Team&amp;diff=11582"/>
		<updated>2024-01-04T14:42:55Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: Created page with &amp;quot;Hello! This is &amp;#039;&amp;#039;&amp;#039;CTPAX-X Team&amp;#039;&amp;#039;&amp;#039; account. For past 18 years (as of 2024) we released for free with source codes almost 170 of our tools for various games, which you can found...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello! This is &#039;&#039;&#039;CTPAX-X Team&#039;&#039;&#039; account. For past 18 years (as of 2024) we released for free with source codes almost 170 of our tools for various games, which you can found here: [http://www.ctpax-x.org/ http://www.CTPAX-X.org/] (if you can&#039;t open link mare sure you&#039;re using HTTP instead of HTTPS). Use &#039;&#039;Translate this page to another language&#039;&#039; button at the page top to translate information on our site to your native language. Note that almost all of our tools implemented in CLI (Commad Line Interface) and have an English (International) or dual English/Russian language support. Have fun!&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=ModdingWiki:Community_portal&amp;diff=11581</id>
		<title>ModdingWiki:Community portal</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=ModdingWiki:Community_portal&amp;diff=11581"/>
		<updated>2024-01-04T14:23:19Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: Xentax gone away&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Discussion ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.classicdosgames.com/forum/viewforum.php?f=25 RGB Classic Games modding forum] (any/all DOS games)&lt;br /&gt;
* [http://www.keenmodding.org Keen:Modding] (Commander Keen and others sharing the same engine)&lt;br /&gt;
* [http://forum.xentax.com Xentax forum] [https://web.archive.org/web/20231008110624/https://forum.xentax.com/ (archived version)] Reverse engineering discussion, with a focus on archive file formats and more modern games&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
&lt;br /&gt;
* [http://rewiki.regengedanken.de REWiki] [https://web.archive.org/web/20140910044440/http://rewiki.regengedanken.de/wiki/Main_Page (archived version)] - reverse engineering wiki (similar to this wiki but not restricted to DOS games)&lt;br /&gt;
* [http://wiki.xentax.com/ Xentax game wiki] [https://web.archive.org/web/20230810044039/http://wiki.xentax.com/index.php/Game_File_Format_Central (archived version)] - game archive format documentation, with more of a focus on modern games and also game consoles&lt;br /&gt;
* [http://oezmen.eu/gameresources/ Deniz Özmen&#039;s game resources] - quite a few unpackers for various games&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dark_Legions&amp;diff=11580</id>
		<title>Dark Legions</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dark_Legions&amp;diff=11580"/>
		<updated>2024-01-04T14:17:35Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Links */ fixed dead link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
{{Game Infobox&lt;br /&gt;
 | Levels = No&lt;br /&gt;
 | Tiles = Edit&lt;br /&gt;
 | Sprites = No&lt;br /&gt;
 | Fullscreen = Edit&lt;br /&gt;
 | Sound = Edit&lt;br /&gt;
 | Music = No&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dark Legions&#039;&#039;&#039; is a strategy/action hybrid game (similar to Archon) developed by [[Silicon Knights]] and published by [[SSI]]. Two armies of fantasy beings attempt to defeat each other&#039;s orb keeper in order to become supremely powerful.&lt;br /&gt;
&lt;br /&gt;
The game can be played two player or versus an AI.&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.amp&lt;br /&gt;
 | Format = [[AMP Format (Dark Legions)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Combat maps&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.map&lt;br /&gt;
 | Format = [[MAP Format (Dark Legions)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Strategic maps&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.col&lt;br /&gt;
 | Format = [[COL Format (Dark Legions)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Palettes&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.bdt&lt;br /&gt;
 | Format = [[DAT Format (Dark Legions)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Graphics archive&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.bdm&lt;br /&gt;
 | Format = [[DAT Format (Dark Legions)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = BDT headers&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.dat&lt;br /&gt;
 | Format = [[DAT Format (Dark Legions)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Graphics archive&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.dmp&lt;br /&gt;
 | Format = [[DAT Format (Dark Legions)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = DAT headers&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.dac&lt;br /&gt;
 | Format = [[DAT Format (Dark Legions)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Graphics archive&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.dmc&lt;br /&gt;
 | Format = [[DAT Format (Dark Legions)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = DAC headers&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.gif&lt;br /&gt;
 | Format = [[Graphics Interchange Format]] (GIF87a)&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Interface and tile set graphics&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.hmp&lt;br /&gt;
 | Format =  [[Human Machine Interfaces MIDI Format]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Music&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.bnk&lt;br /&gt;
 | Format = [[AdLib Instrument Bank Format]] (v0.0)&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Instruments associated with HMP music&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.raw&lt;br /&gt;
 | Format = Raw PCM audio, unsigned 8-bit PCM, mono, little-endian, 11025 Hz&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound effects&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.flc&lt;br /&gt;
 | Format = [[FLIC Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Intro animations&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.arm&lt;br /&gt;
 | Format = ?&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Army saves?&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.gam&lt;br /&gt;
 | Format = ?&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Save games?&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.qgm&lt;br /&gt;
 | Format = ?&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Quickstart games?&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.sgm&lt;br /&gt;
 | Format = ?&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Save games?&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[https://web.archive.org/web/20180127191002/http://rewiki.regengedanken.de/wiki/Dark_Legions Dark Legions on REwiki] - For known file format specs&lt;br /&gt;
&lt;br /&gt;
[[Category:Silicon Knights]]&lt;br /&gt;
[[Category:SSI]]&lt;br /&gt;
[[Category:Strategy]]&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Malvineous&amp;diff=11489</id>
		<title>User talk:Malvineous</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Malvineous&amp;diff=11489"/>
		<updated>2024-01-03T22:35:57Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Pages linking to itself */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Wolfenstein 3D -&amp;gt; Wolfenstein 3-D ==&lt;br /&gt;
I&#039;ve corrected the infamous 3D tyop in the names of several Wolf3D-related pages; can you please delete the following ones?&lt;br /&gt;
&lt;br /&gt;
[[:Category:Wolfenstein 3D]] -&amp;gt; Superseded by [[:Category:Wolfenstein 3-D]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[:Image:Wolfenstein_3D.png]] -&amp;gt; Superseded by [[:Image:Wolfenstein_3-D.png]]&lt;br /&gt;
&lt;br /&gt;
Thanks :) --De Zeurkous (zeurkous@zeurcomp.nichten.info), Thu Nov 22 08:18:42 UTC 2007&lt;br /&gt;
&lt;br /&gt;
:Haha, you&#039;ve certainly been busy.  Don&#039;t forget that this wiki isn&#039;t meant to be an encyclopaedia of the games, its main purpose is documenting the file formats and editing tools that can be used with the games, as opposed to how the games behave without any mods, or what they might be called if you forget to change the title screen :-) -- [[User:Malvineous|Malvineous]] 11:14, 22 November 2007 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Nah, I haven&#039;t forgotten. As we&#039;re reinventing the wheel for a semi-virgin wiki, the naming and something static like the cheats seemed like a good place to start :) --De Zeurkous (zeurkous@nichten.info), Thu Nov 22 12:20:04 UTC 2007&lt;br /&gt;
&lt;br /&gt;
== Jill of the Jungle palette ==&lt;br /&gt;
&lt;br /&gt;
Hi, I&#039;m currently working on a level viewer for [[Jill of the Jungle]] (maybe an editor later on). Some of the information I found here has been very useful, but there&#039;s one thing I&#039;m a bit stuck on. On the [[SHA Format]] page it says:&lt;br /&gt;
:&#039;&#039;Each array item contains 4 unsigned bytes, representing CGA, EGA and VGA, respectivley, and then a null value. [...] Each byte maps to the index of a colour in the palette. If there are no colours required, the tile set uses the default colours.&#039;&#039;&lt;br /&gt;
However, it doesn&#039;t say anywhere where the palette can be found. Is it stored in the EXE file? I hope you can help me on this :)&lt;br /&gt;
&lt;br /&gt;
Regards, [[User:Spinal|Spinal]] 13:00, 2 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
:Unfortunately I didn&#039;t write the JotJ SHA page, and I haven&#039;t yet had the time to figure this out.  For Xargon I&#039;ve taken the quick and dirty route and used a screenshot from within DOSBox as the source of the palette, until I can figure out where the palette is located.  If you find this out, don&#039;t forget to update the page! :-) -- [[User:Malvineous|Malvineous]] 22:02, 2 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Hey Spinal, sorry, I wrote the [[SHA Format]] page, so that was probably my bad. I wasn&#039;t able to find the palette either. I assume it&#039;s in the .EXE, however I spent a fair bit of time manually mapping it using a Wombat tool (http://www.szevvy.com/node/3). I was also writing a level viewer (initally in XHTML which turned out to be too slow, so then I moved to Flash 9). I tried to email you my findings, but the email bounced. I&#039;m not sure if they were 100% accurat, which is why I never added them to the documentation.&lt;br /&gt;
&lt;br /&gt;
::Hey Malvineous, it seems the Jill - [[DMA Format]] page has been removed. Do you have a log of what happened to it? I&#039;m sure it existed at some point.&lt;br /&gt;
&lt;br /&gt;
::- [[User:dheim|Daniel]] 20:00, 5 March 2008&lt;br /&gt;
&lt;br /&gt;
:::I don&#039;t ever remember seeing a DMA page - certainly there&#039;s nothing in the wiki logs about it being deleted or renamed.  Maybe you started working on it but never got around to saving it?  Or is it one of the Xargon pages that shares the same format as Jill?  (by the way, you can type &amp;lt;nowiki&amp;gt;~~~~&amp;lt;/nowiki&amp;gt; to automatically put in the signature in these messages.) -- [[User:Malvineous|Malvineous]] 11:28, 5 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::Sorry, it must have been the stuff in the [[SHA Format]] page that I was thinking of. I may have added the link to the [[DMA Format]] page, and never expanded on it. - [[User:Dheim|Daniel]] 02:46, 6 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::Hi guys. Sorry for the mistake, I mixed up the authors of the SHA and level formats. I&#039;ve written a level viewer in PHP the last week, by using static images instead of getting them from the actual files. This causes some problems for episode 2, which uses a different palette, but besides that it works great :) When everything is done I&#039;ll upload the maps to my server and the tile/object lists to this wiki.&lt;br /&gt;
:::::@Daniel: strange that it bounced, I confirmed my address so it should be working fine... You can mail it to spinal -at- zanderz -dot- net. Also, I saw on your Wombat page that you &amp;quot;have a vague idea of how to do&amp;quot; [[Hocus Pocus]]. Could you share your findings on this wiki? I&#039;d love to make maps, or even a level viewer/editor for that game :) -- [[User:Spinal|Spinal]] 00:32, 8 March 2008 (GMT)&lt;br /&gt;
:Okay, with help of [[User:Dheim|Daniel]] who send me the palette I found it! I&#039;ll put my findings on [[Jill of the Jungle palette]]. -- [[User:Spinal|Spinal]] 15:36, 13 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Halloween Harry/Alien Carnage ==&lt;br /&gt;
&lt;br /&gt;
Hi Malvineous. Thanks for your edits on the GMF article! I notice you mentioned there exist versions of the game which don&#039;t require exploding a BNK to get at the game data. What does the directory structure look like for the version you have? I&#039;m working on a map viewer (which will become a map editor at some point) and would like it to be able to work on whatever versions are out there. Thanks for any info. -[[User:Duckthing|Duckthing]] 04:41, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Hi Duckthing - no worries, Halloween Harry has long been an interest of mine, but my map editor sadly needs a lot more work before I can begin reverse engineering more file formats so I&#039;m glad you&#039;ve made a start!  AFAIK technically Halloween Harry has no compression, but for whatever reason (probably listed in the Apogee FAQ) they decided to swap episodes 1 and 3, compress the BNK file and then re-release it under the name Alien Carnage.  You can download all available versions (including registered versions since the game was released as freeware in 2007) from [http://www.classicdosgames.com/game/Alien_Carnage.html RGB Classic Games].  BTW not sure if you noticed but I also posted a couple of things on the GMF article&#039;s talk/discussion page. -- [[User:Malvineous|Malvineous]] 06:08, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: Thank you! Working with the uncompressed version will keep things less complicated. I did notice the GMF discussion you added, but haven&#039;t had a chance to really go through it yet. -- [[User:Duckthing|Duckthing]] 06:41, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: No worries.  If you&#039;re running Linux or MacOSX you should be able to compile [[Camoto|libgamearchive]] which will let you copy files in and out of the BNK files.  This is a library so it&#039;s also possible to use it in your own program for accessing and editing the map files while they&#039;re still inside the BNK, for instance.  (BTW the &#039;minor&#039; tickbox should only be used when the edit does not affect the information on the page - e.g. fixing a typo or a broken URL.  If you are changing the actual content on a page it is never a minor edit!) -- [[User:Malvineous|Malvineous]] 07:51, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dangerous Dave ==&lt;br /&gt;
&lt;br /&gt;
Working on this, does anyone have any info on the formats? The EGA graphics are 84KB and external, but CGA and VGA graphics unrelated to them are in the 174KB executable, apparently uncompressed, I don&#039;t know how this is possible. I&#039;ve found the levels and partially reverse engineered the format (The first 1000 bytes, a 100x10 array of tiles.) but each level is followed by ~280 bytes of variable and unknown data I assume is sprites. I have a list of internal files in the executable, looks like most of it is non-game code. Any help would be appreciated. -[[User:Levellass|Endian? What are you on about?]] 06:03, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Hmm, interesting.  All I can suggest for the levels is - as you&#039;re probably already familiar with - changing the values in a hex editor then loading the game to see what happens.  I would suspect that all the graphics would be in a similar format, so if there are any headers or structures used in the EGA graphics files perhaps they&#039;re duplicated for CGA/VGA?  Also John Romero seems pretty accessible, perhaps you could ask him directly?  Failing that, randomly writing data into the .exe until the images change could be used as a last resort! -- [[User:Malvineous|Malvineous]] 12:09, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Ha, that was easier than I expected - uncompressed VGA data is easy to find with a good hex editor ;-)  [http://www.shikadi.net/pics/ddave-vga-hexdump.png This looks like it] -- [[User:Malvineous|Malvineous]] 12:17, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Ok that was only the menu graphics.  At offset 0xC629 there&#039;s some sort of offset table which looks very similar to the contents of EGADAVE.DAV but there are extra bytes dotted all over the place - perhaps it&#039;s RLE encoded?  Actually just before that there&#039;s the number 0x6CAA.  If you go a bit less than 0x6CAA bytes after this you end up with another table, which to me suggests that 0x6CAA is the decompressed size of that first table. -- [[User:Malvineous|Malvineous]] 13:01, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:If I remember it correctly, the VGA sprites and tiles are RLE compressed and it&#039;s not too hard to decompress them. The positions of the enemies in the levels on the other hand are still a mystery to me. [[User:Calvero|Calvero]] 20:43, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Looking at the levels, which directly follow the VGA palette, they seem to contain 256 bytes of header data, then the 100x10 tiles, then eight bytes of lead-out data.  Then the next level&#039;s 256 bytes of header, 100x10 tiles, then eight bytes of lead-out.  Although I say &amp;quot;level&amp;quot;, the first &amp;quot;level&amp;quot; seems to contain both level 1 and 2, and this seems to be the way it works in the game - in some levels you can see through to others.  I&#039;m not sure what the 256 bytes of header data are for, but some levels have FF FF 00 00 repeated which seems to indicate two uint16 fields which are blanked out for those levels. -- [[User:Malvineous|Malvineous]] 13:15, 13 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
::First up, levels; where does level 1 start? It&#039;s possible I&#039;m reading the start of a level as the previous level&#039;s end, I looked for the start of tile data, which I assumed, like Keen 1, would be the level start.&lt;br /&gt;
&lt;br /&gt;
::Next, palette; I&#039;m assuming, as you said, it is located just before the level data?&lt;br /&gt;
&lt;br /&gt;
::There is VGA and CGA graphics in the executable, plus headers, but the bulk of graphics for CGA and VGA I haven&#039;t been able to locate. If the data is RLE compressed I should think it would use either Keen 1-3 fullscreen or Jazz Jackrabbit tile RLE, both of which I know well. I&#039;ll look into both of these options, cheers! -[[User:Levellass|Endian? What are you on about?]] 12:03, 20 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::I&#039;ve found the VGA and CGA data for the menu graphics.  It looks like the CGA data is stored in a series of 1-bit-per-pixel (monochrome) images.  Or it could be EGA data with the planes split out (e.g. red plane for all images, then green plane for all images, etc.)  I think I found three planes which means it&#039;s probably EGA, as CGA would have a max of two planes.  I&#039;ve also found the font graphics, this looks like 4bpp/16 colour EGA data.  Haven&#039;t seen level graphics yet.  I&#039;ve successfully modded the levels with a hex editor (putting the jetpack everywhere) so now I&#039;ve finally looked at all the levels!  The creatures are definitely not stored in the 100x10 tile data.  Putting random bytes in there revealed that the values are indices into the image files, because if you put the value in for fire it will animate, and the following three or so values show up as still frames from the fire animation.&lt;br /&gt;
&lt;br /&gt;
:::The VGA palette starts at 0x26B0A (I updated the main DDave page with this) + 768 bytes leads straight onto the start of level 1 at 0x26E0A.  So at 0x26E0A there are 256 bytes of data, then 100x10 tiles, then 24 bytes of footer data.  Some of this data (perhaps footer data) might be the level start coordinates, because Dave doesn&#039;t always start the level at the same place (e.g. the warp level when you climb the tree on level 5 and jump off the edge of the screen.) -- [[User:Malvineous|Malvineous]] 12:24, 20 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::I think I&#039;ve found all the files so far, I&#039;ve updated [[Dangerous Dave]] with the offsets of the files, including what appears to be CGA and VGA tiles.  I&#039;m not sure what sort of format they&#039;re in though, it looks like they might be compressed (and so the offsets in that list might be off by ~4, as I may have cut off the decompressed-size field.)  I&#039;ve also updated the map format page, I think it&#039;s pretty much fully reverse engineered now. -- [[User:Malvineous|Malvineous]] 05:13, 21 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Noahs Ark 3D and IMFs ==&lt;br /&gt;
&lt;br /&gt;
Been poking around Noah&#039;s Ark 3D, an adaption of the Wolfenstein game and found a few interesting things which I&#039;m hoping to confirm.&lt;br /&gt;
&lt;br /&gt;
First, the game uses MID files, not IMF files for music, second, the MIDI files have an extra word at the start of the file giving the file length. Third, the code uses the first word of the midi file as the length of data to read from the file and put into memory to play. After poking around a bit in Wolfenstein and Keen I believe this is the same with IMF files, that is, ALL IMF files are type 0 as it were and the type 1s are read just like type 0s by the games (The first word is read as the amount of IMF data to copy into memory to play, this is then read as type 0.) I&#039;m not quite sure what this does for the two types since type 1 is would essentially be a type 0 with a header and footer that are part of the AUDIO.xxx format, much like PC\adlib sounds can have the huffman lengths at the start. Are there any games that use &#039;individual&#039; type 1 IMFs (Even if included as part of a group file. All I&#039;ve seen are games like cosmo, where non-AUDIO IMFs are type 0.)&lt;br /&gt;
&lt;br /&gt;
Should there be a Noah&#039;s Ark 3D page and should we add the midi note to the AUDIO format page? It seems that the format can hold any type of music file the game can read, not just IMFs.  -- Levellass&lt;br /&gt;
&lt;br /&gt;
: Yes it is known that the type-1 header might really be part of the AUDIO.xxx format but alas there were many type-1 files floating around the place (incorrectly extracted, you could argue) before this was realised, so the format variant is here to stay.  It does have some advantages though (like tagging files with the song title) but I&#039;m not sure whether anyone has figured out definitively whether the header (and footer, in the case of the Wolf3D files) belongs to the IMF or the AUDIO file.  I guess you&#039;d have to browse the game source code and see how the game uses the data to know for sure.&lt;br /&gt;
&lt;br /&gt;
: As far as the MIDI goes, I believe the AUDIO.xxx file is just a container file like any other, capable of supporting any data at all.  It&#039;s up to the game to decide how to use it.  If anything this makes me think it would fit better if the AUDIO.xxx article was merely documenting the structure, with links to actual audio formats like PC SFX, Adlib SFX, IMF and MIDI and notes about which games make use of which formats.&lt;br /&gt;
&lt;br /&gt;
: Oh and yes, by all means create a page for the new game. -- [[User:Malvineous|Malvineous]] 08:41, 3 February 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Sound Files category ==&lt;br /&gt;
&lt;br /&gt;
I don’t know why there’s a Sound Files category and also an Audio Files category... it seems redundant. I left those categories the way they are though.&lt;br /&gt;
&lt;br /&gt;
Also, the [[File format data types]] page needs some signed ints, but I didn’t know what naming convention you wanted to use. I described something as an [[INT16LE]] on [[BMC Format]]. [[User:Yellowantphil|Yellowantphil]] 20:12, 11 September 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Not sure about the Sound vs Audio - I use the term &#039;audio&#039; to mean both sound and music, but you&#039;re right, if there are separate sound and music categories we don&#039;t really need an audio one as well.  Feel free to update.  [[INT16LE]] is perfectly fine too!  I added a note to the data types page. -- [[User:Malvineous|Malvineous]] 22:30, 11 September 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
== GamePage template ==&lt;br /&gt;
&lt;br /&gt;
Should the GamePage template add the page to its own category? It seems a little odd that [[Wacky Wheels]] is not in the Wacky Wheels category. [[User:Yellowantphil|Yellowantphil]] 04:51, 16 September 2011 (GMT)&lt;br /&gt;
: I decided against this because there is a link to the game&#039;s page in the category intro at the top of the page.  It seemed unnecessary having another link in amongst all the other pages.  This was also because the game page was really only meant to be a summary, there wasn&#039;t supposed to be a huge amount of detail on it, only links to other pages with the detail (which then would appear in the category list.)  I would imagine that, eventually, [[Wacky Wheels]] would be tweaked to move a lot of the content onto subpages. -- [[User:Malvineous|Malvineous]] 12:58, 16 September 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Scope of the wiki ==&lt;br /&gt;
&lt;br /&gt;
I don’t know how extensive you want the information to be on ModdingWiki... I added a few lists of audio and graphics files a while ago, and there will probably be other information that I’ll find out that’s potentially helpful for level editing but not directly related to it. I can move some information to my website if it starts to become out of scope for your wiki. I also sometimes end up documenting everything imaginable... there’s some minutiae on my website and possibly on your wiki that I ought to go through and delete. [[User:Yellowantphil|Yellowantphil]] 05:28, 10 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
:Hmm, that&#039;s a difficult one - I&#039;m always in favour of documenting more rather than less.  Generally speaking if it&#039;s related to a game and it would help either a programmer writing a utility or a someone trying to change a game manually then it should be documented.  About the only thing that comes to mind that&#039;s over documenting is when some small calculation is expressed in a couple of different programming languages, but I&#039;ve left that in so people can just copy it rather than trying to figure it out from the text.  But the [[Wacky Wheels]] page is probably the gold standard for what all wiki pages should look like :-)  Do you have anything in particular you&#039;re unsure of whether it would fit here? -- [[User:Malvineous|Malvineous]] 10:07, 10 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
::I was mainly thinking of the list of VOC files on [[Wacky Wheels Music and Sound Effects]] and the list of &amp;lt;tt&amp;gt;*.sp&amp;lt;/tt&amp;gt; files on [[Wacky Wheels Graphics Formats]]. I have an expanded list of the &amp;lt;tt&amp;gt;*.sp&amp;lt;/tt&amp;gt; files on my computer but it isn’t finished yet. I guess there isn’t all that much more Wacky Wheels information to be added to this wiki though. There is still some modding information on my website that ought to be moved over here, so that would take up another page or two. I’ve been lazy about doing Wacky Wheels stuff lately, but I might find some time for it this weekend.&lt;br /&gt;
&lt;br /&gt;
::By the way, I guess that guy from Cascadia Games emailed you. It’s pretty interesting that WW might become an iPhone app. He told me that he was going to be using his own game engine, which sounds a lot easier than trying to get a hold of the WW source code and porting it. —[[User:Yellowantphil|Yellowantphil]] 16:46, 15 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: I was going to say the list of VOCs might be overkill, but then the list of .sp files might be useful.  To be honest, it&#039;s the sort of thing that you could probably omit if you were feeling lazy, but likewise I don&#039;t mind at all if you choose to include it, so since it&#039;s already there I&#039;m happy to keep it.&lt;br /&gt;
&lt;br /&gt;
::: Yes I did get an e-mail from Cascadia, I was going to pass along your details but it sounds like you&#039;re already aware of it!  Using their own engine might make it a bit smoother than the original, as the jerkiness of turning is my only criticism of the game. -- [[User:Malvineous|Malvineous]] 00:14, 16 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
:I&#039;d like to document not only the format of some game archives but also their contents. This would be quite long lists of basically images, sprites and some minor stuff. I&#039;d also like to upload the actual images alongside but I&#039;m not sure whether that fits the scope of the wiki or if I should just put it somewhere on github. Any advice highly welcome :) -- [[User:Yetmorecode|Yetmorecode]] 15:25, 22 December 2020&lt;br /&gt;
&lt;br /&gt;
::That depends on what you mean with &amp;quot;their contents&amp;quot;. Documenting the used file formats is obviously in the scope of this wiki, since there&#039;s not much point in being able to extract/replace the files in those archives if you can&#039;t actually view those files or make those replacements. But dumping the whole list of all existing files in a game into a wiki article is usually not very useful. An article could highlight some specific files with special functions in the game (stuff like the remap-defining PALETTE.CPS in Red Alert 1 comes to mind; [[Westwood CPS Format|cps]] is a very normal image format in these games, but that specific file controls all recolouring of sprites that change to their owner&#039;s colour), but a list of all sprites and sound files and all their exact usages in the game doesn&#039;t seem like it&#039;d belong here; most of the time such things are pretty self-evident.&lt;br /&gt;
::PS: when you add something to a user talk page, use the signature code to give your note a clearly visible author and date stamp. There&#039;s a big red box on the top of the edit page telling you how to do that.&lt;br /&gt;
:: --[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:51, 22 December 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Alright that makes sense. Sorry about the signature I must have been blind. [[User:Yetmorecode|Yetmorecode]] ([[User talk:Yetmorecode|talk]]) 17:11, 22 December 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: Yes just to confirm this, an image or two is useful to illustrate a file format but we don&#039;t want to become an archive of all game material, not least of which because extracting this is often against the game&#039;s licence (and doesn&#039;t really come under &amp;quot;fair use&amp;quot;) so could open you up to legal trouble if the current copyright owner takes exception to it.  If you come across something hidden or undocumented you can put it on [https://tcrf.net/The_Cutting_Room_Floor The Cutting Room Floor] otherwise [https://pages.github.com/ GitHub Pages] may work as you&#039;ve suggested (if you fly under the copyright radar!) -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 07:08, 23 December 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Wacky Wheels ==&lt;br /&gt;
&lt;br /&gt;
Basically all of the WW modding information from my website is here now. I moved one page when I realized it should probably be capitalized to match the rest of the pages on this site... you can delete the redirect at [[Wacky Wheels high score files]] if you want to.&lt;br /&gt;
&lt;br /&gt;
Now, I need to remove most of the modding information from my website and refer people here. Then we’ll have reached the glorious future where all WW modding information is in one place. I’m going to keep those two text files of notes on my website though—the information in them is disorganized and I think not 100% accurate, but they might have some information that isn’t here yet.&lt;br /&gt;
&lt;br /&gt;
By the way, how’s Camoto going? I’m planning to use it to make a new WW level, but I won’t have time for it for a few more months. —[[User:Yellowantphil|Yellowantphil]]&lt;br /&gt;
&lt;br /&gt;
: Sounds good!  Thanks for all the effort you&#039;ve put in by moving it across.  I think Wacky Wheels is now the most completely documented game on the wiki!  Also can&#039;t hurt leaving your own info up - sometimes it&#039;s nice to go back to the original source if something is unclear.  Camoto&#039;s going well, but unfortunately I haven&#039;t had much time to work on it over the last few weeks.  You probably won&#039;t be able to make much of a level until I add in the ability to select a tile from the tileset, but that&#039;s in progress and hopefully will be ready by the time you are!  Keep me posted when you do start your level(s?) -- [[User:Malvineous|Malvineous]] 12:22, 2 February 2012 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Well, as I was reading some of the information on my website, I noticed that it isn’t written very well. I wrote those pages back when I had very little experience programming. Anyway, I’m planning to redesign my website soon, and this will save me from having to rewrite a few of those pages.&lt;br /&gt;
&lt;br /&gt;
::The tile editor in Camoto as it is now is still certainly useful—I can add new tile types to a level using a binary editor and then move them around in Camoto. I think that it shouldn’t be too hard to make a new WW level using the Gimp and Camoto plus some binary editing. I recall having some problems with the route editor for the computer players, but I didn’t look into it at the time—I’ll let you know when I’m working with Camoto again, and I’ll try to come up with some useful bug reports or fixes if I run into problems. —[[User:Yellowantphil|Yellowantphil]] 14:06, 2 February 2012 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Catacomb ==&lt;br /&gt;
&lt;br /&gt;
Hey [[User:Malvineous|Malvineous]], do you know anyone who has properly read the [[Inverse_Frequency_Sound_format|Inverse Sound Frequency]] file format and got the sound playing? I&#039;m struggling with some fine details in my game. Sounds play near what they should sound like, but the sound quality is all crackly and some sounds play totally incorrect. I followed a basic [http://web.archive.org/web/20000818033701/http://www.dd.chalmers.se/~f98anga/projects/keen/sounds2raw.c code sample] by Anders Gavare. Does your tool support this? Interested in helping me figure this out? My current code is available at [https://code.google.com/p/cataclone/source/browse/trunk/src/catacomb/catacomb_sound.c catacomb_sound.c] - [[User:Eros|Eros]] 11:57, 5 May 2012 (GMT)&lt;br /&gt;
: Should this be moved to my talk page? - [[User:Eros|Eros]] 11:59, 5 May 2012 (GMT)&lt;br /&gt;
:: Probably best to keep it on my talk page if you want me to respond in a timely manner :-)  I based my old utility off Anders&#039; one too, but it&#039;s been a long time since I looked at the code.  My latest utility doesn&#039;t support sound effects yet.  I know Levellass has written a few utilities to play and edit those sound files, so I think your best bet would probably be to post over at the [http://www.keenmodding.org Keen:Modding] forum.  Do note that PC Speaker effects do sound crackly at the best of times, though!  Also make sure you&#039;ve got the right audio format (8-bit vs 16-bit, signed vs unsigned) - I remember some inconsistencies there causing some very distorted results for me.  I love the name &#039;Cataclone&#039; - does your code compile under Linux? -- [[User:Malvineous|Malvineous]] 13:21, 5 May 2012 (GMT)&lt;br /&gt;
::: I currently compile the code using Code::Blocks with GCC 4.6 -std=gnu99. It *should* compile under Linux. But I haven&#039;t tested that out yet. [[Catacomb]] sounds also have flags attached to each one, It&#039;s not exactly the same specification as what it says @ the [[Inverse_Frequency_Sound_format|Inverse Sound Frequency]] format page. Perhaps the flags would make a difference to the sounds? I have the sound setup @ [https://code.google.com/p/cataclone/source/browse/trunk/src/sound_manager.c sound_manager.c] in the sound_manager_init() method. I use AUDIO_S16 (signed 16-bit) @ 22050 Hz with 2 channels. I have not added support for the priority of the sounds yet, I plan on doing that after I get them playing properly.&lt;br /&gt;
::: I found some information on the [[ROTT]] sound format here: [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/_rt_soun.h _rt_soun.h]. This format should be similar to Catacomb as ROTT was developed by [[Apogee]] using the [[Doom]] engine. Here are the flags for the sounds that they define:&lt;br /&gt;
 #define SD_OVERWRITE     0x01&lt;br /&gt;
 #define SD_WRITE         0x02&lt;br /&gt;
 #define SD_LOOP          0x04&lt;br /&gt;
 #define SD_PITCHSHIFTOFF 0x08&lt;br /&gt;
 #define SD_PLAYONCE      0x10&lt;br /&gt;
::: There are also many other sound files for ROTT: [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/rt_sound.c], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/rt_sound.h], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/snd_reg.h], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/snd_shar.h], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/sndcards.h]&lt;br /&gt;
:::: I tried it last night and I was able to get it to compile (after a few changes, like using &#039;/&#039; instead of &#039;\&#039; in a couple of #includes) but all I got was a black window and a beep sound, then nothing.  How far advanced is the project?  Should I expect more than that?  I would expect small variations in the file formats between games, but I would be surprised if the core sound data has changed over time. -- [[User:Malvineous|Malvineous]] 02:38, 6 May 2012 (GMT)&lt;br /&gt;
::::: On Windows, you can run around the levels, collide with walls, collect items, etc... I still need to implement monsters, AI and power shots. However, that beep means that the sounds playing. (see line 71 in main.c: catacomb_sounds_play(&amp;quot;foundsound&amp;quot;);). I just committed the catacomb_data.h file. Update it accordingly, you should now see much more than a black screen.&lt;br /&gt;
:::::: Oh wow, that works really well now!  I see what you mean by the sounds.  You might have to output the PCM data to a .wav/.raw file and look at it in a sound editor to see what&#039;s going on.  It sounds like there might be wrapping or something going on.  Also some sounds (like being blocked by a door) play multiple times over the top of themselves.  I guess this is what you meant by priority not being implemented (although maybe you wouldn&#039;t need to handle priority if you can play multiple sounds at the same time, unlike the real PC Speaker.)  One suggestion - if you do decide to support Linux, abstract the calls that open files so that they search for filenames instead - that way you don&#039;t have to rename all the Catacomb files to be uppercase, since Linux has a case-sensitive filesystem and most filenames are usually all lowercase. -- [[User:Malvineous|Malvineous]] 03:42, 6 May 2012 (GMT)&lt;br /&gt;
::::::: I have exported the raw data to a file, then imported the raw data into Audacity using various settings. All of them sound like they do in the game, crackly and sometimes distorted. I really think its some sort of post FX used by the flags. As for files, I&#039;ll code some sort of SafeFileOpen, SafeFileClose functions like the id codebase that open files regardless of case when i get around to implementing the Linux version. - [[User:Eros|Eros]] 03:54, 6 May 2012 (GMT)&lt;br /&gt;
:::::::: If you can e-mail me one of the files (preferably a &#039;quiet&#039; one that&#039;s not supposed to be crackly) I can take a look if you like - malvineous@shikadi.net -- [[User:Malvineous|Malvineous]] 03:57, 6 May 2012 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Merge ==&lt;br /&gt;
&lt;br /&gt;
Is there a way to tag two pages such that it is clear that they should be merged?&lt;br /&gt;
For example, [[Crystal Caves Tileset Format]] describes the same format as [[Duke 1 Tileset Graphics]].[[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 21:00, 15 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
: You can mention it on the talk page for one of the articles.  Any suggestions as to what we should call the merged page? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 03:09, 20 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Dark Ages is the first game that got released that uses this format, so &#039;&#039;Dark Ages Tileset Format&#039;&#039; could be the name, like all those formats that are named after Commander Keen 1-3.&lt;br /&gt;
::Or we name it after Duke Nukem 1, because that game is probably more popular than Dark Ages, Crystal Caves and Secret Agent, like [[Commander Keen 1-3 Level format]], although Slordax used it before Commander Keen 1-3 did.[[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 19:13, 20 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: Yes I was thinking along the same lines, naming it after the first game that used the format.  But then the release date doesn&#039;t necessarily indicate which game &amp;quot;invented&amp;quot; the format, if one game took longer to develop and was released late.  I was wondering whether there is a common thread amongst all these games, such as the same programmer or company we could use instead.  In many ways I would prefer a name like &amp;quot;Replogle tileset format&amp;quot; or &amp;quot;Apogee EGA tileset format&amp;quot;.  What do you think? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 23:36, 20 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: I&#039;ve read the [http://www.3drealms.com/news/2006/04/the_apogee_legacy_15.html | Apogee Legacy interview with Peder Jungck] again today. He wrote the ProGraphx Toolbox.&lt;br /&gt;
:::: DN1.EXE contains the string &#039;&#039;Version 1.0 EGA/VGAProGraphx EGA/VGA Toolbox&#039;&#039;,&lt;br /&gt;
:::: CC1.EXE contains the string &#039;&#039;Version 1.5 320x200 PAN EGA/VGAProGraphx EGA/VGA Toolbox&#039;&#039;,&lt;br /&gt;
:::: SAM1.EXE contains the string &#039;&#039;ProGraphx EGA/VGA Toolbox Version 2.0 320x200 EGA/VGA Copyright 1991 by Peder Jungck&#039;&#039; and&lt;br /&gt;
:::: DA3.EXE contains the string &#039;&#039;Version 1.0 EGA/VGAProGraphx EGA/VGA Toolbox&#039;&#039; (DA1.EXE and DA2.exe contain gibberish).&lt;br /&gt;
:::: So I would suggest &#039;&#039;ProGraphx Toolbox tileset format&#039;&#039;. Peder also wrote a book about the toolbox called &#039;&#039;Graphics Programming &amp;amp; Animation: Ultra-Fast Assembly Routines for EGA/VGA Graphics Animation&#039;&#039;. Maybe that book has a better name for the file format. [[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 11:03, 21 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: So we know of three different versions of the ProGraphx Toolbox. Dark Ages and Duke Nukem 1 use version 1.0. Each tileset is 8064 bytes long and is in a separate file. Crystal Caves uses version 1.5 and each tileset is 8003 bytes long, but they are all in the same file. Secret Agent uses version 2.0 Each tileset is again 8064 bytes long, they are all in the same file and the file is encrypted. [[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 17:00, 28 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::: Thanks for figuring all that out.  I&#039;ve merged the pages and changed the name to [[ProGraphx Toolbox tileset format]] as suggested.  Please feel free to correct anything I have missed. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 02:40, 4 August 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Guidelines for proper Wiki Editing ==&lt;br /&gt;
Dear Malvineous! Could you post the guidelines (or guide) for proper editing of the Wiki? [[User:The coder|The coder]] ([[User talk:The coder|talk]])&lt;br /&gt;
: Hmm, there isn&#039;t really one, it&#039;s more about finding a similar page and matching the style found there!  Copy and paste works well :-)  There is [[ModdingWiki:Contributing]] but it&#039;s not very detailed. (BTW please put &amp;lt;nowiki&amp;gt;~~~~&amp;lt;/nowiki&amp;gt; at the end of your messages, when you preview the page you will see this gets replaced with your name and the date automatically.) -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 21:59, 12 December 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
== VGFM Music Format ==&lt;br /&gt;
&lt;br /&gt;
Hello, Malvineous!&lt;br /&gt;
&lt;br /&gt;
I accidentally found that [[VGFM Music Format]] is absolutely similar to the [http://www.vgmpf.com/Wiki/index.php?title=MUS_(AdLib) MUS (AdLib)] format which I finished researching yesterday.&lt;br /&gt;
&lt;br /&gt;
And [[VGFM Instrument Format]] is similar to [http://www.vgmpf.com/Wiki/index.php?title=SND_(AdLib) SND (AdLib)].&lt;br /&gt;
&lt;br /&gt;
These formats were developed by Ad Lib Inc, I found the sources and documentation in the Ad Lib developer&#039;s manual downloaded from old BBS board site :)  And these formats are used not only in [[Vinyl Goddess From Mars]] game.&lt;br /&gt;
&lt;br /&gt;
--[[User:Binarymaster|Binarymaster]] ([[User talk:Binarymaster|talk]]) 02:05, 22 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Oh wow, what an interesting discovery!!  Do you have any links to the official documentation?  I&#039;d really like to see what else they have to say about the format.  And yes, we should definitely rename the articles here.  What do you think they should be called?  &amp;quot;Ad Lib Music Format&amp;quot; is probably a bit generic given they have a few, like .ROL... -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 09:45, 22 January 2015 (UTC)&lt;br /&gt;
:: Here it is: [http://files.mpoli.fi/software/programm/general/adlip.zip adlip.zip] - binaries and source code, probably from Ad Lib Programmer&#039;s Manual. MUS headers are described in CONVERT.C and CONVERT.H files. Fun fact that they also developed another similar format based on MIDI - [http://www.vgmpf.com/Wiki/index.php?title=MDI MDI]. It has similar musical features but stores all data in one file in MIDI format.&lt;br /&gt;
:: Well, I have no idea how to name it better, I think &amp;quot;Ad Lib Music Format&amp;quot; should be suitable for it :) --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 10:30, 22 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Many thanks!!  I&#039;ve updated the article pages with the info I could gain from the source code.  There are still a few unresolved issues (like what exactly the default percussion pitch is) but it has certainly answered a number of questions.  I called it &amp;quot;AdLib MIDI Format&amp;quot; because that&#039;s the name they use in one place in the source code, although it&#039;s not a very descriptive title!  Thanks again for letting me know about this excellent find :-) -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 12:48, 24 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: That&#039;s good! I think maybe this format should be named as &amp;quot;AdLib MIDI Format v1.0&amp;quot;, because there is also an improved version of it, probably v2.0 - [http://www.vgmpf.com/Wiki/index.php?title=MDI MDI] (I made a typo in previous posted link), it uses a single file in MIDI format.&lt;br /&gt;
:::: And about [[AdLib Timbre Bank Format]] article - BNK format originally was created in the 1987 with the first release of the [http://www.vgmpf.com/Wiki/index.php?title=AdLib_Visual_Composer AdLib Visual Composer], so actually Ad Lib Inc released its formats in this order:&lt;br /&gt;
:::: &#039;&#039;&#039;1)&#039;&#039;&#039; ROL &amp;amp; BNK (1987, with AdLib Visual Composer)&lt;br /&gt;
:::: &#039;&#039;&#039;2)&#039;&#039;&#039; MUS &amp;amp; SND/TIM (1988, with player and converter)&lt;br /&gt;
:::: &#039;&#039;&#039;3)&#039;&#039;&#039; MDI (1989, also with player and converter)&lt;br /&gt;
:::: Information about third format was placed [http://cd.textfiles.com/soundsensations/MISCPROG/AD-PROG/ here], though the link is not working now.&lt;br /&gt;
:::: --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 13:08, 24 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: Oh wow that&#039;s interesting too.  I think the MUS/SND/TIM format should stay as &amp;quot;AdLib MIDI Format&amp;quot; with no version number, because that file format does have version fields so it&#039;s possible to have v1.0, v2.3, etc. within that format.  The MDI article you linked to actually looks like conventional MIDI with some extra events for setting OPL instruments, so I think this belongs as one of the many backwards-compatible extensions of the [[MID Format]].&lt;br /&gt;
&lt;br /&gt;
::::: With the instrument bank formats that&#039;s really unusual if BNK came first!  It seems very odd for AdLib to produce the SND/TIM format if they already had the more efficient BNK format available.  I was going from the dates in the text files from the programmer&#039;s guide you kindly posted, and bkformat.txt says in Jan 1989 they are in the process of converting their software to use BNK.  Can you confirm there was BNK software earlier than this?  I&#039;m just thinking that Visual Composer may have come out in 1987, but maybe it didn&#039;t get BNK support added until later? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 01:30, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::::: Well, I&#039;m sure that first version of Visual Composer was released with AdLib music card, but I don&#039;t know exactly about BNK support. It&#039;s really strange that Ad Lib downgraded the format (BNK is better in structure), but the known formats has converters which converts BNK to X format, but not from X to BNK - this makes sense that BNK was the first format. Also Visual Composer doesn&#039;t support other bank formats, only BNK.&lt;br /&gt;
:::::: BNK creation date 1987 was contributed by [http://www.vgmpf.com/Wiki/index.php?title=User:TheAlmightyGuru Dean Tersigni], I&#039;ll ask him about it.&lt;br /&gt;
&lt;br /&gt;
:::::: Update: I also read information from bkformat.txt, and it seems you&#039;re right :)&lt;br /&gt;
:::::: So actually it was:&lt;br /&gt;
:::::: &#039;&#039;&#039;1)&#039;&#039;&#039; ROL &amp;amp; INS (1987, with AdLib Visual Composer v1.0)&lt;br /&gt;
:::::: &#039;&#039;&#039;2)&#039;&#039;&#039; MUS &amp;amp; SND/TIM (1988, with player and converter)&lt;br /&gt;
:::::: &#039;&#039;&#039;3)&#039;&#039;&#039; BNK (1989, with AdLib Visual Composer v1.5)&lt;br /&gt;
:::::: &#039;&#039;&#039;4)&#039;&#039;&#039; MDI (1989, also with player and converter)&lt;br /&gt;
:::::: Wow, that feel when restored original order of events! :D --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 01:51, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::::: That seems to make the most logical sense - there&#039;s a clear improvement with each new format.  I&#039;m glad you agree!  Note that when you say there&#039;s no conversion from &amp;quot;X to BNK&amp;quot; there is BANKMNG.EXE that comes with the programmer&#039;s manual which converts .ins files to .bnk. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 04:09, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::::::: True. I forgot about it :) Thanks! --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 12:02, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
== email ==&lt;br /&gt;
&lt;br /&gt;
Hello! Can&#039;t send you e-mail. Got this:&lt;br /&gt;
&lt;br /&gt;
 This message was created automatically by mail delivery software.&lt;br /&gt;
 A message that you sent could not be delivered to one or more of its&lt;br /&gt;
 recipients. This is a permanent error. The following address(es) failed:&lt;br /&gt;
 malvineous@shikadi.net&lt;br /&gt;
 host mail.shikadi.net [52.11.27.19]&lt;br /&gt;
 SMTP error from remote mail server after RCPT TO:&amp;lt;malvineous@shikadi.net&amp;gt;:&lt;br /&gt;
 550 invalid recipient&lt;br /&gt;
&lt;br /&gt;
[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 09:12, 11 March 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Whoops, moved my e-mail service to AWS and missed a step for that address!  Please resend, should work now :-)  Thanks for letting me know! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 11:34, 11 March 2017 (UTC)&lt;br /&gt;
::Yes, e-mail goes through this time. Hope you receive it. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 15:41, 11 March 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Duplicate RLE page ==&lt;br /&gt;
&lt;br /&gt;
After some edits to the [[RLE Compression]] page, I noticed that this was not the page linked from the [[:Category:Compression algorithms]] page. It seems there are in fact two of them; one with an uppercase &#039;c&#039;, and [[RLE compression|one with a lowercase &#039;c&#039;]]. The latter seems to be the better-written one, but since the LZW page was apparently moved from &amp;quot;LZW compression&amp;quot; to &amp;quot;LZW Compression&amp;quot;, I suggest the final name of the RLE page should likewise be the uppercase-&#039;c&#039; one.&lt;br /&gt;
&lt;br /&gt;
I have merged anything I deemed useful into the lowercase-&#039;c&#039; version. Could you make sure the uppercase-&#039;c&#039; duplicate is removed, and the other one is moved to its name?&lt;br /&gt;
&lt;br /&gt;
-[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:48, 4 October 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Done, many thanks for the clean up! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:38, 5 October 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Account rename? ==&lt;br /&gt;
Hi Malvineous,&lt;br /&gt;
&lt;br /&gt;
I am wondering if it&#039;s much of a hassle to rename accounts on this wiki.  I&#039;d kind of like to have my account use the same handle I&#039;m using just about everywhere else (ETTiNGRiNDER).  Don&#039;t sweat it too much if this is onerous to do, though.&lt;br /&gt;
&lt;br /&gt;
Thanks! - [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 20:42, 29 January 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
: I&#039;m not sure how it can be done.  If you can find out a quick way to rename a MediaWiki account then let me know!  At any rate all your comments would still be signed with your old name however. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:15, 4 February 2018 (UTC)&lt;br /&gt;
: P.S. the e-mail address in your account is bouncing -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:17, 4 February 2018 (UTC)&lt;br /&gt;
:: Ah, right, it was still set to that old e-mail.  Hushmail nuked that address on me years ago, I&#039;ve changed it to one that&#039;s current.  As for the renaming, I don&#039;t really know anything about wiki administration, though a quick search suggests that there&#039;s this thing: https://www.mediawiki.org/wiki/Extension:Renameuser&lt;br /&gt;
::If that&#039;s a bit much then no biggie. -- [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 14:43, 5 February 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Removal request ==&lt;br /&gt;
&lt;br /&gt;
It seems I made a page that was unnecessary; the [[Westwood Palette]] I documented turned out to be a known common format (6-bit RGB) already covered in the standard [[VGA Palette]] page. I have changed all links to link to the older page, but I don&#039;t think I have the user rights required to delete the Westwood Palette page. Can you take care of it? -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:56, 6 February 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Done!  I made you an admin too so you should have delete access now.  Thanks for your contributions! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 00:03, 7 February 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Hi-Octane ==&lt;br /&gt;
&lt;br /&gt;
Hi! &lt;br /&gt;
&lt;br /&gt;
I&#039;ve figured out the MUSIC.DAT container and I was wondering if you could shed out some light on what these song formats are, now that we know how to unpack it ?&lt;br /&gt;
&lt;br /&gt;
Thanks !!!&lt;br /&gt;
&lt;br /&gt;
: Yep, they&#039;re listed on the [[Hi Octane]] page, in the file format box. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:57, 14 March 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== ReCaptcha v1 problem ==&lt;br /&gt;
&lt;br /&gt;
It seems I can no longer add links in articles; the ReCaptcha test added when new links are detected uses ReCaptcha v1, which gives a warning that &amp;quot;reCAPTCHA 1 IS SHUTDOWN&amp;quot;. It does not allow the check to pass, so the page can never be submitted.&lt;br /&gt;
&lt;br /&gt;
The FAQ on the ReCaptcha docs (can&#039;t link to them, obviously) says that &amp;quot;&#039;&#039;&#039;Any calls to the v1 API will not work after March 31, 2018&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
-[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 09:26, 28 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Bio Menace patches ==&lt;br /&gt;
&lt;br /&gt;
Hey, I&#039;ll have Bio Menace 1 patches for the freeware release. Most of them are status window-related, but there are others as well.&lt;br /&gt;
Question: Could you create several other sections in All Bio Menace patches cathegory? Because I cannot submit them anywhere right now. Thanks! --[[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 00:57, 25 July 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
: The status window patches should go into [[:Category:Bio Menace interface patches]].  The others *should* fit into existing categories, but if you&#039;re not sure let me know! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 05:23, 29 July 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I&#039;ll need several categories from you as I checked there&#039;ll be other BM patch stuff as well. So I need the following categories: status screen, hostage, help menu, main menu, B800 screen (I even built the BIN file and I made patch for that!). And I&#039;ll even submit these for BM2 and 3. Please, create these. Oh, and I&#039;ll surely submit! --[[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 01:36, 1 August 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Status screen, hostage, help menu, main menu and B800 screen should all go into [[:Category:Bio Menace interface patches]] as they are all modifying the user interface.  I would like to keep the number of patch categories fairly small otherwise it will get a little out of control! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 01:48, 17 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Bio Menace patches on PCKF? ==&lt;br /&gt;
&lt;br /&gt;
Hey, how can I post my Bio Menace 1-3 patches on PCKF or keenmodding.org? I very want them to submit one of the forums!--[[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 23:11, 4 August 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Wombat File Reader updates! ==&lt;br /&gt;
&lt;br /&gt;
I think [[Wombat]]&#039;s title should be updated to show its full name, which now is &amp;quot;Wombat File Reader&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Also the supported games list has to be updated accordingly to the list on https://szevvy.com/ (the author&#039;s website, which was listed as &amp;quot;dead&amp;quot; in Wombat&#039;s info while the site is up and running again).&lt;br /&gt;
&lt;br /&gt;
It&#039;s also not a dead program at all, since its latest version is very recent (11 October 2018), and it&#039;d be a shame to have such old and deprecated information on this wiki of such a useful and powerful tool.&lt;br /&gt;
&lt;br /&gt;
-[[User:Elia1995|Elìa1995]] ([[User_talk:Elia1995|talk]]) 07:38, 15 October 2018‎ (UTC)&lt;br /&gt;
&lt;br /&gt;
: It&#039;s only just been updated recently after many years of no releases.  It&#039;s a bit unfair to say the wiki has old information when it&#039;s only a couple of weeks out of date, and it relies on people such as yourself to keep things up to date!  Please go ahead and correct as needed so we can keep the information current.  We are all doing this in our spare time so we need lots of help to keep things up to date.  Also, the page you link to lists it as &amp;quot;Wombat File Tools&amp;quot; rather than &amp;quot;Wombat File Reader&amp;quot;.  Everyone in the community refers to it as just &amp;quot;Wombat&amp;quot; however.  -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 23:27, 16 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I&#039;ve only just gotten my account here approved, and only just made new builds of Wombat (actually a complete rewrite) after (as Malvineous said) many many years of no releases.  It warms my heart to see people notice :) [[User:Szevvy|Szevvy]] ([[User talk:Szevvy|talk]]) 01:44, 17 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: I just noticed the 1.0.4 update, I&#039;ll work on updating the supported games list on the page according to the one on Szevvy&#039;s site; by the way, thanks for telling me how to &amp;quot;sign&amp;quot; these posts, I had no idea. [[User:Elia1995|Elia1995]] ([[User talk:Elia1995|talk]]) 08:08, 18 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== e-mail (again) ==&lt;br /&gt;
&lt;br /&gt;
Hello! Sent you e-mail 2019.02.19 about Prehistorik without any answer. Yesterday another e-mail was sent and since 24+ hours passed was forced to write here. Is there something wrong again with your e-mail account or spam filters (for mail.ru)? Thanks! [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 15:10, 1 March 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Content license ==&lt;br /&gt;
&lt;br /&gt;
Is the content of this wiki governed by a specific license? I&#039;d like to contribute information on &amp;quot;Nomad&amp;quot; file formats that I reverse engineered, which I&#039;d previously published on my personal web site under [http://creativecommons.org/licenses/by-sa/4.0/ Creative Commons SA 4.0]. This wiki certainly seems to be in the spirit of the Creative Commons licensing structure so I&#039;m guessing there would be no real conflict, but I just wanted to get some additional information on this. --[[User:Cmb|Cmb]] ([[User talk:Cmb|talk]]) 13:32, 6 May 2020 (UTC)&lt;br /&gt;
:Personally, I&#039;ve just [[RLE Compression#Source_code|added the license under which code was released]] myself. Then again I release everything under [[wp:WTFPL|WTFPL]], because I honestly don&#039;t mind people using anything I write for research purposes in any way they please, so license compatibility is a bit of a non-issue for me. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:04, 6 May 2020 (UTC)&lt;br /&gt;
:That said, though, given the current online climate, I do agree this is an issue that should be clarified here on the wiki. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:06, 6 May 2020 (UTC)&lt;br /&gt;
:: There is a licence specified somewhere but the short answer is anything you put here is basically in the public domain - because if someone steals it we don&#039;t have the resources to chase them, so if it&#039;s that valuable to you that you can&#039;t handle someone copying it without giving you credit, then don&#039;t post it here.  Having said that for &amp;quot;nice&amp;quot; users many of the pages ask for a mention if you find the content useful, but this is by no means a requirement.  I suppose legally speaking you&#039;ll have to dual-licence your Creative Commons content because some CC versions have additional restrictions, like you can&#039;t copy the content without giving credit.  The [https://creativecommons.org/choose/zero/ CC0 licence] pretty much covers it.  Putting a specific licence on code is fine (although no licence at all would be best so it inherits the wiki&#039;s general content licence), noting that any licence enforcement will be on you, but the content itself is always going to be CC0/public domain. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 05:48, 10 June 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Multiple Platforms ==&lt;br /&gt;
&lt;br /&gt;
Should anything special be done for games that are both DOS and Win95, like [[Warcraft II]] and [[Command &amp;amp; Conquer]]? As it is, the template only supports one &#039;Platform&#039;. I don&#039;t know enough about templates to make it accept lists, though a workaround would be to add the Win95 category to such games manually. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) &lt;br /&gt;
20:29, 17 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
: I&#039;m open to suggestions, but the purpose of the platform category is less about documenting all platforms a game runs on, and is more about identifying which games on the wiki don&#039;t work under DOS, since DOS is the wiki&#039;s main focus.  So think of it more as the &amp;quot;minimum&amp;quot; platform needed - i.e. a DOS game can also run inside Win3.x and Win95, a Win3.x game can also run under Win9x but not DOS, and a Win9x game can&#039;t run under DOS or Win3.x at all.  So for DOS/Windows games DOS would be the oldest platform needed to play the game, even if there is a native Windows version. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 00:26, 18 April 2022 (GMT)&lt;br /&gt;
::&#039;Minimum platform&#039; isn&#039;t really true anymore when going to the reality of getting stuff running on modern machines, though; 16-bit windows programs don&#039;t work on modern systems at all, and DOSBox can&#039;t emulate them. They&#039;re a pretty annoying in-between class. C&amp;amp;C95 has issues like that; while the game itself is 32-bit, its installer is a 16-bit Windows program. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:33, 18 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: That&#039;s true, but I wasn&#039;t thinking so much about modern systems.  If you&#039;re building a VM or setting up an old PC, knowing which games will work without Windows, or will work if you only install Win 3.1, might be useful.  I did think you could install Windows 3.1 in DOSBox though to run 16-bit apps.  At any rate, I more had in my mind which games required OS support for NE executables in order to play, and which ones required PE support. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 11:48, 18 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: Well, one of the specific cases I had in mind in this was the fact that the Win95 version of Command &amp;amp; Conquer uses PCX format for its title screen, while the DOS version doesn&#039;t. And while the basic modding of terrain and game objects is identical in both versions, all modding related to the game UI is different because of the different resolution. So, if more detailed information on that front would be added, it seems logical to also add the Win95 category somehow. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:17, 25 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: In that case it sounds almost like a different game that happens to share a lot of the same content, so I&#039;d be more inclined to list it as a separate game, e.g. on a page called &amp;quot;Command &amp;amp; Conquer (Windows version)&amp;quot;, and just put a note saying the file formats are the same as the DOS version with the following exceptions, then list the Windows-specific file formats. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 15:42, 25 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::: No, it&#039;s really just PCX, nothing else is new in terms of file formats. The UI is in the same sprites format used for the in-game sprites. So like 95% still the same. But yea, I guess if I do ever get around to writing a more in-depth modding guide, I could make a different page for the Win95 version. Most of the modding difference between the two games is just that the Win95 exe file has been researched a lot deeper, to the point that (with the released source code) pretty much anything in it can be changed nowadays. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:10, 25 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
==Empty Pages==&lt;br /&gt;
Not sure if you already noticed it, but user [[User:Parlortricks]] is creating a bunch of empty pages, I&#039;m assuming to be filled at a later date. --[[User:TheAlmightyGuru|TheAlmightyGuru]] ([[User talk:TheAlmightyGuru|talk]])&lt;br /&gt;
: I hadn&#039;t noticed, thanks for the heads up!  I updated [[ModdingWiki:Contributing]] to include some more points about when to create pages. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 04:31, 10 August 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
== File format category for copy-protection data. ==&lt;br /&gt;
&lt;br /&gt;
I can&#039;t find any suitable examples with a template that suits a file containing only the copy protection data.   &lt;br /&gt;
It&#039;s not text, but there don&#039;t seem to be any generic binary format templates. [[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 06:44, 17 April 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
: I&#039;m not really familiar with what copy protection data would contain.  What generic items would you think apply to this sort of data?  I&#039;m not so keen on adding a generic binary format category, it would be nice to have a specific one where possible. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 09:17, 17 April 2023 (GMT)&lt;br /&gt;
:: In this case, the file contains 750 passwords. They were printed on a piece of card in with the original game (in pale blue to thwart photocopying) and the game asks you for one of the passwords at random. I&#039;ll make a file without a specific category for now.[[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 12:31, 17 April 2023 (GMT)&lt;br /&gt;
::: If they&#039;re passwords, doesn&#039;t that make it a type of strings file? You said it&#039;s not &amp;quot;plain text&amp;quot;, but can it be converted/decoded to plain text? I&#039;ve dealt with encrypted text formats before; see [[Cover Girl Strip Poker Text]] -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:20, 17 April 2023 (GMT)&lt;br /&gt;
: There are lots of file formats of unspecified types. See stuff like [[Westwood Fading Table]]; it&#039;s basically a file storing special colour effects. I&#039;m not sure there&#039;s a point in making a template for every specific type like that; there&#039;s so many odd cases out there. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:17, 17 April 2023 (GMT)&lt;br /&gt;
:: Thanks.  I wasn&#039;t necessarily looking for a template. But I couldn&#039;t find an example of a file that wasn&#039;t already in an incorrect template. I&#039;ll base my page on the example you suggested.[[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 12:31, 17 April 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Wiki policy questions ==&lt;br /&gt;
&lt;br /&gt;
Hi, a couple questions I&#039;ve had lingering regarding how things should be done on the wiki / if they should be done at all.&lt;br /&gt;
* What should we do about game title disambiguation?  I think in cases like Warlords (SSG) vs. Warlords (Atari) where only one of the games was released as a DOS game, it&#039;s probably fine to just have a page for the one that&#039;s relevant and at most maybe have a note on its main page that it&#039;s not related to the other game, but I&#039;ve noticed that &amp;quot;Dungeon of Death&amp;quot; is a title that has the honor(?) of being used for two different games &#039;&#039;on DOS&#039;&#039;.  Is there a particular disambiguation format we should use when adding one of those?&lt;br /&gt;
* Is there any specific policy on games/mods with offensive content?  I know we have some strip poker type games referenced on the wiki, but one thing I&#039;m specifically thinking of is I know there was an old hack of the DOS version of Gauntlet 2 that&#039;s been floating around since the 90s, but is a fairly puerile affair that changes text/graphics to sexual and scatological references.  It also has a vulgar word in the mod title itself.  It might be useful to look at how it was done since it&#039;s clearly evidence that changing the text/graphics was attainable even back then, but do we want to document things like that, or is there a &amp;quot;too dirty&amp;quot; line where we should try to keep the wiki clean of references to certain games/mods due to title or content?&lt;br /&gt;
Thanks.-- [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 18:35, 3 October 2023 (GMT)&lt;br /&gt;
: Final decision on this is obviously on Malvineous, but here&#039;s my two cents on this: I don&#039;t think there&#039;s any restriction on making pages for covering games with explicit content, but it&#039;d be nice to keep the &#039;&#039;actual&#039;&#039; explicit content on the wiki to a minimum. As an example, the most daring thing I put on the wiki was the modded showcase image for [[Interactive Girls Club]], which, without the humorous covering, was indeed a straight up explicit image. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 19:23, 3 October 2023 (GMT)&lt;br /&gt;
:: Yep I agree.  The purpose of the wiki is for documentation, and just like a TV documentary, sometimes you may have to cover difficult subjects, so it&#039;s usually done in a tactful way without showing anything directly offensive.  So I think the same policy should apply here - no directly explicit/offensive content (e.g. images), but talking about it for the sake of documenting it is fine.  I would think avoiding offensive words in article titles would be a good idea as people are more likely to come across those by accident, but if you&#039;re browsing an article about a pornographic game and you encounter some dirty words, you have nobody to blame but yourself.  So listing that mod with an uncensored title is fine with me, but perhaps let&#039;s not create an article page for it unless the words are obscured with asterisks or similar just to be extra considerate to those who might be browsing through the lists of pages.&lt;br /&gt;
:: It would be good to make it clear when things are censored though.  In Nyerguds&#039; example I actually thought the &#039;censored&#039; image was part of the game, I didn&#039;t realise it was an addition.  So maybe it would be good to write &amp;quot;Censored by ModdingWiki&amp;quot; or something to that effect, to make it obvious that it&#039;s something we&#039;ve done and not part of the original game.  Likewise for an article title with asterisks in it, one of the first things on the page should be a note to say what the full uncensored article title actually is.&lt;br /&gt;
:: As for disambiguation I&#039;m open to suggestions.  Probably my first thought would be to include the year of release in brackets: &amp;quot;Example (1990)&amp;quot; like what was done for [[Shadow Warrior (1993 Beta)]] or if the year is the same, then perhaps the software developer: &amp;quot;Example (Microsoft)&amp;quot;.  I&#039;m not too fussed as it&#039;s probably more important that the part in brackets makes sense to readers rather than follows any hard and fast rule.  Either way a normal disambiguation page should be created for the name without any brackets, in the same style as the existing ones at [[:Category:Disambiguation]].  A disambiguation page wasn&#039;t created for Shadow Warrior as the beta version isn&#039;t really a competing game, so links on the respective article pages would suffice.  As always, use your best judgement, we can always change it later if we need to. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 06:10, 4 October 2023 (GMT)&lt;br /&gt;
::: The Interactive Girls Club image &#039;&#039;isn&#039;t&#039;&#039; censored for the sake of putting it on the wiki though. It&#039;s a showcase of the game being &#039;&#039;modded&#039;&#039;. I replaced the normal mouse cursor with that sign. I could&#039;ve taken a tamer scene to start with, but I thought this would be funny. I explained what was done to it [[:File:Mod-Interactive_Girls_Club.png|on the actual image page]]. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 07:34, 4 October 2023 (GMT)&lt;br /&gt;
:::: Ohh, I understand now!  Sorry it was completely lost on me, but that&#039;s probably because I&#039;ve never played the game before so I didn&#039;t know what changes to look out for! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:45, 4 October 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Pages linking to itself ==&lt;br /&gt;
&lt;br /&gt;
Hello! Merry Christmas and Happy New Year! Is it possible to check Wiki for pages that linked to itself and maybe autocorrect if possible? Like [https://moddingwiki.shikadi.net/w/index.php?title=Shakii_The_Wolf&amp;amp;curid=2343&amp;amp;diff=11369&amp;amp;oldid=11367 this] or [https://moddingwiki.shikadi.net/w/index.php?title=Pee_and_Gity&amp;amp;curid=2348&amp;amp;diff=11370&amp;amp;oldid=6789 that]? Sometimes this will result in redirect to itself (as in first example) or a red link indicating that page with this name was not created (as in second example). I&#039;ve checked and fixed all pages created by [[User:MartinVole|MartinVole]] but maybe there are more. Thank you! -[[CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 19:46, January 3, 2024‎ (GMT)&lt;br /&gt;
:I&#039;ve occasionally seen it used as shortcut to putting the page name in bold in the page intro, but yea, it&#039;s kind of odd. According to [[wikipedia:Help:Self_link|the official Wikipedia page on the subject]], &amp;quot;Self links are usually undesirable&amp;quot;. I immediately fixed it in the case of Shakii because, with it linking to a redirect page, it even created a real link. (PS: please sign your talk page addidions.) -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 20:26, 3 January 2024 (GMT)&lt;br /&gt;
:: Hello and Merry Christmas and Happy New Year to you too! Wow, you fixed so much pages already! That&#039;s why I was asking [[User:Malvineous|Malvineous]] for help - maybe there is a way to do it automatically. Or at least somehow get the list of the affected pages. (Thanks! I was sure I put four &amp;quot;~&amp;quot; characters but not sure what happend and why Talk page was not included.) [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 22:35, 3 January 2024 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Malvineous&amp;diff=11374</id>
		<title>User talk:Malvineous</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Malvineous&amp;diff=11374"/>
		<updated>2024-01-03T18:46:46Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Pages linking to itself */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Wolfenstein 3D -&amp;gt; Wolfenstein 3-D ==&lt;br /&gt;
I&#039;ve corrected the infamous 3D tyop in the names of several Wolf3D-related pages; can you please delete the following ones?&lt;br /&gt;
&lt;br /&gt;
[[:Category:Wolfenstein 3D]] -&amp;gt; Superseded by [[:Category:Wolfenstein 3-D]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[:Image:Wolfenstein_3D.png]] -&amp;gt; Superseded by [[:Image:Wolfenstein_3-D.png]]&lt;br /&gt;
&lt;br /&gt;
Thanks :) --De Zeurkous (zeurkous@zeurcomp.nichten.info), Thu Nov 22 08:18:42 UTC 2007&lt;br /&gt;
&lt;br /&gt;
:Haha, you&#039;ve certainly been busy.  Don&#039;t forget that this wiki isn&#039;t meant to be an encyclopaedia of the games, its main purpose is documenting the file formats and editing tools that can be used with the games, as opposed to how the games behave without any mods, or what they might be called if you forget to change the title screen :-) -- [[User:Malvineous|Malvineous]] 11:14, 22 November 2007 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Nah, I haven&#039;t forgotten. As we&#039;re reinventing the wheel for a semi-virgin wiki, the naming and something static like the cheats seemed like a good place to start :) --De Zeurkous (zeurkous@nichten.info), Thu Nov 22 12:20:04 UTC 2007&lt;br /&gt;
&lt;br /&gt;
== Jill of the Jungle palette ==&lt;br /&gt;
&lt;br /&gt;
Hi, I&#039;m currently working on a level viewer for [[Jill of the Jungle]] (maybe an editor later on). Some of the information I found here has been very useful, but there&#039;s one thing I&#039;m a bit stuck on. On the [[SHA Format]] page it says:&lt;br /&gt;
:&#039;&#039;Each array item contains 4 unsigned bytes, representing CGA, EGA and VGA, respectivley, and then a null value. [...] Each byte maps to the index of a colour in the palette. If there are no colours required, the tile set uses the default colours.&#039;&#039;&lt;br /&gt;
However, it doesn&#039;t say anywhere where the palette can be found. Is it stored in the EXE file? I hope you can help me on this :)&lt;br /&gt;
&lt;br /&gt;
Regards, [[User:Spinal|Spinal]] 13:00, 2 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
:Unfortunately I didn&#039;t write the JotJ SHA page, and I haven&#039;t yet had the time to figure this out.  For Xargon I&#039;ve taken the quick and dirty route and used a screenshot from within DOSBox as the source of the palette, until I can figure out where the palette is located.  If you find this out, don&#039;t forget to update the page! :-) -- [[User:Malvineous|Malvineous]] 22:02, 2 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Hey Spinal, sorry, I wrote the [[SHA Format]] page, so that was probably my bad. I wasn&#039;t able to find the palette either. I assume it&#039;s in the .EXE, however I spent a fair bit of time manually mapping it using a Wombat tool (http://www.szevvy.com/node/3). I was also writing a level viewer (initally in XHTML which turned out to be too slow, so then I moved to Flash 9). I tried to email you my findings, but the email bounced. I&#039;m not sure if they were 100% accurat, which is why I never added them to the documentation.&lt;br /&gt;
&lt;br /&gt;
::Hey Malvineous, it seems the Jill - [[DMA Format]] page has been removed. Do you have a log of what happened to it? I&#039;m sure it existed at some point.&lt;br /&gt;
&lt;br /&gt;
::- [[User:dheim|Daniel]] 20:00, 5 March 2008&lt;br /&gt;
&lt;br /&gt;
:::I don&#039;t ever remember seeing a DMA page - certainly there&#039;s nothing in the wiki logs about it being deleted or renamed.  Maybe you started working on it but never got around to saving it?  Or is it one of the Xargon pages that shares the same format as Jill?  (by the way, you can type &amp;lt;nowiki&amp;gt;~~~~&amp;lt;/nowiki&amp;gt; to automatically put in the signature in these messages.) -- [[User:Malvineous|Malvineous]] 11:28, 5 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::Sorry, it must have been the stuff in the [[SHA Format]] page that I was thinking of. I may have added the link to the [[DMA Format]] page, and never expanded on it. - [[User:Dheim|Daniel]] 02:46, 6 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::Hi guys. Sorry for the mistake, I mixed up the authors of the SHA and level formats. I&#039;ve written a level viewer in PHP the last week, by using static images instead of getting them from the actual files. This causes some problems for episode 2, which uses a different palette, but besides that it works great :) When everything is done I&#039;ll upload the maps to my server and the tile/object lists to this wiki.&lt;br /&gt;
:::::@Daniel: strange that it bounced, I confirmed my address so it should be working fine... You can mail it to spinal -at- zanderz -dot- net. Also, I saw on your Wombat page that you &amp;quot;have a vague idea of how to do&amp;quot; [[Hocus Pocus]]. Could you share your findings on this wiki? I&#039;d love to make maps, or even a level viewer/editor for that game :) -- [[User:Spinal|Spinal]] 00:32, 8 March 2008 (GMT)&lt;br /&gt;
:Okay, with help of [[User:Dheim|Daniel]] who send me the palette I found it! I&#039;ll put my findings on [[Jill of the Jungle palette]]. -- [[User:Spinal|Spinal]] 15:36, 13 March 2008 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Halloween Harry/Alien Carnage ==&lt;br /&gt;
&lt;br /&gt;
Hi Malvineous. Thanks for your edits on the GMF article! I notice you mentioned there exist versions of the game which don&#039;t require exploding a BNK to get at the game data. What does the directory structure look like for the version you have? I&#039;m working on a map viewer (which will become a map editor at some point) and would like it to be able to work on whatever versions are out there. Thanks for any info. -[[User:Duckthing|Duckthing]] 04:41, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Hi Duckthing - no worries, Halloween Harry has long been an interest of mine, but my map editor sadly needs a lot more work before I can begin reverse engineering more file formats so I&#039;m glad you&#039;ve made a start!  AFAIK technically Halloween Harry has no compression, but for whatever reason (probably listed in the Apogee FAQ) they decided to swap episodes 1 and 3, compress the BNK file and then re-release it under the name Alien Carnage.  You can download all available versions (including registered versions since the game was released as freeware in 2007) from [http://www.classicdosgames.com/game/Alien_Carnage.html RGB Classic Games].  BTW not sure if you noticed but I also posted a couple of things on the GMF article&#039;s talk/discussion page. -- [[User:Malvineous|Malvineous]] 06:08, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: Thank you! Working with the uncompressed version will keep things less complicated. I did notice the GMF discussion you added, but haven&#039;t had a chance to really go through it yet. -- [[User:Duckthing|Duckthing]] 06:41, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: No worries.  If you&#039;re running Linux or MacOSX you should be able to compile [[Camoto|libgamearchive]] which will let you copy files in and out of the BNK files.  This is a library so it&#039;s also possible to use it in your own program for accessing and editing the map files while they&#039;re still inside the BNK, for instance.  (BTW the &#039;minor&#039; tickbox should only be used when the edit does not affect the information on the page - e.g. fixing a typo or a broken URL.  If you are changing the actual content on a page it is never a minor edit!) -- [[User:Malvineous|Malvineous]] 07:51, 11 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dangerous Dave ==&lt;br /&gt;
&lt;br /&gt;
Working on this, does anyone have any info on the formats? The EGA graphics are 84KB and external, but CGA and VGA graphics unrelated to them are in the 174KB executable, apparently uncompressed, I don&#039;t know how this is possible. I&#039;ve found the levels and partially reverse engineered the format (The first 1000 bytes, a 100x10 array of tiles.) but each level is followed by ~280 bytes of variable and unknown data I assume is sprites. I have a list of internal files in the executable, looks like most of it is non-game code. Any help would be appreciated. -[[User:Levellass|Endian? What are you on about?]] 06:03, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Hmm, interesting.  All I can suggest for the levels is - as you&#039;re probably already familiar with - changing the values in a hex editor then loading the game to see what happens.  I would suspect that all the graphics would be in a similar format, so if there are any headers or structures used in the EGA graphics files perhaps they&#039;re duplicated for CGA/VGA?  Also John Romero seems pretty accessible, perhaps you could ask him directly?  Failing that, randomly writing data into the .exe until the images change could be used as a last resort! -- [[User:Malvineous|Malvineous]] 12:09, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Ha, that was easier than I expected - uncompressed VGA data is easy to find with a good hex editor ;-)  [http://www.shikadi.net/pics/ddave-vga-hexdump.png This looks like it] -- [[User:Malvineous|Malvineous]] 12:17, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Ok that was only the menu graphics.  At offset 0xC629 there&#039;s some sort of offset table which looks very similar to the contents of EGADAVE.DAV but there are extra bytes dotted all over the place - perhaps it&#039;s RLE encoded?  Actually just before that there&#039;s the number 0x6CAA.  If you go a bit less than 0x6CAA bytes after this you end up with another table, which to me suggests that 0x6CAA is the decompressed size of that first table. -- [[User:Malvineous|Malvineous]] 13:01, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:If I remember it correctly, the VGA sprites and tiles are RLE compressed and it&#039;s not too hard to decompress them. The positions of the enemies in the levels on the other hand are still a mystery to me. [[User:Calvero|Calvero]] 20:43, 12 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Looking at the levels, which directly follow the VGA palette, they seem to contain 256 bytes of header data, then the 100x10 tiles, then eight bytes of lead-out data.  Then the next level&#039;s 256 bytes of header, 100x10 tiles, then eight bytes of lead-out.  Although I say &amp;quot;level&amp;quot;, the first &amp;quot;level&amp;quot; seems to contain both level 1 and 2, and this seems to be the way it works in the game - in some levels you can see through to others.  I&#039;m not sure what the 256 bytes of header data are for, but some levels have FF FF 00 00 repeated which seems to indicate two uint16 fields which are blanked out for those levels. -- [[User:Malvineous|Malvineous]] 13:15, 13 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
::First up, levels; where does level 1 start? It&#039;s possible I&#039;m reading the start of a level as the previous level&#039;s end, I looked for the start of tile data, which I assumed, like Keen 1, would be the level start.&lt;br /&gt;
&lt;br /&gt;
::Next, palette; I&#039;m assuming, as you said, it is located just before the level data?&lt;br /&gt;
&lt;br /&gt;
::There is VGA and CGA graphics in the executable, plus headers, but the bulk of graphics for CGA and VGA I haven&#039;t been able to locate. If the data is RLE compressed I should think it would use either Keen 1-3 fullscreen or Jazz Jackrabbit tile RLE, both of which I know well. I&#039;ll look into both of these options, cheers! -[[User:Levellass|Endian? What are you on about?]] 12:03, 20 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::I&#039;ve found the VGA and CGA data for the menu graphics.  It looks like the CGA data is stored in a series of 1-bit-per-pixel (monochrome) images.  Or it could be EGA data with the planes split out (e.g. red plane for all images, then green plane for all images, etc.)  I think I found three planes which means it&#039;s probably EGA, as CGA would have a max of two planes.  I&#039;ve also found the font graphics, this looks like 4bpp/16 colour EGA data.  Haven&#039;t seen level graphics yet.  I&#039;ve successfully modded the levels with a hex editor (putting the jetpack everywhere) so now I&#039;ve finally looked at all the levels!  The creatures are definitely not stored in the 100x10 tile data.  Putting random bytes in there revealed that the values are indices into the image files, because if you put the value in for fire it will animate, and the following three or so values show up as still frames from the fire animation.&lt;br /&gt;
&lt;br /&gt;
:::The VGA palette starts at 0x26B0A (I updated the main DDave page with this) + 768 bytes leads straight onto the start of level 1 at 0x26E0A.  So at 0x26E0A there are 256 bytes of data, then 100x10 tiles, then 24 bytes of footer data.  Some of this data (perhaps footer data) might be the level start coordinates, because Dave doesn&#039;t always start the level at the same place (e.g. the warp level when you climb the tree on level 5 and jump off the edge of the screen.) -- [[User:Malvineous|Malvineous]] 12:24, 20 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::I think I&#039;ve found all the files so far, I&#039;ve updated [[Dangerous Dave]] with the offsets of the files, including what appears to be CGA and VGA tiles.  I&#039;m not sure what sort of format they&#039;re in though, it looks like they might be compressed (and so the offsets in that list might be off by ~4, as I may have cut off the decompressed-size field.)  I&#039;ve also updated the map format page, I think it&#039;s pretty much fully reverse engineered now. -- [[User:Malvineous|Malvineous]] 05:13, 21 December 2010 (GMT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Noahs Ark 3D and IMFs ==&lt;br /&gt;
&lt;br /&gt;
Been poking around Noah&#039;s Ark 3D, an adaption of the Wolfenstein game and found a few interesting things which I&#039;m hoping to confirm.&lt;br /&gt;
&lt;br /&gt;
First, the game uses MID files, not IMF files for music, second, the MIDI files have an extra word at the start of the file giving the file length. Third, the code uses the first word of the midi file as the length of data to read from the file and put into memory to play. After poking around a bit in Wolfenstein and Keen I believe this is the same with IMF files, that is, ALL IMF files are type 0 as it were and the type 1s are read just like type 0s by the games (The first word is read as the amount of IMF data to copy into memory to play, this is then read as type 0.) I&#039;m not quite sure what this does for the two types since type 1 is would essentially be a type 0 with a header and footer that are part of the AUDIO.xxx format, much like PC\adlib sounds can have the huffman lengths at the start. Are there any games that use &#039;individual&#039; type 1 IMFs (Even if included as part of a group file. All I&#039;ve seen are games like cosmo, where non-AUDIO IMFs are type 0.)&lt;br /&gt;
&lt;br /&gt;
Should there be a Noah&#039;s Ark 3D page and should we add the midi note to the AUDIO format page? It seems that the format can hold any type of music file the game can read, not just IMFs.  -- Levellass&lt;br /&gt;
&lt;br /&gt;
: Yes it is known that the type-1 header might really be part of the AUDIO.xxx format but alas there were many type-1 files floating around the place (incorrectly extracted, you could argue) before this was realised, so the format variant is here to stay.  It does have some advantages though (like tagging files with the song title) but I&#039;m not sure whether anyone has figured out definitively whether the header (and footer, in the case of the Wolf3D files) belongs to the IMF or the AUDIO file.  I guess you&#039;d have to browse the game source code and see how the game uses the data to know for sure.&lt;br /&gt;
&lt;br /&gt;
: As far as the MIDI goes, I believe the AUDIO.xxx file is just a container file like any other, capable of supporting any data at all.  It&#039;s up to the game to decide how to use it.  If anything this makes me think it would fit better if the AUDIO.xxx article was merely documenting the structure, with links to actual audio formats like PC SFX, Adlib SFX, IMF and MIDI and notes about which games make use of which formats.&lt;br /&gt;
&lt;br /&gt;
: Oh and yes, by all means create a page for the new game. -- [[User:Malvineous|Malvineous]] 08:41, 3 February 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Sound Files category ==&lt;br /&gt;
&lt;br /&gt;
I don’t know why there’s a Sound Files category and also an Audio Files category... it seems redundant. I left those categories the way they are though.&lt;br /&gt;
&lt;br /&gt;
Also, the [[File format data types]] page needs some signed ints, but I didn’t know what naming convention you wanted to use. I described something as an [[INT16LE]] on [[BMC Format]]. [[User:Yellowantphil|Yellowantphil]] 20:12, 11 September 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Not sure about the Sound vs Audio - I use the term &#039;audio&#039; to mean both sound and music, but you&#039;re right, if there are separate sound and music categories we don&#039;t really need an audio one as well.  Feel free to update.  [[INT16LE]] is perfectly fine too!  I added a note to the data types page. -- [[User:Malvineous|Malvineous]] 22:30, 11 September 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
== GamePage template ==&lt;br /&gt;
&lt;br /&gt;
Should the GamePage template add the page to its own category? It seems a little odd that [[Wacky Wheels]] is not in the Wacky Wheels category. [[User:Yellowantphil|Yellowantphil]] 04:51, 16 September 2011 (GMT)&lt;br /&gt;
: I decided against this because there is a link to the game&#039;s page in the category intro at the top of the page.  It seemed unnecessary having another link in amongst all the other pages.  This was also because the game page was really only meant to be a summary, there wasn&#039;t supposed to be a huge amount of detail on it, only links to other pages with the detail (which then would appear in the category list.)  I would imagine that, eventually, [[Wacky Wheels]] would be tweaked to move a lot of the content onto subpages. -- [[User:Malvineous|Malvineous]] 12:58, 16 September 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Scope of the wiki ==&lt;br /&gt;
&lt;br /&gt;
I don’t know how extensive you want the information to be on ModdingWiki... I added a few lists of audio and graphics files a while ago, and there will probably be other information that I’ll find out that’s potentially helpful for level editing but not directly related to it. I can move some information to my website if it starts to become out of scope for your wiki. I also sometimes end up documenting everything imaginable... there’s some minutiae on my website and possibly on your wiki that I ought to go through and delete. [[User:Yellowantphil|Yellowantphil]] 05:28, 10 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
:Hmm, that&#039;s a difficult one - I&#039;m always in favour of documenting more rather than less.  Generally speaking if it&#039;s related to a game and it would help either a programmer writing a utility or a someone trying to change a game manually then it should be documented.  About the only thing that comes to mind that&#039;s over documenting is when some small calculation is expressed in a couple of different programming languages, but I&#039;ve left that in so people can just copy it rather than trying to figure it out from the text.  But the [[Wacky Wheels]] page is probably the gold standard for what all wiki pages should look like :-)  Do you have anything in particular you&#039;re unsure of whether it would fit here? -- [[User:Malvineous|Malvineous]] 10:07, 10 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
::I was mainly thinking of the list of VOC files on [[Wacky Wheels Music and Sound Effects]] and the list of &amp;lt;tt&amp;gt;*.sp&amp;lt;/tt&amp;gt; files on [[Wacky Wheels Graphics Formats]]. I have an expanded list of the &amp;lt;tt&amp;gt;*.sp&amp;lt;/tt&amp;gt; files on my computer but it isn’t finished yet. I guess there isn’t all that much more Wacky Wheels information to be added to this wiki though. There is still some modding information on my website that ought to be moved over here, so that would take up another page or two. I’ve been lazy about doing Wacky Wheels stuff lately, but I might find some time for it this weekend.&lt;br /&gt;
&lt;br /&gt;
::By the way, I guess that guy from Cascadia Games emailed you. It’s pretty interesting that WW might become an iPhone app. He told me that he was going to be using his own game engine, which sounds a lot easier than trying to get a hold of the WW source code and porting it. —[[User:Yellowantphil|Yellowantphil]] 16:46, 15 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: I was going to say the list of VOCs might be overkill, but then the list of .sp files might be useful.  To be honest, it&#039;s the sort of thing that you could probably omit if you were feeling lazy, but likewise I don&#039;t mind at all if you choose to include it, so since it&#039;s already there I&#039;m happy to keep it.&lt;br /&gt;
&lt;br /&gt;
::: Yes I did get an e-mail from Cascadia, I was going to pass along your details but it sounds like you&#039;re already aware of it!  Using their own engine might make it a bit smoother than the original, as the jerkiness of turning is my only criticism of the game. -- [[User:Malvineous|Malvineous]] 00:14, 16 October 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
:I&#039;d like to document not only the format of some game archives but also their contents. This would be quite long lists of basically images, sprites and some minor stuff. I&#039;d also like to upload the actual images alongside but I&#039;m not sure whether that fits the scope of the wiki or if I should just put it somewhere on github. Any advice highly welcome :) -- [[User:Yetmorecode|Yetmorecode]] 15:25, 22 December 2020&lt;br /&gt;
&lt;br /&gt;
::That depends on what you mean with &amp;quot;their contents&amp;quot;. Documenting the used file formats is obviously in the scope of this wiki, since there&#039;s not much point in being able to extract/replace the files in those archives if you can&#039;t actually view those files or make those replacements. But dumping the whole list of all existing files in a game into a wiki article is usually not very useful. An article could highlight some specific files with special functions in the game (stuff like the remap-defining PALETTE.CPS in Red Alert 1 comes to mind; [[Westwood CPS Format|cps]] is a very normal image format in these games, but that specific file controls all recolouring of sprites that change to their owner&#039;s colour), but a list of all sprites and sound files and all their exact usages in the game doesn&#039;t seem like it&#039;d belong here; most of the time such things are pretty self-evident.&lt;br /&gt;
::PS: when you add something to a user talk page, use the signature code to give your note a clearly visible author and date stamp. There&#039;s a big red box on the top of the edit page telling you how to do that.&lt;br /&gt;
:: --[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:51, 22 December 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Alright that makes sense. Sorry about the signature I must have been blind. [[User:Yetmorecode|Yetmorecode]] ([[User talk:Yetmorecode|talk]]) 17:11, 22 December 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: Yes just to confirm this, an image or two is useful to illustrate a file format but we don&#039;t want to become an archive of all game material, not least of which because extracting this is often against the game&#039;s licence (and doesn&#039;t really come under &amp;quot;fair use&amp;quot;) so could open you up to legal trouble if the current copyright owner takes exception to it.  If you come across something hidden or undocumented you can put it on [https://tcrf.net/The_Cutting_Room_Floor The Cutting Room Floor] otherwise [https://pages.github.com/ GitHub Pages] may work as you&#039;ve suggested (if you fly under the copyright radar!) -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 07:08, 23 December 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Wacky Wheels ==&lt;br /&gt;
&lt;br /&gt;
Basically all of the WW modding information from my website is here now. I moved one page when I realized it should probably be capitalized to match the rest of the pages on this site... you can delete the redirect at [[Wacky Wheels high score files]] if you want to.&lt;br /&gt;
&lt;br /&gt;
Now, I need to remove most of the modding information from my website and refer people here. Then we’ll have reached the glorious future where all WW modding information is in one place. I’m going to keep those two text files of notes on my website though—the information in them is disorganized and I think not 100% accurate, but they might have some information that isn’t here yet.&lt;br /&gt;
&lt;br /&gt;
By the way, how’s Camoto going? I’m planning to use it to make a new WW level, but I won’t have time for it for a few more months. —[[User:Yellowantphil|Yellowantphil]]&lt;br /&gt;
&lt;br /&gt;
: Sounds good!  Thanks for all the effort you&#039;ve put in by moving it across.  I think Wacky Wheels is now the most completely documented game on the wiki!  Also can&#039;t hurt leaving your own info up - sometimes it&#039;s nice to go back to the original source if something is unclear.  Camoto&#039;s going well, but unfortunately I haven&#039;t had much time to work on it over the last few weeks.  You probably won&#039;t be able to make much of a level until I add in the ability to select a tile from the tileset, but that&#039;s in progress and hopefully will be ready by the time you are!  Keep me posted when you do start your level(s?) -- [[User:Malvineous|Malvineous]] 12:22, 2 February 2012 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Well, as I was reading some of the information on my website, I noticed that it isn’t written very well. I wrote those pages back when I had very little experience programming. Anyway, I’m planning to redesign my website soon, and this will save me from having to rewrite a few of those pages.&lt;br /&gt;
&lt;br /&gt;
::The tile editor in Camoto as it is now is still certainly useful—I can add new tile types to a level using a binary editor and then move them around in Camoto. I think that it shouldn’t be too hard to make a new WW level using the Gimp and Camoto plus some binary editing. I recall having some problems with the route editor for the computer players, but I didn’t look into it at the time—I’ll let you know when I’m working with Camoto again, and I’ll try to come up with some useful bug reports or fixes if I run into problems. —[[User:Yellowantphil|Yellowantphil]] 14:06, 2 February 2012 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Catacomb ==&lt;br /&gt;
&lt;br /&gt;
Hey [[User:Malvineous|Malvineous]], do you know anyone who has properly read the [[Inverse_Frequency_Sound_format|Inverse Sound Frequency]] file format and got the sound playing? I&#039;m struggling with some fine details in my game. Sounds play near what they should sound like, but the sound quality is all crackly and some sounds play totally incorrect. I followed a basic [http://web.archive.org/web/20000818033701/http://www.dd.chalmers.se/~f98anga/projects/keen/sounds2raw.c code sample] by Anders Gavare. Does your tool support this? Interested in helping me figure this out? My current code is available at [https://code.google.com/p/cataclone/source/browse/trunk/src/catacomb/catacomb_sound.c catacomb_sound.c] - [[User:Eros|Eros]] 11:57, 5 May 2012 (GMT)&lt;br /&gt;
: Should this be moved to my talk page? - [[User:Eros|Eros]] 11:59, 5 May 2012 (GMT)&lt;br /&gt;
:: Probably best to keep it on my talk page if you want me to respond in a timely manner :-)  I based my old utility off Anders&#039; one too, but it&#039;s been a long time since I looked at the code.  My latest utility doesn&#039;t support sound effects yet.  I know Levellass has written a few utilities to play and edit those sound files, so I think your best bet would probably be to post over at the [http://www.keenmodding.org Keen:Modding] forum.  Do note that PC Speaker effects do sound crackly at the best of times, though!  Also make sure you&#039;ve got the right audio format (8-bit vs 16-bit, signed vs unsigned) - I remember some inconsistencies there causing some very distorted results for me.  I love the name &#039;Cataclone&#039; - does your code compile under Linux? -- [[User:Malvineous|Malvineous]] 13:21, 5 May 2012 (GMT)&lt;br /&gt;
::: I currently compile the code using Code::Blocks with GCC 4.6 -std=gnu99. It *should* compile under Linux. But I haven&#039;t tested that out yet. [[Catacomb]] sounds also have flags attached to each one, It&#039;s not exactly the same specification as what it says @ the [[Inverse_Frequency_Sound_format|Inverse Sound Frequency]] format page. Perhaps the flags would make a difference to the sounds? I have the sound setup @ [https://code.google.com/p/cataclone/source/browse/trunk/src/sound_manager.c sound_manager.c] in the sound_manager_init() method. I use AUDIO_S16 (signed 16-bit) @ 22050 Hz with 2 channels. I have not added support for the priority of the sounds yet, I plan on doing that after I get them playing properly.&lt;br /&gt;
::: I found some information on the [[ROTT]] sound format here: [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/_rt_soun.h _rt_soun.h]. This format should be similar to Catacomb as ROTT was developed by [[Apogee]] using the [[Doom]] engine. Here are the flags for the sounds that they define:&lt;br /&gt;
 #define SD_OVERWRITE     0x01&lt;br /&gt;
 #define SD_WRITE         0x02&lt;br /&gt;
 #define SD_LOOP          0x04&lt;br /&gt;
 #define SD_PITCHSHIFTOFF 0x08&lt;br /&gt;
 #define SD_PLAYONCE      0x10&lt;br /&gt;
::: There are also many other sound files for ROTT: [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/rt_sound.c], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/rt_sound.h], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/snd_reg.h], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/snd_shar.h], [http://src.gnu-darwin.org/ports/games/rottdc/work/rottdc-1.0-2/rott/sndcards.h]&lt;br /&gt;
:::: I tried it last night and I was able to get it to compile (after a few changes, like using &#039;/&#039; instead of &#039;\&#039; in a couple of #includes) but all I got was a black window and a beep sound, then nothing.  How far advanced is the project?  Should I expect more than that?  I would expect small variations in the file formats between games, but I would be surprised if the core sound data has changed over time. -- [[User:Malvineous|Malvineous]] 02:38, 6 May 2012 (GMT)&lt;br /&gt;
::::: On Windows, you can run around the levels, collide with walls, collect items, etc... I still need to implement monsters, AI and power shots. However, that beep means that the sounds playing. (see line 71 in main.c: catacomb_sounds_play(&amp;quot;foundsound&amp;quot;);). I just committed the catacomb_data.h file. Update it accordingly, you should now see much more than a black screen.&lt;br /&gt;
:::::: Oh wow, that works really well now!  I see what you mean by the sounds.  You might have to output the PCM data to a .wav/.raw file and look at it in a sound editor to see what&#039;s going on.  It sounds like there might be wrapping or something going on.  Also some sounds (like being blocked by a door) play multiple times over the top of themselves.  I guess this is what you meant by priority not being implemented (although maybe you wouldn&#039;t need to handle priority if you can play multiple sounds at the same time, unlike the real PC Speaker.)  One suggestion - if you do decide to support Linux, abstract the calls that open files so that they search for filenames instead - that way you don&#039;t have to rename all the Catacomb files to be uppercase, since Linux has a case-sensitive filesystem and most filenames are usually all lowercase. -- [[User:Malvineous|Malvineous]] 03:42, 6 May 2012 (GMT)&lt;br /&gt;
::::::: I have exported the raw data to a file, then imported the raw data into Audacity using various settings. All of them sound like they do in the game, crackly and sometimes distorted. I really think its some sort of post FX used by the flags. As for files, I&#039;ll code some sort of SafeFileOpen, SafeFileClose functions like the id codebase that open files regardless of case when i get around to implementing the Linux version. - [[User:Eros|Eros]] 03:54, 6 May 2012 (GMT)&lt;br /&gt;
:::::::: If you can e-mail me one of the files (preferably a &#039;quiet&#039; one that&#039;s not supposed to be crackly) I can take a look if you like - malvineous@shikadi.net -- [[User:Malvineous|Malvineous]] 03:57, 6 May 2012 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Merge ==&lt;br /&gt;
&lt;br /&gt;
Is there a way to tag two pages such that it is clear that they should be merged?&lt;br /&gt;
For example, [[Crystal Caves Tileset Format]] describes the same format as [[Duke 1 Tileset Graphics]].[[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 21:00, 15 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
: You can mention it on the talk page for one of the articles.  Any suggestions as to what we should call the merged page? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 03:09, 20 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
::Dark Ages is the first game that got released that uses this format, so &#039;&#039;Dark Ages Tileset Format&#039;&#039; could be the name, like all those formats that are named after Commander Keen 1-3.&lt;br /&gt;
::Or we name it after Duke Nukem 1, because that game is probably more popular than Dark Ages, Crystal Caves and Secret Agent, like [[Commander Keen 1-3 Level format]], although Slordax used it before Commander Keen 1-3 did.[[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 19:13, 20 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: Yes I was thinking along the same lines, naming it after the first game that used the format.  But then the release date doesn&#039;t necessarily indicate which game &amp;quot;invented&amp;quot; the format, if one game took longer to develop and was released late.  I was wondering whether there is a common thread amongst all these games, such as the same programmer or company we could use instead.  In many ways I would prefer a name like &amp;quot;Replogle tileset format&amp;quot; or &amp;quot;Apogee EGA tileset format&amp;quot;.  What do you think? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 23:36, 20 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: I&#039;ve read the [http://www.3drealms.com/news/2006/04/the_apogee_legacy_15.html | Apogee Legacy interview with Peder Jungck] again today. He wrote the ProGraphx Toolbox.&lt;br /&gt;
:::: DN1.EXE contains the string &#039;&#039;Version 1.0 EGA/VGAProGraphx EGA/VGA Toolbox&#039;&#039;,&lt;br /&gt;
:::: CC1.EXE contains the string &#039;&#039;Version 1.5 320x200 PAN EGA/VGAProGraphx EGA/VGA Toolbox&#039;&#039;,&lt;br /&gt;
:::: SAM1.EXE contains the string &#039;&#039;ProGraphx EGA/VGA Toolbox Version 2.0 320x200 EGA/VGA Copyright 1991 by Peder Jungck&#039;&#039; and&lt;br /&gt;
:::: DA3.EXE contains the string &#039;&#039;Version 1.0 EGA/VGAProGraphx EGA/VGA Toolbox&#039;&#039; (DA1.EXE and DA2.exe contain gibberish).&lt;br /&gt;
:::: So I would suggest &#039;&#039;ProGraphx Toolbox tileset format&#039;&#039;. Peder also wrote a book about the toolbox called &#039;&#039;Graphics Programming &amp;amp; Animation: Ultra-Fast Assembly Routines for EGA/VGA Graphics Animation&#039;&#039;. Maybe that book has a better name for the file format. [[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 11:03, 21 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: So we know of three different versions of the ProGraphx Toolbox. Dark Ages and Duke Nukem 1 use version 1.0. Each tileset is 8064 bytes long and is in a separate file. Crystal Caves uses version 1.5 and each tileset is 8003 bytes long, but they are all in the same file. Secret Agent uses version 2.0 Each tileset is again 8064 bytes long, they are all in the same file and the file is encrypted. [[User:Frenkel|Frenkel]] ([[User talk:Frenkel|talk]]) 17:00, 28 July 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::: Thanks for figuring all that out.  I&#039;ve merged the pages and changed the name to [[ProGraphx Toolbox tileset format]] as suggested.  Please feel free to correct anything I have missed. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 02:40, 4 August 2013 (GMT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Guidelines for proper Wiki Editing ==&lt;br /&gt;
Dear Malvineous! Could you post the guidelines (or guide) for proper editing of the Wiki? [[User:The coder|The coder]] ([[User talk:The coder|talk]])&lt;br /&gt;
: Hmm, there isn&#039;t really one, it&#039;s more about finding a similar page and matching the style found there!  Copy and paste works well :-)  There is [[ModdingWiki:Contributing]] but it&#039;s not very detailed. (BTW please put &amp;lt;nowiki&amp;gt;~~~~&amp;lt;/nowiki&amp;gt; at the end of your messages, when you preview the page you will see this gets replaced with your name and the date automatically.) -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 21:59, 12 December 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
== VGFM Music Format ==&lt;br /&gt;
&lt;br /&gt;
Hello, Malvineous!&lt;br /&gt;
&lt;br /&gt;
I accidentally found that [[VGFM Music Format]] is absolutely similar to the [http://www.vgmpf.com/Wiki/index.php?title=MUS_(AdLib) MUS (AdLib)] format which I finished researching yesterday.&lt;br /&gt;
&lt;br /&gt;
And [[VGFM Instrument Format]] is similar to [http://www.vgmpf.com/Wiki/index.php?title=SND_(AdLib) SND (AdLib)].&lt;br /&gt;
&lt;br /&gt;
These formats were developed by Ad Lib Inc, I found the sources and documentation in the Ad Lib developer&#039;s manual downloaded from old BBS board site :)  And these formats are used not only in [[Vinyl Goddess From Mars]] game.&lt;br /&gt;
&lt;br /&gt;
--[[User:Binarymaster|Binarymaster]] ([[User talk:Binarymaster|talk]]) 02:05, 22 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Oh wow, what an interesting discovery!!  Do you have any links to the official documentation?  I&#039;d really like to see what else they have to say about the format.  And yes, we should definitely rename the articles here.  What do you think they should be called?  &amp;quot;Ad Lib Music Format&amp;quot; is probably a bit generic given they have a few, like .ROL... -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 09:45, 22 January 2015 (UTC)&lt;br /&gt;
:: Here it is: [http://files.mpoli.fi/software/programm/general/adlip.zip adlip.zip] - binaries and source code, probably from Ad Lib Programmer&#039;s Manual. MUS headers are described in CONVERT.C and CONVERT.H files. Fun fact that they also developed another similar format based on MIDI - [http://www.vgmpf.com/Wiki/index.php?title=MDI MDI]. It has similar musical features but stores all data in one file in MIDI format.&lt;br /&gt;
:: Well, I have no idea how to name it better, I think &amp;quot;Ad Lib Music Format&amp;quot; should be suitable for it :) --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 10:30, 22 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Many thanks!!  I&#039;ve updated the article pages with the info I could gain from the source code.  There are still a few unresolved issues (like what exactly the default percussion pitch is) but it has certainly answered a number of questions.  I called it &amp;quot;AdLib MIDI Format&amp;quot; because that&#039;s the name they use in one place in the source code, although it&#039;s not a very descriptive title!  Thanks again for letting me know about this excellent find :-) -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 12:48, 24 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: That&#039;s good! I think maybe this format should be named as &amp;quot;AdLib MIDI Format v1.0&amp;quot;, because there is also an improved version of it, probably v2.0 - [http://www.vgmpf.com/Wiki/index.php?title=MDI MDI] (I made a typo in previous posted link), it uses a single file in MIDI format.&lt;br /&gt;
:::: And about [[AdLib Timbre Bank Format]] article - BNK format originally was created in the 1987 with the first release of the [http://www.vgmpf.com/Wiki/index.php?title=AdLib_Visual_Composer AdLib Visual Composer], so actually Ad Lib Inc released its formats in this order:&lt;br /&gt;
:::: &#039;&#039;&#039;1)&#039;&#039;&#039; ROL &amp;amp; BNK (1987, with AdLib Visual Composer)&lt;br /&gt;
:::: &#039;&#039;&#039;2)&#039;&#039;&#039; MUS &amp;amp; SND/TIM (1988, with player and converter)&lt;br /&gt;
:::: &#039;&#039;&#039;3)&#039;&#039;&#039; MDI (1989, also with player and converter)&lt;br /&gt;
:::: Information about third format was placed [http://cd.textfiles.com/soundsensations/MISCPROG/AD-PROG/ here], though the link is not working now.&lt;br /&gt;
:::: --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 13:08, 24 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: Oh wow that&#039;s interesting too.  I think the MUS/SND/TIM format should stay as &amp;quot;AdLib MIDI Format&amp;quot; with no version number, because that file format does have version fields so it&#039;s possible to have v1.0, v2.3, etc. within that format.  The MDI article you linked to actually looks like conventional MIDI with some extra events for setting OPL instruments, so I think this belongs as one of the many backwards-compatible extensions of the [[MID Format]].&lt;br /&gt;
&lt;br /&gt;
::::: With the instrument bank formats that&#039;s really unusual if BNK came first!  It seems very odd for AdLib to produce the SND/TIM format if they already had the more efficient BNK format available.  I was going from the dates in the text files from the programmer&#039;s guide you kindly posted, and bkformat.txt says in Jan 1989 they are in the process of converting their software to use BNK.  Can you confirm there was BNK software earlier than this?  I&#039;m just thinking that Visual Composer may have come out in 1987, but maybe it didn&#039;t get BNK support added until later? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 01:30, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::::: Well, I&#039;m sure that first version of Visual Composer was released with AdLib music card, but I don&#039;t know exactly about BNK support. It&#039;s really strange that Ad Lib downgraded the format (BNK is better in structure), but the known formats has converters which converts BNK to X format, but not from X to BNK - this makes sense that BNK was the first format. Also Visual Composer doesn&#039;t support other bank formats, only BNK.&lt;br /&gt;
:::::: BNK creation date 1987 was contributed by [http://www.vgmpf.com/Wiki/index.php?title=User:TheAlmightyGuru Dean Tersigni], I&#039;ll ask him about it.&lt;br /&gt;
&lt;br /&gt;
:::::: Update: I also read information from bkformat.txt, and it seems you&#039;re right :)&lt;br /&gt;
:::::: So actually it was:&lt;br /&gt;
:::::: &#039;&#039;&#039;1)&#039;&#039;&#039; ROL &amp;amp; INS (1987, with AdLib Visual Composer v1.0)&lt;br /&gt;
:::::: &#039;&#039;&#039;2)&#039;&#039;&#039; MUS &amp;amp; SND/TIM (1988, with player and converter)&lt;br /&gt;
:::::: &#039;&#039;&#039;3)&#039;&#039;&#039; BNK (1989, with AdLib Visual Composer v1.5)&lt;br /&gt;
:::::: &#039;&#039;&#039;4)&#039;&#039;&#039; MDI (1989, also with player and converter)&lt;br /&gt;
:::::: Wow, that feel when restored original order of events! :D --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 01:51, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::::: That seems to make the most logical sense - there&#039;s a clear improvement with each new format.  I&#039;m glad you agree!  Note that when you say there&#039;s no conversion from &amp;quot;X to BNK&amp;quot; there is BANKMNG.EXE that comes with the programmer&#039;s manual which converts .ins files to .bnk. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 04:09, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::::::: True. I forgot about it :) Thanks! --[[User:Binarymaster|binarymaster]] ([[User talk:Binarymaster|talk]]) 12:02, 25 January 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
== email ==&lt;br /&gt;
&lt;br /&gt;
Hello! Can&#039;t send you e-mail. Got this:&lt;br /&gt;
&lt;br /&gt;
 This message was created automatically by mail delivery software.&lt;br /&gt;
 A message that you sent could not be delivered to one or more of its&lt;br /&gt;
 recipients. This is a permanent error. The following address(es) failed:&lt;br /&gt;
 malvineous@shikadi.net&lt;br /&gt;
 host mail.shikadi.net [52.11.27.19]&lt;br /&gt;
 SMTP error from remote mail server after RCPT TO:&amp;lt;malvineous@shikadi.net&amp;gt;:&lt;br /&gt;
 550 invalid recipient&lt;br /&gt;
&lt;br /&gt;
[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 09:12, 11 March 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Whoops, moved my e-mail service to AWS and missed a step for that address!  Please resend, should work now :-)  Thanks for letting me know! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 11:34, 11 March 2017 (UTC)&lt;br /&gt;
::Yes, e-mail goes through this time. Hope you receive it. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 15:41, 11 March 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Duplicate RLE page ==&lt;br /&gt;
&lt;br /&gt;
After some edits to the [[RLE Compression]] page, I noticed that this was not the page linked from the [[:Category:Compression algorithms]] page. It seems there are in fact two of them; one with an uppercase &#039;c&#039;, and [[RLE compression|one with a lowercase &#039;c&#039;]]. The latter seems to be the better-written one, but since the LZW page was apparently moved from &amp;quot;LZW compression&amp;quot; to &amp;quot;LZW Compression&amp;quot;, I suggest the final name of the RLE page should likewise be the uppercase-&#039;c&#039; one.&lt;br /&gt;
&lt;br /&gt;
I have merged anything I deemed useful into the lowercase-&#039;c&#039; version. Could you make sure the uppercase-&#039;c&#039; duplicate is removed, and the other one is moved to its name?&lt;br /&gt;
&lt;br /&gt;
-[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:48, 4 October 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Done, many thanks for the clean up! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:38, 5 October 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Account rename? ==&lt;br /&gt;
Hi Malvineous,&lt;br /&gt;
&lt;br /&gt;
I am wondering if it&#039;s much of a hassle to rename accounts on this wiki.  I&#039;d kind of like to have my account use the same handle I&#039;m using just about everywhere else (ETTiNGRiNDER).  Don&#039;t sweat it too much if this is onerous to do, though.&lt;br /&gt;
&lt;br /&gt;
Thanks! - [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 20:42, 29 January 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
: I&#039;m not sure how it can be done.  If you can find out a quick way to rename a MediaWiki account then let me know!  At any rate all your comments would still be signed with your old name however. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:15, 4 February 2018 (UTC)&lt;br /&gt;
: P.S. the e-mail address in your account is bouncing -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:17, 4 February 2018 (UTC)&lt;br /&gt;
:: Ah, right, it was still set to that old e-mail.  Hushmail nuked that address on me years ago, I&#039;ve changed it to one that&#039;s current.  As for the renaming, I don&#039;t really know anything about wiki administration, though a quick search suggests that there&#039;s this thing: https://www.mediawiki.org/wiki/Extension:Renameuser&lt;br /&gt;
::If that&#039;s a bit much then no biggie. -- [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 14:43, 5 February 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Removal request ==&lt;br /&gt;
&lt;br /&gt;
It seems I made a page that was unnecessary; the [[Westwood Palette]] I documented turned out to be a known common format (6-bit RGB) already covered in the standard [[VGA Palette]] page. I have changed all links to link to the older page, but I don&#039;t think I have the user rights required to delete the Westwood Palette page. Can you take care of it? -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:56, 6 February 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Done!  I made you an admin too so you should have delete access now.  Thanks for your contributions! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 00:03, 7 February 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Hi-Octane ==&lt;br /&gt;
&lt;br /&gt;
Hi! &lt;br /&gt;
&lt;br /&gt;
I&#039;ve figured out the MUSIC.DAT container and I was wondering if you could shed out some light on what these song formats are, now that we know how to unpack it ?&lt;br /&gt;
&lt;br /&gt;
Thanks !!!&lt;br /&gt;
&lt;br /&gt;
: Yep, they&#039;re listed on the [[Hi Octane]] page, in the file format box. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:57, 14 March 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== ReCaptcha v1 problem ==&lt;br /&gt;
&lt;br /&gt;
It seems I can no longer add links in articles; the ReCaptcha test added when new links are detected uses ReCaptcha v1, which gives a warning that &amp;quot;reCAPTCHA 1 IS SHUTDOWN&amp;quot;. It does not allow the check to pass, so the page can never be submitted.&lt;br /&gt;
&lt;br /&gt;
The FAQ on the ReCaptcha docs (can&#039;t link to them, obviously) says that &amp;quot;&#039;&#039;&#039;Any calls to the v1 API will not work after March 31, 2018&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
-[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 09:26, 28 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Bio Menace patches ==&lt;br /&gt;
&lt;br /&gt;
Hey, I&#039;ll have Bio Menace 1 patches for the freeware release. Most of them are status window-related, but there are others as well.&lt;br /&gt;
Question: Could you create several other sections in All Bio Menace patches cathegory? Because I cannot submit them anywhere right now. Thanks! --[[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 00:57, 25 July 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
: The status window patches should go into [[:Category:Bio Menace interface patches]].  The others *should* fit into existing categories, but if you&#039;re not sure let me know! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 05:23, 29 July 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I&#039;ll need several categories from you as I checked there&#039;ll be other BM patch stuff as well. So I need the following categories: status screen, hostage, help menu, main menu, B800 screen (I even built the BIN file and I made patch for that!). And I&#039;ll even submit these for BM2 and 3. Please, create these. Oh, and I&#039;ll surely submit! --[[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 01:36, 1 August 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Status screen, hostage, help menu, main menu and B800 screen should all go into [[:Category:Bio Menace interface patches]] as they are all modifying the user interface.  I would like to keep the number of patch categories fairly small otherwise it will get a little out of control! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 01:48, 17 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Bio Menace patches on PCKF? ==&lt;br /&gt;
&lt;br /&gt;
Hey, how can I post my Bio Menace 1-3 patches on PCKF or keenmodding.org? I very want them to submit one of the forums!--[[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 23:11, 4 August 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Wombat File Reader updates! ==&lt;br /&gt;
&lt;br /&gt;
I think [[Wombat]]&#039;s title should be updated to show its full name, which now is &amp;quot;Wombat File Reader&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Also the supported games list has to be updated accordingly to the list on https://szevvy.com/ (the author&#039;s website, which was listed as &amp;quot;dead&amp;quot; in Wombat&#039;s info while the site is up and running again).&lt;br /&gt;
&lt;br /&gt;
It&#039;s also not a dead program at all, since its latest version is very recent (11 October 2018), and it&#039;d be a shame to have such old and deprecated information on this wiki of such a useful and powerful tool.&lt;br /&gt;
&lt;br /&gt;
-[[User:Elia1995|Elìa1995]] ([[User_talk:Elia1995|talk]]) 07:38, 15 October 2018‎ (UTC)&lt;br /&gt;
&lt;br /&gt;
: It&#039;s only just been updated recently after many years of no releases.  It&#039;s a bit unfair to say the wiki has old information when it&#039;s only a couple of weeks out of date, and it relies on people such as yourself to keep things up to date!  Please go ahead and correct as needed so we can keep the information current.  We are all doing this in our spare time so we need lots of help to keep things up to date.  Also, the page you link to lists it as &amp;quot;Wombat File Tools&amp;quot; rather than &amp;quot;Wombat File Reader&amp;quot;.  Everyone in the community refers to it as just &amp;quot;Wombat&amp;quot; however.  -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 23:27, 16 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I&#039;ve only just gotten my account here approved, and only just made new builds of Wombat (actually a complete rewrite) after (as Malvineous said) many many years of no releases.  It warms my heart to see people notice :) [[User:Szevvy|Szevvy]] ([[User talk:Szevvy|talk]]) 01:44, 17 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: I just noticed the 1.0.4 update, I&#039;ll work on updating the supported games list on the page according to the one on Szevvy&#039;s site; by the way, thanks for telling me how to &amp;quot;sign&amp;quot; these posts, I had no idea. [[User:Elia1995|Elia1995]] ([[User talk:Elia1995|talk]]) 08:08, 18 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== e-mail (again) ==&lt;br /&gt;
&lt;br /&gt;
Hello! Sent you e-mail 2019.02.19 about Prehistorik without any answer. Yesterday another e-mail was sent and since 24+ hours passed was forced to write here. Is there something wrong again with your e-mail account or spam filters (for mail.ru)? Thanks! [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 15:10, 1 March 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Content license ==&lt;br /&gt;
&lt;br /&gt;
Is the content of this wiki governed by a specific license? I&#039;d like to contribute information on &amp;quot;Nomad&amp;quot; file formats that I reverse engineered, which I&#039;d previously published on my personal web site under [http://creativecommons.org/licenses/by-sa/4.0/ Creative Commons SA 4.0]. This wiki certainly seems to be in the spirit of the Creative Commons licensing structure so I&#039;m guessing there would be no real conflict, but I just wanted to get some additional information on this. --[[User:Cmb|Cmb]] ([[User talk:Cmb|talk]]) 13:32, 6 May 2020 (UTC)&lt;br /&gt;
:Personally, I&#039;ve just [[RLE Compression#Source_code|added the license under which code was released]] myself. Then again I release everything under [[wp:WTFPL|WTFPL]], because I honestly don&#039;t mind people using anything I write for research purposes in any way they please, so license compatibility is a bit of a non-issue for me. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:04, 6 May 2020 (UTC)&lt;br /&gt;
:That said, though, given the current online climate, I do agree this is an issue that should be clarified here on the wiki. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:06, 6 May 2020 (UTC)&lt;br /&gt;
:: There is a licence specified somewhere but the short answer is anything you put here is basically in the public domain - because if someone steals it we don&#039;t have the resources to chase them, so if it&#039;s that valuable to you that you can&#039;t handle someone copying it without giving you credit, then don&#039;t post it here.  Having said that for &amp;quot;nice&amp;quot; users many of the pages ask for a mention if you find the content useful, but this is by no means a requirement.  I suppose legally speaking you&#039;ll have to dual-licence your Creative Commons content because some CC versions have additional restrictions, like you can&#039;t copy the content without giving credit.  The [https://creativecommons.org/choose/zero/ CC0 licence] pretty much covers it.  Putting a specific licence on code is fine (although no licence at all would be best so it inherits the wiki&#039;s general content licence), noting that any licence enforcement will be on you, but the content itself is always going to be CC0/public domain. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 05:48, 10 June 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Multiple Platforms ==&lt;br /&gt;
&lt;br /&gt;
Should anything special be done for games that are both DOS and Win95, like [[Warcraft II]] and [[Command &amp;amp; Conquer]]? As it is, the template only supports one &#039;Platform&#039;. I don&#039;t know enough about templates to make it accept lists, though a workaround would be to add the Win95 category to such games manually. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) &lt;br /&gt;
20:29, 17 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
: I&#039;m open to suggestions, but the purpose of the platform category is less about documenting all platforms a game runs on, and is more about identifying which games on the wiki don&#039;t work under DOS, since DOS is the wiki&#039;s main focus.  So think of it more as the &amp;quot;minimum&amp;quot; platform needed - i.e. a DOS game can also run inside Win3.x and Win95, a Win3.x game can also run under Win9x but not DOS, and a Win9x game can&#039;t run under DOS or Win3.x at all.  So for DOS/Windows games DOS would be the oldest platform needed to play the game, even if there is a native Windows version. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 00:26, 18 April 2022 (GMT)&lt;br /&gt;
::&#039;Minimum platform&#039; isn&#039;t really true anymore when going to the reality of getting stuff running on modern machines, though; 16-bit windows programs don&#039;t work on modern systems at all, and DOSBox can&#039;t emulate them. They&#039;re a pretty annoying in-between class. C&amp;amp;C95 has issues like that; while the game itself is 32-bit, its installer is a 16-bit Windows program. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:33, 18 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: That&#039;s true, but I wasn&#039;t thinking so much about modern systems.  If you&#039;re building a VM or setting up an old PC, knowing which games will work without Windows, or will work if you only install Win 3.1, might be useful.  I did think you could install Windows 3.1 in DOSBox though to run 16-bit apps.  At any rate, I more had in my mind which games required OS support for NE executables in order to play, and which ones required PE support. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 11:48, 18 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: Well, one of the specific cases I had in mind in this was the fact that the Win95 version of Command &amp;amp; Conquer uses PCX format for its title screen, while the DOS version doesn&#039;t. And while the basic modding of terrain and game objects is identical in both versions, all modding related to the game UI is different because of the different resolution. So, if more detailed information on that front would be added, it seems logical to also add the Win95 category somehow. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:17, 25 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
::::: In that case it sounds almost like a different game that happens to share a lot of the same content, so I&#039;d be more inclined to list it as a separate game, e.g. on a page called &amp;quot;Command &amp;amp; Conquer (Windows version)&amp;quot;, and just put a note saying the file formats are the same as the DOS version with the following exceptions, then list the Windows-specific file formats. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 15:42, 25 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::::: No, it&#039;s really just PCX, nothing else is new in terms of file formats. The UI is in the same sprites format used for the in-game sprites. So like 95% still the same. But yea, I guess if I do ever get around to writing a more in-depth modding guide, I could make a different page for the Win95 version. Most of the modding difference between the two games is just that the Win95 exe file has been researched a lot deeper, to the point that (with the released source code) pretty much anything in it can be changed nowadays. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:10, 25 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
==Empty Pages==&lt;br /&gt;
Not sure if you already noticed it, but user [[User:Parlortricks]] is creating a bunch of empty pages, I&#039;m assuming to be filled at a later date. --[[User:TheAlmightyGuru|TheAlmightyGuru]] ([[User talk:TheAlmightyGuru|talk]])&lt;br /&gt;
: I hadn&#039;t noticed, thanks for the heads up!  I updated [[ModdingWiki:Contributing]] to include some more points about when to create pages. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 04:31, 10 August 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
== File format category for copy-protection data. ==&lt;br /&gt;
&lt;br /&gt;
I can&#039;t find any suitable examples with a template that suits a file containing only the copy protection data.   &lt;br /&gt;
It&#039;s not text, but there don&#039;t seem to be any generic binary format templates. [[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 06:44, 17 April 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
: I&#039;m not really familiar with what copy protection data would contain.  What generic items would you think apply to this sort of data?  I&#039;m not so keen on adding a generic binary format category, it would be nice to have a specific one where possible. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 09:17, 17 April 2023 (GMT)&lt;br /&gt;
:: In this case, the file contains 750 passwords. They were printed on a piece of card in with the original game (in pale blue to thwart photocopying) and the game asks you for one of the passwords at random. I&#039;ll make a file without a specific category for now.[[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 12:31, 17 April 2023 (GMT)&lt;br /&gt;
::: If they&#039;re passwords, doesn&#039;t that make it a type of strings file? You said it&#039;s not &amp;quot;plain text&amp;quot;, but can it be converted/decoded to plain text? I&#039;ve dealt with encrypted text formats before; see [[Cover Girl Strip Poker Text]] -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 16:20, 17 April 2023 (GMT)&lt;br /&gt;
: There are lots of file formats of unspecified types. See stuff like [[Westwood Fading Table]]; it&#039;s basically a file storing special colour effects. I&#039;m not sure there&#039;s a point in making a template for every specific type like that; there&#039;s so many odd cases out there. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 10:17, 17 April 2023 (GMT)&lt;br /&gt;
:: Thanks.  I wasn&#039;t necessarily looking for a template. But I couldn&#039;t find an example of a file that wasn&#039;t already in an incorrect template. I&#039;ll base my page on the example you suggested.[[User:Carbon14|Carbon14]] ([[User talk:Carbon14|talk]]) 12:31, 17 April 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Wiki policy questions ==&lt;br /&gt;
&lt;br /&gt;
Hi, a couple questions I&#039;ve had lingering regarding how things should be done on the wiki / if they should be done at all.&lt;br /&gt;
* What should we do about game title disambiguation?  I think in cases like Warlords (SSG) vs. Warlords (Atari) where only one of the games was released as a DOS game, it&#039;s probably fine to just have a page for the one that&#039;s relevant and at most maybe have a note on its main page that it&#039;s not related to the other game, but I&#039;ve noticed that &amp;quot;Dungeon of Death&amp;quot; is a title that has the honor(?) of being used for two different games &#039;&#039;on DOS&#039;&#039;.  Is there a particular disambiguation format we should use when adding one of those?&lt;br /&gt;
* Is there any specific policy on games/mods with offensive content?  I know we have some strip poker type games referenced on the wiki, but one thing I&#039;m specifically thinking of is I know there was an old hack of the DOS version of Gauntlet 2 that&#039;s been floating around since the 90s, but is a fairly puerile affair that changes text/graphics to sexual and scatological references.  It also has a vulgar word in the mod title itself.  It might be useful to look at how it was done since it&#039;s clearly evidence that changing the text/graphics was attainable even back then, but do we want to document things like that, or is there a &amp;quot;too dirty&amp;quot; line where we should try to keep the wiki clean of references to certain games/mods due to title or content?&lt;br /&gt;
Thanks.-- [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 18:35, 3 October 2023 (GMT)&lt;br /&gt;
: Final decision on this is obviously on Malvineous, but here&#039;s my two cents on this: I don&#039;t think there&#039;s any restriction on making pages for covering games with explicit content, but it&#039;d be nice to keep the &#039;&#039;actual&#039;&#039; explicit content on the wiki to a minimum. As an example, the most daring thing I put on the wiki was the modded showcase image for [[Interactive Girls Club]], which, without the humorous covering, was indeed a straight up explicit image. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 19:23, 3 October 2023 (GMT)&lt;br /&gt;
:: Yep I agree.  The purpose of the wiki is for documentation, and just like a TV documentary, sometimes you may have to cover difficult subjects, so it&#039;s usually done in a tactful way without showing anything directly offensive.  So I think the same policy should apply here - no directly explicit/offensive content (e.g. images), but talking about it for the sake of documenting it is fine.  I would think avoiding offensive words in article titles would be a good idea as people are more likely to come across those by accident, but if you&#039;re browsing an article about a pornographic game and you encounter some dirty words, you have nobody to blame but yourself.  So listing that mod with an uncensored title is fine with me, but perhaps let&#039;s not create an article page for it unless the words are obscured with asterisks or similar just to be extra considerate to those who might be browsing through the lists of pages.&lt;br /&gt;
:: It would be good to make it clear when things are censored though.  In Nyerguds&#039; example I actually thought the &#039;censored&#039; image was part of the game, I didn&#039;t realise it was an addition.  So maybe it would be good to write &amp;quot;Censored by ModdingWiki&amp;quot; or something to that effect, to make it obvious that it&#039;s something we&#039;ve done and not part of the original game.  Likewise for an article title with asterisks in it, one of the first things on the page should be a note to say what the full uncensored article title actually is.&lt;br /&gt;
:: As for disambiguation I&#039;m open to suggestions.  Probably my first thought would be to include the year of release in brackets: &amp;quot;Example (1990)&amp;quot; like what was done for [[Shadow Warrior (1993 Beta)]] or if the year is the same, then perhaps the software developer: &amp;quot;Example (Microsoft)&amp;quot;.  I&#039;m not too fussed as it&#039;s probably more important that the part in brackets makes sense to readers rather than follows any hard and fast rule.  Either way a normal disambiguation page should be created for the name without any brackets, in the same style as the existing ones at [[:Category:Disambiguation]].  A disambiguation page wasn&#039;t created for Shadow Warrior as the beta version isn&#039;t really a competing game, so links on the respective article pages would suffice.  As always, use your best judgement, we can always change it later if we need to. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 06:10, 4 October 2023 (GMT)&lt;br /&gt;
::: The Interactive Girls Club image &#039;&#039;isn&#039;t&#039;&#039; censored for the sake of putting it on the wiki though. It&#039;s a showcase of the game being &#039;&#039;modded&#039;&#039;. I replaced the normal mouse cursor with that sign. I could&#039;ve taken a tamer scene to start with, but I thought this would be funny. I explained what was done to it [[:File:Mod-Interactive_Girls_Club.png|on the actual image page]]. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 07:34, 4 October 2023 (GMT)&lt;br /&gt;
:::: Ohh, I understand now!  Sorry it was completely lost on me, but that&#039;s probably because I&#039;ve never played the game before so I didn&#039;t know what changes to look out for! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 10:45, 4 October 2023 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Pages linking to itself ==&lt;br /&gt;
&lt;br /&gt;
Hello! Merry Christmas and Happy New Year! Is it possible to check Wiki for pages that linked to itself and maybe autocorrect if possible? Like [https://moddingwiki.shikadi.net/w/index.php?title=Shakii_The_Wolf&amp;amp;curid=2343&amp;amp;diff=11369&amp;amp;oldid=11367 this] or [https://moddingwiki.shikadi.net/w/index.php?title=Pee_and_Gity&amp;amp;curid=2348&amp;amp;diff=11370&amp;amp;oldid=6789 that]? Sometimes this will result in redirect to itself (as in first example) or a red link indicating that page with this name was not created (as in second example). I&#039;ve checked and fixed all pages created by [[User:MartinVole|MartinVole]] but maybe there are more. Thank you!&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Eol!&amp;diff=11373</id>
		<title>Eol!</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Eol!&amp;diff=11373"/>
		<updated>2024-01-03T18:36:33Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: link to itself&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedMoreInfo}}&lt;br /&gt;
{{Game Infobox&lt;br /&gt;
 | Levels = No&lt;br /&gt;
 | Tiles = No&lt;br /&gt;
 | Sprites = No&lt;br /&gt;
 | Fullscreen = No&lt;br /&gt;
 | Sound = Edit&lt;br /&gt;
 | Music = No&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Eol!&#039;&#039;&#039;, full title Eol-ui Moheom (&#039;&#039;Eol&#039;s Adventure&#039;&#039;) is a platformer featuring a cutesy yellow creature named Eol, who one day, without warning, witnesses the world being split by an immense blast. This blast originating from a being known as Kare who too is of Eol&#039;s race. &lt;br /&gt;
&lt;br /&gt;
The game features some of the best mechanics of Family Production, featuring legitimate challenge, hit-detection, and more well-scripted bosses and enemies. Visually it offers some of the best and most colorful VGA graphics among other titles in its genre.&lt;br /&gt;
&lt;br /&gt;
== File formats ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! File name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.cfg&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Game settings.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.pal&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #CCFFCC;&amp;quot;| [[VGA_Palette | 6-bit VGA Palette]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.emf&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| [[IMS Format]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;EOL.BNK&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #CCFFCC;&amp;quot;| [[BNK Format (Ad Lib)]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.fx5&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Family Production FX5 File.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.eft&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #CCFFCC;&amp;quot;| RIFF Wave, [[VOC_Format | Creative Voice File]] and raw 8-bit unsigned, 8000 sample rate sounds..&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.cap&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| A form of actor behavior (AI) script.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.fam&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Variable, but graphical and consists of scenes, including cutscenes.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.mjd&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Unknown but seemingly deals with multi-part enemies.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.mcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Unknown, but deals with maps.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.img&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Seemingly Map Graphical Tiles.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.efp&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Unknown, but deals with maps.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;DEFAULT.EBF&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Unknown.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;DEFAULT.HBF&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Unknown.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.DPP&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Dragon Patch file, handled by DPP.EXE. Otherwise, unknown.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
- Object layout in stages are apparently hardcoded in the game executable EOL_GAME.EXE as no other file seemingly handle this function. However, overall level layout is handled by the MAP files. The setup thus far is unknown.&lt;br /&gt;
&lt;br /&gt;
[[Category:Sidescroller]]&lt;br /&gt;
[[Category:Family Production]]&lt;br /&gt;
[[Category:Game Intro Page]]&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Corridor_7_Alien_Invasion&amp;diff=11372</id>
		<title>Corridor 7 Alien Invasion</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Corridor_7_Alien_Invasion&amp;diff=11372"/>
		<updated>2024-01-03T18:35:33Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: link to itself&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
{{Game Infobox&lt;br /&gt;
 | Levels = Edit&lt;br /&gt;
 | Tiles = Edit&lt;br /&gt;
 | Sprites = Edit&lt;br /&gt;
 | Fullscreen = Edit&lt;br /&gt;
 | Sound = Edit&lt;br /&gt;
 | Music = Edit&lt;br /&gt;
 | Text = Edit&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corridor 7 Alien Invasion&#039;&#039;&#039; was released in 1994 using a modified version of the Wolf 3D engine.&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://winwolf3d.dugtrio17.com/ Wolfenstein Data Compiler]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = Edit&lt;br /&gt;
| sfx = Edit&lt;br /&gt;
| txt = Edit&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = Edit&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== File formats ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! File name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;AUDIO*.CO7&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC;&amp;quot; | [[AudioT Format]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;AUTOSAVE.DAT&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #FFCCCC;&amp;quot; | Autosave data.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;CONFIG.DAT&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #FFCCCC;&amp;quot; | Configuration File.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;CORR7CD.EXE&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #FFFFCC;&amp;quot; | CD Version Executable.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;GFX*.CO7&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #FFFFCC;&amp;quot; | Textures and sprites.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;MAP*.CO7&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC;&amp;quot; | Maps in [[GameMaps Format]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;VGA*.fat&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #FFFFCC;&amp;quot; | Screens and font.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Capstone Software]]&lt;br /&gt;
[[Category:3D]]&lt;br /&gt;
[[Category:First-Person Shooter]]&lt;br /&gt;
[[Category:Wolfenstein 3-D]]&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Chill_Manor&amp;diff=11371</id>
		<title>Chill Manor</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Chill_Manor&amp;diff=11371"/>
		<updated>2024-01-03T18:34:49Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: link to itself&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Game Infobox&lt;br /&gt;
 | Levels = Unk&lt;br /&gt;
 | Tiles = No&lt;br /&gt;
 | Sprites = No&lt;br /&gt;
 | Fullscreen = Edit&lt;br /&gt;
 | Sound = Edit&lt;br /&gt;
 | Music = Edit&lt;br /&gt;
 | Text = Edit&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Chill Manor&#039;&#039;&#039; is the sequel to [[I.M. Meen]] released in 1996. It follows a group of children out to stop Ignatius Mortimer Meen&#039;s wife, Ophelia Chill, who is altering the course of history.&lt;br /&gt;
&lt;br /&gt;
The game uses an updated version of the I.M. Meen engine sporting features of animated tiles, transforming actors, mipmaps, and multiple dimensional textures.&lt;br /&gt;
&lt;br /&gt;
== File formats ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! File name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.xmi&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #CCFFCC;&amp;quot;| Extended Midi Files.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.wav&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #CCFFCC;&amp;quot;| Standard WAV audio files.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.lab&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| LAByrinth files, generic uncompressed containers.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.ani&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Animated cutscenes.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.pcx&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #CCFFCC;&amp;quot;| [[PCX Format]] screens and backgrounds.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.img&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFFFCC;&amp;quot;| [[IMG_Format_(Meen) | V2 Meen IMG file]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.def&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #CCFFCC;&amp;quot;| Mostly the same as I.M. Meen with the exception that OBJECTS.def is compressed.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.cmp&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Image format that makes up many of the interface graphics including icons and first-person weapons, otherwise unknown.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.bmp&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #CCFFCC;&amp;quot;| Standard bitmaps, mostly for history puzzle fonts.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.ega&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFFFCC;&amp;quot;| [[Raw EGA data]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.atb,*.stb&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Tables that seemingly deal with Adlib and Sound Blaster, respectively.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.exp&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #CCFFCC;&amp;quot;| AnimatedWall text definition file.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===File format notes===&lt;br /&gt;
&lt;br /&gt;
Much of the file formats used in Chill Manor were also used in I.M. Meen, except separated into folders. Within the RES folder some LAB files do not appear to be actual data containers, these are: RESCH, RESCH1, RESCH2, RESGR, RESPZ. As of yet these serve no known purpose. The GAME_SCR.PCX containing the game palette is present within RESINT.&lt;br /&gt;
&lt;br /&gt;
The other new format is present in the HISTORY folder under EGA, which are raw uncompressed EGA graphic files, possibly used in an effort to diminish space usage.&lt;br /&gt;
&lt;br /&gt;
STARTPOS is now known as LEVEL and features a 4th coordinate value.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Intro Page]]&lt;br /&gt;
[[Category:3D]]&lt;br /&gt;
[[Category:First-Person Shooter]]&lt;br /&gt;
[[Category:Educational]]&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Pee_and_Gity&amp;diff=11370</id>
		<title>Pee and Gity</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Pee_and_Gity&amp;diff=11370"/>
		<updated>2024-01-03T18:33:51Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: link to itself&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedMoreInfo}}&lt;br /&gt;
{{Game Infobox&lt;br /&gt;
 | Levels = No&lt;br /&gt;
 | Tiles = No&lt;br /&gt;
 | Sprites = No&lt;br /&gt;
 | Fullscreen = No&lt;br /&gt;
 | Sound = Edit&lt;br /&gt;
 | Music = No&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Released in 1994, &#039;&#039;&#039;Pee And Gity&#039;&#039;&#039; is a brawler/beat em&#039; up with cutesy anthropomorphic animals. The key characters being Pee the Squirrel, and Gity the Snake. The story, though in Korean, seems to be that Pee and Gity&#039;s house has been ransacked by evil forces and when they go to investigate they are ambushed by the forces of an evil being known as Herus who proceeds to transport them around.&lt;br /&gt;
&lt;br /&gt;
There exists two versions of the game, Pee &amp;amp; Gity, and an updated version called Pee &amp;amp; Gity Special. The original featured more story elements but the Special version featured updated/added mechanics and some graphical tweaks.&lt;br /&gt;
&lt;br /&gt;
== File formats ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! File name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.cfg&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Game settings.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.hsv&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #CCFFCC;&amp;quot;| [[VGA_Palette | 6-bit VGA Palette]] Container, programs like FileSplitter can break them into 768-byte chunks and recombine.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.dat&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Raw storage of various filetypes.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.ind&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Index for raw storage *.dat files.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.voc&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #CCFFCC;&amp;quot;| Header is &amp;quot;Saintcom Voice File&amp;quot; but otherwise they are just usual [[VOC Format|VOC Files]] with dummied out version and checksum &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.fx4&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| V4 Family Production Image Container.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.fsm&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFFFCC;&amp;quot;| [[ROL Format]] music.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.fs2&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #CCFFCC;&amp;quot;| [[BNK Format (Ad Lib)]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.fbk&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| &amp;quot;Background Data&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.dac&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Scenes it seems in FX4 format.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DAT and IND files ===&lt;br /&gt;
&lt;br /&gt;
Each DAT container has an index of the same name. Indexes are extremely simple:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || Pointer || States the end of previous file, start of next. 45 EF 00 00 = 0xEF45 or byte 61253 in DAT file.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pee and Gity Special ===&lt;br /&gt;
&lt;br /&gt;
Some changes occured in the formats used between the two versions, the affected formats were:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! File name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.voc&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #CCFFCC;&amp;quot;| RIFF Wave, [[VOC_Format | Creative Voice File]], &amp;quot;Saintcom Voice File&amp;quot;, and raw.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.f&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Compressed graphics for maps.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.map&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Family Production Map.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.dac&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Format changed, still seems to be scenes.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.pcx&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #CCFFCC;&amp;quot;| [[PCX Format]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.fnt&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| Font file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;*.fsm&amp;lt;/tt&amp;gt; &lt;br /&gt;
|style=&amp;quot;background: #FFCCCC;&amp;quot;| [[IMS Format]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Music Format Theory ===&lt;br /&gt;
&lt;br /&gt;
The presence of AdLib Visual Composer ROL files in the first Pee &amp;amp; Gity suggests that the Family Production Music format is based on the ROL format. Makes sense for the time as IMF was born in the same manner but unlike IMF, the instrument synthesis bank (BNK) remained separate.&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
&lt;br /&gt;
[http://cd.textfiles.com/knowledgemedia/CONVRTR/MSDOS/ROL2CMF/ ROL2CMF] this command-line tool can convert ROL files to [[CMF Format]] but with seeming quality loss.&lt;br /&gt;
&lt;br /&gt;
I have made a VERY simple [http://pastebin.com/bJGbR00m QuickBMS] script for extracting most FX4 files from FX4.DAT. It doesn&#039;t snag the final file so far, however, but saves a lot of hex digging. The FX4s can be used in other Family Production titles but will naturally suffer color problems.&lt;br /&gt;
&lt;br /&gt;
[[Category:Brawler]]&lt;br /&gt;
[[Category:Family Production]]&lt;br /&gt;
[[Category:Game Intro Page]]&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Mysterioso&amp;diff=10833</id>
		<title>User talk:Mysterioso</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Mysterioso&amp;diff=10833"/>
		<updated>2022-12-02T18:39:15Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* EGA/VGA? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Native resolution ==&lt;br /&gt;
Hi Mysterioso - thanks for all the things you are contributing!  When you get a chance, would you mind re-uploading [[:File:Witchaven.png]] as 320x200, assuming that&#039;s the game&#039;s native res?  It looks like it&#039;s been double-sized to 640x400, whereas the screenshots here are all in their native resolution.  Otherwise, great to see all the info you&#039;re adding!  Thanks again. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 05:30, 26 September 2015 (UTC)&lt;br /&gt;
: You&#039;re welcome!  I&#039;ve corrected that and added a few more; it&#039;s probably something worth mentioning in the guidelines, though. -- [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 17:41, 26 September 2015 (UTC)&lt;br /&gt;
:: Many thanks!  Good point, I will update the guidelines. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 21:27, 26 September 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Windows 9x games ==&lt;br /&gt;
Saw the thing about Windows 9x games on your page, decided to give my two cents. They are a bit of an ambiguous area, but seem mostly allowed, especially since there are such a large amount of DOS games with Win95 ports that remain 99% identical in modding in both versions (Doom95, C&amp;amp;C95, WC2 BNet etc). This may be stretching it a little, but personally, I&#039;ve been considering the cutoff point of what to consider &amp;quot;classic games modding&amp;quot; to be around the year 2000. It marks the end of most compression and optimisation, and the start of standardisation of file formats. At that point, there&#039;s a very wide abandonment of both indexed graphics and proprietary compression schemes, and a lot of in-house file formats that were constantly updated throughout the 90s were just thrown out. Proprietary file formats remained a thing, of course, but with the advent of the DVD era, barely any of them still bothered with compression, and with the appearance of DRM it seemed game devs also became less concerned with obfuscating the actual files. To me personally, it&#039;s the point it all becomes a lot less interesting ;) -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 09:01, 2 March 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Totally agree with this 100%.  To add further, if it&#039;s a popular Windows game in the modding world (like say Quake II) then there is probably nothing to gain from adding it here, as there is plenty of modding information available elsewhere.  However if it&#039;s a lesser known game and information is hard to find, then I don&#039;t mind it being added here even if it&#039;s Win 3.x or Win95. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 02:18, 11 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Modding tips ==&lt;br /&gt;
&lt;br /&gt;
Hey I just noticed you have added some .exe modifications to [[Heretic/Modding Tips]].  I wonder if you could create a new page called [[Heretic Executable]] and put those there instead, then add an entry to the [[Heretic]] file formats section to link to that new page?  Just because those .exe modifications are more than just tips on how to use modding tools, they&#039;re actual modding information that would be useful to anyone writing their own modding tools.  Thanks! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 15:48, 25 April 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
== EGA/VGA? ==&lt;br /&gt;
&lt;br /&gt;
i saw you changed one of my notes in [[Alpha Waves]] about EGA/VGA configuration difference, but i don&#039;t understand what you mean&lt;br /&gt;
&lt;br /&gt;
both the EGA and VGA code path of Alpha Waves is using int 10h set-video-mode 0dh - that means 320x200 at 16 colors (4 pages)&lt;br /&gt;
this is (to my understanding) a EGA introduced mode (which is still useable with later VGA cards) and even the VGA configuration&lt;br /&gt;
runs on pure EGA systems (with a different palett) - so its seems to me that the original author just added the VGA config for&lt;br /&gt;
&amp;quot;advertising&amp;quot; but not because the game needs real VGA hardware&lt;br /&gt;
&lt;br /&gt;
im reversing the game so i&#039;ve got the clean exectuable without using the loader that do not allow using the VGA config&lt;br /&gt;
if there is no VGA hardware available - but the game itself seems to be only EGA code&lt;br /&gt;
or do you say that its everything EGA code but the palette stuff uses some VGA specials?&lt;br /&gt;
&lt;br /&gt;
maybe you can explain in more detail what your note-change+comment should tell me :)&lt;br /&gt;
[[User:LowLevelMahn|LowLevelMahn]] ([[User talk:LowLevelMahn|talk]]) 06:12, 20 August 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Sure, I&#039;ll try.  Do note that even my oldest DOS hardware has VGA-capable graphics cards, so if someone with a true EGA card wants to contradict this, they&#039;re probably right.&lt;br /&gt;
&lt;br /&gt;
: To give the shortest possible summary I can come up with, mode 0Dh on an EGA card is limited to the 16 default colors, but on a VGA card it&#039;s possible to use the VGA palette registers to change those colors.  So while the game might work fine if you force it to run VGA mode on EGA (if this has only been tested on an emulator, I wouldn&#039;t be too assured that it won&#039;t crash on real hardware), it would be inaccurate to say that it isn&#039;t taking advantage of the VGA hardware capabilities, since it is using the VGA palette hardware.&lt;br /&gt;
&lt;br /&gt;
: Since you have a disassembly you can probably check that the difference is in having some commands to alter the palette registers (perhaps it&#039;s done in a pre-loading routine).  Those would likely be the same commands you would use to adjust palette in mode 13h, so check for outputs to ports 0x03C8 and 0x3C9.  These would, AFAIK, not work on a pure EGA card.&lt;br /&gt;
&lt;br /&gt;
: For a little more background, as I understand it mode 0Dh on EGA can only adjust palettes in so far as it may be possible to swap the associations of the 16 default colors around.  EGA did apparently have some palette adjustment capabilities on mode 10h, which is 640x350 and allows a choice of 16 colors from 64 possibilities.  10h was somewhat rarely used, however, mainly for strategy games where the slower rendering wasn&#039;t as much of an offset to having higher resolution and more color freedom.&lt;br /&gt;
&lt;br /&gt;
: Using a 16-color mode with a VGA palette wasn&#039;t super unusual for games that were ported from the Atari ST or the Amiga.  As I understand it, graphics modes on those systems were fairly commonly 16-color with a diverse choice of colors that could be put into a palette.  Retaining that setup for VGA probably made sense since if your graphics were already designed for a limit of 16 colors (just with fairly free choice of which colors), using a 16-color mode let you get two pixels for every byte (instead of the one pixel per byte you&#039;d get on 256-color indexed mode) thus allowing you a handy savings on RAM and disk space usage for your graphics.&lt;br /&gt;
&lt;br /&gt;
: Unfortunately it&#039;s a bit difficult to get definitive answers about EGA cards, since both the cards themselves and information on them is rather rare these days.  A good reference that I looked at is Richard F. Ferraro&#039;s &amp;quot;Programmer&#039;s Guide to the EGA and VGA Cards&amp;quot; which has some pretty comprehensive technical info on EGA, VGA, and Super VGA cards with lists for modes, interrupts, etc. -- [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 16:32, 20 August 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: You&#039;re right the code sets the color palette using port 3c8/3c9, so its EGA video mode + VGA color palette changing -- [[User:LowLevelMahn|LowLevelMahn]] ([[User talk:LowLevelMahn|talk]]) 19:16, 20 August 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: I think i found EGA Palett-changing code in Alpha Waves: https://www.vogons.org/viewtopic.php?f=63&amp;amp;t=91350 - i though that EGA colors can&#039;t be changed, or? [[User:LowLevelMahn|LowLevelMahn]] ([[User talk:LowLevelMahn|talk]]) 15:40, 2 December 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: Without having a true EGA machine to test on it&#039;s hard to give a definitive answer, but from information I have available, I believe true EGA palette changing has some &amp;quot;yes, but&amp;quot; concerns with it.  You can supposedly get a choice from 64 colors only when you&#039;re in 640×350 mode; when you&#039;re in 320×200 mode then switching the palette around, as far as I know, just lets you move any of the 16 standard colors to one of the other color indices (not hugely useful, but some programs apparently did use it). -- [[User:Mysterioso|Mysterioso]] ([[User talk:Mysterioso|talk]]) 17:04, 2 December 2022 (GMT)&lt;br /&gt;
&lt;br /&gt;
:::: EGA palette colors [http://www.techhelpmanual.com/137-int_10h_1000h__set_one_palette_register.html can be changed] regardless of the video mode (text or graphics) you are in. As Mysterioso already said you can choose from 64 colors which 16 will be shown. In true color mode you have 256 (0..255) values for each of red, green and blue channels, but in EGA you have only 4 (0..3) values for that. Thus 4 * 4 * 4 = 64 possible combination. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 18:39, 2 December 2022 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Yetmorecode&amp;diff=10336</id>
		<title>User talk:Yetmorecode</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Yetmorecode&amp;diff=10336"/>
		<updated>2022-04-02T11:36:16Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: remove double header&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== RSC Format (F1 Manager Professional) ==&lt;br /&gt;
&lt;br /&gt;
From the &amp;quot;File entry&amp;quot; description:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; [[BYTE]][40] name Name of file entry&lt;br /&gt;
&lt;br /&gt;
&amp;gt; char name[14];&lt;br /&gt;
&lt;br /&gt;
Is it 40 or 14 bytes long? Also there is a [[char]] type.&lt;br /&gt;
&lt;br /&gt;
[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 11:35, 2 April 2022 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Yetmorecode&amp;diff=10335</id>
		<title>User talk:Yetmorecode</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Yetmorecode&amp;diff=10335"/>
		<updated>2022-04-02T11:35:34Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* 40 or 14 ? */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 40 or 14 ? ==&lt;br /&gt;
&lt;br /&gt;
== RSC Format (F1 Manager Professional) ==&lt;br /&gt;
&lt;br /&gt;
From the &amp;quot;File entry&amp;quot; description:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; [[BYTE]][40] name Name of file entry&lt;br /&gt;
&lt;br /&gt;
&amp;gt; char name[14];&lt;br /&gt;
&lt;br /&gt;
Is it 40 or 14 bytes long? Also there is a [[char]] type.&lt;br /&gt;
&lt;br /&gt;
[[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 11:35, 2 April 2022 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=LBR_Format&amp;diff=10208</id>
		<title>LBR Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=LBR_Format&amp;diff=10208"/>
		<updated>2021-11-30T18:49:34Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Filename hash */ fix markup, add optimized code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Archive Infobox&lt;br /&gt;
 | MaxFiles = 65535&lt;br /&gt;
 | FAT = Beginning&lt;br /&gt;
 | Names = Yes, hashed&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subdirectories = N&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Encrypted = N&lt;br /&gt;
 | Hidden = N&lt;br /&gt;
 | Games = &lt;br /&gt;
   {{Game|Vinyl Goddess From Mars}}&lt;br /&gt;
}}&lt;br /&gt;
The &#039;&#039;&#039;LBR Format&#039;&#039;&#039; is used by [[Vinyl Goddess From Mars]] to store most of the game data.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
=== Signature ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
The header begins at the start of the file (offset 0.)&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|[[UINT16LE]] numFiles||Number of files stored within&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== File entry ===&lt;br /&gt;
&lt;br /&gt;
After the header, the following structure is repeated once for each file.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|[[UINT16LE]] hash||Hash of the filename&lt;br /&gt;
|-&lt;br /&gt;
|[[UINT32LE]] offset||Offset into LBR where file data begins&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each file&#039;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.&lt;br /&gt;
&lt;br /&gt;
=== Filename hash ===&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
&lt;br /&gt;
Some example code to calculate the hashes follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
int calcHash(const std::string&amp;amp; data)&lt;br /&gt;
{&lt;br /&gt;
  int hash = 0;&lt;br /&gt;
  for (std::string::const_iterator i = data.begin(); i != data.end(); i++) {&lt;br /&gt;
    hash ^= *i &amp;lt;&amp;lt; 8;&lt;br /&gt;
    for (int j = 0; j &amp;lt; 8; j++) {&lt;br /&gt;
      hash &amp;lt;&amp;lt;= 1;&lt;br /&gt;
      if (hash &amp;amp; 0x10000) hash ^= 0x1021;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  return hash &amp;amp; 0xffff;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optimized C code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/* original code in GODDESS.EXE at offset 0x00016622&lt;br /&gt;
self test: lbr_hash(&amp;quot;Casplat1.cmp&amp;quot;) == 0xBDCB */&lt;br /&gt;
uint16_t lbr_hash(char *s) {&lt;br /&gt;
uint16_t hash;&lt;br /&gt;
uint8_t b, i;&lt;br /&gt;
  hash = 0;&lt;br /&gt;
  if (s) {&lt;br /&gt;
    for (; *s; s++) {&lt;br /&gt;
      /* a..z =&amp;gt; A..Z */&lt;br /&gt;
      b = toupper(*s);&lt;br /&gt;
      hash ^= (b &amp;lt;&amp;lt; 8);&lt;br /&gt;
      for (i = 0; i &amp;lt; 8; i++) {&lt;br /&gt;
        /* b = (hash &amp;amp; 0x8000) ? 1 : 0; */&lt;br /&gt;
        b = hash &amp;gt;&amp;gt; 15;&lt;br /&gt;
        hash &amp;lt;&amp;lt;= 1;&lt;br /&gt;
        /* hash ^= b ? 0x1021 : 0; */&lt;br /&gt;
        hash ^= (b &amp;lt;&amp;lt; 12) | (b &amp;lt;&amp;lt; 5) | b;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  return(hash);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Vgfmext also contains BASIC code to calculate hashes, using a slight variation.&lt;br /&gt;
&lt;br /&gt;
=== List of known filenames ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #AACCFF; margin: 1em; padding: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&lt;br /&gt;
1000P.CMP&lt;br /&gt;
100P.CMP&lt;br /&gt;
250P.CMP&lt;br /&gt;
500P.CMP&lt;br /&gt;
50P.CMP&lt;br /&gt;
APPLE.CMP&lt;br /&gt;
APPLE.SND&lt;br /&gt;
BAMBOOP.CMP&lt;br /&gt;
BAPPLE0.OMP&lt;br /&gt;
BETA.BIN&lt;br /&gt;
BGRENSHT.CMP&lt;br /&gt;
BLOOK.CMP&lt;br /&gt;
BLUEBALL.CMP&lt;br /&gt;
BLUEKEY.CMP&lt;br /&gt;
BLUE.PAL&lt;br /&gt;
BLUE.TLS&lt;br /&gt;
BOTTLE.CMP&lt;br /&gt;
BOUNCE.CMP&lt;br /&gt;
BRAIN.CMP&lt;br /&gt;
BREATH.CMP&lt;br /&gt;
BRIDGE.CMP&lt;br /&gt;
BSHOT.CMP&lt;br /&gt;
BUTFLY.CMP&lt;br /&gt;
CANNON.CMP&lt;br /&gt;
CASPLAT1.CMP&lt;br /&gt;
CASPLAT2.CMP&lt;br /&gt;
CASPLAT3.CMP&lt;br /&gt;
CASPLAT4.CMP&lt;br /&gt;
CASTLE.PAL&lt;br /&gt;
CASTLE.TLS&lt;br /&gt;
COVERUP.MUS&lt;br /&gt;
CREDITS.PAL&lt;br /&gt;
CREDITS.SCR&lt;br /&gt;
CRUSH.MUS&lt;br /&gt;
CSTARS.CMP&lt;br /&gt;
DATA.DAT&lt;br /&gt;
DDARKBAR2.GRA&lt;br /&gt;
DEATH.CMP&lt;br /&gt;
DEMO_1.DTA&lt;br /&gt;
DEMO_2.DTA&lt;br /&gt;
DEMO_3.DTA&lt;br /&gt;
DIFFBUTN.CMP&lt;br /&gt;
DIFFMENU.CMP&lt;br /&gt;
DOTS1.CMP&lt;br /&gt;
DUNGEON.PAL&lt;br /&gt;
DUNGEON.TLS&lt;br /&gt;
DUNPLAT1.CMP&lt;br /&gt;
DUSTCLUD.CMP&lt;br /&gt;
ECHOT1.CMP&lt;br /&gt;
EGYPPLAT.CMP&lt;br /&gt;
EGYPT.PAL&lt;br /&gt;
EGYPT.TLS&lt;br /&gt;
ENDBOSSW.CMP&lt;br /&gt;
ENDING.SCN&lt;br /&gt;
ENTER2.SND&lt;br /&gt;
EPISODE.PAL&lt;br /&gt;
EPISODE.SCR&lt;br /&gt;
EVILEYE.MUS&lt;br /&gt;
EXIT.CMP&lt;br /&gt;
EXPL1.SND&lt;br /&gt;
FEVER.MUS&lt;br /&gt;
FIRE231.CMP&lt;br /&gt;
FRUIT.SND&lt;br /&gt;
GAME1.PAL&lt;br /&gt;
GAMEOPT.GRA&lt;br /&gt;
GATEKEY.CMP&lt;br /&gt;
GOLDKEY.CMP&lt;br /&gt;
GRAVE.PAL&lt;br /&gt;
GRAVE.TLS&lt;br /&gt;
GREYKEY.CMP&lt;br /&gt;
GRID.DTA&lt;br /&gt;
HARDHEAD.CMP&lt;br /&gt;
HEALJUG.CMP&lt;br /&gt;
HEALPOT.CMP&lt;br /&gt;
HEALPOTD.CMP&lt;br /&gt;
HEALPOT.SND&lt;br /&gt;
HELLO.T&lt;br /&gt;
HORUS.MUS&lt;br /&gt;
HURT.SND&lt;br /&gt;
HUTS.PAL&lt;br /&gt;
HUTS.TLS&lt;br /&gt;
INBET.PAL&lt;br /&gt;
INBETW.SCR&lt;br /&gt;
INOUTP00.CMP&lt;br /&gt;
INSURED.MUS&lt;br /&gt;
INTRO.MUS&lt;br /&gt;
JFIREB.CMP&lt;br /&gt;
JILL.CMP&lt;br /&gt;
JILLEXPB.CMP&lt;br /&gt;
JILLEXP.CMP&lt;br /&gt;
JILLFIRE.CMP&lt;br /&gt;
JILL.SPR&lt;br /&gt;
JUNGLE2.FON&lt;br /&gt;
JUNGLE.FON&lt;br /&gt;
KNIFE.CMP&lt;br /&gt;
LAND.SND&lt;br /&gt;
LC_CAPS.RAW&lt;br /&gt;
LC_NUMS.RAW&lt;br /&gt;
LEVEL1-1.M&lt;br /&gt;
LEVEL1-2.M&lt;br /&gt;
LEVEL1-3.M&lt;br /&gt;
LEVEL1-4.M&lt;br /&gt;
LEVEL1-5.M&lt;br /&gt;
LEVEL1-6.M&lt;br /&gt;
LEVEL1-7.M&lt;br /&gt;
LEVEL1-8.M&lt;br /&gt;
LEVEL1-9.M&lt;br /&gt;
LEVEL2-1.M&lt;br /&gt;
LEVEL2-2.M&lt;br /&gt;
LEVEL2-3.M&lt;br /&gt;
LEVEL2-4.M&lt;br /&gt;
LEVEL2-5.M&lt;br /&gt;
LEVEL2-6.M&lt;br /&gt;
LEVEL2-7.M&lt;br /&gt;
LEVEL2-8.M&lt;br /&gt;
LEVEL2-9.M&lt;br /&gt;
LEVEL3-1.M&lt;br /&gt;
LEVEL3-2.M&lt;br /&gt;
LEVEL3-3.M&lt;br /&gt;
LEVEL3-4.M&lt;br /&gt;
LEVEL3-5.M&lt;br /&gt;
LEVEL3-6.M&lt;br /&gt;
LEVEL3-7.M&lt;br /&gt;
LEVEL3-8.M&lt;br /&gt;
LEVEL3-9.M&lt;br /&gt;
LGRENSHT.CMP&lt;br /&gt;
LITSCROL.CMP&lt;br /&gt;
MAINFONT.GRA&lt;br /&gt;
MANEATPL.CMP&lt;br /&gt;
MENU2.RAW&lt;br /&gt;
MENUCH.GRA&lt;br /&gt;
MENUCLIK.SND&lt;br /&gt;
MENU.RAW&lt;br /&gt;
MENUYSNO.GRA&lt;br /&gt;
MIDLEVEL.CMP&lt;br /&gt;
MIDPOST.SND&lt;br /&gt;
MMREST.GRA&lt;br /&gt;
MONDIE.SND&lt;br /&gt;
MOUNT.TLS&lt;br /&gt;
MPLAT211.CMP&lt;br /&gt;
MPLAT212.CMP&lt;br /&gt;
MPLAT221.CMP&lt;br /&gt;
MPLAT311.CMP&lt;br /&gt;
MPLAT331.CMP&lt;br /&gt;
MPLAT332.CMP&lt;br /&gt;
MUSHSHOT.CMP&lt;br /&gt;
MYSTIC.MUS&lt;br /&gt;
NEWBEH.CMP&lt;br /&gt;
OLDBEH.CMP&lt;br /&gt;
ORDER.RES&lt;br /&gt;
OSIRIS.MUS&lt;br /&gt;
OUTGATE.CMP&lt;br /&gt;
OVERHEAD.PAL&lt;br /&gt;
OVERHEAD.TLS&lt;br /&gt;
OVERHED1.MAP&lt;br /&gt;
OVERHED2.MAP&lt;br /&gt;
OVERHED3.MAP&lt;br /&gt;
PAN2.SND&lt;br /&gt;
PRESENT.GRA&lt;br /&gt;
PRESENT.PAL&lt;br /&gt;
PROWLER.MUS&lt;br /&gt;
PURPLE.PAL&lt;br /&gt;
PURPLE.TLS&lt;br /&gt;
PUZZ6.MUS&lt;br /&gt;
RABBIT.CMP&lt;br /&gt;
RABBITD.CMP&lt;br /&gt;
REDKEY.CMP&lt;br /&gt;
RETROJIL.MUS&lt;br /&gt;
RING.CMP&lt;br /&gt;
RUFEYE.CMP&lt;br /&gt;
RUFEYES.CMP&lt;br /&gt;
RUFEYSE.CMP&lt;br /&gt;
SAVEBOXG.GRA&lt;br /&gt;
SAVEBOXO.GRA&lt;br /&gt;
SCORE.CMP&lt;br /&gt;
SCROLLG.CMP&lt;br /&gt;
SCROLLO.CMP&lt;br /&gt;
SGREENE.CMP&lt;br /&gt;
SHOTEXPL.CMP&lt;br /&gt;
SHOTTEST.CMP&lt;br /&gt;
SHWRREM.GRA&lt;br /&gt;
SIXPS.GRA&lt;br /&gt;
SIXPS.PAL&lt;br /&gt;
SKELBONE.CMP&lt;br /&gt;
SKELETON.CMP&lt;br /&gt;
SKELETON.SND&lt;br /&gt;
SKELFLY.CMP&lt;br /&gt;
SMALLEX.CMP&lt;br /&gt;
SMALNUM.CMP&lt;br /&gt;
SPARE.SCR&lt;br /&gt;
SPIKEBA.CMP&lt;br /&gt;
SPLADY.CMP&lt;br /&gt;
SPLAT211.CMP&lt;br /&gt;
SPLAT223.CMP&lt;br /&gt;
SPLAT231.CMP&lt;br /&gt;
SPRING.SND&lt;br /&gt;
SPROIN.CMP&lt;br /&gt;
SQUARE.TLS&lt;br /&gt;
STAR.CMP&lt;br /&gt;
STARDUST.MUS&lt;br /&gt;
STHORNSH.CMP&lt;br /&gt;
STICKEYE.CMP&lt;br /&gt;
STIKHORN.CMP&lt;br /&gt;
STLSPIKE.CMP&lt;br /&gt;
STORY.PAL&lt;br /&gt;
STORY.SCR&lt;br /&gt;
STRIKE.MUS&lt;br /&gt;
STRYFNT1.GRA&lt;br /&gt;
SVINYL.SPR&lt;br /&gt;
TAFA.MUS&lt;br /&gt;
T.CMP&lt;br /&gt;
TEST0004.CMP&lt;br /&gt;
THROW.SND&lt;br /&gt;
TITLE.PAL&lt;br /&gt;
TITLE.SCR&lt;br /&gt;
TORNADO.CMP&lt;br /&gt;
TRAMPLE.MUS&lt;br /&gt;
TREEMPLA.CMP&lt;br /&gt;
TREES.PAL&lt;br /&gt;
TREES.TLS&lt;br /&gt;
TWILIGHT.MUS&lt;br /&gt;
UGH.CMP&lt;br /&gt;
UNLOGIC1.GRA&lt;br /&gt;
UNLOGIC1.PAL&lt;br /&gt;
UNLOGIC.UNM&lt;br /&gt;
VINE.CMP&lt;br /&gt;
VINYLDIE.SND&lt;br /&gt;
VINYL.GRA&lt;br /&gt;
VINYL.PAL&lt;br /&gt;
VINYL.SPR&lt;br /&gt;
VSMALLE.CMP&lt;br /&gt;
WEAPBLNK.OMP&lt;br /&gt;
WEAPBLUE.OMP&lt;br /&gt;
WEAPBOTL.OMP&lt;br /&gt;
WEAPFIRE.OMP&lt;br /&gt;
WEAPFSKF.OMP&lt;br /&gt;
WEAPSLKF.OMP&lt;br /&gt;
WEAPSTAR.OMP&lt;br /&gt;
WFIREB.CMP&lt;br /&gt;
WOODSPIK.CMP&lt;br /&gt;
XHUTS.PAL&lt;br /&gt;
YELLOW.PAL&lt;br /&gt;
YELLOW.TLS&lt;br /&gt;
YES.CMP&lt;br /&gt;
&lt;br /&gt;
// These names were guessed by looking at others&amp;lt;br/&amp;gt;&lt;br /&gt;
ENDG1.PAL&lt;br /&gt;
ENDG1.SCR&lt;br /&gt;
ENDG2.PAL&lt;br /&gt;
ENDG2.SCR&lt;br /&gt;
ENDG3.PAL&lt;br /&gt;
ENDG3.SCR&lt;br /&gt;
MOUNT.PAL&lt;br /&gt;
JUNGLE3.FON&lt;br /&gt;
&lt;br /&gt;
// These names were brute-forced from the hashes against a dictionary so they&amp;lt;br/&amp;gt;&lt;br /&gt;
// could be wrong (each hash matches about 56 billion different filenames...)&amp;lt;br/&amp;gt;&lt;br /&gt;
BEGIN.PAL    // Also ARCHIL.PAL.   Before Bl so probably correct.&amp;lt;br/&amp;gt;&lt;br /&gt;
P.PAL        // Also SANGGIL.PAL.  Between O-P maybe correct.&lt;br /&gt;
&lt;br /&gt;
// These names were guessed from the music filenames but with a different&amp;lt;br/&amp;gt;&lt;br /&gt;
// extension for the instruments.&amp;lt;br/&amp;gt;&lt;br /&gt;
COVERUP.TIM&lt;br /&gt;
CRUSH.TIM&lt;br /&gt;
EVILEYE.TIM&lt;br /&gt;
FEVER.TIM&lt;br /&gt;
HORUS.TIM&lt;br /&gt;
INSURED.TIM&lt;br /&gt;
INTRO.TIM&lt;br /&gt;
MYSTIC.TIM&lt;br /&gt;
OSIRIS.TIM&lt;br /&gt;
PROWLER.TIM&lt;br /&gt;
PUZZ6.TIM&lt;br /&gt;
RETROJIL.TIM&lt;br /&gt;
STARDUST.TIM&lt;br /&gt;
STRIKE.TIM&lt;br /&gt;
TAFA.TIM&lt;br /&gt;
TRAMPLE.TIM&lt;br /&gt;
TWILIGHT.TIM&lt;br /&gt;
&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=group}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto]]&lt;br /&gt;
| Platform = Linux/Windows&lt;br /&gt;
| canExtract = Yes&lt;br /&gt;
| canDecompress = N/A&lt;br /&gt;
| canCreate = Yes&lt;br /&gt;
| canModify = Yes&lt;br /&gt;
| canCompress = N/A&lt;br /&gt;
| editHidden = N/A&lt;br /&gt;
| editMetadata = N/A&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto Online#gamearchive.js|Camoto/gamearchive.js]]&lt;br /&gt;
| Platform = Any&lt;br /&gt;
| canExtract = Yes&lt;br /&gt;
| canDecompress = N/A&lt;br /&gt;
| canCreate = Yes&lt;br /&gt;
| canModify = Yes&lt;br /&gt;
| canCompress = N/A&lt;br /&gt;
| editHidden = N/A&lt;br /&gt;
| editMetadata = N/A&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = Vgfmext&lt;br /&gt;
| Platform = DOS&lt;br /&gt;
| canExtract = Yes&lt;br /&gt;
| canDecompress = N/A&lt;br /&gt;
| canCreate = No&lt;br /&gt;
| canModify = No&lt;br /&gt;
| canCompress = N/A&lt;br /&gt;
| editHidden = N/A&lt;br /&gt;
| editMetadata = N/A&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
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&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:CTPAX-X_Team&amp;diff=10207</id>
		<title>User talk:CTPAX-X Team</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:CTPAX-X_Team&amp;diff=10207"/>
		<updated>2021-11-30T18:35:43Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Keen 1 v1.34 EXE problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SLB/M3 tools ==&lt;br /&gt;
&lt;br /&gt;
Thanks for amplifying the page I created related to the M3/SLB format(s).&lt;br /&gt;
Are we aware of any tool to extract data from .SLB/.M3 formats yet ?&lt;br /&gt;
&lt;br /&gt;
- [[User:Elia1995 | Elìa1995]]&lt;br /&gt;
&lt;br /&gt;
: Added script to unpack archives. If you want to view images you can use IGC.EXE game program as a viewer (DOSBox). [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 19:20, 16 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== FileInfoRec on SelectWare Archive ==&lt;br /&gt;
&lt;br /&gt;
On the [[SelectWare Archive]] page, I&#039;m not sure if it is useful to replace the information on the folder ID by the link to the FileInfoRec. I don&#039;t doubt that it&#039;s correct, but the page you linked to just describes that whole start block as &amp;quot;reserved&amp;quot;, giving no information whatsoever about how a tool could distinguish files from folders and link them together correctly, while the previous information on the page did specify that. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:33, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
For more info on the problem, I refer to you the John Madden Football demo on [https://archive.org/details/cdrom-software-jukebox this CD]. It&#039;s the archive under the folder &amp;lt;tt&amp;gt;ELE15003&amp;lt;/tt&amp;gt;. In that archive, there is no difference in directory level between &amp;quot;GRAPHICS\MISC\MISC.BMS&amp;quot; file and the following &amp;quot;GRAPHICS\STANCES&amp;quot; folder; without looking at those folder IDs, there is no way to know if &amp;quot;STANCES&amp;quot; is a &amp;quot;GRAPHICS\STANCES&amp;quot; folder, or an empty &amp;quot;GRAPHICS\MISC\STANCES&amp;quot; file. Here&#039;s [https://i.imgur.com/62F8afM.png an image of the files tree]. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:52, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
[EDIT]&lt;br /&gt;
&lt;br /&gt;
Ah, I missed the fact there is a directory bit in the file attributes. With that, and the dir level from the entry, it is indeed completely possible without ever looking at that &amp;quot;reserved&amp;quot; information. Out of curiosity, does the SelectWare extractor actually look at that reserved block, or is its unpacking identical to your own? -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:32, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Sorry, messed up logic for folder level. Example code fixed (thanks for pointing out on &amp;lt;tt&amp;gt;ELE15003&amp;lt;/tt&amp;gt; example archive) - now it should be identical to how the SelectWare extractor works (rechecked disassembler code), except parts marked as TODO in comments. And yes, original code never use anything from reserved 21 byte block since it&#039;s undocumented DOS internals. Also it would be nice if someone ported to this Wiki information about FileInfoRec, DOS Packed Time/Date and DOS File Attributes, since there are few other file formats which uses this structures (except maybe FileInfoRec). [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 18:26, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: Thanks for confirming that the reserved  block is not used; it will come in handy when writing my code to save the archive type. I adapted my own reading code for the next version of the Librarian tool using the directory flag, and it&#039;s actually a lot simpler now. I also added a small section in the article now describing how to traverse the directory tree. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 22:02, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: One addition: the actual extractor code does not check the first filename character (it&#039;s just this implementation quirks), instead it checks that &amp;lt;tt&amp;gt;sizeof(swt_item)&amp;lt;/tt&amp;gt; bytes was sucessully read from input file. Also add subdirectories and remove hidden tag since can&#039;t imagine a way to hide something with this format. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 16:03, 11 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Black line at the bottom of Keen Dreams title ==&lt;br /&gt;
&lt;br /&gt;
Hello. Could you tell me what to do in this case? Since nobody can help me (yet), read my topic: https://keenmodding.org/viewtopic.php?p=36634#p36634 (Oh, and the black line appears at the right bottom corner of the screen.) [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 07:36, 7 September 2021 (GMT)&lt;br /&gt;
: TitleBuild was developed by [[User:Levellass|Levellass]] - you should ask for help there first. As for some suggestions - try to use nConvert:&lt;br /&gt;
: [https://www.xnview.com/en/nconvert/ nconvert.exe] -in -1 -out iff TITLESCR.BMP&lt;br /&gt;
: Rename output file &amp;quot;TITLESCR.IFF&amp;quot; to &amp;quot;TITLESCR.LBM&amp;quot; and pack it back with &amp;quot;SOFTLIB.EXE&amp;quot; to &amp;quot;KDREAMS.CMP&amp;quot;. Maybe it will work correctly this time. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 09:44, 7 September 2021 (GMT)&lt;br /&gt;
:: I have a little problem at the end. I did everything as you mentioned, but SOFTLIB said titlescr.lbm is not a SOFTLIB file and I&#039;m stopped. Please, tell me what can I do as it would be very important for me. [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 23:36, 7 September 2021 (GMT)&lt;br /&gt;
:: No success. I managed to pack it back, but still the same black line at the bottom. Maybe TitleBuilder is the guilty? [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 01:01, 8 September 2021 (GMT)&lt;br /&gt;
::: Do the following things (step-by-step):&lt;br /&gt;
::: 1. SOFTLIB.EXE E KDREAMS.CMP TITLESCR.LBM&lt;br /&gt;
::: 2. nConvert.exe -in -1 -out bmp TITLESCR.LBM&lt;br /&gt;
::: (edit output &amp;quot;TITLESCR.BMP&amp;quot; file here as you like)&lt;br /&gt;
::: 3. nConvert.exe -in -1 -c 1 -out iff TITLESCR.BMP&lt;br /&gt;
::: 4. del TITLESCR.LBM&lt;br /&gt;
::: 5. ren TITLESCR.IFF TITLESCR.LBM&lt;br /&gt;
::: 6. del KDREAMS.CMP&lt;br /&gt;
::: 7. SOFTLIB.EXE AC KDREAMS.CMP TITLESCR.LBM LZH&lt;br /&gt;
::: Just tested and everything works fine. Use DOSBox or any other DOS VM for running SOFTLIB.EXE. Do not use TileBuilder if you have issues with it. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 08:34, 8 September 2021 (GMT)&lt;br /&gt;
:::: Thanks! I will try it, too. [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 08:50, 8 September 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Keen 1 v1.34 EXE problem ==&lt;br /&gt;
&lt;br /&gt;
Hello! Could you help me? The EXE of Keen 1 v1.34 was compressed by PKLite, which I decompressed with UNP, so that I can use KeenGraph (Keen 1-6, Dreams graphic editor). While trying to extract the graphics, KeenGraph mentions that &#039;EGASPRIT.CK1 LZW-compressed, decompressing...&#039; &#039;EGALATCH.CK1 LZW-compressed, decompressing...&#039; And then nothing happens, but just hanging. Tell me how to decompress these LZW-compressed files. [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 22:52, 18 October 2021 (GMT)&lt;br /&gt;
: Sorry, not familiar with this game or modding tools, can&#039;t help. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 19:50, 20 October 2021 (GMT)&lt;br /&gt;
:: Alright, but any suggestions/tools on how to decompress LZW-decompressed files? [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 21:42, 20 October 2021 (GMT)&lt;br /&gt;
::: Try the [[LZW Compression]] page? Or ask [[User:Levellass|Levellass]], who actually made the KeenGraph tool. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 23:15, 20 October 2021 (GMT)&lt;br /&gt;
:::: I managed to decompress EGALATCH.CK1, but EGASPRIT.CK1 not. Here are the compressed values from EGASPRIT.CK1:&lt;br /&gt;
 0000  70 7B 00 00 0C 00 00 40&lt;br /&gt;
 0010  40 80 6C 00 3B 82 1D 0E&lt;br /&gt;
&lt;br /&gt;
Do you know how to decompress it? [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 20:25, 21 October 2021 (GMT)&lt;br /&gt;
: Sorry, not familiar with this game or modding tools, can&#039;t help. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 18:35, 30 November 2021 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:CTPAX-X_Team&amp;diff=10180</id>
		<title>User talk:CTPAX-X Team</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:CTPAX-X_Team&amp;diff=10180"/>
		<updated>2021-10-20T19:50:31Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SLB/M3 tools ==&lt;br /&gt;
&lt;br /&gt;
Thanks for amplifying the page I created related to the M3/SLB format(s).&lt;br /&gt;
Are we aware of any tool to extract data from .SLB/.M3 formats yet ?&lt;br /&gt;
&lt;br /&gt;
- [[User:Elia1995 | Elìa1995]]&lt;br /&gt;
&lt;br /&gt;
: Added script to unpack archives. If you want to view images you can use IGC.EXE game program as a viewer (DOSBox). [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 19:20, 16 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== FileInfoRec on SelectWare Archive ==&lt;br /&gt;
&lt;br /&gt;
On the [[SelectWare Archive]] page, I&#039;m not sure if it is useful to replace the information on the folder ID by the link to the FileInfoRec. I don&#039;t doubt that it&#039;s correct, but the page you linked to just describes that whole start block as &amp;quot;reserved&amp;quot;, giving no information whatsoever about how a tool could distinguish files from folders and link them together correctly, while the previous information on the page did specify that. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:33, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
For more info on the problem, I refer to you the John Madden Football demo on [https://archive.org/details/cdrom-software-jukebox this CD]. It&#039;s the archive under the folder &amp;lt;tt&amp;gt;ELE15003&amp;lt;/tt&amp;gt;. In that archive, there is no difference in directory level between &amp;quot;GRAPHICS\MISC\MISC.BMS&amp;quot; file and the following &amp;quot;GRAPHICS\STANCES&amp;quot; folder; without looking at those folder IDs, there is no way to know if &amp;quot;STANCES&amp;quot; is a &amp;quot;GRAPHICS\STANCES&amp;quot; folder, or an empty &amp;quot;GRAPHICS\MISC\STANCES&amp;quot; file. Here&#039;s [https://i.imgur.com/62F8afM.png an image of the files tree]. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:52, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
[EDIT]&lt;br /&gt;
&lt;br /&gt;
Ah, I missed the fact there is a directory bit in the file attributes. With that, and the dir level from the entry, it is indeed completely possible without ever looking at that &amp;quot;reserved&amp;quot; information. Out of curiosity, does the SelectWare extractor actually look at that reserved block, or is its unpacking identical to your own? -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:32, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Sorry, messed up logic for folder level. Example code fixed (thanks for pointing out on &amp;lt;tt&amp;gt;ELE15003&amp;lt;/tt&amp;gt; example archive) - now it should be identical to how the SelectWare extractor works (rechecked disassembler code), except parts marked as TODO in comments. And yes, original code never use anything from reserved 21 byte block since it&#039;s undocumented DOS internals. Also it would be nice if someone ported to this Wiki information about FileInfoRec, DOS Packed Time/Date and DOS File Attributes, since there are few other file formats which uses this structures (except maybe FileInfoRec). [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 18:26, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: Thanks for confirming that the reserved  block is not used; it will come in handy when writing my code to save the archive type. I adapted my own reading code for the next version of the Librarian tool using the directory flag, and it&#039;s actually a lot simpler now. I also added a small section in the article now describing how to traverse the directory tree. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 22:02, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: One addition: the actual extractor code does not check the first filename character (it&#039;s just this implementation quirks), instead it checks that &amp;lt;tt&amp;gt;sizeof(swt_item)&amp;lt;/tt&amp;gt; bytes was sucessully read from input file. Also add subdirectories and remove hidden tag since can&#039;t imagine a way to hide something with this format. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 16:03, 11 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Black line at the bottom of Keen Dreams title ==&lt;br /&gt;
&lt;br /&gt;
Hello. Could you tell me what to do in this case? Since nobody can help me (yet), read my topic: https://keenmodding.org/viewtopic.php?p=36634#p36634 (Oh, and the black line appears at the right bottom corner of the screen.) [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 07:36, 7 September 2021 (GMT)&lt;br /&gt;
: TitleBuild was developed by [[User:Levellass|Levellass]] - you should ask for help there first. As for some suggestions - try to use nConvert:&lt;br /&gt;
: [https://www.xnview.com/en/nconvert/ nconvert.exe] -in -1 -out iff TITLESCR.BMP&lt;br /&gt;
: Rename output file &amp;quot;TITLESCR.IFF&amp;quot; to &amp;quot;TITLESCR.LBM&amp;quot; and pack it back with &amp;quot;SOFTLIB.EXE&amp;quot; to &amp;quot;KDREAMS.CMP&amp;quot;. Maybe it will work correctly this time. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 09:44, 7 September 2021 (GMT)&lt;br /&gt;
:: I have a little problem at the end. I did everything as you mentioned, but SOFTLIB said titlescr.lbm is not a SOFTLIB file and I&#039;m stopped. Please, tell me what can I do as it would be very important for me. [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 23:36, 7 September 2021 (GMT)&lt;br /&gt;
:: No success. I managed to pack it back, but still the same black line at the bottom. Maybe TitleBuilder is the guilty? [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 01:01, 8 September 2021 (GMT)&lt;br /&gt;
::: Do the following things (step-by-step):&lt;br /&gt;
::: 1. SOFTLIB.EXE E KDREAMS.CMP TITLESCR.LBM&lt;br /&gt;
::: 2. nConvert.exe -in -1 -out bmp TITLESCR.LBM&lt;br /&gt;
::: (edit output &amp;quot;TITLESCR.BMP&amp;quot; file here as you like)&lt;br /&gt;
::: 3. nConvert.exe -in -1 -c 1 -out iff TITLESCR.BMP&lt;br /&gt;
::: 4. del TITLESCR.LBM&lt;br /&gt;
::: 5. ren TITLESCR.IFF TITLESCR.LBM&lt;br /&gt;
::: 6. del KDREAMS.CMP&lt;br /&gt;
::: 7. SOFTLIB.EXE AC KDREAMS.CMP TITLESCR.LBM LZH&lt;br /&gt;
::: Just tested and everything works fine. Use DOSBox or any other DOS VM for running SOFTLIB.EXE. Do not use TileBuilder if you have issues with it. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 08:34, 8 September 2021 (GMT)&lt;br /&gt;
:::: Thanks! I will try it, too. [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 08:50, 8 September 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Keen 1 v1.34 EXE problem ==&lt;br /&gt;
&lt;br /&gt;
Hello! Could you help me? The EXE of Keen 1 v1.34 was compressed by PKLite, which I decompressed with UNP, so that I can use KeenGraph (Keen 1-6, Dreams graphic editor). While trying to extract the graphics, KeenGraph mentions that &#039;EGASPRIT.CK1 LZW-compressed, decompressing...&#039; &#039;EGALATCH.CK1 LZW-compressed, decompressing...&#039; And then nothing happens, but just hanging. Tell me how to decompress these LZW-compressed files. [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 22:52, 18 October 2021 (GMT)&lt;br /&gt;
: Sorry, not familiar with this game or modding tools, can&#039;t help. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 19:50, 20 October 2021 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:CTPAX-X_Team&amp;diff=10179</id>
		<title>User talk:CTPAX-X Team</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:CTPAX-X_Team&amp;diff=10179"/>
		<updated>2021-10-20T19:49:34Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Keen 1 v1.34 EXE problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SLB/M3 tools ==&lt;br /&gt;
&lt;br /&gt;
Thanks for amplifying the page I created related to the M3/SLB format(s).&lt;br /&gt;
Are we aware of any tool to extract data from .SLB/.M3 formats yet ?&lt;br /&gt;
&lt;br /&gt;
- [[User:Elia1995 | Elìa1995]]&lt;br /&gt;
&lt;br /&gt;
: Added script to unpack archives. If you want to view images you can use IGC.EXE game program as a viewer (DOSBox). [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 19:20, 16 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== FileInfoRec on SelectWare Archive ==&lt;br /&gt;
&lt;br /&gt;
On the [[SelectWare Archive]] page, I&#039;m not sure if it is useful to replace the information on the folder ID by the link to the FileInfoRec. I don&#039;t doubt that it&#039;s correct, but the page you linked to just describes that whole start block as &amp;quot;reserved&amp;quot;, giving no information whatsoever about how a tool could distinguish files from folders and link them together correctly, while the previous information on the page did specify that. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:33, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
For more info on the problem, I refer to you the John Madden Football demo on [https://archive.org/details/cdrom-software-jukebox this CD]. It&#039;s the archive under the folder &amp;lt;tt&amp;gt;ELE15003&amp;lt;/tt&amp;gt;. In that archive, there is no difference in directory level between &amp;quot;GRAPHICS\MISC\MISC.BMS&amp;quot; file and the following &amp;quot;GRAPHICS\STANCES&amp;quot; folder; without looking at those folder IDs, there is no way to know if &amp;quot;STANCES&amp;quot; is a &amp;quot;GRAPHICS\STANCES&amp;quot; folder, or an empty &amp;quot;GRAPHICS\MISC\STANCES&amp;quot; file. Here&#039;s [https://i.imgur.com/62F8afM.png an image of the files tree]. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:52, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
[EDIT]&lt;br /&gt;
&lt;br /&gt;
Ah, I missed the fact there is a directory bit in the file attributes. With that, and the dir level from the entry, it is indeed completely possible without ever looking at that &amp;quot;reserved&amp;quot; information. Out of curiosity, does the SelectWare extractor actually look at that reserved block, or is its unpacking identical to your own? -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:32, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Sorry, messed up logic for folder level. Example code fixed (thanks for pointing out on &amp;lt;tt&amp;gt;ELE15003&amp;lt;/tt&amp;gt; example archive) - now it should be identical to how the SelectWare extractor works (rechecked disassembler code), except parts marked as TODO in comments. And yes, original code never use anything from reserved 21 byte block since it&#039;s undocumented DOS internals. Also it would be nice if someone ported to this Wiki information about FileInfoRec, DOS Packed Time/Date and DOS File Attributes, since there are few other file formats which uses this structures (except maybe FileInfoRec). [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 18:26, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: Thanks for confirming that the reserved  block is not used; it will come in handy when writing my code to save the archive type. I adapted my own reading code for the next version of the Librarian tool using the directory flag, and it&#039;s actually a lot simpler now. I also added a small section in the article now describing how to traverse the directory tree. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 22:02, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: One addition: the actual extractor code does not check the first filename character (it&#039;s just this implementation quirks), instead it checks that &amp;lt;tt&amp;gt;sizeof(swt_item)&amp;lt;/tt&amp;gt; bytes was sucessully read from input file. Also add subdirectories and remove hidden tag since can&#039;t imagine a way to hide something with this format. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 16:03, 11 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Black line at the bottom of Keen Dreams title ==&lt;br /&gt;
&lt;br /&gt;
Hello. Could you tell me what to do in this case? Since nobody can help me (yet), read my topic: https://keenmodding.org/viewtopic.php?p=36634#p36634 (Oh, and the black line appears at the right bottom corner of the screen.) [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 07:36, 7 September 2021 (GMT)&lt;br /&gt;
: TitleBuild was developed by [[User:Levellass|Levellass]] - you should ask for help there first. As for some suggestions - try to use nConvert:&lt;br /&gt;
: [https://www.xnview.com/en/nconvert/ nconvert.exe] -in -1 -out iff TITLESCR.BMP&lt;br /&gt;
: Rename output file &amp;quot;TITLESCR.IFF&amp;quot; to &amp;quot;TITLESCR.LBM&amp;quot; and pack it back with &amp;quot;SOFTLIB.EXE&amp;quot; to &amp;quot;KDREAMS.CMP&amp;quot;. Maybe it will work correctly this time. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 09:44, 7 September 2021 (GMT)&lt;br /&gt;
:: I have a little problem at the end. I did everything as you mentioned, but SOFTLIB said titlescr.lbm is not a SOFTLIB file and I&#039;m stopped. Please, tell me what can I do as it would be very important for me. [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 23:36, 7 September 2021 (GMT)&lt;br /&gt;
:: No success. I managed to pack it back, but still the same black line at the bottom. Maybe TitleBuilder is the guilty? [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 01:01, 8 September 2021 (GMT)&lt;br /&gt;
::: Do the following things (step-by-step):&lt;br /&gt;
::: 1. SOFTLIB.EXE E KDREAMS.CMP TITLESCR.LBM&lt;br /&gt;
::: 2. nConvert.exe -in -1 -out bmp TITLESCR.LBM&lt;br /&gt;
::: (edit output &amp;quot;TITLESCR.BMP&amp;quot; file here as you like)&lt;br /&gt;
::: 3. nConvert.exe -in -1 -c 1 -out iff TITLESCR.BMP&lt;br /&gt;
::: 4. del TITLESCR.LBM&lt;br /&gt;
::: 5. ren TITLESCR.IFF TITLESCR.LBM&lt;br /&gt;
::: 6. del KDREAMS.CMP&lt;br /&gt;
::: 7. SOFTLIB.EXE AC KDREAMS.CMP TITLESCR.LBM LZH&lt;br /&gt;
::: Just tested and everything works fine. Use DOSBox or any other DOS VM for running SOFTLIB.EXE. Do not use TileBuilder if you have issues with it. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 08:34, 8 September 2021 (GMT)&lt;br /&gt;
:::: Thanks! I will try it, too. [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 08:50, 8 September 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Keen 1 v1.34 EXE problem ==&lt;br /&gt;
&lt;br /&gt;
Hello! Could you help me? The EXE of Keen 1 v1.34 was compressed by PKLite, which I decompressed with UNP, so that I can use KeenGraph (Keen 1-6, Dreams graphic editor). While trying to extract the graphics, KeenGraph mentions that &#039;EGASPRIT.CK1 LZW-compressed, decompressing...&#039; &#039;EGALATCH.CK1 LZW-compressed, decompressing...&#039; And then nothing happens, but just hanging. Tell me how to decompress these LZW-compressed files. [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 22:52, 18 October 2021 (GMT)&lt;br /&gt;
: Sorry, not familiar with this game or modding tools, can&#039;t help.&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:CTPAX-X_Team&amp;diff=10044</id>
		<title>User talk:CTPAX-X Team</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:CTPAX-X_Team&amp;diff=10044"/>
		<updated>2021-09-08T08:34:31Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Black line at the bottom of Keen Dreams title */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SLB/M3 tools ==&lt;br /&gt;
&lt;br /&gt;
Thanks for amplifying the page I created related to the M3/SLB format(s).&lt;br /&gt;
Are we aware of any tool to extract data from .SLB/.M3 formats yet ?&lt;br /&gt;
&lt;br /&gt;
- [[User:Elia1995 | Elìa1995]]&lt;br /&gt;
&lt;br /&gt;
: Added script to unpack archives. If you want to view images you can use IGC.EXE game program as a viewer (DOSBox). [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 19:20, 16 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== FileInfoRec on SelectWare Archive ==&lt;br /&gt;
&lt;br /&gt;
On the [[SelectWare Archive]] page, I&#039;m not sure if it is useful to replace the information on the folder ID by the link to the FileInfoRec. I don&#039;t doubt that it&#039;s correct, but the page you linked to just describes that whole start block as &amp;quot;reserved&amp;quot;, giving no information whatsoever about how a tool could distinguish files from folders and link them together correctly, while the previous information on the page did specify that. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:33, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
For more info on the problem, I refer to you the John Madden Football demo on [https://archive.org/details/cdrom-software-jukebox this CD]. It&#039;s the archive under the folder &amp;lt;tt&amp;gt;ELE15003&amp;lt;/tt&amp;gt;. In that archive, there is no difference in directory level between &amp;quot;GRAPHICS\MISC\MISC.BMS&amp;quot; file and the following &amp;quot;GRAPHICS\STANCES&amp;quot; folder; without looking at those folder IDs, there is no way to know if &amp;quot;STANCES&amp;quot; is a &amp;quot;GRAPHICS\STANCES&amp;quot; folder, or an empty &amp;quot;GRAPHICS\MISC\STANCES&amp;quot; file. Here&#039;s [https://i.imgur.com/62F8afM.png an image of the files tree]. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:52, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
[EDIT]&lt;br /&gt;
&lt;br /&gt;
Ah, I missed the fact there is a directory bit in the file attributes. With that, and the dir level from the entry, it is indeed completely possible without ever looking at that &amp;quot;reserved&amp;quot; information. Out of curiosity, does the SelectWare extractor actually look at that reserved block, or is its unpacking identical to your own? -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:32, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Sorry, messed up logic for folder level. Example code fixed (thanks for pointing out on &amp;lt;tt&amp;gt;ELE15003&amp;lt;/tt&amp;gt; example archive) - now it should be identical to how the SelectWare extractor works (rechecked disassembler code), except parts marked as TODO in comments. And yes, original code never use anything from reserved 21 byte block since it&#039;s undocumented DOS internals. Also it would be nice if someone ported to this Wiki information about FileInfoRec, DOS Packed Time/Date and DOS File Attributes, since there are few other file formats which uses this structures (except maybe FileInfoRec). [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 18:26, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: Thanks for confirming that the reserved  block is not used; it will come in handy when writing my code to save the archive type. I adapted my own reading code for the next version of the Librarian tool using the directory flag, and it&#039;s actually a lot simpler now. I also added a small section in the article now describing how to traverse the directory tree. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 22:02, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: One addition: the actual extractor code does not check the first filename character (it&#039;s just this implementation quirks), instead it checks that &amp;lt;tt&amp;gt;sizeof(swt_item)&amp;lt;/tt&amp;gt; bytes was sucessully read from input file. Also add subdirectories and remove hidden tag since can&#039;t imagine a way to hide something with this format. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 16:03, 11 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Black line at the bottom of Keen Dreams title ==&lt;br /&gt;
&lt;br /&gt;
Hello. Could you tell me what to do in this case? Since nobody can help me (yet), read my topic: https://keenmodding.org/viewtopic.php?p=36634#p36634 (Oh, and the black line appears at the right bottom corner of the screen.) [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 07:36, 7 September 2021 (GMT)&lt;br /&gt;
: TitleBuild was developed by [[User:Levellass|Levellass]] - you should ask for help there first. As for some suggestions - try to use nConvert:&lt;br /&gt;
: [https://www.xnview.com/en/nconvert/ nconvert.exe] -in -1 -out iff TITLESCR.BMP&lt;br /&gt;
: Rename output file &amp;quot;TITLESCR.IFF&amp;quot; to &amp;quot;TITLESCR.LBM&amp;quot; and pack it back with &amp;quot;SOFTLIB.EXE&amp;quot; to &amp;quot;KDREAMS.CMP&amp;quot;. Maybe it will work correctly this time. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 09:44, 7 September 2021 (GMT)&lt;br /&gt;
:: I have a little problem at the end. I did everything as you mentioned, but SOFTLIB said titlescr.lbm is not a SOFTLIB file and I&#039;m stopped. Please, tell me what can I do as it would be very important for me. [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 23:36, 7 September 2021 (GMT)&lt;br /&gt;
:: No success. I managed to pack it back, but still the same black line at the bottom. Maybe TitleBuilder is the guilty? [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 01:01, 8 September 2021 (GMT)&lt;br /&gt;
::: Do the following things (step-by-step):&lt;br /&gt;
::: 1. SOFTLIB.EXE E KDREAMS.CMP TITLESCR.LBM&lt;br /&gt;
::: 2. nConvert.exe -in -1 -out bmp TITLESCR.LBM&lt;br /&gt;
::: (edit output &amp;quot;TITLESCR.BMP&amp;quot; file here as you like)&lt;br /&gt;
::: 3. nConvert.exe -in -1 -c 1 -out iff TITLESCR.BMP&lt;br /&gt;
::: 4. del TITLESCR.LBM&lt;br /&gt;
::: 5. ren TITLESCR.IFF TITLESCR.LBM&lt;br /&gt;
::: 6. del KDREAMS.CMP&lt;br /&gt;
::: 7. SOFTLIB.EXE AC KDREAMS.CMP TITLESCR.LBM LZH&lt;br /&gt;
::: Just tested and everything works fine. Use DOSBox or any other DOS VM for running SOFTLIB.EXE. Do not use TileBuilder if you have issues with it. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 08:34, 8 September 2021 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:CTPAX-X_Team&amp;diff=10033</id>
		<title>User talk:CTPAX-X Team</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:CTPAX-X_Team&amp;diff=10033"/>
		<updated>2021-09-07T09:44:15Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Black line at the bottom of Keen Dreams title */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SLB/M3 tools ==&lt;br /&gt;
&lt;br /&gt;
Thanks for amplifying the page I created related to the M3/SLB format(s).&lt;br /&gt;
Are we aware of any tool to extract data from .SLB/.M3 formats yet ?&lt;br /&gt;
&lt;br /&gt;
- [[User:Elia1995 | Elìa1995]]&lt;br /&gt;
&lt;br /&gt;
: Added script to unpack archives. If you want to view images you can use IGC.EXE game program as a viewer (DOSBox). [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 19:20, 16 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== FileInfoRec on SelectWare Archive ==&lt;br /&gt;
&lt;br /&gt;
On the [[SelectWare Archive]] page, I&#039;m not sure if it is useful to replace the information on the folder ID by the link to the FileInfoRec. I don&#039;t doubt that it&#039;s correct, but the page you linked to just describes that whole start block as &amp;quot;reserved&amp;quot;, giving no information whatsoever about how a tool could distinguish files from folders and link them together correctly, while the previous information on the page did specify that. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:33, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
For more info on the problem, I refer to you the John Madden Football demo on [https://archive.org/details/cdrom-software-jukebox this CD]. It&#039;s the archive under the folder &amp;lt;tt&amp;gt;ELE15003&amp;lt;/tt&amp;gt;. In that archive, there is no difference in directory level between &amp;quot;GRAPHICS\MISC\MISC.BMS&amp;quot; file and the following &amp;quot;GRAPHICS\STANCES&amp;quot; folder; without looking at those folder IDs, there is no way to know if &amp;quot;STANCES&amp;quot; is a &amp;quot;GRAPHICS\STANCES&amp;quot; folder, or an empty &amp;quot;GRAPHICS\MISC\STANCES&amp;quot; file. Here&#039;s [https://i.imgur.com/62F8afM.png an image of the files tree]. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:52, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
[EDIT]&lt;br /&gt;
&lt;br /&gt;
Ah, I missed the fact there is a directory bit in the file attributes. With that, and the dir level from the entry, it is indeed completely possible without ever looking at that &amp;quot;reserved&amp;quot; information. Out of curiosity, does the SelectWare extractor actually look at that reserved block, or is its unpacking identical to your own? -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:32, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Sorry, messed up logic for folder level. Example code fixed (thanks for pointing out on &amp;lt;tt&amp;gt;ELE15003&amp;lt;/tt&amp;gt; example archive) - now it should be identical to how the SelectWare extractor works (rechecked disassembler code), except parts marked as TODO in comments. And yes, original code never use anything from reserved 21 byte block since it&#039;s undocumented DOS internals. Also it would be nice if someone ported to this Wiki information about FileInfoRec, DOS Packed Time/Date and DOS File Attributes, since there are few other file formats which uses this structures (except maybe FileInfoRec). [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 18:26, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: Thanks for confirming that the reserved  block is not used; it will come in handy when writing my code to save the archive type. I adapted my own reading code for the next version of the Librarian tool using the directory flag, and it&#039;s actually a lot simpler now. I also added a small section in the article now describing how to traverse the directory tree. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 22:02, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: One addition: the actual extractor code does not check the first filename character (it&#039;s just this implementation quirks), instead it checks that &amp;lt;tt&amp;gt;sizeof(swt_item)&amp;lt;/tt&amp;gt; bytes was sucessully read from input file. Also add subdirectories and remove hidden tag since can&#039;t imagine a way to hide something with this format. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 16:03, 11 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Black line at the bottom of Keen Dreams title ==&lt;br /&gt;
&lt;br /&gt;
Hello. Could you tell me what to do in this case? Since nobody can help me (yet), read my topic: https://keenmodding.org/viewtopic.php?p=36634#p36634 (Oh, and the black line appears at the right bottom corner of the screen.) [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 07:36, 7 September 2021 (GMT)&lt;br /&gt;
: TitleBuild was developed by [[User:Levellass|Levellass]] - you should ask for help there first. As for some suggestions - try to use nConvert:&lt;br /&gt;
: [https://www.xnview.com/en/nconvert/ nconvert.exe] -in -1 -out iff TITLESCR.BMP&lt;br /&gt;
: Rename output file &amp;quot;TITLESCR.IFF&amp;quot; to &amp;quot;TITLESCR.LBM&amp;quot; and pack it back with &amp;quot;SOFTLIB.EXE&amp;quot; to &amp;quot;KDREAMS.CMP&amp;quot;. Maybe it will work correctly this time. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 09:44, 7 September 2021 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Talk:Softdisk_Library_Format&amp;diff=10023</id>
		<title>Talk:Softdisk Library Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Talk:Softdisk_Library_Format&amp;diff=10023"/>
		<updated>2021-09-06T10:12:06Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Broken link */ link fixed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Compression and exceptions ==&lt;br /&gt;
I had a quick look at the LZW compression used by SOFTLIB.EXE and I was wondering in which case the exception that is mentioned in the text occured. I was able to write a very quick implementation of an LZW decompressor (with a sliding window of 4 KB) that worked perfectly, so I&#039;d like to test that code for those exceptions. Another thing I noticed is that the LZH compressed data doesn&#039;t appear to be based on the compressed data that the LZW compression produces. This seems to be a different compression scheme, using codeword lengths of 8 and 9 bits. --[[User:K1n9 Duk3|K1n9 Duk3]] 22:32, 2 January 2012 (GMT)&lt;br /&gt;
: Seems I was a bit of a twit, I have rewritten the page entirely given my recent pokings at this format. There are no exceptions, just a faulty windows calculator that gave me the wrong binary for a hex value. The &#039;LZH&#039; I think is just regular LZW, but using a dictionary instead of a sliding window, much like Keen 1&#039;s graphics use. --[[User:Levellass|Endian? What are you on about?]] 05:13, 18 April 2012 (GMT)&lt;br /&gt;
:: So I&#039;ve implemented this in Wombat, and I&#039;ve found the following: type 1 compression is LZSS (the description which talks about &#039;flag bytes&#039; on this page confirms that).  Would it make sense to move the text that describes the algorithm to the LZSS page?  It&#039;s quite a good writeup, but would make more sense there.  Type 2 is LZH: LZ77+Huffman, 4k window, adaptive Huffman for codes, offsets use a pre-defined Huffman tree, read-ahead of 30 bytes.  It&#039;s identical to LHA&#039;s -lh1- compression, except that -lh1- uses a 60 byte read-ahead - which makes sense, as the algorithms in both were written by Haruhiko Okumura. ([[User:Szevvy|Szevvy]] ([[User talk:Szevvy|talk]]) 21:40, 14 July 2021‎ (GMT))&lt;br /&gt;
::: If it&#039;s definitely LZSS then it should be merged in with that description so we don&#039;t have multiple descriptions of what is ultimately the same thing!  Worst case at least add a &amp;lt;nowiki&amp;gt;{{TODO|message}}&amp;lt;/nowiki&amp;gt; to mention that it&#039;s LZSS to save future coders from reinventing the wheel! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 09:46, 4 August 2021 (GMT)&lt;br /&gt;
:::: There are already several articles with explanations about LZW. Some examples include [[Westwood LZW-12]] and [[Westwood LZW-14]]. Both were renamed to &amp;quot;LZW&amp;quot; after they were identified as such. Unfortunately, there are loads of slightly different implementations of the LZW compression, too. I&#039;m honestly not sure how to sort out that mess. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 11:00, 4 August 2021 (GMT)&lt;br /&gt;
::::: I would link all those pages to the standard LZW algorithm, then mention the differences on each format&#039;s page, which seems to be more or less what has been done with the Westwood ones.  I&#039;d also put links on the LZW page to all the different variants, again just like Westwood.  The goal is for someone trying to make use of a file format to quickly understand how to do so.  Having to implement an algorithm from scratch isn&#039;t great, but having to only slightly modify a standard already existing algorithm is much easier.  The way the Westwood articles are, mentioning the variations against a standard format, I think is the best we can hope for and it gives people a good place to start from.  The ultimate goal, if possible, would be for the main LZW page to describe a generic enough algorithm that would handle most of the variations.  I have tried to do this in [https://github.com/camoto-project/gamecompjs/blob/master/formats/cmp-lzw.js#L64-L77 the gamecomp.js LZW implementation] by having a bunch of options you can specify, where only the options are different between each game but the LZW code is the same. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 04:06, 6 August 2021 (GMT)&lt;br /&gt;
:::::: All right, thanks for the heads up. The reason I mentioned the WW ones was mostly because, as I wrote in the article, they are a 100% textbook implementation without any modifications at all. I found an implementation of it online to use in my program, and it just worked right away (besides the fact the  programmer used an ASCII-stream in that code, which filtered out all higher-value bytes. Dev derp there, lol) -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 08:11, 6 August 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
== Broken link ==&lt;br /&gt;
&lt;br /&gt;
Hello. Titlebuild&#039;s dropbox link is down: http://dl.dropbox.com/u/3940020/Titlebuild.zip&lt;br /&gt;
Please fix or update it. Or tell me where to get Titlebuild. [[User:Szemigi|Szemigi]] ([[User talk:Szemigi|talk]]) 07:43, 6 September 2021 (GMT)&lt;br /&gt;
: Fixed link. Don&#039;t hesitate to check dead links in the [https://web.archive.org/ Internet Archive Wayback Machine] project. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 10:12, 6 September 2021 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Softdisk_Library_Format&amp;diff=10022</id>
		<title>Softdisk Library Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Softdisk_Library_Format&amp;diff=10022"/>
		<updated>2021-09-06T10:04:18Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* Tools */ replaced with link to Internet Archive&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Archive Infobox&lt;br /&gt;
 | MaxFiles = 65,535&lt;br /&gt;
 | FAT = Beginning&lt;br /&gt;
 | Names = Yes, 8.3&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subdirectories = N&lt;br /&gt;
 | Compressed = Y&lt;br /&gt;
 | Encrypted = N&lt;br /&gt;
 | Hidden = Y&lt;br /&gt;
 | Games = &lt;br /&gt;
   {{Game|Commander Keen Dreams}}&lt;br /&gt;
   {{Game|Dangerous Dave 3}}&lt;br /&gt;
   {{Game|Dangerous Dave 4}}&lt;br /&gt;
}}&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;SOFTLIB.EXE&amp;lt;/tt&amp;gt; and as such any game that uses this format contains various segments of code in common with &amp;lt;tt&amp;gt;SOFTLIB&amp;lt;/tt&amp;gt; for the decompression of data.&lt;br /&gt;
&lt;br /&gt;
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&#039;s file signature is &#039;CMP1&#039; (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; &amp;lt;tt&amp;gt;.CMP&amp;lt;/tt&amp;gt; (CoMPressed), &amp;lt;tt&amp;gt;.SHL&amp;lt;/tt&amp;gt; (Softdisk Help Library) or the game extension.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;SOFLIB&amp;lt;/tt&amp;gt; to extract compressed files.&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
&lt;br /&gt;
 FILE HEADER:&lt;br /&gt;
 0 CHAR[4]	fID		Signature, &#039;SLIB&#039; (Softdisk LIBrary)&lt;br /&gt;
 4 UINT16LE	Version		Version number, always $0002&lt;br /&gt;
 6 UINT16LE	Chunks		Number of data chunks in file&lt;br /&gt;
 8 CHAR[30x]	Chunk headers	Chunk headers&lt;br /&gt;
&lt;br /&gt;
 IMAGE HEADERS:&lt;br /&gt;
 ?   CHAR[16]	Name         Name of compressed image (Max len 12 chars) padded with nuls&lt;br /&gt;
 +16 UINT32LE	Dat st       Start of image data in file (From start of first image chunk)&lt;br /&gt;
 +20 UINT32LE	Dat end      End of image data in file (From start of first image chunk)&lt;br /&gt;
 +24 UINT32LE	iOriginalSize	Decompressed data size&lt;br /&gt;
 +28 UINT16LE	iCompression	Compression used, 0 = none, 1 = LZW, 2 = LZH&lt;br /&gt;
&lt;br /&gt;
== Data Chunks ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Notice that in the case of SLIB chunks bytes 4-10 are identical to bytes 24-30 of that chunk&#039;s header.&lt;br /&gt;
&lt;br /&gt;
 SLIB CHUNK FORMAT&lt;br /&gt;
 ?   CHAR[4]	cID		Signature&#039;CUNK&#039; (Chunk UNKompressed size)&lt;br /&gt;
 +4  UINT32LE	iOriginalSize	Decompressed data size&lt;br /&gt;
 +8  UINT16LE	iCompression	Compression method&lt;br /&gt;
 +10 CHAR[?]	Data		Image data&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 SHL FILE FORMAT&lt;br /&gt;
 0  CHAR[4]	cID		Signature&#039;CMP1&#039; (CoMPressed s1ingle file)&lt;br /&gt;
 4  UINT16LE	iCompression	Compression method (as above)&lt;br /&gt;
 6  UINT32LE	iOriginalSize	Decompressed data size&lt;br /&gt;
 10 UINT32LE	iCompressedSize	Compressed data size&lt;br /&gt;
 14 CHAR[?]	Data		Image data&lt;br /&gt;
&lt;br /&gt;
== Compression ==&lt;br /&gt;
&lt;br /&gt;
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 &#039;LZW&#039; and &#039;LZH&#039; by the programmers but both differ from what are now standard implmentations of those formats.&lt;br /&gt;
&lt;br /&gt;
=== LZW ===&lt;br /&gt;
&lt;br /&gt;
A compression value of 1 means the chunk is [[LZW compression|LZW compressed]]. The format of the compression used is different from the more &#039;usual&#039; implementation of LZW. Most LZW works by building a &#039;dictionary&#039;, but LZW is in essence just referring back to data that has already been read.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Flag bytes divide the datastream into segments of eight &#039;values&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;sliding window&#039; minus 18. In hexadecimal this is as simple as appending the nybble to the first byte. For example flag bytes of &amp;lt;tt&amp;gt;$EA $F6&amp;lt;/tt&amp;gt; point to location &amp;lt;tt&amp;gt;$FEA&amp;lt;/tt&amp;gt; with &#039;6&#039; relating to the data length to read.&lt;br /&gt;
&lt;br /&gt;
The &#039;sliding window&#039; 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 &#039;sliding window&#039;; it is a window of data that can be slid along the datastream as it gets bigger.)&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&amp;lt;tt&amp;gt;$20&amp;lt;/tt&amp;gt; not &amp;lt;tt&amp;gt;$00&amp;lt;/tt&amp;gt;.) and considered part of the datastream but not part that is output to the final file. (Their locations are negative.)&lt;br /&gt;
&lt;br /&gt;
This has an odd result; it&#039;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 &#039;I am Sam. Sam I am!&#039; as compressed by &amp;lt;tt&amp;gt;softlib.exe&amp;lt;/tt&amp;gt;. Note that on line 6 it requests 5 bytes from address -1. This is the string &#039; I am&#039;. The last four bytes are from the start of the sentence but the first, a blank space, comes from the buffer.&lt;br /&gt;
&lt;br /&gt;
 FF				Flag byte, 8 literals follow&lt;br /&gt;
 49 20 61 6D 20 53 61 6D		&#039;I am Sam&#039; as literals&lt;br /&gt;
 09				Flag byte, 1L, 2P, 1L,4Blanks ($09 = 00001001)&lt;br /&gt;
 2E				&#039;.&#039; as literal&lt;br /&gt;
 F2 F1				Pointer, read 1 + 3 = 4 bytes from $FF2, or -14 + 18 = 4 in the data. This is &#039; Sam&#039;&lt;br /&gt;
 ED F2				Pointer, read 2 + 3 = 5 bytes from $FED or -19 + 18 = -1 in the data. This is &#039; I am&#039;&lt;br /&gt;
 21				&#039;!&#039; as literal&lt;br /&gt;
&lt;br /&gt;
=== LZH ===&lt;br /&gt;
&lt;br /&gt;
LZH is a combination of LZW and [[Huffman Compression]]. In its simplest implementation it is two levels of compression, first the data is LZW compressed, then it is Huffman compressed. This is used for example in &amp;lt;tt&amp;gt;GAMEMAPS&amp;lt;/tt&amp;gt; However, the compression used in this case seems to be similar to that used in Keen 1, pure LZW using a dictionary.&lt;br /&gt;
&lt;br /&gt;
The format is far from elucidated, but a table in the executables involved can be used to convert data into the 8 and 9 bit codes used for perfectly incompressible data. (Once compression starts being used this changes, indicative that this table is used to build the initial LZW dictionary.)&lt;br /&gt;
&lt;br /&gt;
It is also notable that it seems to use both 8 and 9 bit codes, which is very difficult to do without some table to indicate the length of the codes. This varaible codeword length may be why the compression is said to be &#039;huffman&#039;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;JM_LZH.C&amp;lt;/tt&amp;gt;. 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.&lt;br /&gt;
&lt;br /&gt;
== Softlib ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Data contained in libraries ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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]]&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.shikadi.net/files/games/softdisk/softlib.exe SOFTLIB.EXE] - original DOS program that can create and modify Softdisk Libraries&lt;br /&gt;
* [https://web.archive.org/web/20141013082255/http://dl.dropbox.com/u/3940020/Titlebuild.zip TITLEBUILD] - Windows program to turn a 320x200 bitmap into &amp;lt;tt&amp;gt;KDREAMS.CMP&amp;lt;/tt&amp;gt; for Keen Dreams - (archived download link)&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This format partially reverse engineered by [[User:Lemm]] and [[User:Levellass]].&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=SelectWare_Archive&amp;diff=9763</id>
		<title>SelectWare Archive</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=SelectWare_Archive&amp;diff=9763"/>
		<updated>2021-05-21T12:28:15Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Archive Infobox&lt;br /&gt;
 | MaxFiles = Unlimited&lt;br /&gt;
 | FAT = Embedded&lt;br /&gt;
 | Names = Yes, 8.3&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subdirectories = Y&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Encrypted = N&lt;br /&gt;
 | Hidden = N&lt;br /&gt;
 | Games = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The SelectWare archive format is a format used by [https://archive.org/details/The_SelectWare_System_Series_1_Volume_2_Number_3_Selectware &#039;&#039;The SelectWare System&#039;&#039;], a quick-launch mechanism used by the company SelectWare Technologies to publish software, mostly shareware demos. It appears in a number of Selectware releases.&lt;br /&gt;
&lt;br /&gt;
===Use===&lt;br /&gt;
&lt;br /&gt;
The most prominent collection containing this format is the &#039;&#039;SelectWare Gold Medal 12 Pack&#039;&#039;; a collection containing the following programs and games:&lt;br /&gt;
&lt;br /&gt;
* [[Blue Force]]&lt;br /&gt;
* [[Dune II]]&lt;br /&gt;
* Jet Fighter 2&lt;br /&gt;
* [[Maelstrom]]&lt;br /&gt;
* [[Microcosm]]&lt;br /&gt;
* [[Shadow President]]&lt;br /&gt;
* [[The Complete House]]&lt;br /&gt;
* [[The Selfish Giant]]&lt;br /&gt;
* [[Darklands]]&lt;br /&gt;
* [[CyberRace]]&lt;br /&gt;
* The Peter Norton Productivity Pack&lt;br /&gt;
* Casino Master Gold Edition&lt;br /&gt;
&lt;br /&gt;
Besides that, the company also distributed several shareware CDs.&lt;br /&gt;
&lt;br /&gt;
===Header===&lt;br /&gt;
&lt;br /&gt;
The format starts with the following header.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset||Data type!!Name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[BYTE]][0x28]||Signature||The text &amp;quot;SelectWare Technologies demo file&amp;quot;, followed by bytes 0x0A 0x1A, and filled to the end with zeroes.&lt;br /&gt;
|-&lt;br /&gt;
|0x28||[[UINT32LE]]||FreeSpace||Minimum disk free space required for this software (sizes of all files inside archive + some free space).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===File entry===&lt;br /&gt;
&lt;br /&gt;
Following the header are the actual files, each one preceded by a file header that indicates its length and some other information.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset||Data type!!Name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|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 &amp;lt;code&amp;gt;DirLevel&amp;lt;/code&amp;gt; will be one higher than that of the files at the same tree depth.&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[http://www.techhelpmanual.com/364-fileinforec.html FileInfoRec]||FileInfo||Structure from FindFirst / FindNext DOS services.&lt;br /&gt;
|-&lt;br /&gt;
|0x2D||[[BYTE]]||Padding||Padding to align whole structure to the even boundary.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file contents of the described file immediately follow this file header.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
For understanding DOS &amp;lt;tt&amp;gt;FileInfoRec&amp;lt;/tt&amp;gt; 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].&lt;br /&gt;
&lt;br /&gt;
=== Traversing the directory tree ===&lt;br /&gt;
&lt;br /&gt;
There is always an explicit entry for the directory before encountering files at a deeper level in the directory tree. From the &amp;lt;code&amp;gt;FileInfo&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;DirLevel&amp;lt;/code&amp;gt;, 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 &amp;lt;code&amp;gt;DirLevel&amp;lt;/code&amp;gt; or a directory with the same &amp;lt;code&amp;gt;DirLevel&amp;lt;/code&amp;gt; is found.&lt;br /&gt;
&lt;br /&gt;
For practical purposes, it is probably more straightforward to decrease the read &amp;lt;code&amp;gt;DirLevel&amp;lt;/code&amp;gt; of directory entries by 1, so it always indicates the level of the entry&#039;s parent directory. This allows the number to be treated the same way for files and directories.&lt;br /&gt;
&lt;br /&gt;
== Archive extracting example source code ==&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Copyright 2021 CTPAX-X Team&lt;br /&gt;
This source code licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;):&lt;br /&gt;
https://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
#include &amp;lt;malloc.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdint.h&amp;gt;&lt;br /&gt;
#include &amp;lt;direct.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#pragma pack(push, 1)&lt;br /&gt;
typedef struct {&lt;br /&gt;
  char signature[40]; /* ignored */&lt;br /&gt;
  uint32_t disksize;  /* required minimum free disk space for software to run */&lt;br /&gt;
} swt_head;           /* (size of all files inside archive + some free space) */&lt;br /&gt;
&lt;br /&gt;
/* DOS FileInfoRec structure for FindFirst / FindNext services */&lt;br /&gt;
typedef struct {&lt;br /&gt;
  uint8_t  reserved[21];&lt;br /&gt;
  uint8_t  dos_attr;&lt;br /&gt;
  uint16_t dos_time;&lt;br /&gt;
  uint16_t dos_date;&lt;br /&gt;
  uint32_t filesize;&lt;br /&gt;
  char     filename[13];&lt;br /&gt;
} dos_find;&lt;br /&gt;
&lt;br /&gt;
typedef struct {&lt;br /&gt;
  int16_t  dirlevel; /* current directory level */&lt;br /&gt;
  dos_find fileinfo;&lt;br /&gt;
  uint8_t  padding; /* padding to align whole structure to the even boundary */&lt;br /&gt;
} swt_item;&lt;br /&gt;
#pragma pack(pop)&lt;br /&gt;
&lt;br /&gt;
int main (int argc, char *argv[]) {&lt;br /&gt;
char path[260], s[260];&lt;br /&gt;
swt_head sh;&lt;br /&gt;
swt_item si;&lt;br /&gt;
int16_t dold;&lt;br /&gt;
FILE *fl, *f;&lt;br /&gt;
size_t i;&lt;br /&gt;
void *p;&lt;br /&gt;
  puts(&amp;quot;SelectWare Technologies demo file extractor\n&amp;quot;);&lt;br /&gt;
  if (argc != 2) {&lt;br /&gt;
    puts(&amp;quot;Usage: unswtpak &amp;lt;filename.swt&amp;gt;\n&amp;quot;);&lt;br /&gt;
    return(1);&lt;br /&gt;
  }&lt;br /&gt;
  fl = fopen(argv[1], &amp;quot;rb&amp;quot;);&lt;br /&gt;
  if (!fl) {&lt;br /&gt;
    puts(&amp;quot;Error: can&#039;t open input file.\n&amp;quot;);&lt;br /&gt;
    return(2);&lt;br /&gt;
  }&lt;br /&gt;
  fread(&amp;amp;sh, sizeof(sh), 1, fl);&lt;br /&gt;
  /* TODO: check minimum free disk space before extracting */&lt;br /&gt;
  dold = 0;&lt;br /&gt;
  path[0] = 0;&lt;br /&gt;
  do {&lt;br /&gt;
    memset(&amp;amp;si, 0, sizeof(si));&lt;br /&gt;
    fread(&amp;amp;si, sizeof(si), 1, fl);&lt;br /&gt;
    /* no more records */&lt;br /&gt;
    if (!si.fileinfo.filename[0]) { break; }&lt;br /&gt;
    /* going up */&lt;br /&gt;
    while (si.dirlevel &amp;lt;= dold) {&lt;br /&gt;
      /* in this level can go up only for directory (will replace current) */&lt;br /&gt;
      if ((si.dirlevel == dold) &amp;amp;&amp;amp; (!(si.fileinfo.dos_attr &amp;amp; 0x10))) { break; }&lt;br /&gt;
      /* cut last directory */&lt;br /&gt;
      i = strlen(path);&lt;br /&gt;
      if (i) {&lt;br /&gt;
        i--;&lt;br /&gt;
        while (i) {&lt;br /&gt;
          if (path[i - 1] == &#039;\\&#039;) { break; }&lt;br /&gt;
          i--;&lt;br /&gt;
        }&lt;br /&gt;
        path[i] = 0;&lt;br /&gt;
      }&lt;br /&gt;
      dold--;&lt;br /&gt;
    }&lt;br /&gt;
    /* update current location */&lt;br /&gt;
    dold = si.dirlevel;&lt;br /&gt;
    /* it&#039;s directory */&lt;br /&gt;
    if (si.fileinfo.dos_attr &amp;amp; 0x10) {&lt;br /&gt;
      /* going down */&lt;br /&gt;
      strcat(path, si.fileinfo.filename);&lt;br /&gt;
      mkdir(path);&lt;br /&gt;
      strcat(path, &amp;quot;\\&amp;quot;);&lt;br /&gt;
    } else {&lt;br /&gt;
      /* it&#039;s file */&lt;br /&gt;
      p = malloc(si.fileinfo.filesize);&lt;br /&gt;
      if (p) {&lt;br /&gt;
        fread(p, si.fileinfo.filesize, 1, fl);&lt;br /&gt;
        /* build path */&lt;br /&gt;
        strcpy(s, path);&lt;br /&gt;
        strcat(s, si.fileinfo.filename);&lt;br /&gt;
        puts(s);&lt;br /&gt;
        /* dump file to disk */&lt;br /&gt;
        f = fopen(s, &amp;quot;wb&amp;quot;);&lt;br /&gt;
        if (f) {&lt;br /&gt;
          fwrite(p, si.fileinfo.filesize, 1, f);&lt;br /&gt;
          /* TODO: set file date, time and attributes */&lt;br /&gt;
          fclose(f);&lt;br /&gt;
        } else {&lt;br /&gt;
          puts(&amp;quot;Error: can&#039;t create output file.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        free(p);&lt;br /&gt;
      } else {&lt;br /&gt;
        /* not enough memory - skip file */&lt;br /&gt;
        fseek(fl, si.fileinfo.filesize, SEEK_CUR);&lt;br /&gt;
        puts(&amp;quot;Error: not enough memory for output file.&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  } while (si.fileinfo.filename[0]);&lt;br /&gt;
  fclose(fl);&lt;br /&gt;
  puts(&amp;quot;\ndone\n&amp;quot;);&lt;br /&gt;
  return(0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=group}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Librarian]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| canExtract = Yes&lt;br /&gt;
| canDecompress = N/A&lt;br /&gt;
| canCreate = No&lt;br /&gt;
| canModify = No&lt;br /&gt;
| canCompress = N/A&lt;br /&gt;
| editHidden = N/A&lt;br /&gt;
| editMetadata = No&lt;br /&gt;
| notes =&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
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 [[CTPAX-X Team]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:CTPAX-X_Team&amp;diff=9759</id>
		<title>User talk:CTPAX-X Team</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:CTPAX-X_Team&amp;diff=9759"/>
		<updated>2021-05-11T16:03:35Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* FileInfoRec on SelectWare Archive */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SLB/M3 tools ==&lt;br /&gt;
&lt;br /&gt;
Thanks for amplifying the page I created related to the M3/SLB format(s).&lt;br /&gt;
Are we aware of any tool to extract data from .SLB/.M3 formats yet ?&lt;br /&gt;
&lt;br /&gt;
- [[User:Elia1995 | Elìa1995]]&lt;br /&gt;
&lt;br /&gt;
: Added script to unpack archives. If you want to view images you can use IGC.EXE game program as a viewer (DOSBox). [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 19:20, 16 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== FileInfoRec on SelectWare Archive ==&lt;br /&gt;
&lt;br /&gt;
On the [[SelectWare Archive]] page, I&#039;m not sure if it is useful to replace the information on the folder ID by the link to the FileInfoRec. I don&#039;t doubt that it&#039;s correct, but the page you linked to just describes that whole start block as &amp;quot;reserved&amp;quot;, giving no information whatsoever about how a tool could distinguish files from folders and link them together correctly, while the previous information on the page did specify that. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:33, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
For more info on the problem, I refer to you the John Madden Football demo on [https://archive.org/details/cdrom-software-jukebox this CD]. It&#039;s the archive under the folder &amp;lt;tt&amp;gt;ELE15003&amp;lt;/tt&amp;gt;. In that archive, there is no difference in directory level between &amp;quot;GRAPHICS\MISC\MISC.BMS&amp;quot; file and the following &amp;quot;GRAPHICS\STANCES&amp;quot; folder; without looking at those folder IDs, there is no way to know if &amp;quot;STANCES&amp;quot; is a &amp;quot;GRAPHICS\STANCES&amp;quot; folder, or an empty &amp;quot;GRAPHICS\MISC\STANCES&amp;quot; file. Here&#039;s [https://i.imgur.com/62F8afM.png an image of the files tree]. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:52, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
[EDIT]&lt;br /&gt;
&lt;br /&gt;
Ah, I missed the fact there is a directory bit in the file attributes. With that, and the dir level from the entry, it is indeed completely possible without ever looking at that &amp;quot;reserved&amp;quot; information. Out of curiosity, does the SelectWare extractor actually look at that reserved block, or is its unpacking identical to your own? -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:32, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Sorry, messed up logic for folder level. Example code fixed (thanks for pointing out on &amp;lt;tt&amp;gt;ELE15003&amp;lt;/tt&amp;gt; example archive) - now it should be identical to how the SelectWare extractor works (rechecked disassembler code), except parts marked as TODO in comments. And yes, original code never use anything from reserved 21 byte block since it&#039;s undocumented DOS internals. Also it would be nice if someone ported to this Wiki information about FileInfoRec, DOS Packed Time/Date and DOS File Attributes, since there are few other file formats which uses this structures (except maybe FileInfoRec). [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 18:26, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
:: Thanks for confirming that the reserved  block is not used; it will come in handy when writing my code to save the archive type. I adapted my own reading code for the next version of the Librarian tool using the directory flag, and it&#039;s actually a lot simpler now. I also added a small section in the article now describing how to traverse the directory tree. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 22:02, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
::: One addition: the actual extractor code does not check the first filename character (it&#039;s just this implementation quirks), instead it checks that &amp;lt;tt&amp;gt;sizeof(swt_item)&amp;lt;/tt&amp;gt; bytes was sucessully read from input file. Also add subdirectories and remove hidden tag since can&#039;t imagine a way to hide something with this format. [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 16:03, 11 May 2021 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=SelectWare_Archive&amp;diff=9758</id>
		<title>SelectWare Archive</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=SelectWare_Archive&amp;diff=9758"/>
		<updated>2021-05-11T15:50:32Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Archive Infobox&lt;br /&gt;
 | MaxFiles = Unlimited&lt;br /&gt;
 | FAT = Embedded&lt;br /&gt;
 | Names = Yes, 8.3&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subdirectories = Y&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Encrypted = N&lt;br /&gt;
 | Hidden = N&lt;br /&gt;
 | Games = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The SelectWare archive format is a format used by [https://archive.org/details/The_SelectWare_System_Series_1_Volume_2_Number_3_Selectware &#039;&#039;The SelectWare System&#039;&#039;], a quick-launch mechanism used by the company SelectWare Technologies to publish software, mostly shareware demos. It appears in a number of Selectware releases.&lt;br /&gt;
&lt;br /&gt;
===Use===&lt;br /&gt;
&lt;br /&gt;
The most prominent collection containing this format is the &#039;&#039;SelectWare Gold Medal 12 Pack&#039;&#039;; a collection containing the following programs and games:&lt;br /&gt;
&lt;br /&gt;
* [[Blue Force]]&lt;br /&gt;
* [[Dune II]]&lt;br /&gt;
* Jet Fighter 2&lt;br /&gt;
* [[Maelstrom]]&lt;br /&gt;
* [[Microcosm]]&lt;br /&gt;
* [[Shadow President]]&lt;br /&gt;
* [[The Complete House]]&lt;br /&gt;
* [[The Selfish Giant]]&lt;br /&gt;
* [[Darklands]]&lt;br /&gt;
* [[CyberRace]]&lt;br /&gt;
* The Peter Norton Productivity Pack&lt;br /&gt;
* Casino Master Gold Edition&lt;br /&gt;
&lt;br /&gt;
Besides that, the company also distributed several shareware CDs.&lt;br /&gt;
&lt;br /&gt;
===Header===&lt;br /&gt;
&lt;br /&gt;
The format starts with the following header.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset||Data type!!Name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[BYTE]][0x28]||Signature||The text &amp;quot;SelectWare Technologies demo file&amp;quot;, followed by bytes 0x0A 0x1A, and filled to the end with zeroes.&lt;br /&gt;
|-&lt;br /&gt;
|0x28||[[UINT32LE]]||FreeSpace||Minimum disk free space required for this software (sizes of all files inside archive + some free space).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===File entry===&lt;br /&gt;
&lt;br /&gt;
Following the header are the actual files, each one preceded by a file header that indicates its length and some other information.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset||Data type!!Name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[INT16LE]]||DirLevel||Current folder level. Used as flag for files in subfolders. Folder entries will be treated as the root of the deeper level, so their &amp;lt;code&amp;gt;DirLevel&amp;lt;/code&amp;gt; will be one higher than that of the files at the same tree depth.&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[http://www.techhelpmanual.com/364-fileinforec.html FileInfoRec]||FileInfo||Structure from FindFirst / FindNext DOS services.&lt;br /&gt;
|-&lt;br /&gt;
|0x2D||[[BYTE]]||Padding||Padding to align whole structure to the even boundary.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file contents of the described file immediately follow this file header.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
For understanding DOS &amp;lt;tt&amp;gt;FileInfoRec&amp;lt;/tt&amp;gt; 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].&lt;br /&gt;
&lt;br /&gt;
=== Traversing the directory tree ===&lt;br /&gt;
&lt;br /&gt;
There is always an explicit entry for the directory before encountering files at a deeper level in the directory tree. From the &amp;lt;code&amp;gt;FileInfo&amp;lt;/code&amp;gt; information, the file attributes can be checked to see if an entry is a folder. With the combined information of this directory flag and the &amp;lt;code&amp;gt;DirLevel&amp;lt;/code&amp;gt;, 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 &amp;lt;code&amp;gt;DirLevel&amp;lt;/code&amp;gt; or a directory with the same &amp;lt;code&amp;gt;DirLevel&amp;lt;/code&amp;gt; is found.&lt;br /&gt;
&lt;br /&gt;
For practical purposes, it is probably more straightforward to decrease the &amp;lt;code&amp;gt;DirLevel&amp;lt;/code&amp;gt; of directory entries by 1, so it always indicates the level of the entry&#039;s parent folder. This allows the number to be treated the same way for files and folders.&lt;br /&gt;
&lt;br /&gt;
== Archive extracting example source code ==&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Copyright 2021 CTPAX-X Team&lt;br /&gt;
This source code licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;):&lt;br /&gt;
https://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
#include &amp;lt;malloc.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdint.h&amp;gt;&lt;br /&gt;
#include &amp;lt;direct.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#pragma pack(push, 1)&lt;br /&gt;
typedef struct {&lt;br /&gt;
  char signature[40]; /* ignored */&lt;br /&gt;
  uint32_t disksize;  /* required minimum free disk space for software to run */&lt;br /&gt;
} swt_head;           /* (size of all files inside archive + some free space) */&lt;br /&gt;
&lt;br /&gt;
/* DOS FileInfoRec structure for FindFirst / FindNext services */&lt;br /&gt;
typedef struct {&lt;br /&gt;
  uint8_t  reserved[21];&lt;br /&gt;
  uint8_t  dos_attr;&lt;br /&gt;
  uint16_t dos_time;&lt;br /&gt;
  uint16_t dos_date;&lt;br /&gt;
  uint32_t filesize;&lt;br /&gt;
  char     filename[13];&lt;br /&gt;
} dos_find;&lt;br /&gt;
&lt;br /&gt;
typedef struct {&lt;br /&gt;
  int16_t  dirlevel; /* current directory level */&lt;br /&gt;
  dos_find fileinfo;&lt;br /&gt;
  uint8_t  padding; /* padding to align whole structure to the even boundary */&lt;br /&gt;
} swt_item;&lt;br /&gt;
#pragma pack(pop)&lt;br /&gt;
&lt;br /&gt;
int main (int argc, char *argv[]) {&lt;br /&gt;
char path[260], s[260];&lt;br /&gt;
swt_head sh;&lt;br /&gt;
swt_item si;&lt;br /&gt;
int16_t dold;&lt;br /&gt;
FILE *fl, *f;&lt;br /&gt;
size_t i;&lt;br /&gt;
void *p;&lt;br /&gt;
  puts(&amp;quot;SelectWare Technologies demo file extractor\n&amp;quot;);&lt;br /&gt;
  if (argc != 2) {&lt;br /&gt;
    puts(&amp;quot;Usage: unswtpak &amp;lt;filename.swt&amp;gt;\n&amp;quot;);&lt;br /&gt;
    return(1);&lt;br /&gt;
  }&lt;br /&gt;
  fl = fopen(argv[1], &amp;quot;rb&amp;quot;);&lt;br /&gt;
  if (!fl) {&lt;br /&gt;
    puts(&amp;quot;Error: can&#039;t open input file.\n&amp;quot;);&lt;br /&gt;
    return(2);&lt;br /&gt;
  }&lt;br /&gt;
  fread(&amp;amp;sh, sizeof(sh), 1, fl);&lt;br /&gt;
  /* TODO: check minimum free disk space before extracting */&lt;br /&gt;
  dold = 0;&lt;br /&gt;
  path[0] = 0;&lt;br /&gt;
  do {&lt;br /&gt;
    memset(&amp;amp;si, 0, sizeof(si));&lt;br /&gt;
    fread(&amp;amp;si, sizeof(si), 1, fl);&lt;br /&gt;
    /* no more records */&lt;br /&gt;
    if (!si.fileinfo.filename[0]) { break; }&lt;br /&gt;
    /* going up */&lt;br /&gt;
    while (si.dirlevel &amp;lt;= dold) {&lt;br /&gt;
      /* in this level can go up only for folder (will replace current) */&lt;br /&gt;
      if ((si.dirlevel == dold) &amp;amp;&amp;amp; (!(si.fileinfo.dos_attr &amp;amp; 0x10))) { break; }&lt;br /&gt;
      /* cut last folder */&lt;br /&gt;
      i = strlen(path);&lt;br /&gt;
      if (i) {&lt;br /&gt;
        i--;&lt;br /&gt;
        while (i) {&lt;br /&gt;
          if (path[i - 1] == &#039;\\&#039;) { break; }&lt;br /&gt;
          i--;&lt;br /&gt;
        }&lt;br /&gt;
        path[i] = 0;&lt;br /&gt;
      }&lt;br /&gt;
      dold--;&lt;br /&gt;
    }&lt;br /&gt;
    /* update current location */&lt;br /&gt;
    dold = si.dirlevel;&lt;br /&gt;
    /* it&#039;s folder */&lt;br /&gt;
    if (si.fileinfo.dos_attr &amp;amp; 0x10) {&lt;br /&gt;
      /* going down */&lt;br /&gt;
      strcat(path, si.fileinfo.filename);&lt;br /&gt;
      mkdir(path);&lt;br /&gt;
      strcat(path, &amp;quot;\\&amp;quot;);&lt;br /&gt;
    } else {&lt;br /&gt;
      /* it&#039;s file */&lt;br /&gt;
      p = malloc(si.fileinfo.filesize);&lt;br /&gt;
      if (p) {&lt;br /&gt;
        fread(p, si.fileinfo.filesize, 1, fl);&lt;br /&gt;
        /* build path */&lt;br /&gt;
        strcpy(s, path);&lt;br /&gt;
        strcat(s, si.fileinfo.filename);&lt;br /&gt;
        puts(s);&lt;br /&gt;
        /* dump file to disk */&lt;br /&gt;
        f = fopen(s, &amp;quot;wb&amp;quot;);&lt;br /&gt;
        if (f) {&lt;br /&gt;
          fwrite(p, si.fileinfo.filesize, 1, f);&lt;br /&gt;
          /* TODO: set file date, time and attributes */&lt;br /&gt;
          fclose(f);&lt;br /&gt;
        } else {&lt;br /&gt;
          puts(&amp;quot;Error: can&#039;t create output file.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        free(p);&lt;br /&gt;
      } else {&lt;br /&gt;
        /* not enough memory - skip file */&lt;br /&gt;
        fseek(fl, si.fileinfo.filesize, SEEK_CUR);&lt;br /&gt;
        puts(&amp;quot;Error: not enough memory for output file.&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  } while (si.fileinfo.filename[0]);&lt;br /&gt;
  fclose(fl);&lt;br /&gt;
  puts(&amp;quot;\ndone\n&amp;quot;);&lt;br /&gt;
  return(0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=group}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Librarian]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| canExtract = Yes&lt;br /&gt;
| canDecompress = N/A&lt;br /&gt;
| canCreate = No&lt;br /&gt;
| canModify = No&lt;br /&gt;
| canCompress = N/A&lt;br /&gt;
| editHidden = N/A&lt;br /&gt;
| editMetadata = No&lt;br /&gt;
| notes =&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
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 [[CTPAX-X Team]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:CTPAX-X_Team&amp;diff=9753</id>
		<title>User talk:CTPAX-X Team</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:CTPAX-X_Team&amp;diff=9753"/>
		<updated>2021-05-08T18:27:13Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* FileInfoRec on SelectWare Archive */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SLB/M3 tools ==&lt;br /&gt;
&lt;br /&gt;
Thanks for amplifying the page I created related to the M3/SLB format(s).&lt;br /&gt;
Are we aware of any tool to extract data from .SLB/.M3 formats yet ?&lt;br /&gt;
&lt;br /&gt;
- [[User:Elia1995 | Elìa1995]]&lt;br /&gt;
&lt;br /&gt;
: Added script to unpack archives. If you want to view images you can use IGC.EXE game program as a viewer (DOSBox). [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 19:20, 16 October 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== FileInfoRec on SelectWare Archive ==&lt;br /&gt;
&lt;br /&gt;
On the [[SelectWare Archive]] page, I&#039;m not sure if it is useful to replace the information on the folder ID by the link to the FileInfoRec. I don&#039;t doubt that it&#039;s correct, but the page you linked to just describes that whole start block as &amp;quot;reserved&amp;quot;, giving no information whatsoever about how a tool could distinguish files from folders and link them together correctly, while the previous information on the page did specify that. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:33, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
For more info on the problem, I refer to you the John Madden Football demo on [https://archive.org/details/cdrom-software-jukebox this CD]. It&#039;s the archive under the folder &amp;lt;tt&amp;gt;ELE15003&amp;lt;/tt&amp;gt;. In that archive, there is no difference in directory level between &amp;quot;GRAPHICS\MISC\MISC.BMS&amp;quot; file and the following &amp;quot;GRAPHICS\STANCES&amp;quot; folder; without looking at those folder IDs, there is no way to know if &amp;quot;STANCES&amp;quot; is a &amp;quot;GRAPHICS\STANCES&amp;quot; folder, or an empty &amp;quot;GRAPHICS\MISC\STANCES&amp;quot; file. Here&#039;s [https://i.imgur.com/62F8afM.png an image of the files tree]. -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 14:52, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
[EDIT]&lt;br /&gt;
&lt;br /&gt;
Ah, I missed the fact there is a directory bit in the file attributes. With that, and the dir level from the entry, it is indeed completely possible without ever looking at that &amp;quot;reserved&amp;quot; information. Out of curiosity, does the SelectWare extractor actually look at that reserved block, or is its unpacking identical to your own? -[[User:Nyerguds|Nyerguds]] ([[User talk:Nyerguds|talk]]) 15:32, 8 May 2021 (GMT)&lt;br /&gt;
&lt;br /&gt;
: Sorry, messed up logic for folder level. Example code fixed (thanks for pointing out on &amp;lt;tt&amp;gt;ELE15003&amp;lt;/tt&amp;gt; example archive) - now it should be identical to how the SelectWare extractor works (rechecked disassembler code), except parts marked as TODO in comments. And yes, original code never use anything from reserved 21 byte block since it&#039;s undocumented DOS internals. Also it would be nice if someone ported to this Wiki information about FileInfoRec, DOS Packed Time/Date and DOS File Attributes, since there are few other file formats which uses this structures (except maybe FileInfoRec). [[User:CTPAX-X Team|CTPAX-X Team]] ([[User talk:CTPAX-X Team|talk]]) 18:26, 8 May 2021 (GMT)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=SelectWare_Archive&amp;diff=9752</id>
		<title>SelectWare Archive</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=SelectWare_Archive&amp;diff=9752"/>
		<updated>2021-05-08T18:11:14Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* C */ fix folder level&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Archive Infobox&lt;br /&gt;
 | MaxFiles = Unlimited&lt;br /&gt;
 | FAT = Embedded&lt;br /&gt;
 | Names = Yes, 8.3&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subdirectories = N&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Encrypted = N&lt;br /&gt;
 | Hidden = Y&lt;br /&gt;
 | Games = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The SelectWare archive format is a format used by [https://archive.org/details/The_SelectWare_System_Series_1_Volume_2_Number_3_Selectware &#039;&#039;The SelectWare System&#039;&#039;], a quick-launch mechanism used by the company SelectWare Technologies to publish software, mostly shareware demos. It appears in a number of Selectware releases.&lt;br /&gt;
&lt;br /&gt;
===Use===&lt;br /&gt;
&lt;br /&gt;
The most prominent collection containing this format is the &#039;&#039;SelectWare Gold Medal 12 Pack&#039;&#039;; a collection containing the following programs and games:&lt;br /&gt;
&lt;br /&gt;
* [[Blue Force]]&lt;br /&gt;
* [[Dune II]]&lt;br /&gt;
* Jet Fighter 2&lt;br /&gt;
* [[Maelstrom]]&lt;br /&gt;
* [[Microcosm]]&lt;br /&gt;
* [[Shadow President]]&lt;br /&gt;
* [[The Complete House]]&lt;br /&gt;
* [[The Selfish Giant]]&lt;br /&gt;
* [[Darklands]]&lt;br /&gt;
* [[CyberRace]]&lt;br /&gt;
* The Peter Norton Productivity Pack&lt;br /&gt;
* Casino Master Gold Edition&lt;br /&gt;
&lt;br /&gt;
Besides that, the company also distributed several shareware CDs.&lt;br /&gt;
&lt;br /&gt;
===Header===&lt;br /&gt;
&lt;br /&gt;
The format starts with the following header.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset||Data type!!Name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[BYTE]][0x28]||Signature||The text &amp;quot;SelectWare Technologies demo file&amp;quot;, followed by bytes 0x0A 0x1A, and filled to the end with zeroes.&lt;br /&gt;
|-&lt;br /&gt;
|0x28||[[UINT32LE]]||FreeSpace||Minimum disk free space required for this software (sizes of all files inside archive + some free space).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===File entry===&lt;br /&gt;
&lt;br /&gt;
Following the header are the actual files, each one preceded by a file header that indicates its length and some other information.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset||Data type!!Name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[INT16LE]]||DirLevel||Current folder level. Used as flag for files in subfolders.&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[http://www.techhelpmanual.com/364-fileinforec.html FileInfoRec]||FileInfo||Structure from FindFirst / FindNext DOS services.&lt;br /&gt;
|-&lt;br /&gt;
|0x2D||[[BYTE]]||Padding||Padding to align whole structure to the even boundary.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file contents of the described file immediately follow this file header.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
For understanding DOS &amp;lt;tt&amp;gt;FileInfoRec&amp;lt;/tt&amp;gt; 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].&lt;br /&gt;
&lt;br /&gt;
== Archive extracting example source code ==&lt;br /&gt;
=== C ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Copyright 2021 CTPAX-X Team&lt;br /&gt;
This source code licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;):&lt;br /&gt;
https://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
#include &amp;lt;malloc.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdint.h&amp;gt;&lt;br /&gt;
#include &amp;lt;direct.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#pragma pack(push, 1)&lt;br /&gt;
typedef struct {&lt;br /&gt;
  char signature[40]; /* ignored */&lt;br /&gt;
  uint32_t disksize;  /* required minimum free disk space for software to run */&lt;br /&gt;
} swt_head;           /* (size of all files inside archive + some free space) */&lt;br /&gt;
&lt;br /&gt;
/* DOS FileInfoRec structure for FindFirst / FindNext services */&lt;br /&gt;
typedef struct {&lt;br /&gt;
  uint8_t  reserved[21];&lt;br /&gt;
  uint8_t  dos_attr;&lt;br /&gt;
  uint16_t dos_time;&lt;br /&gt;
  uint16_t dos_date;&lt;br /&gt;
  uint32_t filesize;&lt;br /&gt;
  char     filename[13];&lt;br /&gt;
} dos_find;&lt;br /&gt;
&lt;br /&gt;
typedef struct {&lt;br /&gt;
  int16_t  dirlevel; /* current directory level */&lt;br /&gt;
  dos_find fileinfo;&lt;br /&gt;
  uint8_t  padding; /* padding to align whole structure to the even boundary */&lt;br /&gt;
} swt_item;&lt;br /&gt;
#pragma pack(pop)&lt;br /&gt;
&lt;br /&gt;
int main (int argc, char *argv[]) {&lt;br /&gt;
char path[260], s[260];&lt;br /&gt;
swt_head sh;&lt;br /&gt;
swt_item si;&lt;br /&gt;
int16_t dold;&lt;br /&gt;
FILE *fl, *f;&lt;br /&gt;
size_t i;&lt;br /&gt;
void *p;&lt;br /&gt;
  puts(&amp;quot;SelectWare Technologies demo file extractor\n&amp;quot;);&lt;br /&gt;
  if (argc != 2) {&lt;br /&gt;
    puts(&amp;quot;Usage: unswtpak &amp;lt;filename.swt&amp;gt;\n&amp;quot;);&lt;br /&gt;
    return(1);&lt;br /&gt;
  }&lt;br /&gt;
  fl = fopen(argv[1], &amp;quot;rb&amp;quot;);&lt;br /&gt;
  if (!fl) {&lt;br /&gt;
    puts(&amp;quot;Error: can&#039;t open input file.\n&amp;quot;);&lt;br /&gt;
    return(2);&lt;br /&gt;
  }&lt;br /&gt;
  fread(&amp;amp;sh, sizeof(sh), 1, fl);&lt;br /&gt;
  /* TODO: check minimum free disk space before extracting */&lt;br /&gt;
  dold = 0;&lt;br /&gt;
  path[0] = 0;&lt;br /&gt;
  do {&lt;br /&gt;
    memset(&amp;amp;si, 0, sizeof(si));&lt;br /&gt;
    fread(&amp;amp;si, sizeof(si), 1, fl);&lt;br /&gt;
    /* no more records */&lt;br /&gt;
    if (!si.fileinfo.filename[0]) { break; }&lt;br /&gt;
    /* going up */&lt;br /&gt;
    while (si.dirlevel &amp;lt;= dold) {&lt;br /&gt;
      /* in this level can go up only for folder (will replace current) */&lt;br /&gt;
      if ((si.dirlevel == dold) &amp;amp;&amp;amp; (!(si.fileinfo.dos_attr &amp;amp; 0x10))) { break; }&lt;br /&gt;
      /* cut last folder */&lt;br /&gt;
      i = strlen(path);&lt;br /&gt;
      if (i) {&lt;br /&gt;
        i--;&lt;br /&gt;
        while (i) {&lt;br /&gt;
          if (path[i - 1] == &#039;\\&#039;) { break; }&lt;br /&gt;
          i--;&lt;br /&gt;
        }&lt;br /&gt;
        path[i] = 0;&lt;br /&gt;
      }&lt;br /&gt;
      dold--;&lt;br /&gt;
    }&lt;br /&gt;
    /* update current location */&lt;br /&gt;
    dold = si.dirlevel;&lt;br /&gt;
    /* it&#039;s folder */&lt;br /&gt;
    if (si.fileinfo.dos_attr &amp;amp; 0x10) {&lt;br /&gt;
      /* going down */&lt;br /&gt;
      strcat(path, si.fileinfo.filename);&lt;br /&gt;
      mkdir(path);&lt;br /&gt;
      i = strlen(path);&lt;br /&gt;
      strcat(path, &amp;quot;\\&amp;quot;);&lt;br /&gt;
    } else {&lt;br /&gt;
      /* it&#039;s file */&lt;br /&gt;
      p = malloc(si.fileinfo.filesize);&lt;br /&gt;
      if (p) {&lt;br /&gt;
        fread(p, si.fileinfo.filesize, 1, fl);&lt;br /&gt;
        /* build path */&lt;br /&gt;
        strcpy(s, path);&lt;br /&gt;
        strcat(s, si.fileinfo.filename);&lt;br /&gt;
        puts(s);&lt;br /&gt;
        /* dump file to disk */&lt;br /&gt;
        f = fopen(s, &amp;quot;wb&amp;quot;);&lt;br /&gt;
        if (f) {&lt;br /&gt;
          fwrite(p, si.fileinfo.filesize, 1, f);&lt;br /&gt;
          /* TODO: set file date, time and attributes */&lt;br /&gt;
          fclose(f);&lt;br /&gt;
        } else {&lt;br /&gt;
          puts(&amp;quot;Error: can&#039;t create output file.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        free(p);&lt;br /&gt;
      } else {&lt;br /&gt;
        /* not enough memory - skip file */&lt;br /&gt;
        fseek(fl, si.fileinfo.filesize, SEEK_CUR);&lt;br /&gt;
        puts(&amp;quot;Error: not enough memory for output file.&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  } while (si.fileinfo.filename[0]);&lt;br /&gt;
  fclose(fl);&lt;br /&gt;
  puts(&amp;quot;\ndone\n&amp;quot;);&lt;br /&gt;
  return(0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=group}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Librarian]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| canExtract = Yes&lt;br /&gt;
| canDecompress = N/A&lt;br /&gt;
| canCreate = No&lt;br /&gt;
| canModify = No&lt;br /&gt;
| canCompress = N/A&lt;br /&gt;
| editHidden = N/A&lt;br /&gt;
| editMetadata = No&lt;br /&gt;
| notes = Doesn&#039;t support subdirectories.&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
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]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=SelectWare_Archive&amp;diff=9748</id>
		<title>SelectWare Archive</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=SelectWare_Archive&amp;diff=9748"/>
		<updated>2021-05-08T06:40:33Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: /* File entry */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Archive Infobox&lt;br /&gt;
 | MaxFiles = Unlimited&lt;br /&gt;
 | FAT = Embedded&lt;br /&gt;
 | Names = Yes, 8.3&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subdirectories = N&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Encrypted = N&lt;br /&gt;
 | Hidden = Y&lt;br /&gt;
 | Games = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The SelectWare archive format is a format used by [https://archive.org/details/The_SelectWare_System_Series_1_Volume_2_Number_3_Selectware &#039;&#039;The SelectWare System&#039;&#039;], a quick-launch mechanism used by the company SelectWare Technologies to publish software, mostly shareware demos. It appears in a number of Selectware releases.&lt;br /&gt;
&lt;br /&gt;
===Use===&lt;br /&gt;
&lt;br /&gt;
The most prominent collection containing this format is the &#039;&#039;SelectWare Gold Medal 12 Pack&#039;&#039;; a collection containing the following programs and games:&lt;br /&gt;
&lt;br /&gt;
* [[Blue Force]]&lt;br /&gt;
* [[Dune II]]&lt;br /&gt;
* Jet Fighter 2&lt;br /&gt;
* [[Maelstrom]]&lt;br /&gt;
* [[Microcosm]]&lt;br /&gt;
* [[Shadow President]]&lt;br /&gt;
* [[The Complete House]]&lt;br /&gt;
* [[The Selfish Giant]]&lt;br /&gt;
* [[Darklands]]&lt;br /&gt;
* [[CyberRace]]&lt;br /&gt;
* The Peter Norton Productivity Pack&lt;br /&gt;
* Casino Master Gold Edition&lt;br /&gt;
&lt;br /&gt;
Besides that, the company also distributed several shareware CDs.&lt;br /&gt;
&lt;br /&gt;
===Header===&lt;br /&gt;
&lt;br /&gt;
The format starts with the following header.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset||Data type!!Name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[BYTE]][0x28]||Signature||The text &amp;quot;SelectWare Technologies demo file&amp;quot;, followed by bytes 0x0A 0x1A, and filled to the end with zeroes.&lt;br /&gt;
|-&lt;br /&gt;
|0x28||[[UINT32LE]]||FreeSpace||Minimum disk free space required for this software (sizes of all files inside archive + some free space).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===File entry===&lt;br /&gt;
&lt;br /&gt;
Following the header are the actual files, each one preceded by a file header that indicates its length and some other information.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset||Data type!!Name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[INT16LE]]||DirLevel||Current folder level. Used as flag for files in subfolders.&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[http://www.techhelpmanual.com/364-fileinforec.html FileInfoRec]||FileInfo||Structure from FindFirst / FindNext DOS services.&lt;br /&gt;
|-&lt;br /&gt;
|0x2D||[[BYTE]]||Padding||Padding to align whole structure to the even boundary.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file contents of the described file immediately follow this file header.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
For understanding DOS &amp;lt;tt&amp;gt;FileInfoRec&amp;lt;/tt&amp;gt; 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].&lt;br /&gt;
&lt;br /&gt;
== Archive extracting example source code ==&lt;br /&gt;
=== C ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Copyright 2021 CTPAX-X Team&lt;br /&gt;
This source code licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;):&lt;br /&gt;
https://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
#include &amp;lt;malloc.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdint.h&amp;gt;&lt;br /&gt;
#include &amp;lt;direct.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#pragma pack(push, 1)&lt;br /&gt;
typedef struct {&lt;br /&gt;
  char signature[40]; /* ignored */&lt;br /&gt;
  uint32_t disksize;  /* required minimum free disk space for software to run */&lt;br /&gt;
} swt_head;           /* (size of all files inside archive + some free space) */&lt;br /&gt;
&lt;br /&gt;
/* DOS FileInfoRec structure for FindFirst / FindNext services */&lt;br /&gt;
typedef struct {&lt;br /&gt;
  uint8_t  reserved[21];&lt;br /&gt;
  uint8_t  dos_attr;&lt;br /&gt;
  uint16_t dos_time;&lt;br /&gt;
  uint16_t dos_date;&lt;br /&gt;
  uint32_t filesize;&lt;br /&gt;
  char     filename[13];&lt;br /&gt;
} dos_find;&lt;br /&gt;
&lt;br /&gt;
typedef struct {&lt;br /&gt;
  int16_t  dirlevel; /* current directory level */&lt;br /&gt;
  dos_find fileinfo;&lt;br /&gt;
  uint8_t  padding; /* padding to align whole structure to the even boundary */&lt;br /&gt;
} swt_item;&lt;br /&gt;
#pragma pack(pop)&lt;br /&gt;
&lt;br /&gt;
int main (int argc, char *argv[]) {&lt;br /&gt;
char path[260], s[260];&lt;br /&gt;
swt_head sh;&lt;br /&gt;
swt_item si;&lt;br /&gt;
int16_t dold;&lt;br /&gt;
FILE *fl, *f;&lt;br /&gt;
size_t i;&lt;br /&gt;
void *p;&lt;br /&gt;
  puts(&amp;quot;SelectWare Technologies demo file unpacker\n&amp;quot;);&lt;br /&gt;
  if (argc != 2) {&lt;br /&gt;
    puts(&amp;quot;Usage: unswtpak &amp;lt;filename.swt&amp;gt;\n&amp;quot;);&lt;br /&gt;
    return(1);&lt;br /&gt;
  }&lt;br /&gt;
  fl = fopen(argv[1], &amp;quot;rb&amp;quot;);&lt;br /&gt;
  if (!fl) {&lt;br /&gt;
    puts(&amp;quot;Error: can&#039;t open input file.\n&amp;quot;);&lt;br /&gt;
    return(2);&lt;br /&gt;
  }&lt;br /&gt;
  fread(&amp;amp;sh, sizeof(sh), 1, fl);&lt;br /&gt;
  /* TODO: check header signature and miminal disk free space */&lt;br /&gt;
  dold = 0;&lt;br /&gt;
  path[0] = 0;&lt;br /&gt;
  do {&lt;br /&gt;
    memset(&amp;amp;si, 0, sizeof(si));&lt;br /&gt;
    fread(&amp;amp;si, sizeof(si), 1, fl);&lt;br /&gt;
    /* no more records */&lt;br /&gt;
    if (!si.fileinfo.filename[0]) { break; }&lt;br /&gt;
    /* going up */&lt;br /&gt;
    if (si.dirlevel &amp;lt; dold) {&lt;br /&gt;
      i = strlen(path);&lt;br /&gt;
      if (i) {&lt;br /&gt;
        i--;&lt;br /&gt;
        path[i] = 0;&lt;br /&gt;
        while (i--) {&lt;br /&gt;
          if (path[i] == &#039;\\&#039;) {&lt;br /&gt;
            path[i + 1] = 0;&lt;br /&gt;
            break;&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    /* update current location */&lt;br /&gt;
    dold = si.dirlevel;&lt;br /&gt;
    /* it&#039;s folder */&lt;br /&gt;
    if (si.fileinfo.dos_attr &amp;amp; 0x10) {&lt;br /&gt;
      /* going down */&lt;br /&gt;
      strcat(path, si.fileinfo.filename);&lt;br /&gt;
      mkdir(path);&lt;br /&gt;
      i = strlen(path);&lt;br /&gt;
      strcat(path, &amp;quot;\\&amp;quot;);&lt;br /&gt;
    } else {&lt;br /&gt;
      /* it&#039;s file */&lt;br /&gt;
      p = malloc(si.fileinfo.filesize);&lt;br /&gt;
      if (p) {&lt;br /&gt;
        fread(p, si.fileinfo.filesize, 1, fl);&lt;br /&gt;
        /* build path */&lt;br /&gt;
        strcpy(s, path);&lt;br /&gt;
        strcat(s, si.fileinfo.filename);&lt;br /&gt;
        puts(s);&lt;br /&gt;
        /* dump file to disk */&lt;br /&gt;
        f = fopen(s, &amp;quot;wb&amp;quot;);&lt;br /&gt;
        if (f) {&lt;br /&gt;
          fwrite(p, si.fileinfo.filesize, 1, f);&lt;br /&gt;
          /* TODO: set file time, date and attributes */&lt;br /&gt;
          fclose(f);&lt;br /&gt;
        } else {&lt;br /&gt;
          puts(&amp;quot;Error: can&#039;t create output file.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        free(p);&lt;br /&gt;
      } else {&lt;br /&gt;
        /* not enough memory - skip file */&lt;br /&gt;
        fseek(fl, si.fileinfo.filesize, SEEK_CUR);&lt;br /&gt;
        puts(&amp;quot;Error: not enough memory for output file.&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  } while (si.fileinfo.filename[0]);&lt;br /&gt;
  fclose(fl);&lt;br /&gt;
  puts(&amp;quot;\ndone\n&amp;quot;);&lt;br /&gt;
  return(0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=group}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Librarian]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| canExtract = Yes&lt;br /&gt;
| canDecompress = N/A&lt;br /&gt;
| canCreate = No&lt;br /&gt;
| canModify = No&lt;br /&gt;
| canCompress = N/A&lt;br /&gt;
| editHidden = N/A&lt;br /&gt;
| editMetadata = No&lt;br /&gt;
| notes = Doesn&#039;t support subdirectories.&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
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]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=SelectWare_Archive&amp;diff=9747</id>
		<title>SelectWare Archive</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=SelectWare_Archive&amp;diff=9747"/>
		<updated>2021-05-08T06:35:34Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: This structure for sure was familiar.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Archive Infobox&lt;br /&gt;
 | MaxFiles = Unlimited&lt;br /&gt;
 | FAT = Embedded&lt;br /&gt;
 | Names = Yes, 8.3&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subdirectories = N&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Encrypted = N&lt;br /&gt;
 | Hidden = Y&lt;br /&gt;
 | Games = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The SelectWare archive format is a format used by [https://archive.org/details/The_SelectWare_System_Series_1_Volume_2_Number_3_Selectware &#039;&#039;The SelectWare System&#039;&#039;], a quick-launch mechanism used by the company SelectWare Technologies to publish software, mostly shareware demos. It appears in a number of Selectware releases.&lt;br /&gt;
&lt;br /&gt;
===Use===&lt;br /&gt;
&lt;br /&gt;
The most prominent collection containing this format is the &#039;&#039;SelectWare Gold Medal 12 Pack&#039;&#039;; a collection containing the following programs and games:&lt;br /&gt;
&lt;br /&gt;
* [[Blue Force]]&lt;br /&gt;
* [[Dune II]]&lt;br /&gt;
* Jet Fighter 2&lt;br /&gt;
* [[Maelstrom]]&lt;br /&gt;
* [[Microcosm]]&lt;br /&gt;
* [[Shadow President]]&lt;br /&gt;
* [[The Complete House]]&lt;br /&gt;
* [[The Selfish Giant]]&lt;br /&gt;
* [[Darklands]]&lt;br /&gt;
* [[CyberRace]]&lt;br /&gt;
* The Peter Norton Productivity Pack&lt;br /&gt;
* Casino Master Gold Edition&lt;br /&gt;
&lt;br /&gt;
Besides that, the company also distributed several shareware CDs.&lt;br /&gt;
&lt;br /&gt;
===Header===&lt;br /&gt;
&lt;br /&gt;
The format starts with the following header.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset||Data type!!Name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[BYTE]][0x28]||Signature||The text &amp;quot;SelectWare Technologies demo file&amp;quot;, followed by bytes 0x0A 0x1A, and filled to the end with zeroes.&lt;br /&gt;
|-&lt;br /&gt;
|0x28||[[UINT32LE]]||FreeSpace||Minimum disk free space required for this software (sizes of all files inside archive + some free space).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===File entry===&lt;br /&gt;
&lt;br /&gt;
Following the header are the actual files, each one preceded by a file header that indicates its length and some other information.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset||Data type!!Name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[INT16LE]]||DirLevel||Current folder level. Used as flag for files in subfolders.&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[http://www.techhelpmanual.com/364-fileinforec.html FileInfoRec]||FileInfo||Structure from FindFirst / FindNext DOS services.&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[BYTE]]||Padding||Padding to align whole structure to the even boundary.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file contents of the described file immediately follow this file header.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
For understanding DOS &amp;lt;tt&amp;gt;FileInfoRec&amp;lt;/tt&amp;gt; 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].&lt;br /&gt;
&lt;br /&gt;
== Archive extracting example source code ==&lt;br /&gt;
=== C ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Copyright 2021 CTPAX-X Team&lt;br /&gt;
This source code licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;):&lt;br /&gt;
https://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
#include &amp;lt;malloc.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdint.h&amp;gt;&lt;br /&gt;
#include &amp;lt;direct.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#pragma pack(push, 1)&lt;br /&gt;
typedef struct {&lt;br /&gt;
  char signature[40]; /* ignored */&lt;br /&gt;
  uint32_t disksize;  /* required minimum free disk space for software to run */&lt;br /&gt;
} swt_head;           /* (size of all files inside archive + some free space) */&lt;br /&gt;
&lt;br /&gt;
/* DOS FileInfoRec structure for FindFirst / FindNext services */&lt;br /&gt;
typedef struct {&lt;br /&gt;
  uint8_t  reserved[21];&lt;br /&gt;
  uint8_t  dos_attr;&lt;br /&gt;
  uint16_t dos_time;&lt;br /&gt;
  uint16_t dos_date;&lt;br /&gt;
  uint32_t filesize;&lt;br /&gt;
  char     filename[13];&lt;br /&gt;
} dos_find;&lt;br /&gt;
&lt;br /&gt;
typedef struct {&lt;br /&gt;
  int16_t  dirlevel; /* current directory level */&lt;br /&gt;
  dos_find fileinfo;&lt;br /&gt;
  uint8_t  padding; /* padding to align whole structure to the even boundary */&lt;br /&gt;
} swt_item;&lt;br /&gt;
#pragma pack(pop)&lt;br /&gt;
&lt;br /&gt;
int main (int argc, char *argv[]) {&lt;br /&gt;
char path[260], s[260];&lt;br /&gt;
swt_head sh;&lt;br /&gt;
swt_item si;&lt;br /&gt;
int16_t dold;&lt;br /&gt;
FILE *fl, *f;&lt;br /&gt;
size_t i;&lt;br /&gt;
void *p;&lt;br /&gt;
  puts(&amp;quot;SelectWare Technologies demo file unpacker\n&amp;quot;);&lt;br /&gt;
  if (argc != 2) {&lt;br /&gt;
    puts(&amp;quot;Usage: unswtpak &amp;lt;filename.swt&amp;gt;\n&amp;quot;);&lt;br /&gt;
    return(1);&lt;br /&gt;
  }&lt;br /&gt;
  fl = fopen(argv[1], &amp;quot;rb&amp;quot;);&lt;br /&gt;
  if (!fl) {&lt;br /&gt;
    puts(&amp;quot;Error: can&#039;t open input file.\n&amp;quot;);&lt;br /&gt;
    return(2);&lt;br /&gt;
  }&lt;br /&gt;
  fread(&amp;amp;sh, sizeof(sh), 1, fl);&lt;br /&gt;
  /* TODO: check header signature and miminal disk free space */&lt;br /&gt;
  dold = 0;&lt;br /&gt;
  path[0] = 0;&lt;br /&gt;
  do {&lt;br /&gt;
    memset(&amp;amp;si, 0, sizeof(si));&lt;br /&gt;
    fread(&amp;amp;si, sizeof(si), 1, fl);&lt;br /&gt;
    /* no more records */&lt;br /&gt;
    if (!si.fileinfo.filename[0]) { break; }&lt;br /&gt;
    /* going up */&lt;br /&gt;
    if (si.dirlevel &amp;lt; dold) {&lt;br /&gt;
      i = strlen(path);&lt;br /&gt;
      if (i) {&lt;br /&gt;
        i--;&lt;br /&gt;
        path[i] = 0;&lt;br /&gt;
        while (i--) {&lt;br /&gt;
          if (path[i] == &#039;\\&#039;) {&lt;br /&gt;
            path[i + 1] = 0;&lt;br /&gt;
            break;&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    /* update current location */&lt;br /&gt;
    dold = si.dirlevel;&lt;br /&gt;
    /* it&#039;s folder */&lt;br /&gt;
    if (si.fileinfo.dos_attr &amp;amp; 0x10) {&lt;br /&gt;
      /* going down */&lt;br /&gt;
      strcat(path, si.fileinfo.filename);&lt;br /&gt;
      mkdir(path);&lt;br /&gt;
      i = strlen(path);&lt;br /&gt;
      strcat(path, &amp;quot;\\&amp;quot;);&lt;br /&gt;
    } else {&lt;br /&gt;
      /* it&#039;s file */&lt;br /&gt;
      p = malloc(si.fileinfo.filesize);&lt;br /&gt;
      if (p) {&lt;br /&gt;
        fread(p, si.fileinfo.filesize, 1, fl);&lt;br /&gt;
        /* build path */&lt;br /&gt;
        strcpy(s, path);&lt;br /&gt;
        strcat(s, si.fileinfo.filename);&lt;br /&gt;
        puts(s);&lt;br /&gt;
        /* dump file to disk */&lt;br /&gt;
        f = fopen(s, &amp;quot;wb&amp;quot;);&lt;br /&gt;
        if (f) {&lt;br /&gt;
          fwrite(p, si.fileinfo.filesize, 1, f);&lt;br /&gt;
          /* TODO: set file time, date and attributes */&lt;br /&gt;
          fclose(f);&lt;br /&gt;
        } else {&lt;br /&gt;
          puts(&amp;quot;Error: can&#039;t create output file.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        free(p);&lt;br /&gt;
      } else {&lt;br /&gt;
        /* not enough memory - skip file */&lt;br /&gt;
        fseek(fl, si.fileinfo.filesize, SEEK_CUR);&lt;br /&gt;
        puts(&amp;quot;Error: not enough memory for output file.&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  } while (si.fileinfo.filename[0]);&lt;br /&gt;
  fclose(fl);&lt;br /&gt;
  puts(&amp;quot;\ndone\n&amp;quot;);&lt;br /&gt;
  return(0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=group}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Librarian]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| canExtract = Yes&lt;br /&gt;
| canDecompress = N/A&lt;br /&gt;
| canCreate = No&lt;br /&gt;
| canModify = No&lt;br /&gt;
| canCompress = N/A&lt;br /&gt;
| editHidden = N/A&lt;br /&gt;
| editMetadata = No&lt;br /&gt;
| notes = Doesn&#039;t support subdirectories.&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
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]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=SelectWare_Archive&amp;diff=9741</id>
		<title>SelectWare Archive</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=SelectWare_Archive&amp;diff=9741"/>
		<updated>2021-05-07T09:44:00Z</updated>

		<summary type="html">&lt;p&gt;CTPAX-X Team: according to disassembled code of SW.EXE from SelectWare Series vol. 1, 2, 3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Archive Infobox&lt;br /&gt;
 | MaxFiles = Unlimited&lt;br /&gt;
 | FAT = Embedded&lt;br /&gt;
 | Names = Yes, 8.3&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subdirectories = N&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Encrypted = N&lt;br /&gt;
 | Hidden = Y&lt;br /&gt;
 | Games = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The SelectWare archive format is a format used by [https://archive.org/details/The_SelectWare_System_Series_1_Volume_2_Number_3_Selectware &#039;&#039;The SelectWare System&#039;&#039;], a quick-launch mechanism used by the company SelectWare Technologies to publish software, mostly shareware demos. It appears in a number of Selectware releases.&lt;br /&gt;
&lt;br /&gt;
===Use===&lt;br /&gt;
&lt;br /&gt;
The most prominent collection containing this format is the &#039;&#039;SelectWare Gold Medal 12 Pack&#039;&#039;; a collection containing the following programs and games:&lt;br /&gt;
&lt;br /&gt;
* [[Blue Force]]&lt;br /&gt;
* [[Dune II]]&lt;br /&gt;
* Jet Fighter 2&lt;br /&gt;
* [[Maelstrom]]&lt;br /&gt;
* [[Microcosm]]&lt;br /&gt;
* [[Shadow President]]&lt;br /&gt;
* [[The Complete House]]&lt;br /&gt;
* [[The Selfish Giant]]&lt;br /&gt;
* [[Darklands]]&lt;br /&gt;
* [[CyberRace]]&lt;br /&gt;
* The Peter Norton Productivity Pack&lt;br /&gt;
* Casino Master Gold Edition&lt;br /&gt;
&lt;br /&gt;
Besides that, the company also distributed several shareware CDs.&lt;br /&gt;
&lt;br /&gt;
===Header===&lt;br /&gt;
&lt;br /&gt;
The format starts with the following header.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset||Data type!!Name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[BYTE]][0x28]||Signature||The text &amp;quot;SelectWare Technologies demo file&amp;quot;, followed by bytes 0x0A 0x1A, and filled to the end with zeroes.&lt;br /&gt;
|-&lt;br /&gt;
|0x28||[[UINT32LE]]||FreeSpace||Minimum disk free space required for this software (sizes of all files inside archive + some free space).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===File entry===&lt;br /&gt;
&lt;br /&gt;
Following the header are the actual files, each one preceded by a file header that indicates its length and some other information.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset||Data type!!Name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[INT16LE]]||DirLevel||Current folder level. Used as flag for files in subfolders.&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[BYTE]]||Unknown1||Unknown value.&lt;br /&gt;
|-&lt;br /&gt;
|0x03||[[BYTE]][11]||Mask||Always 11 question mark symbols (&amp;lt;tt&amp;gt;?&amp;lt;/tt&amp;gt;, or byte 0x3F).&lt;br /&gt;
|-&lt;br /&gt;
|0x0E||[[BYTE]]||Unknown2||Always 0x10&lt;br /&gt;
|-&lt;br /&gt;
|0x0F||[[UINT16LE]]||Index||File index number for this folder. Increases with each file, but seems to always start from &#039;2&#039;. Restarts for each folder.&lt;br /&gt;
|-&lt;br /&gt;
|0x11||[[UINT16LE]]||DirId||Directory identifier. All files in the same folder share the same value here. It is currently unknown how to link those to the directory entries, however, a change of &amp;lt;code&amp;gt;DirId&amp;lt;/code&amp;gt; seems to always be preceded by an empty file.&lt;br /&gt;
|-&lt;br /&gt;
|0x13||[[UINT32LE]]||Unknown3||Unknown. Seems to be the same for all entries in a file.&lt;br /&gt;
|-&lt;br /&gt;
|0x17||[[BYTE]]||FileAttr||DOS file attributes&lt;br /&gt;
|-&lt;br /&gt;
|0x18||[[UINT16LE]]||TimeStamp||DOS time stamp&lt;br /&gt;
|-&lt;br /&gt;
|0x1A||[[UINT16LE]]||DateStamp||DOS date stamp&lt;br /&gt;
|-&lt;br /&gt;
|0x1C||[[UINT32LE]]||FileSize||Size of the file&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[Char]][14]||FileName||File name in 8.3 ASCII, null-terminated, padded with 00 bytes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file contents of the described file immediately follow this file header.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Archive extracting example source code ==&lt;br /&gt;
=== C ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Copyright 2021 CTPAX-X Team&lt;br /&gt;
This source code licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;):&lt;br /&gt;
https://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
#include &amp;lt;malloc.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdint.h&amp;gt;&lt;br /&gt;
#include &amp;lt;direct.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/*#define DEBUG 1*/&lt;br /&gt;
&lt;br /&gt;
#pragma pack(push, 1)&lt;br /&gt;
typedef struct {&lt;br /&gt;
  char signature[40]; /* ignored */&lt;br /&gt;
  uint32_t disksize;  /* required minimum free disk space for software to run */&lt;br /&gt;
} swt_head;           /* (size of all files inside archive + some free space) */&lt;br /&gt;
&lt;br /&gt;
typedef struct {&lt;br /&gt;
  int16_t dirlevel;&lt;br /&gt;
  /* ignored from this... */&lt;br /&gt;
  uint8_t unknown1;&lt;br /&gt;
  uint8_t mask[11];&lt;br /&gt;
  uint8_t unknown2;&lt;br /&gt;
  uint16_t index;&lt;br /&gt;
  uint16_t dirid;&lt;br /&gt;
  uint32_t unknown3;&lt;br /&gt;
  /* ...until that */&lt;br /&gt;
  uint8_t  dos_attr;&lt;br /&gt;
  uint16_t dos_time;&lt;br /&gt;
  uint16_t dos_date;&lt;br /&gt;
  uint32_t filesize;&lt;br /&gt;
  char filename[14];&lt;br /&gt;
} swt_item;&lt;br /&gt;
#pragma pack(pop)&lt;br /&gt;
&lt;br /&gt;
int main (int argc, char *argv[]) {&lt;br /&gt;
char path[260], s[260];&lt;br /&gt;
swt_head sh;&lt;br /&gt;
swt_item si;&lt;br /&gt;
int16_t dold;&lt;br /&gt;
FILE *fl, *f;&lt;br /&gt;
size_t i;&lt;br /&gt;
void *p;&lt;br /&gt;
  puts(&amp;quot;SelectWare Technologies demo file unpacker\n&amp;quot;);&lt;br /&gt;
  if (argc != 2) {&lt;br /&gt;
    puts(&amp;quot;Usage: unswtpak &amp;lt;filename.swt&amp;gt;\n&amp;quot;);&lt;br /&gt;
    return(1);&lt;br /&gt;
  }&lt;br /&gt;
  fl = fopen(argv[1], &amp;quot;rb&amp;quot;);&lt;br /&gt;
  if (!fl) {&lt;br /&gt;
    puts(&amp;quot;Error: can&#039;t open input file.\n&amp;quot;);&lt;br /&gt;
    return(2);&lt;br /&gt;
  }&lt;br /&gt;
  fread(&amp;amp;sh, sizeof(sh), 1, fl);&lt;br /&gt;
  /* TODO: check header signature and miminal disk free space */&lt;br /&gt;
  dold = 0;&lt;br /&gt;
  path[0] = 0;&lt;br /&gt;
  do {&lt;br /&gt;
    memset(&amp;amp;si, 0, sizeof(si));&lt;br /&gt;
    fread(&amp;amp;si, sizeof(si), 1, fl);&lt;br /&gt;
    /* no more records */&lt;br /&gt;
    if (!si.filename[0]) { break; }&lt;br /&gt;
    #ifdef DEBUG&lt;br /&gt;
    printf(&amp;quot;%02X %02X %04X %04X %08X\n&amp;quot;,&lt;br /&gt;
      si.unknown1, si.unknown2, si.index, si.dirid, si.unknown3);&lt;br /&gt;
    #endif&lt;br /&gt;
    /* going up */&lt;br /&gt;
    if (si.dirlevel &amp;lt; dold) {&lt;br /&gt;
      i = strlen(path);&lt;br /&gt;
      if (i) {&lt;br /&gt;
        i--;&lt;br /&gt;
        path[i] = 0;&lt;br /&gt;
        while (i--) {&lt;br /&gt;
          if (path[i] == &#039;\\&#039;) {&lt;br /&gt;
            path[i + 1] = 0;&lt;br /&gt;
            break;&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    /* update current location */&lt;br /&gt;
    dold = si.dirlevel;&lt;br /&gt;
    /* it&#039;s folder */&lt;br /&gt;
    if (si.dos_attr &amp;amp; 0x10) {&lt;br /&gt;
      /* going down */&lt;br /&gt;
      strcat(path, si.filename);&lt;br /&gt;
      #ifndef DEBUG&lt;br /&gt;
      mkdir(path);&lt;br /&gt;
      #endif&lt;br /&gt;
      i = strlen(path);&lt;br /&gt;
      strcat(path, &amp;quot;\\&amp;quot;);&lt;br /&gt;
    } else {&lt;br /&gt;
      /* it&#039;s file */&lt;br /&gt;
      p = malloc(si.filesize);&lt;br /&gt;
      if (p) {&lt;br /&gt;
        fread(p, si.filesize, 1, fl);&lt;br /&gt;
        /* build path */&lt;br /&gt;
        strcpy(s, path);&lt;br /&gt;
        strcat(s, si.filename);&lt;br /&gt;
        puts(s);&lt;br /&gt;
        #ifndef DEBUG&lt;br /&gt;
        /* dump file to disk */&lt;br /&gt;
        f = fopen(s, &amp;quot;wb&amp;quot;);&lt;br /&gt;
        if (f) {&lt;br /&gt;
          fwrite(p, si.filesize, 1, f);&lt;br /&gt;
          /* TODO: set file time, date and attributes */&lt;br /&gt;
          fclose(f);&lt;br /&gt;
        } else {&lt;br /&gt;
          puts(&amp;quot;Error: can&#039;t create output file.\n&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        #endif&lt;br /&gt;
        free(p);&lt;br /&gt;
      } else {&lt;br /&gt;
        /* not enough memory - skip file */&lt;br /&gt;
        fseek(fl, si.filesize, SEEK_CUR);&lt;br /&gt;
        puts(&amp;quot;Error: not enough memory for output file.\n&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  } while (si.filename[0]);&lt;br /&gt;
  fclose(fl);&lt;br /&gt;
  puts(&amp;quot;\ndone\n&amp;quot;);&lt;br /&gt;
  return(0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=group}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Librarian]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| canExtract = Yes&lt;br /&gt;
| canDecompress = N/A&lt;br /&gt;
| canCreate = No&lt;br /&gt;
| canModify = No&lt;br /&gt;
| canCompress = N/A&lt;br /&gt;
| editHidden = N/A&lt;br /&gt;
| editMetadata = No&lt;br /&gt;
| notes = Doesn&#039;t support subdirectories.&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
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]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>CTPAX-X Team</name></author>
	</entry>
</feed>