<?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=The+coder</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=The+coder"/>
	<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/wiki/Special:Contributions/The_coder"/>
	<updated>2026-05-15T03:14:48Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.11</generator>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder&amp;diff=12535</id>
		<title>Eye of the Beholder</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder&amp;diff=12535"/>
		<updated>2025-10-30T06:37:41Z</updated>

		<summary type="html">&lt;p&gt;The coder: Added reference for very comprehensive EOB file formats description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedMoreInfo}}&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 = No&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;Eye of the Beholder&#039;&#039;&#039; is a Dungeon &amp;amp; Dragons role-playing video game for computers and video game consoles developed by [[:Category:Westwood Studios|Westwood Studios]]. A party of 4 adventurers explores the dungeons under Waterdeep in the Forgotten Realms. It was published by Strategic Simulations, Inc. in 1991 for the MS-DOS operating system and later ported to the Amiga, the Sega CD, Game Boy Advance and the SNES. The Sega CD version features an exclusive soundtrack composed by Yuzo Koshiro. &lt;br /&gt;
&lt;br /&gt;
There is a dedicated wiki for EOB file formats https://web.archive.org/web/20130923004015/http://eob.wikispaces.com/&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}{{GameFile&lt;br /&gt;
 | Name = *.pak&lt;br /&gt;
 | Format = [[PAK Format (Westwood)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = File archives&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.adl&lt;br /&gt;
 | Format = [[ADL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cps, *.ega, *.cmp&lt;br /&gt;
 | Format = [[Westwood CPS Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.pal, *.col&lt;br /&gt;
 | Format = [[VGA_Palette#The_.22Classic.22_format|6-bit RGB 256-colour palette]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Palette&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = item.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder item.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = itemtype.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder itemtype.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = text.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder text.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Strings&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.dat, *.dec&lt;br /&gt;
 | Format = [[Eye of the Beholder Decorations Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.fnt&lt;br /&gt;
 | Format = [[Westwood Font Format v2]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Fonts&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.inf, *.dro, *.elo&lt;br /&gt;
 | Format = [[Eye of the Beholder Maze Information Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Maps&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.maz&lt;br /&gt;
 | Format = [[Eye of the Beholder Maze Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Maps&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.sav&lt;br /&gt;
 | Format = [[Eye of the Beholder Save Game Format]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Save Game&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.vcn&lt;br /&gt;
 | Format = [[Eye of the Beholder VCN Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Tileset (View Cone)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.vmp&lt;br /&gt;
 | Format = [[Eye of the Beholder VMP Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Maps (View Cone)&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Westwood Studios]]&lt;br /&gt;
[[Category:3D dungeon]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Secret_Agent_encryption&amp;diff=11931</id>
		<title>Secret Agent encryption</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Secret_Agent_encryption&amp;diff=11931"/>
		<updated>2024-07-12T12:54:37Z</updated>

		<summary type="html">&lt;p&gt;The coder: typo fixed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most [[Secret Agent]] data files are encrypted, but not compressed: an encrypted file has exactly the same size as its corresponding unencrypted file.&lt;br /&gt;
&lt;br /&gt;
== Key ==&lt;br /&gt;
&lt;br /&gt;
Encrypting and decrypting files for Secret Agent depend on a key. The key consists of the string &amp;quot;Copyright 1991 Peder Jungck&amp;quot; followed by a null-character. So the length of the key is 28 characters.&lt;br /&gt;
&lt;br /&gt;
The first time the key is used (the first byte to decode), it is the ASCII code of the first character in the string.  So, it will be 67 (because the 67th entry in the ASCII table is &#039;C&#039;).  The second time (for the second byte to decode) it is 111 (&#039;o&#039;), and so on.  When all 28 characters are used, including the null-character, the key loops back to the beginning with 67 (&#039;C&#039;).&lt;br /&gt;
&lt;br /&gt;
The game appears to perform the decryption after reading in a particular amount of data, which means the key appears to reset (start again from 67/&#039;C&#039;) at the boundaries of these data chunks.  Thus when encrypting or decrypting a whole file in one go, the key must be reset after a particular number of bytes:&lt;br /&gt;
&lt;br /&gt;
* Level files (&amp;lt;tt&amp;gt;SAM?03.GFX&amp;lt;/tt&amp;gt;) - reset every 42 bytes.  If the value 0 is used to decrypt the 42nd byte in a chunk (instead of the expected character &#039;1&#039;) the last two bytes of the chunk will form a newline (0x0D0A), making the resulting file easier to read in a text editor.  While this won&#039;t produce the exact original file, it is harmless as the game only uses the first 40 bytes of each chunk in a level file.&lt;br /&gt;
* 8&amp;amp;times;8 sprite files (&amp;lt;tt&amp;gt;SAM?02.GFX&amp;lt;/tt&amp;gt;) - reset every 2048 bytes&lt;br /&gt;
* 16&amp;amp;times;16 sprite files (&amp;lt;tt&amp;gt;SAM?01.GFX&amp;lt;/tt&amp;gt;) - reset every 8064 bytes&lt;br /&gt;
&lt;br /&gt;
== Decryption ==&lt;br /&gt;
&lt;br /&gt;
For all bytes in a file, do:&lt;br /&gt;
&lt;br /&gt;
# Read a byte.&lt;br /&gt;
# Swap the order of the bits in the byte.  For example, 00000001 becomes 10000000, and 10110000 becomes 00001101.&lt;br /&gt;
# XOR this turned-around-byte with the next key-value.&lt;br /&gt;
# Return the result&lt;br /&gt;
&lt;br /&gt;
== Encryption ==&lt;br /&gt;
&lt;br /&gt;
Encryption is the reverse of decryption. So, after reading a byte, XOR it with the next key-value and then turn the bits around.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This encryption was reverse engineered by [[User:Frenkel|Frenkel]]. 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;
[[Category:Secret Agent]]&lt;br /&gt;
[[Category:Encryption algorithms]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=EXE_Format&amp;diff=9378</id>
		<title>EXE Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=EXE_Format&amp;diff=9378"/>
		<updated>2021-01-23T09:14:18Z</updated>

		<summary type="html">&lt;p&gt;The coder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Executable Infobox&lt;br /&gt;
 | Interpreted = N&lt;br /&gt;
 | Platform = MS-DOS&lt;br /&gt;
 | Code = 16-bit x86&lt;br /&gt;
 | Hidden = Y&lt;br /&gt;
}}&lt;br /&gt;
The &#039;&#039;&#039;EXE format&#039;&#039;&#039; is used by all but the smallest DOS games to store the machine code instructions for running the game itself.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
=== Signature ===&lt;br /&gt;
&lt;br /&gt;
The first two characters of the file are &amp;quot;MZ&amp;quot;.  The following values (see below) will indicate the size of the .exe file, however this should not be relied upon because it is not uncommon for additional data to be appended onto the end of the .exe.  The other header fields can however be inspected to ensure the values are sensible, particularly the ones about memory requirements which will never ask for more than 640 kB of memory, otherwise the file would not run on the majority of DOS machines.&lt;br /&gt;
&lt;br /&gt;
=== 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;
| [[char]] || signature[2] || &amp;quot;MZ&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || lenFinal || Size of final block in the file, or &amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt; if the final block is a full 512 bytes.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || numBlocks || Number of 512-byte blocks in the file, including the final block which may not be the full 512 bytes.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || numReloc || Number of entries in the relocation table.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || pgHeader || Number of 16-byte blocks (paragraphs) in the file header, including the &amp;quot;MZ&amp;quot; and up until the machine code starts.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || pgMemExtra || Number of 16-byte paragraphs of extra memory that must be allocated for the program to run.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || pgMemMax || If the program doesn&#039;t need all available memory, this value can limit it to a smaller number of paragraphs.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || segSS || Stack segment offset.  This value is added to the load segment and set as the stack segment (&amp;lt;tt&amp;gt;SS&amp;lt;/tt&amp;gt; register).&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || regSP || Initial value of the &amp;lt;tt&amp;gt;SP&amp;lt;/tt&amp;gt; (stack pointer/index into stack) register.  The stack is located at the segment:offset &amp;lt;tt&amp;gt;SS:SP&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || checknum || Usually ignored and set to zero.  Supposedly if all UINT16LE values in the file are summed they should equal zero, and this value can be tweaked to ensure that is the case.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || regIP || Initial value of the &amp;lt;tt&amp;gt;IP&amp;lt;/tt&amp;gt; (instruction pointer) register, where execution will actually begin.  This is normally 0x100 as DOS writes some information (the PSP) between memory offsets 0 and 0x100.  This means the first 0x100 bytes of the file are usually 0x00 bytes to avoid code getting overwritten, however to avoid wasting this space in the .exe files, some programs set &amp;lt;tt&amp;gt;regCS&amp;lt;/tt&amp;gt; to -16 which will cause everything to be shifted back by 0x100 bytes.  This means the code gets loaded at offset 0, then before it gets overwritten with the PSP &amp;lt;tt&amp;gt;regCS&amp;lt;/tt&amp;gt; is applied, changing the segment and making the code visible at offset 0x100 instead.  Thus the PSP can be written to memory before the code and execution begins at offset 0x100, without needing 0x100 bytes of zeroes at the start of the machine code.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || regCS || Offset for the &amp;lt;tt&amp;gt;CS&amp;lt;/tt&amp;gt; (code segment) register relative to the segment the code was loaded in.  Execution begins at &amp;lt;tt&amp;gt;CS:IP&amp;lt;/tt&amp;gt; so a value of &amp;lt;tt&amp;gt;1&amp;lt;/tt&amp;gt; would skip the first 16 bytes of code that follows the .exe header.  May be negative.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || offReloc || Offset of the first entry in the relocation table, relative to the start of the .exe file.  Increasing this value allows more data to be stored in the .exe header.  [[PKLite]] for example uses it to store a copyright message.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || overlayIndex || Overlay number, or zero for the main .exe file.  Rarely used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Additional data can appear in the header until &amp;lt;tt&amp;gt;offReloc&amp;lt;/tt&amp;gt; is reached where the relocation table begins.&lt;br /&gt;
&lt;br /&gt;
=== Relocation table ===&lt;br /&gt;
&lt;br /&gt;
The relocation table consists of a number of four-byte entries.  Beginning at offset &amp;lt;tt&amp;gt;offReloc&amp;lt;/tt&amp;gt; from the start of the file and continuing until &amp;lt;tt&amp;gt;numReloc&amp;lt;/tt&amp;gt; four-byte entries have been read.&lt;br /&gt;
&lt;br /&gt;
Additional data can appear after the relocation table, until offset &amp;lt;tt&amp;gt;pgHeader * 16&amp;lt;/tt&amp;gt; where the machine code begins.&lt;br /&gt;
&lt;br /&gt;
{{TODO|Explain how the relocation table works}}&lt;br /&gt;
&lt;br /&gt;
=== Machine code ===&lt;br /&gt;
&lt;br /&gt;
The actual machine code that runs begins at the end of the .exe header (file offset &amp;lt;tt&amp;gt;pgHeader * 16&amp;lt;/tt&amp;gt;) and continues until the last (possibly partial) block has been read.  This can be calculated like so:&lt;br /&gt;
&lt;br /&gt;
    lenCode = numBlocks * 512&lt;br /&gt;
    if (lenFinal != 0) {&lt;br /&gt;
        // Last block is not 512 but less than this, so adjust it.&lt;br /&gt;
        lenCode = lenCode - 512&lt;br /&gt;
        lenCode = lenCode + lenFinal&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
After this point it is possible for more data to be stored in the .exe, but it will not be loaded into memory by DOS and is essentially ignored.  Some games use this to store extra game data in their main .exe, opening their own .exe file at runtime to read out the extra data.  These can often be spotted by the fact that the .exe file is much larger than one that will typically fit into memory.&lt;br /&gt;
&lt;br /&gt;
To calculate the offset of this extra data, find the beginning of the code (&amp;lt;tt&amp;gt;pgHeader * 16&amp;lt;/tt&amp;gt;) and add the size of the code (&amp;lt;tt&amp;gt;lenCode&amp;lt;/tt&amp;gt; above).  This will be the offset of the trailing data, or if there is none, it will match the size of the .exe file itself.&lt;br /&gt;
&lt;br /&gt;
== Compression ==&lt;br /&gt;
&lt;br /&gt;
A few schemes exist to compress .exe files while still leaving them executable.  These work by compressing the original code and inserting a small decompression routine at the start of the data.  When DOS loads the .exe into memory, it ends up running the decompression routine instead of the original code.  This routine expands the compressed data and then passes control to it so the program appears to work as normal.  The trick with this process is figuring out how to decompress the data while using as little extra memory as possible, as most .exe files take up large amounts of memory and there is typically not enough memory to store both the compressed and decompressed code at the same time.  So the decompressor must carefully expand the data such that it overwrites only the compressed data that has already been decompressed and is no longer needed.&lt;br /&gt;
&lt;br /&gt;
Typically the .exe file headers are set up such that DOS will load both the decompression routine and the compressed code into memory at the same time, so the decompressor does not have to worry about opening and reading files.&lt;br /&gt;
&lt;br /&gt;
The individual compression schemes are documented on their own pages, but they refer back to the .exe headers described here.  There are many more schemes than listed here as this list only includes those used by games documented on this wiki.&lt;br /&gt;
&lt;br /&gt;
* [[LZEXE]]&lt;br /&gt;
* [[PKLite]]&lt;br /&gt;
&lt;br /&gt;
== Successors ==&lt;br /&gt;
&lt;br /&gt;
The .exe format has been extended to add functionality and to work on other platforms:&lt;br /&gt;
&lt;br /&gt;
* [[New Executable (NE) Format]] was introduced with 16-bit Windows.&lt;br /&gt;
* [[Linear Executable (LX/LE) Format]] adds 32-bit support and was used by many DOS games from the late 1990s running in protected mode (DOS4GW).&lt;br /&gt;
* [[Portable Executable (PE) Format]] was introduced with 32-bit Windows.&lt;br /&gt;
&lt;br /&gt;
Most of these extensions are backwards compatible in that a small &amp;quot;MZ&amp;quot; stub is included that prints an error if the file is run on a platform that does not support the extensions.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=exe}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = MS-DOS debug.exe&lt;br /&gt;
| Platform = MS-DOS&lt;br /&gt;
| canView = Yes&lt;br /&gt;
| canCreate = No&lt;br /&gt;
| canModify = No&lt;br /&gt;
| canCompress = No&lt;br /&gt;
| canDecompress = No&lt;br /&gt;
| editHidden = Yes&lt;br /&gt;
| notes = Loads into correct offsets, disassemble with &amp;quot;u&amp;quot; command.&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[LZEXE]]&lt;br /&gt;
| Platform = MS-DOS&lt;br /&gt;
| canView = No&lt;br /&gt;
| canCreate = No&lt;br /&gt;
| canModify = No&lt;br /&gt;
| canCompress = Yes, LZEXE&lt;br /&gt;
| canDecompress = No&lt;br /&gt;
| editHidden = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[PKLite]]&lt;br /&gt;
| Platform = MS-DOS&lt;br /&gt;
| canView = No&lt;br /&gt;
| canCreate = No&lt;br /&gt;
| canModify = No&lt;br /&gt;
| canCompress = Yes, PKLite&lt;br /&gt;
| canDecompress = Yes, PKLite&lt;br /&gt;
| editHidden = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[LZEXE|UNLZEXE]]&lt;br /&gt;
| Platform = MS-DOS&lt;br /&gt;
| canView = No&lt;br /&gt;
| canCreate = No&lt;br /&gt;
| canModify = No&lt;br /&gt;
| canCompress = No&lt;br /&gt;
| canDecompress = Yes, LZEXE&lt;br /&gt;
| editHidden = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://github.com/devbrain/mz-explode/ mz-explode]&lt;br /&gt;
| Platform = Portable&lt;br /&gt;
| canView = No&lt;br /&gt;
| canCreate = No&lt;br /&gt;
| canModify = No&lt;br /&gt;
| canCompress = No&lt;br /&gt;
| canDecompress = Yes, [[LZEXE|LZEXE]], [[PKLite|PKLite]], [[Knowledge Dynamics LZW COMPRESSOR|KNOWLEDGE DYNAMICS]], [[Microsoft EXEPACK|EXEPACK]]&lt;br /&gt;
| editHidden = No&lt;br /&gt;
| notes = C++ library&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
The .exe structure was taken from the [http://www.delorie.com/djgpp/doc/exe/ DJGPP documentation].  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>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Stargunner_Sprites_Format&amp;diff=9076</id>
		<title>Stargunner Sprites Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Stargunner_Sprites_Format&amp;diff=9076"/>
		<updated>2020-05-30T16:31:31Z</updated>

		<summary type="html">&lt;p&gt;The coder: Created page with &amp;quot;{{Tileset Infobox  | ImageNativeWidth = Y  | Hardware1 = VGA  | MaxTiles = 65535  | Palette = External  | Names = N  | TileMaxSize = 65535&amp;amp;times;65535  | NumPlanes = 1  | Plan...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tileset Infobox&lt;br /&gt;
 | ImageNativeWidth = Y&lt;br /&gt;
 | Hardware1 = VGA&lt;br /&gt;
 | MaxTiles = 65535&lt;br /&gt;
 | Palette = External&lt;br /&gt;
 | Names = N&lt;br /&gt;
 | TileMaxSize = 65535&amp;amp;times;65535&lt;br /&gt;
 | NumPlanes = 1&lt;br /&gt;
 | PlaneArrangement = Linear&lt;br /&gt;
 | HasTransparency = N&lt;br /&gt;
 | HasHitmap = Unknown&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subtilesets = N&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Hidden = N&lt;br /&gt;
 | Games = &lt;br /&gt;
   {{Game|Stargunner}}&lt;br /&gt;
}}&lt;br /&gt;
The &#039;&#039;&#039;Stargunner Sprites Format&#039;&#039;&#039; is used by [[Stargunner]] to store the graphics used to draw various objects.&lt;br /&gt;
&lt;br /&gt;
== Signature ==&lt;br /&gt;
&lt;br /&gt;
There is no signature, but careful parsing of the fields to ensure they have expected values can allow files to be detected.  There is no data trailing the &amp;lt;tt&amp;gt;pixelData&amp;lt;/tt&amp;gt; field, so if this field ends right at the end of the file, it is highly probable the file is in this format.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
The file begins with short header, followed by index table and raw pixels data&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || DWORD1 || Unknown. same as NUM&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || PAYLOAD || Length of pixel data&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || NUM || Number of sprites in this file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Sprite descriptors ===&lt;br /&gt;
Just after the header there are NUM of sprite descriptors. Every sprite descriptor is 40 bytes long&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || INDEX || Index number of this sprite&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || W || Width of this sprite in pixels (only low 16 bits are set)&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || H || Height of this sprite in pixels (only low 16 bits are set)&lt;br /&gt;
|-&lt;br /&gt;
| [[INT32LE]] || UNK1 || Unknown - roughly is W/2&lt;br /&gt;
|-&lt;br /&gt;
| [[INT32LE]] || UNK2 || Unknown - roughly is H/2&lt;br /&gt;
|-&lt;br /&gt;
| [[INT32LE]] || UNK3 || Unknown - may be negative&lt;br /&gt;
|-&lt;br /&gt;
| [[INT32LE]] || UNK4 || Unknown &lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || OFFSET1 || Offset to the data in the payload area&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || OFFSET2 || Unknown&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || OFFSET3 || Unknown&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Payload area ===&lt;br /&gt;
Just after the end of the sprite descriptors is the payload area. It starts at 3*sizeof(UINT32) + 40*NUM from the beginning of the file. Every offset in the sprite descriptor is relative to the payload area.&lt;br /&gt;
Sprites are stored as 8-bit play VGA image of W*H size&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Stargunner&amp;diff=9075</id>
		<title>Stargunner</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Stargunner&amp;diff=9075"/>
		<updated>2020-05-30T16:15:09Z</updated>

		<summary type="html">&lt;p&gt;The coder: &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 = No&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;
== File formats ==&lt;br /&gt;
Most of the data files for Stargunner are stored in &amp;lt;tt&amp;gt;STARGUN.DLT&amp;lt;/tt&amp;gt;, which is an archive file containing a number of other files. For the file format of &amp;lt;tt&amp;gt;STARGUN.DLT&amp;lt;/tt&amp;gt; itself, see [[DLT Format]].&lt;br /&gt;
&lt;br /&gt;
=== Files in &amp;lt;tt&amp;gt;STARGUN.DLT&amp;lt;/tt&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.anm&lt;br /&gt;
 | Format = [[ANM Format (Stargunner)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Definition of animation groups&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.ctl&lt;br /&gt;
 | Format = Plain text&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = In game texts&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.dfs&lt;br /&gt;
 | Format = INI file&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Definition of music and timings for animation cutscenes&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.evt&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Events script?&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.flc&lt;br /&gt;
 | Format = [http://woodshole.er.usgs.gov/operations/modeling/flc.html FLIC format]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Cutscene animations&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.mod&lt;br /&gt;
 | Format = [[https://en.wikipedia.org/wiki/Module_file MOD Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Background music&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.mpr&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Level maps?&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.pal&lt;br /&gt;
 | Format = 6-bit classic [[VGA Palette]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = VGA palette file&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.pcx&lt;br /&gt;
 | Format = [[PCX Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full screen image&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.pts&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = &lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.rec&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = &lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.seq&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = &lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.smp&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = &lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.spd&lt;br /&gt;
 | Format = [[Stargunner Sprites Format]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Sprite sheets&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.tld&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = &lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.tlr&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = &lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.wav&lt;br /&gt;
 | Format = [https://en.wikipedia.org/wiki/WAV Microsoft RIFF wave files]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.xlt&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the official release these files are all compressed when stored inside the DLT file.  Each compressed file begins with the string &amp;quot;PGBP&amp;quot;, however if this signature is missing the game will use the data as is, without attempting to decompress it first.  Thus it is possible to replace files with uncompressed versions and the game will still work correctly.&lt;br /&gt;
&lt;br /&gt;
* The game does NOT check for the existence of files in the current directory, they must be inside the DLT to be seen.&lt;br /&gt;
* If a file is removed (or renamed) inside the DLT, the game will still refuse to check the current directory and appears to continue somewhat unpredictably, as if the file was loaded successfully even though it wasn&#039;t.&lt;br /&gt;
* If the DLT file is missing, the game will still not look for files in the current directory, and will complain about the absent DLT file being the wrong version.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto]]&lt;br /&gt;
| Platform = Linux/Windows&lt;br /&gt;
| grp = No decompression&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Wombat]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = View&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Apogee]]&lt;br /&gt;
[[Category:Sidescroller]]&lt;br /&gt;
[[Category:Space Invaders]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Stargunner&amp;diff=9060</id>
		<title>Stargunner</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Stargunner&amp;diff=9060"/>
		<updated>2020-05-17T07:18:51Z</updated>

		<summary type="html">&lt;p&gt;The coder: Refactoring&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 = No&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;
== File formats ==&lt;br /&gt;
Most of the data files for Stargunner are stored in &amp;lt;tt&amp;gt;STARGUN.DLT&amp;lt;/tt&amp;gt;, which is an archive file containing a number of other files. For the file format of &amp;lt;tt&amp;gt;STARGUN.DLT&amp;lt;/tt&amp;gt; itself, see [[DLT Format]].&lt;br /&gt;
&lt;br /&gt;
=== Files in &amp;lt;tt&amp;gt;STARGUN.DLT&amp;lt;/tt&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.anm&lt;br /&gt;
 | Format = [[ANM Format (Stargunner)]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Definition of animation groups&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.ctl&lt;br /&gt;
 | Format = Plain text&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = In game texts&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.dfs&lt;br /&gt;
 | Format = INI file&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Definition of music and timings for animation cutscenes&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.evt&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Events script?&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.flc&lt;br /&gt;
 | Format = [http://woodshole.er.usgs.gov/operations/modeling/flc.html FLIC format]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Cutscene animations&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.mod&lt;br /&gt;
 | Format = [[https://en.wikipedia.org/wiki/Module_file MOD Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Background music&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.mpr&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Level maps?&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.pal&lt;br /&gt;
 | Format = 6-bit classic [[VGA Palette]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = VGA palette file&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.pcx&lt;br /&gt;
 | Format = [[PCX Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full screen image&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.pts&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = &lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.rec&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = &lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.seq&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = &lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.smp&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = &lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.spd&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = &lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.tld&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = &lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.tlr&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = &lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.wav&lt;br /&gt;
 | Format = [https://en.wikipedia.org/wiki/WAV Microsoft RIFF wave files]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.xlt&lt;br /&gt;
 | Format = &lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the official release these files are all compressed when stored inside the DLT file.  Each compressed file begins with the string &amp;quot;PGBP&amp;quot;, however if this signature is missing the game will use the data as is, without attempting to decompress it first.  Thus it is possible to replace files with uncompressed versions and the game will still work correctly.&lt;br /&gt;
&lt;br /&gt;
* The game does NOT check for the existence of files in the current directory, they must be inside the DLT to be seen.&lt;br /&gt;
* If a file is removed (or renamed) inside the DLT, the game will still refuse to check the current directory and appears to continue somewhat unpredictably, as if the file was loaded successfully even though it wasn&#039;t.&lt;br /&gt;
* If the DLT file is missing, the game will still not look for files in the current directory, and will complain about the absent DLT file being the wrong version.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto]]&lt;br /&gt;
| Platform = Linux/Windows&lt;br /&gt;
| grp = No decompression&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Wombat]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = View&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Apogee]]&lt;br /&gt;
[[Category:Sidescroller]]&lt;br /&gt;
[[Category:Space Invaders]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Terminal_Velocity&amp;diff=8133</id>
		<title>Terminal Velocity</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Terminal_Velocity&amp;diff=8133"/>
		<updated>2018-10-14T09:01:34Z</updated>

		<summary type="html">&lt;p&gt;The coder: link fixed&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 = No&lt;br /&gt;
 | Sound = Edit&lt;br /&gt;
 | Music = Edit&lt;br /&gt;
 | Text = Edit&lt;br /&gt;
 | Story = Edit&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Terminal Velocity]] is a first-person aerial shooter.  The later Fury&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; engine is backwards compatible enough that it can run Terminal Velocity without modification.&lt;br /&gt;
&lt;br /&gt;
== File formats ==&lt;br /&gt;
&lt;br /&gt;
This section lists the major file formats used in the game.&lt;br /&gt;
&lt;br /&gt;
All text files are in DOS format (CRLF line endings).&lt;br /&gt;
&lt;br /&gt;
* [[POD Format]] - group file storing most of the game data.&lt;br /&gt;
* [[WAV Format]] - The RemoteRidicule and other game sounds are stored in .WAV files.&lt;br /&gt;
* [[VOX Format (Terminal Velocity)|VOX Format]] - The level order seems to be stored in these files, as well as the audio config file &amp;lt;tt&amp;gt;VOX.INI&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* [[INI Format]] - Used for POD mounting and configuration. The file &amp;lt;tt&amp;gt;POD.INI&amp;lt;/tt&amp;gt; starts with a number specifying the number of PODs to mount, subsequent lines are the file names of the PODs to load. The configuration file &amp;lt;tt&amp;gt;SETUP.CFG&amp;lt;/tt&amp;gt; seems to be in standard .INI format.&lt;br /&gt;
&lt;br /&gt;
=== POD files ===&lt;br /&gt;
&lt;br /&gt;
The POD files contain a number of other data files:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Filename !! Purpose !! Format&lt;br /&gt;
|-&lt;br /&gt;
| art\*.raw || Textures || 64x64 8bpp images (no header)&lt;br /&gt;
|-&lt;br /&gt;
| art\*.act || Palettes || 6-bit [[VGA Palette]]&lt;br /&gt;
|-&lt;br /&gt;
| data\*.clr || unknown || 256x256 8bpp image (no header)&lt;br /&gt;
|-&lt;br /&gt;
| data\*.def || unknown || ASCII text&lt;br /&gt;
|-&lt;br /&gt;
| data\*.nav || Waypoints || ASCII text, first line is number of waypoints&lt;br /&gt;
|-&lt;br /&gt;
| data\*.raw || Level heightmap || 256x256 8bpp image (no header)&lt;br /&gt;
|-&lt;br /&gt;
| data\*.tdf || unknown || ASCII text&lt;br /&gt;
|-&lt;br /&gt;
| data\*.tex || List of textures || ASCII text, one filename per line, first line is decimal texture count&lt;br /&gt;
|-&lt;br /&gt;
| data\*.txt || Level introduction/story || ASCII text, first line is model to show, second line is texture to render it with, rest of file is shown in story window&lt;br /&gt;
|-&lt;br /&gt;
| levels\*.lvl || Level info || ASCII text (which files to use for this level)&lt;br /&gt;
|-&lt;br /&gt;
| music\*.mod || Music || Six-channel [[MOD Format]]&lt;br /&gt;
|-&lt;br /&gt;
| sound\*.wav || Sound effects || [[WAV Format]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto]]&lt;br /&gt;
| Platform = Linux/Windows&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://mtm2.com/~mtmg/cpod/about.shtml C-POD]&lt;br /&gt;
| Platform = Windows GUI&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = No&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 = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://www.wolfensteingoodies.com/archives/geocities/TimesSquare/8271/index.html GFE (Game File Explorer)]&lt;br /&gt;
| Platform = Windows GUI&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = Export&lt;br /&gt;
| gfx = Export&lt;br /&gt;
| mus = Export&lt;br /&gt;
| sfx = Export&lt;br /&gt;
| txt = Export&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* Lots of information on the [https://web.archive.org/web/20160729125600/http://rewiki.regengedanken.de:80/wiki/Terminal_Velocity REwiki Terminal Velocity] page&lt;br /&gt;
&lt;br /&gt;
[[Category:3DRealms]]&lt;br /&gt;
[[Category:3D]]&lt;br /&gt;
[[Category:Flight Sim]]&lt;br /&gt;
[[Category:First-Person Shooter]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=MID_Format&amp;diff=5985</id>
		<title>MID Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=MID_Format&amp;diff=5985"/>
		<updated>2015-01-28T11:52:47Z</updated>

		<summary type="html">&lt;p&gt;The coder: /* External links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Music Infobox&lt;br /&gt;
 | Type = MIDI&lt;br /&gt;
 | Instruments = MIDI&lt;br /&gt;
 | NumChannels = 16&lt;br /&gt;
 | NumTracks = 65535&lt;br /&gt;
 | Game1 = Blood&lt;br /&gt;
 | Game2 = Boppin&#039;&lt;br /&gt;
 | Game3 = Duke Nukem 3D&lt;br /&gt;
 | Game4 = Hi Octane&lt;br /&gt;
 | Game5 = Hocus Pocus&lt;br /&gt;
 | Game6 = Magic Pockets&lt;br /&gt;
 | Game7 = Prince of Persia&lt;br /&gt;
 | Game8 = Rise of the Triad&lt;br /&gt;
 | Game9 = Sango Fighter&lt;br /&gt;
 | Game10 = Shadow Warrior&lt;br /&gt;
 | Game11 = SimCity 2000&lt;br /&gt;
 | Game12 = Wacky Wheels&lt;br /&gt;
 | Game13 = Where In the World Is Carmen Sandiego?&lt;br /&gt;
}}&lt;br /&gt;
The &amp;lt;b&amp;gt;&amp;lt;u&amp;gt;M&amp;lt;/u&amp;gt;usical &amp;lt;u&amp;gt;I&amp;lt;/u&amp;gt;nstrument &amp;lt;u&amp;gt;D&amp;lt;/u&amp;gt;igital &amp;lt;u&amp;gt;I&amp;lt;/u&amp;gt;nterface (MIDI) file format&amp;lt;/b&amp;gt; is used for storing the notes required to accurately reproduce a song.  Commercial instruments are available that &amp;quot;speak&amp;quot; the MIDI protocol, and a MIDI file (.mid) simply stores the data sent over the wire, with a few headers on the front.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
A MIDI file starts with an overall &#039;&#039;MThd&#039;&#039; header, followed by one or more &#039;&#039;MTrk&#039;&#039; headers for each &amp;quot;track&amp;quot; (a track is normally created for each instrument, for simplicity when the song is being composed.)&lt;br /&gt;
&lt;br /&gt;
=== MThd Header ===&lt;br /&gt;
The file begins with a 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;
|BYTE[4]||cSignature||&amp;quot;MThd&amp;quot; (not NULL-terminated)&lt;br /&gt;
|-&lt;br /&gt;
|UINT32BE||iLength||Length of MThd block (usually 6)&lt;br /&gt;
|-&lt;br /&gt;
|UINT16BE||iType||0, 1 or 2 (for format-0, 1 or 2)&lt;br /&gt;
|-&lt;br /&gt;
|UINT16BE||iNumTracks||Number of tracks (will be 1 for format-0)&lt;br /&gt;
|-&lt;br /&gt;
|UINT16BE||iTicksPerQuarterNote||Number of MIDI delay ticks in a quarter-note&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If the high bit in &amp;lt;tt&amp;gt;iTicksPerQuarterNote&amp;lt;/tt&amp;gt; is set (0x8000) then the file uses SMPTE timing instead, which is rare and not covered here.&lt;br /&gt;
&lt;br /&gt;
=== MTrk block ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;MTrk&#039;&#039; block is repeated once for each track in the song (the &#039;&#039;&#039;iNumTracks&#039;&#039;&#039; field in the MThd 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;
|BYTE[4]||cSignature||&amp;quot;MTrk&amp;quot; (not NULL-terminated)&lt;br /&gt;
|-&lt;br /&gt;
|UINT32BE||iLength||Length of block&lt;br /&gt;
|-&lt;br /&gt;
|BYTE[iLength]||cData||MIDI data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MIDI data ===&lt;br /&gt;
&lt;br /&gt;
The MIDI data consists of a delay value (in MIDI variable-length integer notation), followed by a MIDI event byte (see [[#MIDI events]] below.)  The event data follows, and will be different depending on the event.  It then starts again with the delay value for the next event.&lt;br /&gt;
&lt;br /&gt;
==== MIDI lengths ====&lt;br /&gt;
&lt;br /&gt;
MIDI lengths are stored as variable length integers, between one and four bytes long.  Each byte only uses the lower 7-bits, with the MSB set if there is another length byte following.  The bytes are in big endian order.  Some examples of these length bytes are:&lt;br /&gt;
&lt;br /&gt;
  50      // Hex value 0x50&lt;br /&gt;
  81 50   // Hex value 0xD0 ((0x81 &amp;amp; 0x7F) &amp;gt;&amp;gt; 1) | (0x50 &amp;amp; 0x7F)&lt;br /&gt;
&lt;br /&gt;
Here is some C code to read these values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
const char *midi_data = &amp;quot;\x81\x50&amp;quot;;&lt;br /&gt;
unsigned long val = 0;&lt;br /&gt;
&lt;br /&gt;
for (int i = 0; i &amp;lt; 4; i++) {&lt;br /&gt;
&lt;br /&gt;
	// Include the lower 7-bits of this byte into the value&lt;br /&gt;
	val |= midi_data[i] &amp;amp; 0x7F;&lt;br /&gt;
&lt;br /&gt;
	// If the high bit is set, shift the value up&lt;br /&gt;
	// seven bits to make room for the next value&lt;br /&gt;
	if (midi_data[i] &amp;amp; 0x80) val &amp;lt;&amp;lt;= 7;&lt;br /&gt;
	else break; // High bit unset means end of value&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
printf(&amp;quot;Value is %lu\n&amp;quot;, val);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generally speaking, MIDI data that can be sent over the wire uses these values (e.g. delays), whereas data only used to write .mid files on disk (e.g. MTrk lengths in bytes) use normal big-endian fixed-length values.&lt;br /&gt;
&lt;br /&gt;
==== MIDI events ====&lt;br /&gt;
&lt;br /&gt;
This table lists the different MIDI events that can occur in a song.  The events are listed as channel zero (e.g. 0x80, which would become 0x85 for channel five.)  Removing the high bit (&amp;lt;code&amp;gt;(byte &amp;amp; 0x7F) &amp;gt;&amp;gt; 4&amp;lt;/code&amp;gt;) will give the &#039;event number&#039;.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Register value!!Event number!!Data size!!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|0x80||0||2||Note off&lt;br /&gt;
|-&lt;br /&gt;
|0x90||1||2||Note on&lt;br /&gt;
|-&lt;br /&gt;
|0xA0||2||2||Polyphonic key pressure&lt;br /&gt;
|-&lt;br /&gt;
|0xB0||3||2||Controller&lt;br /&gt;
|-&lt;br /&gt;
|0xC0||4||1||Instrument change&lt;br /&gt;
|-&lt;br /&gt;
|0xD0||5||1||Channel pressure&lt;br /&gt;
|-&lt;br /&gt;
|0xE0||6||2||Pitch bend&lt;br /&gt;
|-&lt;br /&gt;
|0xF0||7||Any||Sysex&lt;br /&gt;
|-&lt;br /&gt;
|0xFF||N/A||Any||Meta-event&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data bytes for each event are described in the sections below.&lt;br /&gt;
&lt;br /&gt;
Each event is preceded by a delay (as a MIDILEN variable-length integer, see [[#MIDI lengths]] above) which specifies the number of MIDI ticks until the event should be actioned.&lt;br /&gt;
&lt;br /&gt;
To convert the number of MIDI ticks into a usable time value, the &amp;lt;tt&amp;gt;iTicksPerQuarterNote&amp;lt;/tt&amp;gt; field from the header will allow the tick count to be converted into a fractional number of quarter notes, then the song&#039;s tempo (in microseconds per quarter note) will allow this fractional number of quarter notes to be converted into microseconds.&lt;br /&gt;
&lt;br /&gt;
The default tempo of 500,000 microseconds per quarter note applies until overridden by a [[#0x51: Set tempo|set-tempo]] event.&lt;br /&gt;
&lt;br /&gt;
===== Running-status =====&lt;br /&gt;
&lt;br /&gt;
Any event values without the high-bit set (i.e. less than 0x80) are so-called &amp;quot;running status&amp;quot; values.  If one of these bytes is encountered as a MIDI event, it is actually the first data byte of the event instead.  The actual event is the same as the previous one.  For example, these two lines are equivalent: (delay bytes omitted for clarity)&lt;br /&gt;
&lt;br /&gt;
 90 40 7F   91 44 7F   91 47 7F   81 44 7F  (full syntax)&lt;br /&gt;
 90 40 7F   91 44 7F      47 7F      44 00  (with running status)&lt;br /&gt;
&lt;br /&gt;
This means:&lt;br /&gt;
* 90 40 7F: Turn note 0x40 on channel 0 at maximum velocity&lt;br /&gt;
* 91 44 7F: Then turn note 0x44 on channel 1 at maximum velocity&lt;br /&gt;
* 47 7F: Turn note 0x47 on the same channel (running status means use event 0x91 from before)&lt;br /&gt;
* 44 00: Turn note 0x44 off on the same channel (running status uses event 0x91 again, and takes advantage of note-on at zero velocity being the same as note-off)&lt;br /&gt;
&lt;br /&gt;
Meta-events do not affect running status, so any event from 0xF0 to 0xFF can appear in the middle of data without affecting the running status.  For example the following line is equivalent to the two lines above:&lt;br /&gt;
&lt;br /&gt;
 90 40 7F   91 44 7F   FF 01 02 AA BB   47 7F   F0 02 AA F7   44 00&lt;br /&gt;
&lt;br /&gt;
===== 0x80: Note off =====&lt;br /&gt;
Stops the specified note from sounding on this channel.  Does not affect any other notes currently being played on the same channel.  A note-on event with a velocity of zero is the same as a note-off event.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data bytes!!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|UINT8 iNote||MIDI note number to key-off (0-127)&lt;br /&gt;
|-&lt;br /&gt;
|UINT8 iVelocity||How hard to release the note (0-127)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== 0x90: Note on =====&lt;br /&gt;
Plays the specified note on the given channel.  Multiple notes can be sounding at the same time on the same channel.  A velocity of zero is the same as a note-off event (this is often used with running status to minimise the amount of data used.)&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data bytes!!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|UINT8 iNote||MIDI note number to key-on (0-127)&lt;br /&gt;
|-&lt;br /&gt;
|UINT8 iVelocity||How hard to press the note (0-127)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== 0xA0: Polyphonic key pressure =====&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data bytes!!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|UINT8 iPressure||Pressure value (0-127)&lt;br /&gt;
|-&lt;br /&gt;
|UINT8 iNote||MIDI note number to affect (0-127)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== 0xB0: Controller =====&lt;br /&gt;
Set a MIDI controller to the specified value.  TODO: List of standard controllers&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data bytes!!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|UINT8 iController||Controller index (0-127)&lt;br /&gt;
|-&lt;br /&gt;
|UINT8 iValue||Value to set (0-127)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== 0xC0: Instrument change =====&lt;br /&gt;
Set the channel to the specified instrument.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data bytes!!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|UINT8 iInstrument||Instrument number (0-127)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== 0xD0: Channel pressure =====&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data bytes!!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|UINT8 iPressure||Pressure value (0-127)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== 0xE0: Pitch bend =====&lt;br /&gt;
Bend all notes on the channel up or down by the specified amount.  The value is between 0 and 16384.  The value 8192 is in the middle and means no bend, thus 8192 can be subtracted from this the value to create a signed integer between -8192 and +8191, with zero meaning &amp;quot;no bend.&amp;quot;  The actual pitch resulting from the bend depends on the range, which is set (usually at the start of the song) by a MIDI controller message.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data bytes!!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|UINT8 iLSB||Least significant byte (0-127)&lt;br /&gt;
|-&lt;br /&gt;
|UINT8 iMSB||Most significant byte (0-127)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The value is calculated by combining the lower seven bits from each of the two bytes into a single 14-bit value: &amp;lt;code&amp;gt;value = (iMSB &amp;lt;&amp;lt; 7) | iLSB&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== 0xF0: System exclusive =====&lt;br /&gt;
These messages are used to send proprietary commands to various MIDI devices.  They are essentially a list of raw bytes to send.  The channel is not used, so 0xF0 through 0xFF are different &amp;quot;sysex&amp;quot; messages.  Since 0xFF is used as a reset it would have no use in a .mid file on disk, so this event is used for meta-events described below.&lt;br /&gt;
&lt;br /&gt;
The event type (0xF0 to 0xFE) is followed by this structure:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data bytes!!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|MIDILEN iLength||Length of data&lt;br /&gt;
|-&lt;br /&gt;
|UINT8 cData[iLength]||Block of data, iLength bytes long&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Event 0xFF has a different structure and is covered below.  The event types are defined as follows:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Event type!!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|0xF0||Start system exclusive event&lt;br /&gt;
|-&lt;br /&gt;
|0xF1||MIDI time code&lt;br /&gt;
|-&lt;br /&gt;
|0xF2||Song position pointer&lt;br /&gt;
|-&lt;br /&gt;
|0xF3||Song select&lt;br /&gt;
|-&lt;br /&gt;
|0xF4||(Unused)&lt;br /&gt;
|-&lt;br /&gt;
|0xF5||(Unused)&lt;br /&gt;
|-&lt;br /&gt;
|0xF6||Tune request&lt;br /&gt;
|-&lt;br /&gt;
|0xF7||End system exclusive event (EOX)&lt;br /&gt;
|-&lt;br /&gt;
|0xF8||Timing clock&lt;br /&gt;
|-&lt;br /&gt;
|0xF9||(Unused)&lt;br /&gt;
|-&lt;br /&gt;
|0xFA||Start playback&lt;br /&gt;
|-&lt;br /&gt;
|0xFB||Continue playback&lt;br /&gt;
|-&lt;br /&gt;
|0xFC||Stop playback&lt;br /&gt;
|-&lt;br /&gt;
|0xFD||(Unused)&lt;br /&gt;
|-&lt;br /&gt;
|0xFE||Active sensing&lt;br /&gt;
|-&lt;br /&gt;
|0xFF||System reset (used for meta-event in a MIDI file)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Meta events ====&lt;br /&gt;
&lt;br /&gt;
Meta events are events specific to MIDI files themselves.  They are not transmitted to MIDI devices.  A meta event is signalled by the 0xFF system exclusive event.  The following table lists the format of the bytes following the 0xFF.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data bytes!!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|UINT8 iType||Meta-event type&lt;br /&gt;
|-&lt;br /&gt;
|MIDILEN iLength||Length of event data&lt;br /&gt;
|-&lt;br /&gt;
|UINT8 cData[iLength]||Event data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following section lists the meaning of various values of &amp;lt;tt&amp;gt;iType&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== 0x01 - 0x0F: Text =====&lt;br /&gt;
These events set various types of text.  The event data is the text to set.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Event type!!Text use&lt;br /&gt;
|-&lt;br /&gt;
|0x01||Generic text event.  Often the first text event in a song is used as its title.&lt;br /&gt;
|-&lt;br /&gt;
|0x02||Copyright notice&lt;br /&gt;
|-&lt;br /&gt;
|0x03||Track name.  Often the first event (format-0) or the first track (format-1) is the song title.&lt;br /&gt;
|-&lt;br /&gt;
|0x04||Instrument name&lt;br /&gt;
|-&lt;br /&gt;
|0x05||Lyric&lt;br /&gt;
|-&lt;br /&gt;
|0x06||Marker&lt;br /&gt;
|-&lt;br /&gt;
|0x07||Cue point (e.g. stage instructions)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== 0x2F: End of track =====&lt;br /&gt;
Mandatory event at the end of each MTrk track.  The length field is always zero, so there are no bytes of event data.&lt;br /&gt;
&lt;br /&gt;
===== 0x51: Set tempo =====&lt;br /&gt;
This event should always have a length of three.  The event data is a big-endian integer (&#039;&#039;&#039;not&#039;&#039;&#039; in MIDI variable-length notation) indicating the number of microseconds in a quarter note.  Together with the &amp;lt;tt&amp;gt;iTicksPerQuarterNote&amp;lt;/tt&amp;gt; value from the header, this allows MIDI ticks to be converted into microseconds for correct playback speed of the MIDI file.&lt;br /&gt;
&lt;br /&gt;
Unless overridden by this event, the number of microseconds in a quarter note defaults to 500,000.&lt;br /&gt;
&lt;br /&gt;
===== 0x7F: Manufacturer-specific =====&lt;br /&gt;
The first data byte of this event is a manufacturer ID.  If it is 0x00, then the following [[UINT16BE]] is the actual manufacturer ID.  This means either one or three bytes total will be read to obtain the manufacturer ID.&lt;br /&gt;
&lt;br /&gt;
If the manufacturer ID is 0x3F then it is an Ad Lib, Inc. event, and the file format is technically &amp;lt;tt&amp;gt;.mdi&amp;lt;/tt&amp;gt; (an Ad Lib MIDI file with embedded OPL instruments.)  In this case, read another UINT16BE to obtain the opcode, then the data following the opcode is arranged as:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Opcode !! Purpose !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Instrument change || 29 data bytes follow:&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Type&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Name&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[UINT8]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;voice&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;MIDI channel number to assign instrument to&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;BNK_ENTRY&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;patch&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;OPL register settings&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Sound mode || One data byte.  0=melodic/rhythm-off, 1=percussive/rhythm-on&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Pitch bend range || One data byte, value in range 1-12 inclusive. {{TODO|Explain how this works}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;BNK_ENTRY&amp;lt;/tt&amp;gt; is defined as follows: (note this is identical to the layout of an instrument inside a [[AdLib Instrument Bank Format]] .bnk file.  See that article for the explanation of the &amp;lt;tt&amp;gt;OPLREGS&amp;lt;/tt&amp;gt; structure.)&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;
| [[AdLib Instrument Bank Format|OPLREGS]] || oplModulator || Register values for the Modulator operator (op 0)&lt;br /&gt;
|-&lt;br /&gt;
| [[AdLib Instrument Bank Format|OPLREGS]] || oplCarrier || Register values for the Carrier operator (op 1)&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || iModWaveSel || Modulator wave select (OPL base register 0xE0)&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || iCarWaveSel || Carrier wave select (OPL base register 0xE0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Additional meta-events =====&lt;br /&gt;
&lt;br /&gt;
Other meta-events (not so important for playing back game music) are listed on various web sites:&lt;br /&gt;
&lt;br /&gt;
* http://www.omega-art.com/midi/mfiles.html#meta&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
* [[DRO2MIDI]] - converts .dro files into [[MID Format|.mid files]]&lt;br /&gt;
&lt;br /&gt;
== Similar formats ==&lt;br /&gt;
* [[CMF Format|CMF files]] store their song data in MIDI format.&lt;br /&gt;
* [[MUS Format|MUS files]] are single-track MIDI files made by id Software.&lt;br /&gt;
* [[XMI Format|XMI files]] are Extended MIDI files.&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* https://web.archive.org/web/20070104033706/http://www.cybermuff.cz/music/MIDIspec.htm - great reference for the MIDI spec&lt;br /&gt;
&lt;br /&gt;
[[Category:Build engine]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=OPL_chip&amp;diff=5984</id>
		<title>OPL chip</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=OPL_chip&amp;diff=5984"/>
		<updated>2015-01-28T11:48:57Z</updated>

		<summary type="html">&lt;p&gt;The coder: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Programmer&#039;s Guide to Yamaha YMF 262/OPL3 FM Music Synthesizer =&lt;br /&gt;
Version 1.00  Nov-24-1994&lt;br /&gt;
&lt;br /&gt;
Written by Vladimir Arnost, QA-Software&lt;br /&gt;
Internet:  xarnos00@dcse.fee.vutbr.cz&lt;br /&gt;
&lt;br /&gt;
This manual can be distributed freely if not modified.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&lt;br /&gt;
I assume no responsibility for any damages arising out of use or inability to use this text. No warranty is provided about correctness of any information in this file. You are on your own.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The chip I am going to describe is getting more and more common, but programming information is still scarce, so I have decided to fill in this gap. All information contained in this file is a result of my experience in Adlib programming, research (read: reverse engineering) and finally of my effort to write down everything necessary to understand and use this piece of hardware. No official sources (i.e. development kits, books about this topic, etc.) were available to me except:&lt;br /&gt;
&lt;br /&gt;
: Adlib Programming Guide - by Tero Töttö, and&lt;br /&gt;
: The PC Games Programmers Encyclopedia V1.0&lt;br /&gt;
&lt;br /&gt;
The information below is a combination of known features of Adlib (alias Yamaha YM 3812/OPL2) and my own uncountable experiments and failures, which brought out a lot of important details you have to know about the chip.&lt;br /&gt;
&lt;br /&gt;
As far as I know, there are four major sound cards based on OPL3 chip:&lt;br /&gt;
&lt;br /&gt;
* Sound Blaster Pro II (not Sound Blaster Pro I)&lt;br /&gt;
* Sound Blaster 16&lt;br /&gt;
* Adlib Gold&lt;br /&gt;
* Pro Audio Spectrum Plus/16&lt;br /&gt;
&lt;br /&gt;
I currently have a Sound Blaster Pro II-compatible card only, so all the programming info I provide will be based on this card. (The other cards are quite similar, however. They are just wired at different I/O-port addresses.)&lt;br /&gt;
&lt;br /&gt;
Note: I assume some knowledge of FM music programming (mainly Adlib FM synthesizer) in this manual. If you are new to this topic I recommend you try Adlib first before going higher. Anyway, OPL3 is a direct descendant of OPL2 (what a surprise), so most features of OPL2 are also present on OPL3.&lt;br /&gt;
&lt;br /&gt;
== Description of the Synthesizer ==&lt;br /&gt;
&lt;br /&gt;
My card&#039;s user manual says: &amp;quot;[this card contains] ... a stereo music FM synthesizer with 20 channels consisting of four (4) operators each ... &amp;quot; I thought: &amp;quot;Wow -- that&#039;s together eighty operators. This must be a GOOD sound-card.&amp;quot; I was wrong. Just another advertising lie.&lt;br /&gt;
&lt;br /&gt;
So let&#039;s clear some facts. First, OPL3 has only thirty-six (36) operators which can be combined in several ways:&lt;br /&gt;
&lt;br /&gt;
* 18 FM channels (36 operators), or&lt;br /&gt;
* 15 FM channels (30 ops) and 5 percussion instruments (6 ops), giving us 20 channels altogether, or&lt;br /&gt;
* up to 6 four-operator FM channels (max 24 ops), the rest again being divided into two-operator FM channels and drums.&lt;br /&gt;
&lt;br /&gt;
From the table above you can see that not all channels can be used in four-operator (4-OP) mode -- only a part of the synthesizer is really capable of making 4-OP sounds -- the rest uses traditional two-operator (2-OP) mode.&lt;br /&gt;
&lt;br /&gt;
Second, the manual states this card is capable of &amp;quot;stereo&amp;quot; music. Yes, the quotes are necessary, because the stereo capabilities are very limited. You are given ability to control output going to left or right channel by turning it on and off. That&#039;s all. So the sound can flow from very left side, center and very right side. No sound panning, no special stereo effects. :-(&lt;br /&gt;
&lt;br /&gt;
Well, flaming apart, back to the main topic.&lt;br /&gt;
&lt;br /&gt;
The OPL3 chip is capable of making sounds in several ways:&lt;br /&gt;
&lt;br /&gt;
=== Two-operator Additive Synthesis ===&lt;br /&gt;
&lt;br /&gt;
Output of both operators is simply added. It is the simplest way to make any sound, and it works on both OPL2 and OPL3. The diagram should make it clear.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	┌────────────┐&lt;br /&gt;
	│            │&lt;br /&gt;
	│ Operator 1 ├────────┐&lt;br /&gt;
	│            │        │&lt;br /&gt;
	└────────────┘        │&lt;br /&gt;
			      ├────────&amp;gt; Output&lt;br /&gt;
	┌────────────┐        │&lt;br /&gt;
	│            │        │&lt;br /&gt;
	│ Operator 2 ├────────┘&lt;br /&gt;
	│            │&lt;br /&gt;
	└────────────┘&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Two-operator Frequency Modulation (FM) Synthesis ===&lt;br /&gt;
&lt;br /&gt;
Output from the first operator (Modulator) is sent to the input of the second one (Carrier) and is used to modulate (alter) frequency of the second operator. Only the second operator produces sound. Most of interesting sounds are made this way. This also works on OPL2. Hope the picture helps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	┌────────────┐         ┌────────────┐&lt;br /&gt;
	│            │         │            │&lt;br /&gt;
	│ Operator 1 ├────────&amp;gt;│ Operator 2 ├────────&amp;gt; Output&lt;br /&gt;
	│(Modulator) │         │ (Carrier)  │&lt;br /&gt;
	└────────────┘         └────────────┘&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Four-operator &amp;quot;Mess&amp;quot; Modulation Synthesis ===&lt;br /&gt;
&lt;br /&gt;
All of OPL3&#039;s 4-OP configurations are combinations of the above two modes of synthesis. OPL3 combines these two modes in four ways. I have no words to describe these four ways. Only the pictures can show their principle.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   a) FM-FM Mode&lt;br /&gt;
&lt;br /&gt;
	┌───────┐      ┌───────┐      ┌───────┐      ┌───────┐&lt;br /&gt;
	│       │      │       │      │       │      │       │&lt;br /&gt;
	│ Op. 1 ├─────&amp;gt;│ Op. 2 ├─────&amp;gt;│ Op. 3 ├─────&amp;gt;│ Op. 4 ├─────&amp;gt; Output&lt;br /&gt;
	│       │      │       │      │       │      │       │&lt;br /&gt;
	└───────┘      └───────┘      └───────┘      └───────┘&lt;br /&gt;
&lt;br /&gt;
   b) AM-FM Mode&lt;br /&gt;
&lt;br /&gt;
	┌───────┐&lt;br /&gt;
	│       │&lt;br /&gt;
	│ Op. 1 ├───────────────────────────────────┐&lt;br /&gt;
	│       │                                   │&lt;br /&gt;
	└───────┘                                   │&lt;br /&gt;
						    │&lt;br /&gt;
	┌───────┐      ┌───────┐      ┌───────┐     │&lt;br /&gt;
	│       │      │       │      │       │     │&lt;br /&gt;
	│ Op. 2 ├─────&amp;gt;│ Op. 3 ├─────&amp;gt;│ Op. 4 ├─────┴─────&amp;gt; Output&lt;br /&gt;
	│       │      │       │      │       │&lt;br /&gt;
	└───────┘      └───────┘      └───────┘&lt;br /&gt;
&lt;br /&gt;
   c) FM-AM Mode&lt;br /&gt;
&lt;br /&gt;
	┌───────┐      ┌───────┐&lt;br /&gt;
	│       │      │       │&lt;br /&gt;
	│ Op. 1 ├─────&amp;gt;│ Op. 2 ├─────┐&lt;br /&gt;
	│       │      │       │     │&lt;br /&gt;
	└───────┘      └───────┘     │&lt;br /&gt;
				     ├─────&amp;gt; Output&lt;br /&gt;
	┌───────┐      ┌───────┐     │&lt;br /&gt;
	│       │      │       │     │&lt;br /&gt;
	│ Op. 3 ├─────&amp;gt;│ Op. 4 ├─────┘&lt;br /&gt;
	│       │      │       │&lt;br /&gt;
	└───────┘      └───────┘&lt;br /&gt;
&lt;br /&gt;
   d) AM-AM Mode&lt;br /&gt;
&lt;br /&gt;
	┌───────┐&lt;br /&gt;
	│       │&lt;br /&gt;
	│ Op. 1 ├────────────────────┐&lt;br /&gt;
	│       │                    │&lt;br /&gt;
	└───────┘                    │&lt;br /&gt;
				     │&lt;br /&gt;
	┌───────┐      ┌───────┐     │&lt;br /&gt;
	│       │      │       │     │&lt;br /&gt;
	│ Op. 2 ├─────&amp;gt;│ Op. 3 ├─────┼─────&amp;gt; Output&lt;br /&gt;
	│       │      │       │     │&lt;br /&gt;
	└───────┘      └───────┘     │&lt;br /&gt;
				     │&lt;br /&gt;
	┌───────┐                    │&lt;br /&gt;
	│       │                    │&lt;br /&gt;
	│ Op. 4 ├────────────────────┘&lt;br /&gt;
	│       │&lt;br /&gt;
	└───────┘&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Nice, aren&#039;t they?&lt;br /&gt;
&lt;br /&gt;
The only way I think this can be written is a math formula. Symbol + (plus) means additive synthesis, and * (asterisk) means frequency modulation (Op1 * Op2 means operator 1 modulates operator 2, not vice versa). Here they are:&lt;br /&gt;
&lt;br /&gt;
# FM-FM Mode:	 (Op1 * Op2 * Op3 * Op4) ────&amp;gt; Output&lt;br /&gt;
# AM-FM Mode:	  Op1 + (Op2 * Op3 * Op4) ───&amp;gt; Output&lt;br /&gt;
# FM-AM Mode:	 (Op1 * Op2) + (Op3 * Op4) ──&amp;gt; Output&lt;br /&gt;
# AM-AM Mode:	  Op1 + (Op2 * Op3) + Op4 ───&amp;gt; Output&lt;br /&gt;
&lt;br /&gt;
=== Percussion Mode ===&lt;br /&gt;
&lt;br /&gt;
In this mode 6 operators are used to produce five different percussion instruments:&lt;br /&gt;
&lt;br /&gt;
* Bass Drum (2 operators)&lt;br /&gt;
* Snare Drum (1 operator)&lt;br /&gt;
* Tom-Tom (1 operator)&lt;br /&gt;
* Cymbal (1 operator)&lt;br /&gt;
* Hi-Hat (1 operator)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strike&amp;gt;Because these instruments occupy only three melodic channels, only Bass Drum, Snare Drum and Tom-Tom frequencies can be set. Cymbal and Hi-Hat frequencies are fixed.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Based on the behaviour of the DOSBox OPL synth, the following points hold true: {{TODO|Verify using a real chip}}&lt;br /&gt;
&lt;br /&gt;
* Setting the block/fnum on each percussive channel affects the pitch of both instruments sharing the channel&lt;br /&gt;
** The pitch on channel 7 affects both the hihat and the snare&lt;br /&gt;
** The pitch on channel 8 affects both the cymbal and tomtom&lt;br /&gt;
** The pitch on channel 6 (of course) affects just the bass drum&lt;br /&gt;
* The register 0xC0 has no effect on the percussive channels (so setting 0xC6, 0xC7 and 0xC8 will have no effect)&lt;br /&gt;
** This means in OPL3 mode, the panning L/R bits are ignored and the percussive instruments are always played through both channels, as if the bits are always set.&lt;br /&gt;
* Changing the modulator output level (0x40) has no effect for modulator-only instruments.  This means the hihat and tomtom cannot have their volume set.  The other instruments (those that use the output level set in the carrier operator) can have their volume adjusted normally using the carrier output level instead.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;AdLib Programmer&#039;s Manual&#039;&#039; contains playback code that uses the Tom-Tom frequency for all percussion instruments.  It is possible this is the source of the confusion.  Here, when a note is played on the Tom-Tom channel, that note will of course cause the Top Cymbal to change as well because of the shared channel.  But the code increases this pitch by seven semitones and sets that frequency for channel 7 at the same time, ensuring the Hi-Hat and Snare Drum are always set to seven semitones above the last Tom-Tom note.  (See [[AdLib MIDI Format]] for details.)&lt;br /&gt;
&lt;br /&gt;
This mode is identical with that of OPL2. For more details see ADLIB.DOC.&lt;br /&gt;
&lt;br /&gt;
== Programming the Synthesizer ==&lt;br /&gt;
&lt;br /&gt;
OPL3 may be found at the following addresses:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Sound Blaster Pro II || 220h or 240h (selectable), also 388h&lt;br /&gt;
|-&lt;br /&gt;
| Adlib Gold || 388h&lt;br /&gt;
|-&lt;br /&gt;
| Pro Audio Spectrum Plus/16 || ? (if you have a PAS you should know it)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The base address of the synthesizer will be called &amp;quot;base&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The chip occupies four I/O addresses:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| base+0 || Primary index register (write), Status register (read)&lt;br /&gt;
|-&lt;br /&gt;
| base+1 || Primary data register (write-only)&lt;br /&gt;
|-&lt;br /&gt;
| base+2 || Secondary index register (write)&lt;br /&gt;
|-&lt;br /&gt;
| base+3 || Secondary data register (write-only)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The index registers are used to select internal registers and data registers are used to write to them. Status register returns the state of two timers built in the chip.&lt;br /&gt;
&lt;br /&gt;
OPL3 contains two sets of registers. The Primary set maps to channels 0-8 (operators 0-17) and the secondary maps to channels 9-17 (operators 18-35). The reason for this is simple: all these registers wouldn&#039;t fit into single register set.&lt;br /&gt;
&lt;br /&gt;
Unlike Adlib (OPL2), OPL3 doesn&#039;t need delay between register writes. With OPL2 you had to wait 3.3 µs after index register write and another 23 µs after data register write. On the contrary OPL3 doesn&#039;t need (almost) any delay after index register write and only 0.28 µs after data register write. This means you can neglect the delays and slightly speed up your music driver. But using reasonable delays will certainly do no harm.&lt;br /&gt;
&lt;br /&gt;
The data registers can&#039;t be read (they are write-only) on both OPL2 and OPL3.&lt;br /&gt;
&lt;br /&gt;
== Register Map ==&lt;br /&gt;
&lt;br /&gt;
The registers are grouped in the same manner as in the OPL2 chip. Programs using both OPL2 and OPL3 chips may use the same code provided that their direct I/O interface is well written. The only thing you have to change is operator-to-register mapping, which must accomodate the fact that registers are spread between two register sets.&lt;br /&gt;
&lt;br /&gt;
(The register map is nearly the same so I dared to copy it from ADLIB.DOC.)&lt;br /&gt;
&lt;br /&gt;
=== Status Register (base+0) ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
!    D7   !!   D6   !!   D5   !!   D4   !!   D3   !!   D2   !!   D1   !!   D0&lt;br /&gt;
|-&lt;br /&gt;
| IRQFlag || T1Flag || T2Flag ||        ||        ||        ||        ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Data Registers (base+1, base+3) ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! REG   !!   D7   !!   D6   !!   D5   !!   D4   !!   D3   !!   D2   !!   D1   !!   D0&lt;br /&gt;
|-&lt;br /&gt;
| 01    ||colspan=2| Test Register ||style=&amp;quot;background-color: #CCFFCC;&amp;quot;|(WSEnable)||colspan=5| Test Register&lt;br /&gt;
|-&lt;br /&gt;
| 02    ||colspan=8| Timer 1 Count (80 µsec resolution)&lt;br /&gt;
|-&lt;br /&gt;
| 03    ||colspan=8| Timer 2 Count (320 µsec resolution)&lt;br /&gt;
|-&lt;br /&gt;
| 04*   ||IRQReset|| T1Mask || T2Mask ||colspan=3|                  ||T2 Start||T1 Start&lt;br /&gt;
|-&lt;br /&gt;
| 04**  ||colspan=2|        ||style=&amp;quot;background-color: #CCFFCC;&amp;quot;|4-OP B-E||style=&amp;quot;background-color: #CCFFCC;&amp;quot;|4-OP A-D||style=&amp;quot;background-color: #CCFFCC;&amp;quot;|4-OP 9-C||style=&amp;quot;background-color: #CCFFCC;&amp;quot;|4-OP 2-5||style=&amp;quot;background-color: #CCFFCC;&amp;quot;|4-OP 1-4||style=&amp;quot;background-color: #CCFFCC;&amp;quot;|4-OP 0-3&lt;br /&gt;
|-&lt;br /&gt;
| 05**  ||colspan=7|                                                           ||style=&amp;quot;background-color: #CCFFCC;&amp;quot;| OPL3&lt;br /&gt;
|-&lt;br /&gt;
| 08    ||style=&amp;quot;background-color: #CCFFCC;&amp;quot;| (CSW)  ||style=&amp;quot;background-color: #CCFFCC;&amp;quot;|NOTE-SEL||colspan=6|&lt;br /&gt;
|-&lt;br /&gt;
| 20-35 ||style=&amp;quot;background-color: #CCCCFF;&amp;quot;|Tremolo ||style=&amp;quot;background-color: #CCCCFF;&amp;quot;|Vibrato ||style=&amp;quot;background-color: #CCCCFF;&amp;quot;|Sustain ||style=&amp;quot;background-color: #CCCCFF;&amp;quot;|  KSR   ||colspan=4 style=&amp;quot;background-color: #CCCCFF;&amp;quot;| Frequency Multiplication Factor&lt;br /&gt;
|-&lt;br /&gt;
| 40-55 ||colspan=2 style=&amp;quot;background-color: #CCCCFF;&amp;quot;| Key Scale Level ||colspan=6 style=&amp;quot;background-color: #CCCCFF;&amp;quot;| Output Level&lt;br /&gt;
|-&lt;br /&gt;
| 60-75 ||colspan=4 style=&amp;quot;background-color: #CCCCFF;&amp;quot;| Attack Rate ||colspan=4 style=&amp;quot;background-color: #CCCCFF;&amp;quot;| Decay Rate&lt;br /&gt;
|-&lt;br /&gt;
| 80-95 ||colspan=4 style=&amp;quot;background-color: #CCCCFF;&amp;quot;| Sustain Level ||colspan=4 style=&amp;quot;background-color: #CCCCFF;&amp;quot;| Release Rate&lt;br /&gt;
|-&lt;br /&gt;
| A0-A8 ||colspan=8 style=&amp;quot;background-color: #FFE0CC;&amp;quot;| Frequency Number  (Lower 8 bits)&lt;br /&gt;
|-&lt;br /&gt;
| B0-B8 ||colspan=2|        ||style=&amp;quot;background-color: #FFE0CC;&amp;quot;| KEY-ON ||colspan=3 style=&amp;quot;background-color: #FFE0CC;&amp;quot;| Block Number ||colspan=2 style=&amp;quot;background-color: #FFE0CC;&amp;quot;| F-Num (hi bits)&lt;br /&gt;
|-&lt;br /&gt;
| BD    ||style=&amp;quot;background-color: #CCFFCC;&amp;quot;|Trem Dep||style=&amp;quot;background-color: #CCFFCC;&amp;quot;|Vibr Dep||style=&amp;quot;background-color: #FFCCDD;&amp;quot;|PercMode||style=&amp;quot;background-color: #FFCCDD;&amp;quot;| BD On  ||style=&amp;quot;background-color: #FFCCDD;&amp;quot;| SD On  ||style=&amp;quot;background-color: #FFCCDD;&amp;quot;| TT On  ||style=&amp;quot;background-color: #FFCCDD;&amp;quot;| CY On  ||style=&amp;quot;background-color: #FFCCDD;&amp;quot;| HH On&lt;br /&gt;
|-&lt;br /&gt;
| C0-C8 ||style=&amp;quot;background-color: #FFE0CC;&amp;quot;| OutCh_D ||style=&amp;quot;background-color: #FFE0CC;&amp;quot;| OutCh_C ||style=&amp;quot;background-color: #FFE0CC;&amp;quot;| Right  ||style=&amp;quot;background-color: #FFE0CC;&amp;quot;| Left   ||colspan=3 style=&amp;quot;background-color: #FFE0CC;&amp;quot;|FeedBack Modulation Factor||style=&amp;quot;background-color: #FFE0CC;&amp;quot;|SynthTyp&lt;br /&gt;
|-&lt;br /&gt;
| E0-F5 ||colspan=5|                                      ||colspan=3 style=&amp;quot;background-color: #CCCCFF;&amp;quot;| Waveform Select&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|style=&amp;quot;background-color: #CCFFCC;&amp;quot;| Chip-wide setting&lt;br /&gt;
|style=&amp;quot;background-color: #CCCCFF;&amp;quot;| Per operator&lt;br /&gt;
|style=&amp;quot;background-color: #FFE0CC;&amp;quot;| Per channel&lt;br /&gt;
|style=&amp;quot;background-color: #FFCCDD;&amp;quot;| Rhythm-mode only&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; This applies only to port base+1&lt;br /&gt;
:&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt; This applies only to port base+3&lt;br /&gt;
&lt;br /&gt;
For register bases A0, B0 and C0 there is one register per output channel. The primary register set holds the first nine channels (0-8) and the secondary holds last nine channels (9-17). For bases 20, 40, 60, 80 and E0 there are two registers per channel. Each register maps to one operator. Unfortunately the operator&#039;s register numbers are not continuous. The following table shows which operator maps to which register set and offset (in hex).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred&amp;quot;&lt;br /&gt;
! Op. !! Set/Offset !! Op. !! Set/Offset&lt;br /&gt;
|-&lt;br /&gt;
| 0  || 0/00 || 18 || 1/00&lt;br /&gt;
|-&lt;br /&gt;
| 1  || 0/01 || 19 || 1/01&lt;br /&gt;
|-&lt;br /&gt;
| 2  || 0/02 || 20 || 1/02&lt;br /&gt;
|-&lt;br /&gt;
| 3  || 0/03 || 21 || 1/03&lt;br /&gt;
|-&lt;br /&gt;
| 4  || 0/04 || 22 || 1/04&lt;br /&gt;
|-&lt;br /&gt;
| 5  || 0/05 || 23 || 1/05&lt;br /&gt;
|-&lt;br /&gt;
| 6  || 0/08 || 24 || 1/08&lt;br /&gt;
|-&lt;br /&gt;
| 7  || 0/09 || 25 || 1/09&lt;br /&gt;
|-&lt;br /&gt;
| 8  || 0/0A || 26 || 1/0A&lt;br /&gt;
|-&lt;br /&gt;
| 9  || 0/0B || 27 || 1/0B&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 0/0C || 28 || 1/0C&lt;br /&gt;
|-&lt;br /&gt;
| 11 || 0/0D || 29 || 1/0D&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 0/10 || 30 || 1/10&lt;br /&gt;
|-&lt;br /&gt;
| 13 || 0/11 || 31 || 1/11&lt;br /&gt;
|-&lt;br /&gt;
| 14 || 0/12 || 32 || 1/12&lt;br /&gt;
|-&lt;br /&gt;
| 15 || 0/13 || 33 || 1/13&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 0/14 || 34 || 1/14&lt;br /&gt;
|-&lt;br /&gt;
| 17 || 0/15 || 35 || 1/15&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following tables summarize which operators form a channel in various modes:&lt;br /&gt;
&lt;br /&gt;
1. Two-operator Melodic Mode&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred&amp;quot;&lt;br /&gt;
! Channel    !! 0 !! 1 !! 2 !! 3 !! 4 !! 5 !! 6 !! 7 !! 8 !! 9 !! 10 !! 11 !! 12 !! 13 !! 14 !! 15 !! 16 !! 17&lt;br /&gt;
|-&lt;br /&gt;
| Operator 1 || 0 || 1 || 2 || 6 || 7  || 8  || 12 || 13 || 14 || 18 || 19 || 20 || 24 || 25 || 26 || 30 || 31 || 32&lt;br /&gt;
|-&lt;br /&gt;
| Operator 2 || 3 || 4 || 5 || 9 || 10 || 11 || 15 || 16 || 17 || 21 || 22 || 23 || 27 || 28 || 29 || 33 || 34 || 35&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. Two-operator Melodic and Percussion Mode&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred&amp;quot;&lt;br /&gt;
! Channel !! 0 !! 1 !! 2 !! 3 !! 4 !! 5 !! BD !! SD !! TT !! CY !! HH !! 9 !! 10 !! 11 !! 12 !! 13 !! 14 !! 15 !! 16 !! 17&lt;br /&gt;
|-&lt;br /&gt;
| Operator 1 || 0 || 1 || 2 || 6 || 7  || 8  || 12 || 16 || 14 || 17 || 13 || 18 || 19 || 20 || 24 || 25 || 26 || 30 || 31 || 32&lt;br /&gt;
|-&lt;br /&gt;
| Operator 2 || 3 || 4 || 5 || 9 || 10 || 11 || 15 ||colspan=4| - || 21 || 22 || 23 || 27 || 28 || 29 || 33 || 34 || 35&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
3. Four-operator Melodic Mode&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred&amp;quot;&lt;br /&gt;
! Channel !! 0 !! 1 !! 2 !! 6 !! 7 !! 8 !! 9 !! 10 !! 11 !! 15 !! 16 !! 17&lt;br /&gt;
|-&lt;br /&gt;
| Operator 1 || 0 || 1 || 2 || 12 || 13 || 14 || 18 || 19 || 20 || 30 || 31 || 32&lt;br /&gt;
|-&lt;br /&gt;
| Operator 2 || 3 || 4 || 5 || 15 || 16 || 17 || 21 || 22 || 23 || 33 || 34 || 35&lt;br /&gt;
|-&lt;br /&gt;
| Operator 3 || 6 || 7 || 8 ||colspan=3| - || 24 || 25 || 26 ||colspan=3| -&lt;br /&gt;
|-&lt;br /&gt;
| Operator 4 || 9 || 10 || 11 ||colspan=3| - || 27 || 28 || 29 ||colspan=3| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Channels 3, 4, 5 and 12, 13, 14 can&#039;t be used separately because their operators became part of channels 0, 1, 2 and 9, 10, 11 respectively. For instance a four-operator channel 1 consists of two two-operator channels number 1 and 4. (The second 2-OP channel number is always the first 2-OP channel number plus three.)&lt;br /&gt;
&lt;br /&gt;
OPL3 allows you to enable/disable 4-OP mode separately for any of channels 0, 1, 2, 9, 10 and 11 (see register 104h in the reference below). This means for instance when you switch only channel 2 into 4-OP mode, channels number 0, 1, 3, 4, 6, 7, 8, 9, etc. will be still independent 2-OP channels.&lt;br /&gt;
&lt;br /&gt;
Channels 6, 7, 8 and 15, 16, 17 are always two-operator ones. They can&#039;t be grouped to form four-operator channels.&lt;br /&gt;
&lt;br /&gt;
4. Four-operator Melodic and Percussion Mode&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred&amp;quot;&lt;br /&gt;
! Channel !! 0 !! 1 !! 2 !! BD !! SD !! TT !! CY !! HH !! 9 !! 10 !! 11 !! 15 !! 16 !! 17&lt;br /&gt;
|-&lt;br /&gt;
| Operator 1 || 0 || 1 || 2 || 12 || 16 || 14 || 17 || 13 || 18 || 19 || 20 || 30 || 31 || 32&lt;br /&gt;
|-&lt;br /&gt;
| Operator 2 || 3 || 4 || 5 || 15 ||colspan=4| - || 21 || 22 || 23 || 33 || 34 || 35&lt;br /&gt;
|-&lt;br /&gt;
| Operator 3 || 6 || 7 || 8 ||colspan=5| - || 24 || 25 || 26 ||colspan=3| -&lt;br /&gt;
|-&lt;br /&gt;
| Operator 4 || 9 || 10 || 11 ||colspan=5| - || 27 || 28 || 29 ||colspan=3| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
Two-operator channel #14 consists of operators 26 and 29 which occupy these registers (all are in the secondary register set):&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| 12A || Operator 1 || Tremolo/Vibrato/Sustain/KSR/Multiplication&lt;br /&gt;
|-&lt;br /&gt;
| 12D || Operator 2 || Tremolo/Vibrato/Sustain/KSR/Multiplication&lt;br /&gt;
|-&lt;br /&gt;
| 14A || Operator 1 || Key Scale Level/Output Level&lt;br /&gt;
|-&lt;br /&gt;
| 14D || Operator 2 || Key Scale Level/Output Level&lt;br /&gt;
|-&lt;br /&gt;
| 16A || Operator 1 || Attack Rate/Decay Rate&lt;br /&gt;
|-&lt;br /&gt;
| 16D || Operator 2 || Attack Rate/Decay Rate&lt;br /&gt;
|-&lt;br /&gt;
| 18A || Operator 1 ||Sustain Level/Release Rate&lt;br /&gt;
|-&lt;br /&gt;
| 18D || Operator 2 || Sustain Level/Release Rate&lt;br /&gt;
|-&lt;br /&gt;
| 1A5 ||            || Frequency Number (low)&lt;br /&gt;
|-&lt;br /&gt;
| 1B5 ||            || Key On/Block Number/Frequency Number (high)&lt;br /&gt;
|-&lt;br /&gt;
| 1C5 ||            || FeedBack/Synthesis Type&lt;br /&gt;
|-&lt;br /&gt;
| 1EA || Operator 1 || Waveform Select&lt;br /&gt;
|-&lt;br /&gt;
| 1ED || Operator 2 || Waveform Select&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Four-operator channel #1 consists of operators 1, 4, 7 and 10. All registers except register 104h are in the primary set:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 104 || bit 1 = 1  || Enable Four-Operator Synthesis in channel #1&lt;br /&gt;
|-&lt;br /&gt;
| 21 || Operator 1 || Tremolo/Vibrato/Sustain/KSR/Multiplication&lt;br /&gt;
|-&lt;br /&gt;
| 24 || Operator 2 || Tremolo/Vibrato/Sustain/KSR/Multiplication&lt;br /&gt;
|-&lt;br /&gt;
| 29 || Operator 3 || Tremolo/Vibrato/Sustain/KSR/Multiplication&lt;br /&gt;
|-&lt;br /&gt;
| 2C || Operator 4 || Tremolo/Vibrato/Sustain/KSR/Multiplication&lt;br /&gt;
|-&lt;br /&gt;
| 41 || Operator 1 || Key Scale Level/Output Level&lt;br /&gt;
|-&lt;br /&gt;
| 44 || Operator 2 || Key Scale Level/Output Level&lt;br /&gt;
|-&lt;br /&gt;
| 49 || Operator 3 || Key Scale Level/Output Level&lt;br /&gt;
|-&lt;br /&gt;
| 4C || Operator 4 || Key Scale Level/Output Level&lt;br /&gt;
|-&lt;br /&gt;
| 61 || Operator 1 || Attack Rate/Decay Rate&lt;br /&gt;
|-&lt;br /&gt;
| 64 || Operator 2 || Attack Rate/Decay Rate&lt;br /&gt;
|-&lt;br /&gt;
| 69 || Operator 3 || Attack Rate/Decay Rate&lt;br /&gt;
|-&lt;br /&gt;
| 6C || Operator 4 || Attack Rate/Decay Rate&lt;br /&gt;
|-&lt;br /&gt;
| 81 || Operator 1 || Sustain Level/Release Rate&lt;br /&gt;
|-&lt;br /&gt;
| 84 || Operator 2 || Sustain Level/Release Rate&lt;br /&gt;
|-&lt;br /&gt;
| 89 || Operator 3 || Sustain Level/Release Rate&lt;br /&gt;
|-&lt;br /&gt;
| 8C || Operator 4 || Sustain Level/Release Rate&lt;br /&gt;
|-&lt;br /&gt;
| A1 ||            || Frequency Number (low)&lt;br /&gt;
|-&lt;br /&gt;
| A4 ||            || Unused&lt;br /&gt;
|-&lt;br /&gt;
| B1 ||            || Key On/Block Number/Frequency Number (high)&lt;br /&gt;
|-&lt;br /&gt;
| B4 ||            || Unused&lt;br /&gt;
|-&lt;br /&gt;
| C1 ||            || FeedBack/Synthesis Type (part 1)&lt;br /&gt;
|-&lt;br /&gt;
| C4 ||            || Synthesis Type (part 2)&lt;br /&gt;
|-&lt;br /&gt;
| E1 || Operator 1 || Waveform Select&lt;br /&gt;
|-&lt;br /&gt;
| E4 || Operator 2 || Waveform Select&lt;br /&gt;
|-&lt;br /&gt;
| E9 || Operator 3 || Waveform Select&lt;br /&gt;
|-&lt;br /&gt;
| EC || Operator 4 || Waveform Select&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
NOTE: If a register number is greater than 100h, then it belongs into the secondary register set. (I use this numbering to emphasize the fact that the particular register MUST be written to the secondary set.) See the example code below for details.&lt;br /&gt;
&lt;br /&gt;
== OPL3 Register Reference ==&lt;br /&gt;
&lt;br /&gt;
Because the registers of OPL3 are almost the same as of OPL2, I have copied their descriptions from file ADLIB.DOC.&lt;br /&gt;
&lt;br /&gt;
=== Status Register ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! D7 !! D6 !! D5 !! D4 !! D3 !! D2 !! D1 !! D0&lt;br /&gt;
|-&lt;br /&gt;
| IRQ || T1 || T2 ||colspan=5| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* bit 7: IRQ Flag. Set whenever any timer has elapsed.&lt;br /&gt;
* bit 6: Timer 1 Flag. Set every time the preset time in Timer 1 has elapsed.&lt;br /&gt;
* bit 5: Timer 2 Flag. Set every time the preset time in Timer 2 has elapsed.&lt;br /&gt;
&lt;br /&gt;
Timer interrupts are not wired to any IRQ (why??). The timers can be used to detect the OPL2/OPL3 chip (see Appendix B).&lt;br /&gt;
&lt;br /&gt;
=== Data Registers ===&lt;br /&gt;
&lt;br /&gt;
==== 01: Test Register / Waveform Select Enable ====&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! D7 !! D6 !! D5 !! D4 !! D3 !! D2 !! D1 !! D0&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2| Test Register&lt;br /&gt;
| (WSE)&lt;br /&gt;
|colspan=5| Test Register&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* bits 7-6: Test Register. Must be reset to zero before any operation.&lt;br /&gt;
* bit 5: Waveform Select Enable. If clear, all channels will use normal sine wave. If set, register E0-F5 (Waveform Select) contents will be used.&lt;br /&gt;
* bits 0-4: Test Register. Must be reset to zero before any operation.&lt;br /&gt;
&lt;br /&gt;
OPL3 does not implement WSE bit, and it should be left clear. In OPL2 mode all four waveforms are always available, and in OPL3 mode all eight waveforms are always available. For compatibility with OPL2, when a program is finished using an OPL3, the waveform select registers should be set to 0, if the next program assumes that by setting WSE bit to 0 the waveform is always sine like on a real OPL2.&lt;br /&gt;
&lt;br /&gt;
==== 02: Timer 1 Count ====&lt;br /&gt;
&lt;br /&gt;
Upward 8 bit counter with a resolution of 80 µsec. If an overflow occurs, the status register bit is set, and the preset value is loaded into the timer again.&lt;br /&gt;
&lt;br /&gt;
==== 03: Timer 2 Count ====&lt;br /&gt;
&lt;br /&gt;
Same as Timer 1, but with a resolution of 320 µsec.&lt;br /&gt;
&lt;br /&gt;
==== 004 (port: base+1): IRQ-Reset / Mask / Start ====&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! D7 !! D6 !! D5 !! D4 !! D3 !! D2 !! D1 !! D0&lt;br /&gt;
|-&lt;br /&gt;
| Rst&lt;br /&gt;
| T1M&lt;br /&gt;
| T2M&lt;br /&gt;
|colspan=3| -&lt;br /&gt;
| T2S&lt;br /&gt;
| T1S&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* bit 7: IRQ-Reset. Resets timer and IRQ flags in status register. All other bits are ignored when this bit is set.&lt;br /&gt;
* bit 6: Timer 1 Mask. If 1, status register is not affected in overflow.&lt;br /&gt;
* bit 5: Timer 2 Mask. Same as above.&lt;br /&gt;
* bit 1: Timer 2 Start. Timer on/off.&lt;br /&gt;
* bit 0: Timer 1 Start. Same as above.&lt;br /&gt;
&lt;br /&gt;
==== 104 (port: base+3): Four-Operator Enable ====&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! D7 !! D6 !! D5 !! D4 !! D3 !! D2 !! D1 !! D0&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2| -&lt;br /&gt;
| ChB&lt;br /&gt;
| ChA&lt;br /&gt;
| Ch9&lt;br /&gt;
| Ch2&lt;br /&gt;
| Ch1&lt;br /&gt;
| Ch0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* bit 5: Enable four-operator synthesis for channel pair 11 - 14 (decimal).&lt;br /&gt;
* bit 4: Same as above for channel pair 10 - 13.&lt;br /&gt;
* bit 3: Same as above for channel pair 9 - 12.&lt;br /&gt;
* bit 2: Same as above for channel pair 2 - 5.&lt;br /&gt;
* bit 1: Same as above for channel pair 1 - 4.&lt;br /&gt;
* bit 0: Same as above for channel pair 0 - 3.&lt;br /&gt;
&lt;br /&gt;
If reset to zero, OPL3 can produce 18 two-operator sounds at a time. If nonzero, OPL3 produces four-operator sound in appropriate channel pair.&lt;br /&gt;
&lt;br /&gt;
==== 105 (port: base+3): OPL3 Mode Enable ====&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! D7 !! D6 !! D5 !! D4 !! D3 !! D2 !! D1 !! D0&lt;br /&gt;
|-&lt;br /&gt;
|colspan=7| -&lt;br /&gt;
| OPL3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* bit 0: OPL3 Mode Enable. When set, OPL3 extensions (36 operators, 4-OP synthesis, 8 waveforms, stereo output) can be used. When reset, the chip behaves as an ordinary OPL2. This bit is zero by default for compatibility with OPL2.&lt;br /&gt;
&lt;br /&gt;
==== 08: CSW / NOTE-SEL ====&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! D7 !! D6 !! D5 !! D4 !! D3 !! D2 !! D1 !! D0&lt;br /&gt;
|-&lt;br /&gt;
| (CSW)&lt;br /&gt;
| N-S&lt;br /&gt;
|colspan=6| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* bit 7: Composite sine wave mode on/off. All KEY-ON bits must be clear in order to use this mode. The card is unable to create any other sound when in CSW mode. (Unfortunately, I have no info how to use this mode :-&amp;lt; ). The CSW mode is not implemented on an OPL3 and this bit is ignored.&lt;br /&gt;
* bit 6: NOTE-SEL. Controls the split point of the keyboard. When 0, the keyboard split is the second bit from the bit 8 of the F-Number. When 1, the MSb of the F-Number is used. (???)&lt;br /&gt;
&lt;br /&gt;
The Note Select bit defines what kind of F-NUM values are used within an octave so the chip knows how to split an octave into two parts. When Note Select bit is 0, F-NUM values used within an octave all have their MSB bit (bit 9) set, ranging from 0x200 to 0x3FF, so the second most significant bit, bit 8 is used to determine if currently playing note belongs to lower (0x200-0x2FF) or upper (0x300-0x3FF) half within an octave. When Note Select bit is 1, the F-NUM value MSB bit, bit 9, is used to determine if the note belongs to lower (0x000-0x1FF) or upper (0x200-0x3FF) half within an octave.&lt;br /&gt;
&lt;br /&gt;
==== 20-35: Tremolo / Vibrato / Sustain / KSR / Frequency Multiplication Factor ====&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! D7 !! D6 !! D5 !! D4 !! D3 !! D2 !! D1 !! D0&lt;br /&gt;
|-&lt;br /&gt;
| Tre&lt;br /&gt;
| Vib&lt;br /&gt;
| Sus&lt;br /&gt;
| KSR&lt;br /&gt;
|colspan=4| Multiplication&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* bit 7:    Tremolo (Amplitude vibrato) on/off.&lt;br /&gt;
* bit 6:    Frequency vibrato on/off.&lt;br /&gt;
* bit 5:    Sound Sustaining. When 1, operator&#039;s output level will be held at its sustain level until a KEY-OFF is done.&lt;br /&gt;
* bit 4:    Envelope scaling (KSR) on/off. When 1, higher notes are shorter than lower notes.&lt;br /&gt;
* bits 0-3: Frequency Multiplication Factor (MULTI). Operator&#039;s frequency is set to (see registers A0, B0) F-Number * Factor.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! MULTI !! Factor&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0.5&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 2&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 3&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 4&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 5&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 6&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 7&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 8&lt;br /&gt;
|-&lt;br /&gt;
| 9 || 9&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 10&lt;br /&gt;
|-&lt;br /&gt;
| 11 || 10&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 12&lt;br /&gt;
|-&lt;br /&gt;
| 13 || 12&lt;br /&gt;
|-&lt;br /&gt;
| 14 || 15&lt;br /&gt;
|-&lt;br /&gt;
| 15 || 15&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== 40-55: Key Scale Level / Output Level ====&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! D7 !! D6 !! D5 !! D4 !! D3 !! D2 !! D1 !! D0&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2| KSL&lt;br /&gt;
|colspan=6| Output level&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* bits 6-7: Key Scale Level. Attenuates output level towards higher pitch:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! KSL !! Attenuation&lt;br /&gt;
|-&lt;br /&gt;
| 0 || -&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 3.0 dB/oct&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 1.5 dB/oct&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 6.0 dB/oct&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The attenuation level is based on the 3-bit octave (block number) value and top four bits of the FNUM value, so each octave is subdivided into 16 parts.&lt;br /&gt;
&lt;br /&gt;
* bits 0-5: Output Level. Attenuates the operator output level. 0 is the loudest, 3F is the softest. Attenuation range is 48dB with 0.75dB resolution.&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! D5 !! D4 !! D3 !! D2 !! D1 !! D0&lt;br /&gt;
|-&lt;br /&gt;
| 24dB || 12dB || 6dB || 3dB || 1.5dB || 0.75dB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* In additive synthesis, varying the output level of any operator varies the volume of its corresponding channel. In FM synthesis, varying the output level of the carrier varies the volume of the channel. Varying the output of the modulator will change the frequency spectrum produced by the carrier. The following table summarizes which operators&#039; output levels should be updated when trying to change channel output level.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! Mode !! Op 1 !! Op 2 !! Op 3 !! Op 4&lt;br /&gt;
|-&lt;br /&gt;
| AM    || Y || Y || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| FM    || - || Y || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| FM-FM || - || - || -   || Y&lt;br /&gt;
|-&lt;br /&gt;
| AM-FM || Y || - || -   || Y&lt;br /&gt;
|-&lt;br /&gt;
| FM-AM || - || Y || -   || Y&lt;br /&gt;
|-&lt;br /&gt;
| AM-AM || Y || - || Y   || Y&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== 60-75: Attack Rate / Decay Rate ====&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! D7 !! D6 !! D5 !! D4 !! D3 !! D2 !! D1 !! D0&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4| Attack rate&lt;br /&gt;
|colspan=4| Decay rate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* bits 4-7: Attack Rate. Determines the rising time for the sound. The higher the value, the faster the attack. If value is 0, the sound will never attack, and if value is 15, the volume jumps directly from minimum to maximum.&lt;br /&gt;
* bits 0-3: Decay Rate. Determines the diminishing time for the sound. The higher the value, the shorter the decay. If value is 0, the sound does not decay towards sustain level and stays at maximum volume after attack.&lt;br /&gt;
&lt;br /&gt;
==== 80-95: Sustain Level / Release Rate ====&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! D7 !! D6 !! D5 !! D4 !! D3 !! D2 !! D1 !! D0&lt;br /&gt;
|-&lt;br /&gt;
|colspan=4| Sustain level&lt;br /&gt;
|colspan=4| Release rate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* bits 4-7: Sustain Level. Determines the point at which the sound ceases to decay and chages to a sound having a constant level. The sustain level is expressed as a fraction of the maximum level. 15 is the softest and 0 is the loudest sustain level. Note that the Sustain-bit in the register 20-35 must be set for this to have an effect. Otherwise the sound will continue with release phase after hitting sustain level.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! SL3 !! SL2 !! SL1 !! SL0&lt;br /&gt;
|-&lt;br /&gt;
| -24dB || -12dB || -6dB || -3dB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is an exception when all bits are set (value=15), the actual level is -93dB instead, matching as if the value were 31.&lt;br /&gt;
&lt;br /&gt;
* bits 0-3: Release Rate. Determines the rate at which the sound disappears after KEY-OFF. The higher the value, the shorter the release. Value of 0 causes the sound not to release at all, it will continue to produce sound at level before KEY-OFF.&lt;br /&gt;
&lt;br /&gt;
==== A0-A8: Frequency Number ====&lt;br /&gt;
&lt;br /&gt;
Determines the pitch of the note. Highest bits of F-Number are stored in the register below.&lt;br /&gt;
&lt;br /&gt;
==== B0-B8: Key On / Block Number / F-Number(hi bits) ====&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! D7 !! D6 !! D5 !! D4 !! D3 !! D2 !! D1 !! D0&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2| -&lt;br /&gt;
| Note on&lt;br /&gt;
|colspan=3| Block number&lt;br /&gt;
|colspan=2| Frequency num.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;note on&#039;&#039;&#039; bit is set to 1 to play a note on the channel, and 0 to silence the note.  Setting this value to 1 when a note is already playing has no effect (it does not retrigger the note.)&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;block number&#039;&#039;&#039; is often referred to as the octave, but this is a misleading description.  The value of the block controls the frequency range spanned by the frequency numbers.  A larger block allows higher frequencies (pitch) to be reached, at the expense of there being a greater difference in pitch of two adjacent frequency numbers.  This works out well, since a low block number allows a very high pitch accuracy for deep notes where it is most noticeable, while high block numbers mean the coarse pitch settings need only be used at high frequencies where the coarseness is unnoticeable.&lt;br /&gt;
&lt;br /&gt;
The following table illustrates the effect of different block numbers.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=2| Block !!colspan=2| Note frequency !!rowspan=2| Difference between&amp;lt;br/&amp;gt;adjacent notes (Hz)&lt;br /&gt;
|-&lt;br /&gt;
! F-num=1 !! F-num=1023&lt;br /&gt;
|-&lt;br /&gt;
|align=center| 0 ||align=right| 0.047 Hz ||align=right| 48.503 Hz ||align=right| 0.048 Hz&lt;br /&gt;
|-&lt;br /&gt;
|align=center| 1 ||align=right| 0.094 Hz ||align=right| 97.006 Hz ||align=right| 0.095 Hz&lt;br /&gt;
|-&lt;br /&gt;
|align=center| 2 ||align=right| 0.189 Hz ||align=right| 194.013 Hz ||align=right| 0.190 Hz&lt;br /&gt;
|-&lt;br /&gt;
|align=center| 3 ||align=right| 0.379 Hz ||align=right| 388.026 Hz ||align=right| 0.379 Hz&lt;br /&gt;
|-&lt;br /&gt;
|align=center| 4 ||align=right| 0.758 Hz ||align=right| 776.053 Hz ||align=right| 0.759 Hz&lt;br /&gt;
|-&lt;br /&gt;
|align=center| 5 ||align=right| 1.517 Hz ||align=right| 1,552.107 Hz ||align=right| 1.517 Hz&lt;br /&gt;
|-&lt;br /&gt;
|align=center| 6 ||align=right| 3.034 Hz ||align=right| 3,104.215 Hz ||align=right| 3.034 Hz&lt;br /&gt;
|-&lt;br /&gt;
|align=center| 7 ||align=right| 6.068 Hz ||align=right| 6,208.431 Hz ||align=right| 6.069 Hz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This shows that block 7 is capable of reaching the highest note (6.2kHz) but since there are 6Hz between notes the accuracy suffers.  Note A-4 is 440Hz but in this block, the two closest frequency numbers are 72 and 73, which create tones at 437Hz and 443Hz respectively, neither of which is particularly accurate.  Blocks 3 and below are unable to reach as high as 440Hz, but block 4 can.  With block 4, frequency numbers 579 and 580 produce 439.4Hz and 440.2Hz, considerably closer to the intended frequency.&lt;br /&gt;
&lt;br /&gt;
In other words, when calculating notes, the best accuracy is achieved by selecting the lowest possible block number that can reach the desired note frequency.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;frequency number&#039;&#039;&#039; is split between registers A0 and B0, with the upper two bits being stored here.  The full frequency number is a value between 0 and 1023 inclusive.  The following formula is used to determine the frequency number for a given note frequency (in Hertz) and block:&lt;br /&gt;
&lt;br /&gt;
: f-num = freq * 2^(20 - block) / 49716&lt;br /&gt;
&lt;br /&gt;
This formula can produce frequency numbers outside of the allowed 0-1023 range if the block number is too low, or the frequency is higher than the hardware can produce.&lt;br /&gt;
&lt;br /&gt;
The sampling frequency of OPL2 and OPL3 chips is approximately 49716 Hz, leading to the constant in the formula.  Occasionally this is rounded to 50000 leading to a small pitch variation if the wrong constant is used to play these songs.  OPL2 cards like Adlib and early Sound Blasters used the 14.31818 MHz oscillator signal from ISA bus slot and divided it by four on card, thus running the OPL2 chip at 3.579545 MHz, which gets divided internally by 72 to get the sampling rate. OPL3 cards had to be compatible, and mostly the sound cards have separate 14.31818 MHz oscillator on board which the OPL3 uses directly, and this gets divided internally by 288 to get the sampling rate.&lt;br /&gt;
&lt;br /&gt;
NOTE: In four-operator mode only the register value of Operators 1 and 2 is used, value of Operators 3 and 4 in this register is ignored. In other words: one channel uses only one frequency, block and KEY-ON value at a time, regardless whether it is a two- or four-operator channel.&lt;br /&gt;
&lt;br /&gt;
Setting the frequency and/or block while the &#039;&#039;note on&#039;&#039; bit is set will result in the frequency changing immediately.  By changing the values gradually, pitch bends can be achieved.&lt;br /&gt;
&lt;br /&gt;
{{TODO|Does changing the frequency just after a note-off cause a pitch bend for those instruments with lengthy release rates?}}&lt;br /&gt;
&lt;br /&gt;
==== BD: Tremolo Depth / Vibrato Depth / Percussion Mode / BD/SD/TT/CY/HH On ====&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! D7 !! D6 !! D5 !! D4 !! D3 !! D2 !! D1 !! D0&lt;br /&gt;
|-&lt;br /&gt;
| Tre&lt;br /&gt;
| Vib&lt;br /&gt;
| Per&lt;br /&gt;
| BD&lt;br /&gt;
| SD&lt;br /&gt;
| TT&lt;br /&gt;
| CY&lt;br /&gt;
| HH&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* bit 7:    Tremolo (Amplitude Vibrato) Depth. 0 = 1.0dB, 1 = 4.8dB.&lt;br /&gt;
* bit 6:    Frequency Vibrato Depth. 0 = 7 cents, 1 = 14 cents. A &amp;quot;cent&amp;quot; is 1/100 of a semi-tone.&lt;br /&gt;
* bit 5:    Percussion Mode. 0 = Melodic Mode, 1 = Percussion Mode.&lt;br /&gt;
* bit 4:    BD On. KEY-ON of the Bass Drum channel.&lt;br /&gt;
* bit 3:    SD On. KEY-ON of the Snare Drum channel.&lt;br /&gt;
* bit 2:    TT On. KEY-ON of the Tom-Tom channel.&lt;br /&gt;
* bit 1:    CY On. KEY-ON of the Cymbal channel.&lt;br /&gt;
* bit 0:    HH On. KEY-ON of the Hi-Hat channel.&lt;br /&gt;
&lt;br /&gt;
NOTE: KEY-ON bits of channels 6, 7 and 8 must be clear and their F-Nums, Attack/Decay/Release rates, etc. must be set properly to use percussion mode.&lt;br /&gt;
&lt;br /&gt;
==== C0-C8: FeedBack Modulation Factor / Synthesis Type ====&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! D7 !! D6 !! D5 !! D4 !! D3 !! D2 !! D1 !! D0&lt;br /&gt;
|-&lt;br /&gt;
| OutCh_D&lt;br /&gt;
| OutCh_C&lt;br /&gt;
| R&lt;br /&gt;
| L&lt;br /&gt;
|colspan=3| Feedback&lt;br /&gt;
| Syn&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* bit 7: CHD, Output Channel D Enable. When set, channel output goes to fourth digital audio output channel.&lt;br /&gt;
* bit 6: CHC, Output Channel C Enable. When set, channel output goes to third digital audio output channel.&lt;br /&gt;
* bit 5:    Right Speaker Enable. When set, channel output goes to second digital audio output channel, connected to right speaker.&lt;br /&gt;
* bit 4:    Left Speaker Enable. When set, channel output goes to first digital audio output channel, connected to left speaker.&lt;br /&gt;
** In OPL3 mode, at least one of the left/right bits must be set to hear the channel.&lt;br /&gt;
** In OPL2 mode, these bits are ignored and audio is sent to all channels for compatibility reasons.&lt;br /&gt;
** Left/Right bits can be used to realize sound &amp;quot;panning&amp;quot;, but this method offers only three pan positions (left/center/right).&lt;br /&gt;
** These bits apply only to operators producing sound (Carriers). Modulators are not affected by their setting.&lt;br /&gt;
** Sound cards use only one stereo DAC, so only two of the four digital output channels are available.&lt;br /&gt;
* bits 1-3: FeedBack Modulation Factor. If 0, no feedback is present. If 1-7, operator 1 will send a portion of its output back into itself.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! FeedBack !! Factor&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || &amp;amp;pi;/16&lt;br /&gt;
|-&lt;br /&gt;
| 2 || &amp;amp;pi;/8&lt;br /&gt;
|-&lt;br /&gt;
| 3 || &amp;amp;pi;/4&lt;br /&gt;
|-&lt;br /&gt;
| 4 || &amp;amp;pi;/2&lt;br /&gt;
|-&lt;br /&gt;
| 5 || &amp;amp;pi;&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 2&amp;amp;pi;&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 4&amp;amp;pi;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When in four-operator mode, the FeedBack value is used only by Operator 1, value of Operators 2, 3 and 4 is ignored.&lt;br /&gt;
&lt;br /&gt;
* bit 0: Synthesis Type. 1 = Additive synthesis, 0 = Frequency Modulation.  In four-operator mode, there are two bits controlling the synthesis type. Both are the bit 0 of register C0, one of Operators 1 and 2 and the second of Operators 3 and 4.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! Op 1&amp;amp;2 !! Op 3&amp;amp;4 !! Type&lt;br /&gt;
|-&lt;br /&gt;
| 0 || NONE || FM&lt;br /&gt;
|-&lt;br /&gt;
| 1 || NONE || AM&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || FM-FM&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || AM-FM&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || FM-AM&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || AM-AM&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== E0-F5: Waveform Select ====&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable centred fixed-width&amp;quot;&lt;br /&gt;
! D7 !! D6 !! D5 !! D4 !! D3 !! D2 !! D1 !! D0&lt;br /&gt;
|-&lt;br /&gt;
|colspan=5| -&lt;br /&gt;
|colspan=3| Waveform&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* bits 0-2: WaveForm Select (WS): &amp;lt;gallery widths=261px perrow=4&amp;gt;&lt;br /&gt;
Image:OPL_Wave0_Digital.svg|Waveform 0: Sine&lt;br /&gt;
Image:OPL_Wave1_Digital.svg|Waveform 1: Half-sine&lt;br /&gt;
Image:OPL_Wave2_Digital.svg|Waveform 2: Abs-sine&lt;br /&gt;
Image:OPL_Wave3_Digital.svg|Waveform 3: Pulse-sine&lt;br /&gt;
Image:OPL_Wave4_Digital.svg|Waveform 4: Sine - even periods only&lt;br /&gt;
Image:OPL_Wave5_Digital.svg|Waveform 5: Abs-sine - even periods only&lt;br /&gt;
Image:OPL_Wave6_Digital.svg|Waveform 6: Square&lt;br /&gt;
Image:OPL_Wave7_Digital.svg|Waveform 7: Derived square&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* NOTE: Bit 5 of register 01 must be set to use waveforms other than sine. Waveforms 4-7 are available only on OPL3. See files WAVEn.GIF for real waveforms, where n is a number between 0 and 7.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
These examples show a few working routines used in my MUS Player. They are written in Borland C++ 3.1 but should be easy to translate to any other language.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
// I prefer using these Assembler-like types&lt;br /&gt;
typedef unsigned int  WORD;&lt;br /&gt;
typedef unsigned char BYTE;&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
 * FM Synthesizer base port. SB Pro II - 0x220, Adlib 0x388&lt;br /&gt;
 */&lt;br /&gt;
WORD FMport = 0x220;&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
 * Enables OPL3 extensions.&lt;br /&gt;
 */&lt;br /&gt;
WORD OPL3 = 1;&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
 * Direct write to any Adlib/SB Pro II FM synthetiser register.&lt;br /&gt;
 *   reg - register number (range 0x001-0x0F5 and 0x101-0x1F5). When high byte&lt;br /&gt;
 *         of reg is zero, data go to port FMport, otherwise to FMport+2&lt;br /&gt;
 *   data - register value to be written&lt;br /&gt;
 */&lt;br /&gt;
BYTE FMwriteReg(WORD reg, BYTE data)&lt;br /&gt;
{&lt;br /&gt;
    asm {&lt;br /&gt;
	mov	dx,FMport&lt;br /&gt;
	mov	ax,reg&lt;br /&gt;
	or	ah,ah		// high byte is nonzero -- write to port base+2&lt;br /&gt;
	jz	out1&lt;br /&gt;
	inc	dx&lt;br /&gt;
	inc	dx&lt;br /&gt;
    }&lt;br /&gt;
out1: asm {&lt;br /&gt;
	out	dx,al&lt;br /&gt;
	mov	cx,6&lt;br /&gt;
    }&lt;br /&gt;
loop1:asm {			// delay between writes&lt;br /&gt;
	in	al,dx&lt;br /&gt;
	loop	loop1&lt;br /&gt;
&lt;br /&gt;
	inc	dx&lt;br /&gt;
	mov	al,data&lt;br /&gt;
	out	dx,al&lt;br /&gt;
	dec	dx&lt;br /&gt;
	mov	cx,36&lt;br /&gt;
    }&lt;br /&gt;
loop2:asm {			// delay after data write&lt;br /&gt;
	in	al,dx&lt;br /&gt;
	loop	loop2&lt;br /&gt;
    }&lt;br /&gt;
    return _AL;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
 * Write to an operator pair. To be used for register bases of 0x20, 0x40,&lt;br /&gt;
 * 0x60, 0x80 and 0xE0.&lt;br /&gt;
 */&lt;br /&gt;
void FMwriteChannel(BYTE regbase, BYTE channel, BYTE data1, BYTE data2)&lt;br /&gt;
{&lt;br /&gt;
    static BYTE adlib_op[] = {0, 1, 2, 8, 9, 10, 16, 17, 18};&lt;br /&gt;
    static BYTE sbpro_op[] = { 0,  1,  2,   6,  7,  8,  12, 13, 14,&lt;br /&gt;
			      18, 19, 20,  24, 25, 26,  30, 31, 32};&lt;br /&gt;
    static WORD rg[] = {0x000,0x001,0x002,0x003,0x004,0x005,&lt;br /&gt;
			0x008,0x009,0x00A,0x00B,0x00C,0x00D,&lt;br /&gt;
			0x010,0x011,0x012,0x013,0x014,0x015,&lt;br /&gt;
			0x100,0x101,0x102,0x103,0x104,0x105,&lt;br /&gt;
			0x108,0x109,0x10A,0x10B,0x10C,0x10D,&lt;br /&gt;
			0x110,0x111,0x112,0x113,0x114,0x115};&lt;br /&gt;
&lt;br /&gt;
    if (OPL3)&lt;br /&gt;
    {&lt;br /&gt;
	register WORD reg = sbpro_op[channel];&lt;br /&gt;
	FMwriteReg(rg[reg]+regbase, data1);&lt;br /&gt;
	FMwriteReg(rg[reg+3]+regbase, data2);&lt;br /&gt;
    } else {&lt;br /&gt;
	register WORD reg = regbase+adlib_op[channel];&lt;br /&gt;
	FMwriteReg(reg, data1);&lt;br /&gt;
	FMwriteReg(reg+3, data2);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
 * Write to channel a single value. To be used for register bases of&lt;br /&gt;
 * 0xA0, 0xB0 and 0xC0.&lt;br /&gt;
 */&lt;br /&gt;
void FMwriteValue(BYTE regbase, BYTE channel, BYTE value)&lt;br /&gt;
{&lt;br /&gt;
    static WORD ch[] = {0x000,0x001,0x002,0x003,0x004,0x005,0x006,0x007,0x008,&lt;br /&gt;
			0x100,0x101,0x102,0x103,0x104,0x105,0x106,0x107,0x108};&lt;br /&gt;
    register WORD chan;&lt;br /&gt;
&lt;br /&gt;
    if (OPL3)&lt;br /&gt;
	chan = ch[channel];&lt;br /&gt;
    else&lt;br /&gt;
	chan = channel;&lt;br /&gt;
    FMwriteReg(regbase + chan, value);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Detection Methods ==&lt;br /&gt;
&lt;br /&gt;
An official method of Adlib (OPL2) detection is:&lt;br /&gt;
&lt;br /&gt;
# Reset Timer 1 and Timer 2: write 60h to register 4.&lt;br /&gt;
# Reset the IRQ: write 80h to register 4.&lt;br /&gt;
#* NOTE: Steps 1 and 2 can&#039;t be combined together.&lt;br /&gt;
# Read status register: read port base+0 (388h). Save the result.&lt;br /&gt;
# Set Timer 1 to FFh: write FFh to register 2.&lt;br /&gt;
# Unmask and start Timer 1: write 21h to register 4.&lt;br /&gt;
# Wait in a delay loop for at least 80 µsec.&lt;br /&gt;
# Read status register: read port base+0 (388h). Save the result.&lt;br /&gt;
# Reset Timer 1, Timer 2 and IRQ as in steps 1 and 2.&lt;br /&gt;
# Test the results of the two reads: the first should be 0, the second should be C0h. If either is incorrect, then the OPL2 is not present.&lt;br /&gt;
&lt;br /&gt;
* NOTE1: You should AND the result bytes with E0h because the unused bits are undefined.&lt;br /&gt;
* NOTE2: This testing method doesn&#039;t work in some SoundBlaster compatible cards.&lt;br /&gt;
&lt;br /&gt;
=== OPL3 Detection ===&lt;br /&gt;
--------------&lt;br /&gt;
&lt;br /&gt;
# Detect OPL2. If present, continue.&lt;br /&gt;
# Read status register: read port base+0.&lt;br /&gt;
# AND the result with 06h.&lt;br /&gt;
# If the result is zero, you have OPL3, otherwise OPL2.&lt;br /&gt;
&lt;br /&gt;
* NOTE: This is NOT an official method. I have dug it out of a sound driver. I haven&#039;t tested it, because I haven&#039;t an OPL2 card (Adlib, SB Pro I). Nevertheless it &amp;quot;detects&amp;quot; my SB Pro II properly. ;-)&lt;br /&gt;
&lt;br /&gt;
Another possible detection method for distinguishing between SB Pro I and SB Pro II would be to try to detect OPL2 at I/O port base+0 and then at port base+2. The first test should succeed and the second should fail if OPL3 is present. (Remember: SB Pro I contains twin OPL2 chips at addresses base+0 and base+2, while SB Pro II contains one OPL3 chip at I/O address base+0 thru base+3).&lt;br /&gt;
&lt;br /&gt;
== BLASTER Environment Variable ==&lt;br /&gt;
&lt;br /&gt;
Perhaps the most recommended &amp;quot;detection&amp;quot; method. Reading this variable avoids blindfold I/O port scanning and possible device conflicts. The user is responsible for its proper setting.&lt;br /&gt;
&lt;br /&gt;
The variable has this format:&lt;br /&gt;
&lt;br /&gt;
 BLASTER=Aaddr Iirq Ddma Ttype&lt;br /&gt;
&lt;br /&gt;
* A: Base I/O address given in hex. For most Sound Blasters the default is 220.&lt;br /&gt;
* I: IRQ Number (decimal). Default 7.&lt;br /&gt;
* D: DMA Number (decimal). Default 1.&lt;br /&gt;
* T: Card Type (decimal):&lt;br /&gt;
** 1 - Sound Blaster 1.5&lt;br /&gt;
** 2 - Sound Blaster Pro I&lt;br /&gt;
** 3 - Sound Blaster 2.0&lt;br /&gt;
** 4 - Sound Blaster Pro II&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 BLASTER=A220 I7 D1 T4&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The PC Games Programmers Encyclopedia&#039;&#039;, Mark Feldman and many others on Usenet and Internet, http://bespin.org/~qz/pc-gpe/&lt;br /&gt;
: ... you can find (almost) everything you need there&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Sound Blaster - The Official Book&#039;&#039;, Richard Heimlich, David M. Golden, Ivan Luk, Peter M. Ridge, Osborne/McGraw Hill, ISBN 0-07-881907-5&lt;br /&gt;
: ... this is a number-one in my book-wishlist. If anyone wanted to get rid of the book, I wouldn&#039;t scorn it ... :-)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The SoundBlaster Developer Kit&#039;&#039;, Creative Labs Inc, Creative Technology PTE LTD&lt;br /&gt;
: ... I wonder if you can find something comprehensible in that.&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:Malvineous&amp;diff=5790</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=5790"/>
		<updated>2014-12-12T21:03:10Z</updated>

		<summary type="html">&lt;p&gt;The coder: Question&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;
== 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;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder&amp;diff=5783</id>
		<title>Eye of the Beholder</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder&amp;diff=5783"/>
		<updated>2014-12-12T20:26:25Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&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 = No&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;
[[Eye of the Beholder]] is a role-playing video game for computers and video game consoles developed by Westwood Studios. It was published by Strategic Simulations, Inc. in 1991 for the MS-DOS operating system and later ported to the Amiga, the Sega CD, Game Boy Advance and the SNES. The Sega CD version features an exclusive soundtrack composed by Yuzo Koshiro&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.adl&lt;br /&gt;
 | Format = [[ADL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cps&lt;br /&gt;
 | Format = [[Westwood CPS Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cmp&lt;br /&gt;
 | Format = [[Westwood CMP Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.ega&lt;br /&gt;
 | Format = [[Westwood EGA Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.col&lt;br /&gt;
 | Format = [[Westwood COL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.pal&lt;br /&gt;
 | Format = [[Westwood PAL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = item.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder item.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = itemtype.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder itemtype.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = text.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder text.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.dat, *.dec&lt;br /&gt;
 | Format = [[Eye of the Beholder decorations Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.fnt&lt;br /&gt;
 | Format = [[Eye of the Beholder bitmap font Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.inf, *.dro, *.elo&lt;br /&gt;
 | Format = [[Eye of the Beholder maze information Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.maz&lt;br /&gt;
 | Format = [[Eye of the Beholder maze Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Westwood]]&lt;br /&gt;
[[Category:3D dungeon]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder_Maze_Information_Format&amp;diff=5782</id>
		<title>Eye of the Beholder Maze Information Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder_Maze_Information_Format&amp;diff=5782"/>
		<updated>2014-12-12T20:25:30Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;.dro files are used in localized versions such as the spanish one. .dro files are non-compressed .inf files. &lt;br /&gt;
.elo files are used in some localized versions such as the german one. .elo files are non-compressed .inf files without header. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;General&#039;&#039;&#039;&lt;br /&gt;
Each maze consist of a .maz file and an accompaning .inf file. This document describes the .inf file and how it relates to the .maz files.&lt;br /&gt;
The .inf files are standard CPS files. However the german and spanish versions are uncompressed. This document assumes that you&#039;ve depacked the .inf files using for instance uncps.exe.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Header&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct Monster&lt;br /&gt;
{&lt;br /&gt;
    unsigned char  index;&lt;br /&gt;
    unsigned char  levelType;&lt;br /&gt;
    unsigned short pos;&lt;br /&gt;
    unsigned char  subpos;&lt;br /&gt;
    unsigned char  direction;&lt;br /&gt;
    unsigned char  type;&lt;br /&gt;
    unsigned char  picture;&lt;br /&gt;
    unsigned char  phase;&lt;br /&gt;
    unsigned char  pause;&lt;br /&gt;
    unsigned short weapon;&lt;br /&gt;
    unsigned short pocket_item;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Position gives the x and y values. It&#039;s lower 5 bits are the y coordinate value and the next 5 bits are the x coordinate value.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    x_pos = (pos &amp;gt;&amp;gt; 5) &amp;amp; 0x1F;&lt;br /&gt;
    y_pos = pos &amp;amp; 0x1F;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values sign must be confirmed.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct Inf&lt;br /&gt;
{&lt;br /&gt;
    unsigned short triggersOffset;&lt;br /&gt;
    char           mazeName[12];&lt;br /&gt;
    char           vmpVcnName[12];&lt;br /&gt;
    char           paletteName[12];&lt;br /&gt;
    unsigned char  unknown[9];&lt;br /&gt;
    unsigned char  monster1CompressionMethod;&lt;br /&gt;
    unsigned char  monster1Name[12];&lt;br /&gt;
    unsigned char  monster2CompressionMethod;&lt;br /&gt;
    unsigned char  monster2Name[12];&lt;br /&gt;
    unsigned char  unknown[5];&lt;br /&gt;
    Monster        monsters[30];&lt;br /&gt;
    unsigned short nbrDecCommands;&lt;br /&gt;
    DecCommand     commands[nbrDecCommands];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Decoration data&#039;&#039;&#039;&lt;br /&gt;
After the header comes the decoration data. It&#039;s loaded as a command sequence. The first unsigned short determines number of commands to execute. After that follows the first command code. Each command code is one byte.&lt;br /&gt;
&lt;br /&gt;
Command codes&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0xec (Load overlay image picture + overlay image rectangle data)&lt;br /&gt;
&lt;br /&gt;
    graphics data name, 12 bytes containing a null terminated string. Points to a .cps file containg wall graphics data.&lt;br /&gt;
    rectangles data name, 12 bytes containing a null terminated string. Points to a .dat file containing rectangular data that point into the graphics data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0xfb (Define wall mapping)&lt;br /&gt;
&lt;br /&gt;
struct WallMapping&lt;br /&gt;
{&lt;br /&gt;
   unsigned char wallMappingIndex; /* This is the index used by the .maz file. */&lt;br /&gt;
   unsigned char wallType; /* Index to what backdrop wall type that is being used. */&lt;br /&gt;
   unsigned char decorationID; /* Index to and optional overlay decoration image in&lt;br /&gt;
                                  the DecorationData.decorations array in the&lt;br /&gt;
                                  [[eob.dat|.dat]] files. */&lt;br /&gt;
   unsigned char unknownFlags1;&lt;br /&gt;
   unsigned char unknownFlags2;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Event data&#039;&#039;&#039;&lt;br /&gt;
After the decoration data comes a sequence of event data. It&#039;s also loaded as a command sequence. Each command code is one byte.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command codes&lt;br /&gt;
&lt;br /&gt;
0xff (Set wall)&lt;br /&gt;
0xfe (Change wall)&lt;br /&gt;
0xfd (Open door)&lt;br /&gt;
0xfc (Close coor)&lt;br /&gt;
0xfb (Create monster)&lt;br /&gt;
0xfa (Teleport)&lt;br /&gt;
0xf9 (Steal small item)&lt;br /&gt;
0xf8 (Message)&lt;br /&gt;
0xf7 (Set flag)&lt;br /&gt;
0xf6 (Sound)&lt;br /&gt;
0xf5 (Clear flag)&lt;br /&gt;
0xf4 (Heal)&lt;br /&gt;
0xf3 (Damage)&lt;br /&gt;
0xf2 (Jump)&lt;br /&gt;
0xf1 (End code)&lt;br /&gt;
0xf0 (Return)&lt;br /&gt;
0xef (Call)&lt;br /&gt;
0xee (Conditions)&lt;br /&gt;
0xed (Item consume)&lt;br /&gt;
0xec (Change level)&lt;br /&gt;
0xeb (Give experience)&lt;br /&gt;
0xea (New item)&lt;br /&gt;
0xe9 (Launcher)&lt;br /&gt;
0xe8 (Turn)&lt;br /&gt;
0xe7 (Identify all items)&lt;br /&gt;
0xe6 (Encounters)&lt;br /&gt;
0xe5 (Wait)&lt;br /&gt;
0xe4 (Update screen)&lt;br /&gt;
0xe3 (Text menu)&lt;br /&gt;
0xe2 (Special window pictures)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each command code is executed using a parsing function for that specific code. Number of bytes following each code is very specific to what command it is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0xff (Set wall)&lt;br /&gt;
&lt;br /&gt;
unsigned char subcode=nextUnsignedChar();&lt;br /&gt;
 &lt;br /&gt;
switch (subcode)&lt;br /&gt;
{&lt;br /&gt;
   case 0xf7: // Set complete maze block (all four walls)&lt;br /&gt;
      unsigned short position=nextUnsignedShort();&lt;br /&gt;
      unsigned char wallMappingIndex=nextUnsignedChar();&lt;br /&gt;
      for (int i=0; i&amp;lt;4; i++)&lt;br /&gt;
         maze[position][i]=wallMappingIndex;&lt;br /&gt;
   break;&lt;br /&gt;
 &lt;br /&gt;
   case 0xe9; // Change one wall&lt;br /&gt;
      unsigned short position=nextUnsignedShort();&lt;br /&gt;
      unsigned char wallMappingIndex=nextUnsignedChar();&lt;br /&gt;
      unsigned char direction=nextUnsignedChar();&lt;br /&gt;
      maze[position][direction]=wallMappingIndex;&lt;br /&gt;
   break;&lt;br /&gt;
 &lt;br /&gt;
   case 0xed; // Turn party&lt;br /&gt;
      Party.facing = nextUnsignedChar();&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0xfe (Change wall)&lt;br /&gt;
&lt;br /&gt;
unsigned char subcode=nextUnsignedChar();&lt;br /&gt;
 &lt;br /&gt;
switch (subcode)&lt;br /&gt;
{&lt;br /&gt;
   case 0xf7: //Flip four sides&lt;br /&gt;
      unsigned short position=nextUnsignedShort();&lt;br /&gt;
      unsigned char sourceWallMappingIndex=nextUnsignedChar();&lt;br /&gt;
      unsigned char destinationWallMappingIndex=nextUnsignedChar();&lt;br /&gt;
      for (int i=0; i&amp;lt;4; i++)&lt;br /&gt;
      {&lt;br /&gt;
         if (maze[position][i] == sourceWallMappingIndex)&lt;br /&gt;
            maze[position][i] = destinationWallMappingIndex;&lt;br /&gt;
      }&lt;br /&gt;
   break;&lt;br /&gt;
 &lt;br /&gt;
   case 0xe9;// Change one wall&lt;br /&gt;
      unsigned short position=nextUnsignedShort();&lt;br /&gt;
      unsigned char direction=nextUnsignedChar();&lt;br /&gt;
      unsigned char sourceWallMappingIndex=nextUnsignedChar();&lt;br /&gt;
      unsigned char destinationWallMappingIndex=nextUnsignedChar();&lt;br /&gt;
      if (maze[position][direction] == sourceWallMappingIndex)&lt;br /&gt;
         maze[position][direction] = destinationWallMappingIndex;&lt;br /&gt;
   break;&lt;br /&gt;
 &lt;br /&gt;
   case 0xea; // Unknown&lt;br /&gt;
      unsigned short unknown=nextUnsigndShort();&lt;br /&gt;
   break;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0xfb (Monster Creation)&lt;br /&gt;
&lt;br /&gt;
char MoNo;&lt;br /&gt;
char MoTime;&lt;br /&gt;
short int position;&lt;br /&gt;
char subpos;&lt;br /&gt;
char facing;&lt;br /&gt;
char type;&lt;br /&gt;
char pic;&lt;br /&gt;
char phase;&lt;br /&gt;
char pause;&lt;br /&gt;
short int weapon; /* Item Number */&lt;br /&gt;
short int pocket; /* Dropped on Monster killed */&lt;br /&gt;
&lt;br /&gt;
0xf6 (Sound)&lt;br /&gt;
&lt;br /&gt;
char SoundId;&lt;br /&gt;
short int position;&lt;br /&gt;
&lt;br /&gt;
0xf6 (Sound) in the demo version of the EOB1&lt;br /&gt;
&lt;br /&gt;
char SoundId;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All other commands, except 0xf6, are identical in all EOB1 versions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Far from all command codes have been documented here, however most of it have already been reverse engineered. Feel free to check the source code for the script decompiler: Script Decompiler 2 at the tools section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
.inf dump with comments&lt;br /&gt;
EOB1 INF file resourced for assembler 68000 (To See here for all the INF files&lt;br /&gt;
EOB-InfFile-Asm.lha&lt;br /&gt;
EOB-InfFile-Asm.lha&lt;br /&gt;
&lt;br /&gt;
    Details&lt;br /&gt;
    Download&lt;br /&gt;
    91 KB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 BOPT uo+&lt;br /&gt;
 BOPT ue-&lt;br /&gt;
 BOPT ua+&lt;br /&gt;
 OUTPUT LEVEL1.INF.dec&lt;br /&gt;
 ;Source Created by &amp;quot;EOB Langage File ReSourcerINF&amp;quot; Beta&lt;br /&gt;
 ;A Tool done by CFou! on June 2006&lt;br /&gt;
Start&lt;br /&gt;
Hunk0:&lt;br /&gt;
 dc.b Hunk3-Start,(Hunk3-Start)/$100 ; dc.w $B10A&lt;br /&gt;
 ; Maze name&lt;br /&gt;
 dc.b &#039;level1.maz&#039;,0,0&lt;br /&gt;
 ; VCN/VMP name&lt;br /&gt;
 dc.b &#039;brick&#039;,0,&#039;.maz&#039;,0,0&lt;br /&gt;
 ; Palette name&lt;br /&gt;
 dc.b &#039;brick&#039;,0,&#039;.maz&#039;,0,0&lt;br /&gt;
_0026:&lt;br /&gt;
 ; Nb of doors and doorknobs&lt;br /&gt;
 dc.w $0000,$FF03&lt;br /&gt;
_002A:&lt;br /&gt;
 ; Max monster / tdiff etc&lt;br /&gt;
 dc.b $00,$00,$00,$00,$00&lt;br /&gt;
_002F:&lt;br /&gt;
 ; Number of procedure for extraction of monster picture&lt;br /&gt;
 dc.b $01&lt;br /&gt;
 ; Name Of Monster pic CPS file&lt;br /&gt;
 dc.b &#039;kobold&#039;,0,&#039;maz&#039;,0,0&lt;br /&gt;
_003C:&lt;br /&gt;
 ; Number of procedure for extraction of monster picture&lt;br /&gt;
 dc.b $00&lt;br /&gt;
 ; Name Of Monster pic CPS file&lt;br /&gt;
 dc.b &#039;leech&#039;,0,0,&#039;maz&#039;,0,0&lt;br /&gt;
_0049:&lt;br /&gt;
 ; Timer0 | Timer 1| Timerdiff (in Ticks)&lt;br /&gt;
 dc.b $00,$19&lt;br /&gt;
 ; Timer0 | Timer 1| Timerdiff&lt;br /&gt;
 dc.b $01,$23&lt;br /&gt;
 ; End of Timer&lt;br /&gt;
 dc.b $FF&lt;br /&gt;
_004E:&lt;br /&gt;
 ; Monster Description X 30: Start point and so on&lt;br /&gt;
 dc.b $01,$00,$14,$01,$04,$02,$00,$00,$06,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $02,$00,$F4,$00,$04,$02,$00,$00,$06,$00,$00,$00,$04,$00&lt;br /&gt;
 dc.b $03,$00,$15,$01,$04,$02,$00,$00,$06,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $04,$00,$F5,$00,$04,$02,$00,$00,$06,$00,$04,$00,$37,$00&lt;br /&gt;
 dc.b $05,$00,$B4,$01,$00,$00,$00,$00,$04,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $06,$00,$B4,$01,$01,$00,$00,$00,$04,$00,$00,$00,$04,$00&lt;br /&gt;
 dc.b $07,$00,$B4,$01,$02,$00,$00,$00,$04,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $08,$00,$B4,$01,$03,$00,$00,$00,$04,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $09,$00,$4A,$02,$04,$01,$00,$00,$05,$00,$00,$00,$04,$00&lt;br /&gt;
 dc.b $0A,$00,$4B,$02,$04,$03,$00,$00,$05,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $0B,$00,$4C,$02,$04,$01,$00,$00,$05,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $0C,$00,$2C,$03,$02,$02,$00,$00,$04,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $0D,$00,$2C,$03,$03,$02,$00,$00,$04,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $0E,$00,$59,$02,$02,$02,$00,$00,$04,$00,$00,$00,$04,$00&lt;br /&gt;
 dc.b $0F,$00,$59,$02,$03,$02,$00,$00,$04,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $10,$00,$6B,$02,$04,$01,$00,$00,$06,$00,$04,$00,$3B,$00&lt;br /&gt;
 dc.b $11,$00,$2C,$02,$04,$02,$00,$00,$06,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $12,$00,$8F,$01,$04,$02,$00,$00,$01,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $13,$01,$86,$03,$04,$00,$01,$01,$01,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $14,$01,$66,$03,$04,$00,$01,$01,$01,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $15,$01,$45,$03,$04,$01,$01,$01,$05,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $16,$01,$2A,$03,$04,$00,$01,$01,$01,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $17,$01,$E8,$02,$04,$01,$01,$01,$01,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $18,$01,$EF,$02,$04,$03,$01,$01,$01,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00&lt;br /&gt;
_01F2:&lt;br /&gt;
Hunk1:&lt;br /&gt;
 ; Nb of $EC &amp;amp; $FB command Hunk 1&lt;br /&gt;
 dc.w $1B00&lt;br /&gt;
 ; Command $EC &amp;amp; $FB&lt;br /&gt;
 dc.b $EC&lt;br /&gt;
 dc.b &#039;brick1&#039;,0,&#039;maz&#039;,0,0&lt;br /&gt;
 dc.b &#039;brick.dat&#039;,0,0,0&lt;br /&gt;
 dc.b $FB,$27,$01,$00,$03,$04&lt;br /&gt;
 dc.b $FB,$28,$01,$01,$04,$04&lt;br /&gt;
 dc.b $FB,$3E,$01,$17,$02,$04&lt;br /&gt;
 dc.b $FB,$2B,$01,$28,$02,$04&lt;br /&gt;
 dc.b $FB,$3F,$01,$16,$02,$04&lt;br /&gt;
 dc.b $FB,$32,$01,$04,$02,$04&lt;br /&gt;
 dc.b $FB,$41,$01,$1A,$02,$04&lt;br /&gt;
 dc.b $FB,$2F,$01,$30,$02,$04&lt;br /&gt;
 dc.b $FB,$2C,$01,$2F,$02,$04&lt;br /&gt;
 dc.b $FB,$2A,$01,$31,$02,$04&lt;br /&gt;
 dc.b $EC&lt;br /&gt;
 dc.b &#039;brick2&#039;,0,&#039;at&#039;,0,0,0&lt;br /&gt;
 dc.b &#039;brick.dat&#039;,0,0,0&lt;br /&gt;
 dc.b $FB,$1A,$00,$1C,$00,$03&lt;br /&gt;
 dc.b $FB,$17,$04,$21,$00,$05&lt;br /&gt;
 dc.b $FB,$18,$05,$22,$00,$05&lt;br /&gt;
 dc.b $FB,$1C,$00,$1D,$00,$03&lt;br /&gt;
 dc.b $FB,$19,$00,$FF,$00,$07&lt;br /&gt;
 dc.b $FB,$3C,$01,$24,$03,$04&lt;br /&gt;
 dc.b $FB,$3D,$01,$25,$04,$04&lt;br /&gt;
 dc.b $FB,$37,$01,$1E,$03,$04&lt;br /&gt;
 dc.b $FB,$38,$01,$1F,$04,$04&lt;br /&gt;
 dc.b $FB,$1D,$01,$20,$0A,$84&lt;br /&gt;
 dc.b $FB,$33,$01,$26,$02,$04&lt;br /&gt;
 dc.b $FB,$3A,$01,$23,$00,$04&lt;br /&gt;
 dc.b $EC&lt;br /&gt;
 dc.b &#039;brick3&#039;,0,&#039;at&#039;,0,0,0&lt;br /&gt;
 dc.b &#039;brick.dat&#039;,0,0,0&lt;br /&gt;
 dc.b $FB,$45,$00,$27,$02,$04&lt;br /&gt;
 dc.b $FB,$31,$00,$2D,$02,$04&lt;br /&gt;
 ;$1B Command Resourced&lt;br /&gt;
Hunk2:&lt;br /&gt;
 ; New Section&lt;br /&gt;
_02CF: dc.b $EE,$E0,$01&lt;br /&gt;
_02D2: dc.b $FF,$EE,_035A-Start,(_035A-Start)/$100 ; dc.b $5A,$03&lt;br /&gt;
_02D6: dc.b $EE,$ED,$01&lt;br /&gt;
_02D9: dc.b $FF,$EE,_0308-Start,(_0308-Start)/$100 ; dc.b $08,$03&lt;br /&gt;
_02DD: dc.b $EE,$EF,$1F,$00&lt;br /&gt;
_02E1: dc.b $FF,$EE,_02EA-Start,(_02EA-Start)/$100 ; dc.b $EA,$02&lt;br /&gt;
_02E5: dc.b $E6,$0A&lt;br /&gt;
_02E7: dc.b $F7,$EF,$1F&lt;br /&gt;
_02EA: dc.b $F8,&amp;quot;going down...&amp;quot;,0,$05,$00&lt;br /&gt;
_02FB: dc.b $F6,$4F,$00,$00&lt;br /&gt;
_02FF: dc.b $EC,$E5,$02,$F3,$02,$01&lt;br /&gt;
_0305: dc.b $F2,_035A-Start,(_035A-Start)/$100 ; dc.b $5A,$03&lt;br /&gt;
_0308: dc.b $F8,&amp;quot;you can&#039;t go that way.&amp;quot;,0,$0F,$00&lt;br /&gt;
_0322: dc.b $F6,$1D,$00,$00&lt;br /&gt;
_0326: dc.b $EE,$01,$00&lt;br /&gt;
_0329: dc.b $FF,$EE,_0333-Start,(_0333-Start)/$100 ; dc.b $33,$03&lt;br /&gt;
_032D: dc.b $FA,$E8,$00,$00,$12,$03&lt;br /&gt;
_0333: dc.b $EE,$01,$01&lt;br /&gt;
_0336: dc.b $FF,$EE,_0340-Start,(_0340-Start)/$100 ; dc.b $40,$03&lt;br /&gt;
_033A: dc.b $FA,$E8,$00,$00,$F1,$02&lt;br /&gt;
_0340: dc.b $EE,$01,$02&lt;br /&gt;
_0343: dc.b $FF,$EE,_034D-Start,(_034D-Start)/$100 ; dc.b $4D,$03&lt;br /&gt;
_0347: dc.b $FA,$E8,$00,$00,$D2,$02&lt;br /&gt;
_034D: dc.b $EE,$01,$03&lt;br /&gt;
_0350: dc.b $FF,$EE,_035A-Start,(_035A-Start)/$100 ; dc.b $5A,$03&lt;br /&gt;
_0354: dc.b $FA,$E8,$00,$00,$F3,$02&lt;br /&gt;
_035A: dc.b $EE,$E0,$04&lt;br /&gt;
_035D: dc.b $FF,$EE,_0395-Start,(_0395-Start)/$100 ; dc.b $95,$03&lt;br /&gt;
_0361: dc.b $EE,$01,$00&lt;br /&gt;
_0364: dc.b $FF,$EE,_036E-Start,(_036E-Start)/$100 ; dc.b $6E,$03&lt;br /&gt;
_0368: dc.b $FA,$F5,$F2,$02,$12,$03&lt;br /&gt;
_036E: dc.b $EE,$01,$01&lt;br /&gt;
_0371: dc.b $FF,$EE,_037B-Start,(_037B-Start)/$100 ; dc.b $7B,$03&lt;br /&gt;
_0375: dc.b $FA,$F5,$F2,$02,$F1,$02&lt;br /&gt;
_037B: dc.b $EE,$01,$02&lt;br /&gt;
_037E: dc.b $FF,$EE,_0388-Start,(_0388-Start)/$100 ; dc.b $88,$03&lt;br /&gt;
_0382: dc.b $FA,$F5,$F2,$02,$D2,$02&lt;br /&gt;
_0388: dc.b $EE,$01,$03&lt;br /&gt;
_038B: dc.b $FF,$EE,_0395-Start,(_0395-Start)/$100 ; dc.b $95,$03&lt;br /&gt;
_038F: dc.b $FA,$F5,$F2,$02,$F3,$02&lt;br /&gt;
_0395:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0396: dc.b $EE,$EF,$0A,$00&lt;br /&gt;
_039A: dc.b $FF,$EE,_03A5-Start,(_03A5-Start)/$100 ; dc.b $A5,$03&lt;br /&gt;
_039E: dc.b $EB,$E2,$40,$06&lt;br /&gt;
_03A2: dc.b $F7,$EF,$0A&lt;br /&gt;
_03A5:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_03A6: dc.b $EB,$E2,$10,$27&lt;br /&gt;
_03AA:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_03AB: dc.b $EE,$EF,$08,$00&lt;br /&gt;
_03AF: dc.b $FF,$EE,_03BA-Start,(_03BA-Start)/$100 ; dc.b $BA,$03&lt;br /&gt;
_03B3: dc.b $EB,$E2,$40,$06&lt;br /&gt;
_03B7: dc.b $F7,$EF,$08&lt;br /&gt;
_03BA:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_03BB: dc.b $EE,$EF,$04,$00&lt;br /&gt;
_03BF: dc.b $FF,$EE,_03CA-Start,(_03CA-Start)/$100 ; dc.b $CA,$03&lt;br /&gt;
_03C3: dc.b $EB,$E2,$90,$01&lt;br /&gt;
_03C7: dc.b $F7,$EF,$04&lt;br /&gt;
_03CA:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_03CB: dc.b $F6,$01,$AD,$01&lt;br /&gt;
_03CF: dc.b $FE,$EA,$AE,$01&lt;br /&gt;
_03D3: dc.b $EE,$EF,$01,$00&lt;br /&gt;
_03D7: dc.b $FF,$EE,_03E2-Start,(_03E2-Start)/$100 ; dc.b $E2,$03&lt;br /&gt;
_03DB: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_03DF: dc.b $F7,$EF,$01&lt;br /&gt;
_03E2:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_03E3: dc.b $EE,$F7,$75,$01,$01&lt;br /&gt;
_03E8: dc.b $FE,$EE,_03F6-Start,(_03F6-Start)/$100 ; dc.b $F6,$03&lt;br /&gt;
_03EC: dc.b $FF,$F7,$11,$02,$01&lt;br /&gt;
_03F1: dc.b $FF,$F7,$2E,$03,$01&lt;br /&gt;
_03F6: dc.b $EE,$EF,$02,$00&lt;br /&gt;
_03FA: dc.b $FF,$EE,_0405-Start,(_0405-Start)/$100 ; dc.b $05,$04&lt;br /&gt;
_03FE: dc.b $EB,$E2,$90,$01&lt;br /&gt;
_0402: dc.b $F7,$EF,$02&lt;br /&gt;
_0405:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0406: dc.b $EE,$F7,$11,$02,$01&lt;br /&gt;
_040B: dc.b $FE,$EE,_041F-Start,(_041F-Start)/$100 ; dc.b $1F,$04&lt;br /&gt;
_040F: dc.b $FF,$E9,$C9,$02,$00,$01&lt;br /&gt;
_0415: dc.b $FF,$F7,$75,$01,$01&lt;br /&gt;
_041A: dc.b $FF,$F7,$4D,$03,$01&lt;br /&gt;
_041F: dc.b $F7,$EF,$02&lt;br /&gt;
_0422:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0423: dc.b $EE,$E9,$00,$B7,$01,$01&lt;br /&gt;
_0429: dc.b $FE,$EE,_0444-Start,(_0444-Start)/$100 ; dc.b $44,$04&lt;br /&gt;
_042D: dc.b $F6,$07,$B7,$01&lt;br /&gt;
_0431: dc.b $FE,$EA,$B6,$01&lt;br /&gt;
_0435: dc.b $EE,$EF,$05,$00&lt;br /&gt;
_0439: dc.b $FF,$EE,_0444-Start,(_0444-Start)/$100 ; dc.b $44,$04&lt;br /&gt;
_043D: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_0441: dc.b $F7,$EF,$05&lt;br /&gt;
_0444:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0445: dc.b $EE,$F7,$D6,$01,$1C&lt;br /&gt;
_044A: dc.b $FF,$EE,_0465-Start,(_0465-Start)/$100 ; dc.b $65,$04&lt;br /&gt;
_044E: dc.b $F6,$0C,$D6,$01&lt;br /&gt;
_0452: dc.b $FE,$EA,$B6,$01&lt;br /&gt;
_0456: dc.b $EE,$EF,$07,$00&lt;br /&gt;
_045A: dc.b $FF,$EE,_0465-Start,(_0465-Start)/$100 ; dc.b $65,$04&lt;br /&gt;
_045E: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_0462: dc.b $F7,$EF,$07&lt;br /&gt;
_0465:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0466: dc.b $EE,$E0,$01&lt;br /&gt;
_0469: dc.b $FF,$F5,$FF,$36,$02,$00&lt;br /&gt;
_046F: dc.b $FF,$F9,$E0,$04,$FF&lt;br /&gt;
_0474: dc.b $F5,$FF,$36,$02,$01&lt;br /&gt;
_0479: dc.b $FF,$F9,$F1,$36,$02,$00&lt;br /&gt;
_047F: dc.b $FF,$F9,$F8,$EE,_048C-Start,(_048C-Start)/$100 ; dc.b $8C,$04&lt;br /&gt;
_0485: dc.b $F6,$0C,$36,$02&lt;br /&gt;
_0489: dc.b $FD,$76,$02&lt;br /&gt;
_048C: dc.b $EE,$E0,$02&lt;br /&gt;
_048F: dc.b $FF,$F5,$FF,$36,$02,$00&lt;br /&gt;
_0495: dc.b $FF,$F9,$E0,$08,$FF&lt;br /&gt;
_049A: dc.b $F5,$FF,$36,$02,$00&lt;br /&gt;
_049F: dc.b $FF,$F9,$F1,$36,$02,$00&lt;br /&gt;
_04A5: dc.b $FF,$F9,$F8,$EE,_04B2-Start,(_04B2-Start)/$100 ; dc.b $B2,$04&lt;br /&gt;
_04AB: dc.b $F6,$0C,$36,$02&lt;br /&gt;
_04AF: dc.b $FC,$76,$02&lt;br /&gt;
_04B2:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_04B3: dc.b $F6,$01,$52,$02&lt;br /&gt;
_04B7: dc.b $FE,$EA,$53,$02&lt;br /&gt;
_04BB:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_04BC: dc.b $EE,$E9,$01,$6E,$02,$01&lt;br /&gt;
_04C2: dc.b $FE,$EE,_04DD-Start,(_04DD-Start)/$100 ; dc.b $DD,$04&lt;br /&gt;
_04C6: dc.b $F6,$07,$6E,$02&lt;br /&gt;
_04CA: dc.b $FE,$EA,$4E,$02&lt;br /&gt;
_04CE: dc.b $EE,$EF,$05,$00&lt;br /&gt;
_04D2: dc.b $FF,$EE,_04DD-Start,(_04DD-Start)/$100 ; dc.b $DD,$04&lt;br /&gt;
_04D6: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_04DA: dc.b $F7,$EF,$05&lt;br /&gt;
_04DD:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_04DE: dc.b $EE,$F7,$4D,$02,$1C&lt;br /&gt;
_04E3: dc.b $FF,$EE,_04FE-Start,(_04FE-Start)/$100 ; dc.b $FE,$04&lt;br /&gt;
_04E7: dc.b $F6,$0C,$4D,$02&lt;br /&gt;
_04EB: dc.b $FE,$EA,$4E,$02&lt;br /&gt;
_04EF: dc.b $EE,$EF,$07,$00&lt;br /&gt;
_04F3: dc.b $FF,$EE,_04FE-Start,(_04FE-Start)/$100 ; dc.b $FE,$04&lt;br /&gt;
_04F7: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_04FB: dc.b $F7,$EF,$07&lt;br /&gt;
_04FE:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_04FF: dc.b $F6,$07,$B2,$02&lt;br /&gt;
_0503: dc.b $F6,$0D,$93,$02&lt;br /&gt;
_0507: dc.b $FE,$F7,$93,$02,$00,$01&lt;br /&gt;
_050D: dc.b $FA,$F3,$93,$02,$73,$02&lt;br /&gt;
_0513: dc.b $EE,$EF,$06,$00&lt;br /&gt;
_0517: dc.b $FF,$EE,_0522-Start,(_0522-Start)/$100 ; dc.b $22,$05&lt;br /&gt;
_051B: dc.b $EB,$E2,$40,$06&lt;br /&gt;
_051F: dc.b $F7,$EF,$06&lt;br /&gt;
_0522:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0523: dc.b $F6,$07,$BA,$02&lt;br /&gt;
_0527: dc.b $FA,$F3,$99,$02,$79,$02&lt;br /&gt;
_052D: dc.b $F6,$0D,$99,$02&lt;br /&gt;
_0531: dc.b $FE,$F7,$99,$02,$00,$01&lt;br /&gt;
_0537: dc.b $EE,$EF,$06,$00&lt;br /&gt;
_053B: dc.b $FF,$EE,_0546-Start,(_0546-Start)/$100 ; dc.b $46,$05&lt;br /&gt;
_053F: dc.b $EB,$E2,$40,$06&lt;br /&gt;
_0543: dc.b $F7,$EF,$06&lt;br /&gt;
_0546:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0547: dc.b $EE,$E9,$01,$E7,$02,$01&lt;br /&gt;
_054D: dc.b $FE,$EE,_0568-Start,(_0568-Start)/$100 ; dc.b $68,$05&lt;br /&gt;
_0551: dc.b $F6,$07,$E7,$02&lt;br /&gt;
_0555: dc.b $FE,$EA,$C8,$02&lt;br /&gt;
_0559: dc.b $EE,$EF,$05,$00&lt;br /&gt;
_055D: dc.b $FF,$EE,_0568-Start,(_0568-Start)/$100 ; dc.b $68,$05&lt;br /&gt;
_0561: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_0565: dc.b $F7,$EF,$05&lt;br /&gt;
_0568:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0569: dc.b $F6,$07,$C9,$02&lt;br /&gt;
_056D: dc.b $EE,$E9,$00,$C9,$02,$01&lt;br /&gt;
_0573: dc.b $FE,$EE,_0590-Start,(_0590-Start)/$100 ; dc.b $90,$05&lt;br /&gt;
_0577: dc.b $FE,$EA,$C8,$02&lt;br /&gt;
_057B: dc.b $FF,$E9,$E7,$02,$01,$01&lt;br /&gt;
_0581: dc.b $EE,$EF,$05,$00&lt;br /&gt;
_0585: dc.b $FF,$EE,_0590-Start,(_0590-Start)/$100 ; dc.b $90,$05&lt;br /&gt;
_0589: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_058D: dc.b $F7,$EF,$05&lt;br /&gt;
_0590:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0591: dc.b $F6,$0C,$11,$03&lt;br /&gt;
_0595: dc.b $FD,$F1,$02&lt;br /&gt;
_0598:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0599: dc.b $EE,$E0,$01&lt;br /&gt;
_059C: dc.b $FF,$F5,$FF,$F0,$02,$00&lt;br /&gt;
_05A2: dc.b $FF,$F9,$EE,_05AE-Start,(_05AE-Start)/$100 ; dc.b $AE,$05&lt;br /&gt;
_05A7: dc.b $F6,$0C,$F0,$02&lt;br /&gt;
_05AB: dc.b $FC,$F1,$02&lt;br /&gt;
_05AE: dc.b $EE,$E0,$04&lt;br /&gt;
_05B1: dc.b $FF,$F1,$F0,$02,$00&lt;br /&gt;
_05B6: dc.b $FF,$F5,$FF,$F0,$02,$02&lt;br /&gt;
_05BC: dc.b $FD,$F9,$F9,$EE,_05C9-Start,(_05C9-Start)/$100 ; dc.b $C9,$05&lt;br /&gt;
_05C2: dc.b $F6,$0C,$F0,$02&lt;br /&gt;
_05C6: dc.b $FC,$F1,$02&lt;br /&gt;
_05C9:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_05CA: dc.b $EE,$EF,$00,$00&lt;br /&gt;
_05CE: dc.b $FF,$EE,_05F1-Start,(_05F1-Start)/$100 ; dc.b $F1,$05&lt;br /&gt;
_05D2: dc.b $F8,&amp;quot;it smells terrible here.&amp;quot;,0,$02,$00&lt;br /&gt;
_05EE: dc.b $F7,$EF,$00&lt;br /&gt;
_05F1:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_05F2: dc.b $F8,&amp;quot;this slimy, smelly drain pipe reveals nothing.&amp;quot;,0,$02,$00&lt;br /&gt;
_0624: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_0628: dc.b $FF,$EE,_0633-Start,(_0633-Start)/$100 ; dc.b $33,$06&lt;br /&gt;
_062C: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_0630: dc.b $F7,$EF,$03&lt;br /&gt;
_0633:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0634: dc.b $F8,&amp;quot;there is a drainage grate here.&amp;quot;,0,$02,$00&lt;br /&gt;
_0657: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_065B: dc.b $FF,$EE,_0666-Start,(_0666-Start)/$100 ; dc.b $66,$06&lt;br /&gt;
_065F: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_0663: dc.b $F7,$EF,$03&lt;br /&gt;
_0666: dc.b $EE,$E7,$F5,$00&lt;br /&gt;
_066A: dc.b $FF,$EF,$01,$00&lt;br /&gt;
_066E: dc.b $FF,$F9,$EE,_067C-Start,(_067C-Start)/$100 ; dc.b $7C,$06&lt;br /&gt;
_0673: dc.b $EA,$3A,$00,$FF,$FF,$00&lt;br /&gt;
_0679: dc.b $F7,$EF,$01&lt;br /&gt;
_067C:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_067D: dc.b $F8,&amp;quot;this slimy, smelly drain pipe reveals nothing.&amp;quot;,0,$02,$00&lt;br /&gt;
_06AF: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_06B3: dc.b $FF,$EE,_06BE-Start,(_06BE-Start)/$100 ; dc.b $BE,$06&lt;br /&gt;
_06B7: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_06BB: dc.b $F7,$EF,$03&lt;br /&gt;
_06BE:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_06BF: dc.b $F8,&amp;quot;there is a drainage grate here.&amp;quot;,0,$02,$00&lt;br /&gt;
_06E2: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_06E6: dc.b $FF,$EE,_06F1-Start,(_06F1-Start)/$100 ; dc.b $F1,$06&lt;br /&gt;
_06EA: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_06EE: dc.b $F7,$EF,$03&lt;br /&gt;
_06F1:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_06F2: dc.b $F8,&amp;quot;there is a drainage grate here.&amp;quot;,0,$02,$00&lt;br /&gt;
_0715: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_0719: dc.b $FF,$EE,_0724-Start,(_0724-Start)/$100 ; dc.b $24,$07&lt;br /&gt;
_071D: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_0721: dc.b $F7,$EF,$03&lt;br /&gt;
_0724:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0725: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_0729: dc.b $FF,$EE,_0734-Start,(_0734-Start)/$100 ; dc.b $34,$07&lt;br /&gt;
_072D: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_0731: dc.b $F7,$EF,$03&lt;br /&gt;
_0734: dc.b $EE,$F1,$CE,$01,$01&lt;br /&gt;
_0739: dc.b $FF,$EE,_07AF-Start,(_07AF-Start)/$100 ; dc.b $AF,$07&lt;br /&gt;
_073D: dc.b $EE,$E9,$03,$CF,$01,$2C&lt;br /&gt;
_0743: dc.b $FF,$EE,_0789-Start,(_0789-Start)/$100 ; dc.b $89,$07&lt;br /&gt;
_0747: dc.b $F8,&amp;quot;something scurries deeper into the floor drain.&amp;quot;,0,$02,$00&lt;br /&gt;
_077A: dc.b $FF,$E9,$CF,$01,$03,$3E&lt;br /&gt;
_0780: dc.b $FF,$E9,$CF,$01,$01,$2C&lt;br /&gt;
_0786: dc.b $F2,_07AC-Start,(_07AC-Start)/$100 ; dc.b $AC,$07&lt;br /&gt;
_0789: dc.b $F8,&amp;quot;there is a drainage grate here.&amp;quot;,0,$02,$00&lt;br /&gt;
_07AC: dc.b $F2,_081E-Start,(_081E-Start)/$100 ; dc.b $1E,$08&lt;br /&gt;
_07AF: dc.b $EE,$E9,$01,$CF,$01,$2C&lt;br /&gt;
_07B5: dc.b $FF,$EE,_07FB-Start,(_07FB-Start)/$100 ; dc.b $FB,$07&lt;br /&gt;
_07B9: dc.b $F8,&amp;quot;something scurries deeper into the floor drain.&amp;quot;,0,$02,$00&lt;br /&gt;
_07EC: dc.b $FF,$E9,$CF,$01,$01,$3E&lt;br /&gt;
_07F2: dc.b $FF,$E9,$CF,$01,$03,$2C&lt;br /&gt;
_07F8: dc.b $F2,_081E-Start,(_081E-Start)/$100 ; dc.b $1E,$08&lt;br /&gt;
_07FB: dc.b $F8,&amp;quot;there is a drainage grate here.&amp;quot;,0,$02,$00&lt;br /&gt;
_081E:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_081F: dc.b $FF,$E9,$CF,$01,$03,$2C&lt;br /&gt;
_0825: dc.b $FF,$E9,$CF,$01,$01,$2C&lt;br /&gt;
_082B:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_082C: dc.b $F8,&amp;quot;this slimy, smelly drain pipe reveals nothing.&amp;quot;,0,$02,$00&lt;br /&gt;
_085E: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_0862: dc.b $FF,$EE,_086D-Start,(_086D-Start)/$100 ; dc.b $6D,$08&lt;br /&gt;
_0866: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_086A: dc.b $F7,$EF,$03&lt;br /&gt;
_086D:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_086E: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_0872: dc.b $FF,$EE,_087D-Start,(_087D-Start)/$100 ; dc.b $7D,$08&lt;br /&gt;
_0876: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_087A: dc.b $F7,$EF,$03&lt;br /&gt;
_087D: dc.b $EE,$DD,$04,$01&lt;br /&gt;
_0881: dc.b $FF,$EE,_08A7-Start,(_08A7-Start)/$100 ; dc.b $A7,$08&lt;br /&gt;
_0885: dc.b $F8,&amp;quot;kobold rune for &#039;entrance&#039;.&amp;quot;,0,$02,$00&lt;br /&gt;
_08A4: dc.b $F2,_08C5-Start,(_08C5-Start)/$100 ; dc.b $C5,$08&lt;br /&gt;
_08A7: dc.b $F8,&amp;quot;this rune is unrecognized.&amp;quot;,0,$02,$00&lt;br /&gt;
_08C5:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_08C6: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_08CA: dc.b $FF,$EE,_08D5-Start,(_08D5-Start)/$100 ; dc.b $D5,$08&lt;br /&gt;
_08CE: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_08D2: dc.b $F7,$EF,$03&lt;br /&gt;
_08D5: dc.b $EE,$DD,$04,$01&lt;br /&gt;
_08D9: dc.b $FF,$EE,_08FF-Start,(_08FF-Start)/$100 ; dc.b $FF,$08&lt;br /&gt;
_08DD: dc.b $F8,&amp;quot;kobold rune for &#039;entrance&#039;.&amp;quot;,0,$02,$00&lt;br /&gt;
_08FC: dc.b $F2,_091D-Start,(_091D-Start)/$100 ; dc.b $1D,$09&lt;br /&gt;
_08FF: dc.b $F8,&amp;quot;this rune is unrecognized.&amp;quot;,0,$02,$00&lt;br /&gt;
_091D:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_091E: dc.b $EE,$F5,$05,$0C,$03,$00&lt;br /&gt;
_0924: dc.b $FB,$F0,$01,$00&lt;br /&gt;
_0928: dc.b $FF,$F9,$EE,_0962-Start,(_0962-Start)/$100 ; dc.b $62,$09&lt;br /&gt;
_092D: dc.b $F8,&amp;quot;special quest for this level!&amp;quot;,0,$03,$00&lt;br /&gt;
_094E: dc.b $F6,$1C,$00,$00&lt;br /&gt;
_0952: dc.b $F7,$F0,$01&lt;br /&gt;
_0955: dc.b $ED,$05,$0C,$03&lt;br /&gt;
_0959: dc.b $EA,$31,$00,$0C,$03,$08&lt;br /&gt;
_095F: dc.b $F7,$F0,$01&lt;br /&gt;
_0962: dc.b $EE,$EF,$09,$00&lt;br /&gt;
_0966: dc.b $FF,$EE,_0971-Start,(_0971-Start)/$100 ; dc.b $71,$09&lt;br /&gt;
_096A: dc.b $EB,$E2,$90,$01&lt;br /&gt;
_096E: dc.b $F7,$EF,$09&lt;br /&gt;
_0971:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0972: dc.b $F8,&amp;quot;fallen rocks block the way.&amp;quot;,0,$02,$00&lt;br /&gt;
_0991:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0992: dc.b $FF,$E9,$CA,$01,$02,$31&lt;br /&gt;
_0998:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0999: dc.b $FF,$E9,$CA,$01,$02,$45&lt;br /&gt;
_099F:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_09A0: dc.b $EE,$E9,$03,$62,$00,$08&lt;br /&gt;
_09A6: dc.b $FF,$EE,_0A86-Start,(_0A86-Start)/$100 ; dc.b $86,$0A&lt;br /&gt;
_09AA: dc.b $EE,$E7,$E1,$26&lt;br /&gt;
_09AE: dc.b $FF,$E7,$F6,$01&lt;br /&gt;
_09B2: dc.b $FF,$F9,$EE,_09C3-Start,(_09C3-Start)/$100 ; dc.b $C3,$09&lt;br /&gt;
_09B7: dc.b $F6,$0E,$81,$00&lt;br /&gt;
_09BB: dc.b $FD,$62,$00&lt;br /&gt;
_09BE: dc.b $ED,$FF&lt;br /&gt;
_09C0: dc.b $F2,_0A83-Start,(_0A83-Start)/$100 ; dc.b $83,$0A&lt;br /&gt;
_09C3: dc.b $EE,$E7,$E1,$26&lt;br /&gt;
_09C7: dc.b $FF,$EE,_09E5-Start,(_09E5-Start)/$100 ; dc.b $E5,$09&lt;br /&gt;
_09CB: dc.b $F8,&amp;quot;it doesn&#039;t fit.&amp;quot;,0,$06,$00&lt;br /&gt;
_09DE: dc.b $F6,$51,$81,$00&lt;br /&gt;
_09E2: dc.b $F2,_0A83-Start,(_0A83-Start)/$100 ; dc.b $83,$0A&lt;br /&gt;
_09E5: dc.b $EE,$E7,$E1,$1C&lt;br /&gt;
_09E9: dc.b $FF,$EE,_0A66-Start,(_0A66-Start)/$100 ; dc.b $66,$0A&lt;br /&gt;
_09ED: dc.b $EE,$DC,$08,$01&lt;br /&gt;
_09F1: dc.b $FF,$EE,_0A43-Start,(_0A43-Start)/$100 ; dc.b $43,$0A&lt;br /&gt;
_09F5: dc.b $F6,$51,$81,$00&lt;br /&gt;
_09F9: dc.b $F8,&amp;quot;failed lock pick attempt.&amp;quot;,0,$05,$00&lt;br /&gt;
_0A16: dc.b $EE,$DB,$01,$64,$00,$01&lt;br /&gt;
_0A1C: dc.b $FF,$EE,_0A40-Start,(_0A40-Start)/$100 ; dc.b $40,$0A&lt;br /&gt;
_0A20: dc.b $F6,$52,$00,$00&lt;br /&gt;
_0A24: dc.b $F8,&amp;quot;the lock picks break!.&amp;quot;,0,$06,$00&lt;br /&gt;
_0A3E: dc.b $ED,$FF&lt;br /&gt;
_0A40: dc.b $F2,_0A63-Start,(_0A63-Start)/$100 ; dc.b $63,$0A&lt;br /&gt;
_0A43: dc.b $F8,&amp;quot;only a thief can pick locks.&amp;quot;,0,$06,$00&lt;br /&gt;
_0A63: dc.b $F2,_0A83-Start,(_0A83-Start)/$100 ; dc.b $83,$0A&lt;br /&gt;
_0A66: dc.b $F8,&amp;quot;this lock requires a key.&amp;quot;,0,$0F,$00&lt;br /&gt;
_0A83: dc.b $F2,_0AA2-Start,(_0AA2-Start)/$100 ; dc.b $A2,$0A&lt;br /&gt;
_0A86: dc.b $F8,&amp;quot;the lock appears jammed.&amp;quot;,0,$06,$00&lt;br /&gt;
_0AA2:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0AA3: dc.b $FF,$E9,$22,$00,$03,$31&lt;br /&gt;
_0AA9:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0AAA: dc.b $FF,$E9,$22,$00,$03,$45&lt;br /&gt;
_0AB0:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0AB1:&lt;br /&gt;
Hunk3:&lt;br /&gt;
 ; Nb reloc info&lt;br /&gt;
 dc.b $26,$00&lt;br /&gt;
 dc.b $F2,$02,$A8,_02CF-Start,(_02CF-Start)/$100 ; dc.b $CF,$02&lt;br /&gt;
 dc.b $F1,$02,$08,_0396-Start,(_0396-Start)/$100 ; dc.b $96,$03&lt;br /&gt;
 dc.b $AA,$01,$08,_03A6-Start,(_03A6-Start)/$100 ; dc.b $A6,$03&lt;br /&gt;
 dc.b $96,$02,$08,_03AB-Start,(_03AB-Start)/$100 ; dc.b $AB,$03&lt;br /&gt;
 dc.b $CE,$01,$60,_03BB-Start,(_03BB-Start)/$100 ; dc.b $BB,$03&lt;br /&gt;
 dc.b $AD,$01,$00,_03CB-Start,(_03CB-Start)/$100 ; dc.b $CB,$03&lt;br /&gt;
 dc.b $50,$01,$08,_03E3-Start,(_03E3-Start)/$100 ; dc.b $E3,$03&lt;br /&gt;
 dc.b $91,$01,$08,_0406-Start,(_0406-Start)/$100 ; dc.b $06,$04&lt;br /&gt;
 dc.b $B7,$01,$00,_0423-Start,(_0423-Start)/$100 ; dc.b $23,$04&lt;br /&gt;
 dc.b $D6,$01,$08,_0445-Start,(_0445-Start)/$100 ; dc.b $45,$04&lt;br /&gt;
 dc.b $36,$02,$78,_0466-Start,(_0466-Start)/$100 ; dc.b $66,$04&lt;br /&gt;
 dc.b $52,$02,$00,_04B3-Start,(_04B3-Start)/$100 ; dc.b $B3,$04&lt;br /&gt;
 dc.b $6E,$02,$00,_04BC-Start,(_04BC-Start)/$100 ; dc.b $BC,$04&lt;br /&gt;
 dc.b $4D,$02,$08,_04DE-Start,(_04DE-Start)/$100 ; dc.b $DE,$04&lt;br /&gt;
 dc.b $B2,$02,$00,_04FF-Start,(_04FF-Start)/$100 ; dc.b $FF,$04&lt;br /&gt;
 dc.b $BA,$02,$00,_0523-Start,(_0523-Start)/$100 ; dc.b $23,$05&lt;br /&gt;
 dc.b $E7,$02,$00,_0547-Start,(_0547-Start)/$100 ; dc.b $47,$05&lt;br /&gt;
 dc.b $C9,$02,$00,_0569-Start,(_0569-Start)/$100 ; dc.b $69,$05&lt;br /&gt;
 dc.b $11,$03,$00,_0591-Start,(_0591-Start)/$100 ; dc.b $91,$05&lt;br /&gt;
 dc.b $F0,$02,$28,_0599-Start,(_0599-Start)/$100 ; dc.b $99,$05&lt;br /&gt;
 dc.b $79,$02,$08,_05CA-Start,(_05CA-Start)/$100 ; dc.b $CA,$05&lt;br /&gt;
 dc.b $07,$03,$00,_05F2-Start,(_05F2-Start)/$100 ; dc.b $F2,$05&lt;br /&gt;
 dc.b $CD,$02,$00,_0634-Start,(_0634-Start)/$100 ; dc.b $34,$06&lt;br /&gt;
 dc.b $14,$03,$00,_067D-Start,(_067D-Start)/$100 ; dc.b $7D,$06&lt;br /&gt;
 dc.b $B8,$02,$00,_06BF-Start,(_06BF-Start)/$100 ; dc.b $BF,$06&lt;br /&gt;
 dc.b $32,$02,$00,_06F2-Start,(_06F2-Start)/$100 ; dc.b $F2,$06&lt;br /&gt;
 dc.b $CF,$01,$00,_0725-Start,(_0725-Start)/$100 ; dc.b $25,$07&lt;br /&gt;
 dc.b $8E,$01,$08,_081F-Start,(_081F-Start)/$100 ; dc.b $1F,$08&lt;br /&gt;
 dc.b $94,$01,$00,_082C-Start,(_082C-Start)/$100 ; dc.b $2C,$08&lt;br /&gt;
 dc.b $93,$01,$00,_086E-Start,(_086E-Start)/$100 ; dc.b $6E,$08&lt;br /&gt;
 dc.b $CF,$02,$00,_08C6-Start,(_08C6-Start)/$100 ; dc.b $C6,$08&lt;br /&gt;
 dc.b $0C,$03,$60,_091E-Start,(_091E-Start)/$100 ; dc.b $1E,$09&lt;br /&gt;
 dc.b $CA,$01,$00,_0972-Start,(_0972-Start)/$100 ; dc.b $72,$09&lt;br /&gt;
 dc.b $EB,$01,$08,_0992-Start,(_0992-Start)/$100 ; dc.b $92,$09&lt;br /&gt;
 dc.b $EA,$01,$08,_0999-Start,(_0999-Start)/$100 ; dc.b $99,$09&lt;br /&gt;
 dc.b $81,$00,$00,_09A0-Start,(_09A0-Start)/$100 ; dc.b $A0,$09&lt;br /&gt;
 dc.b $41,$00,$08,_0AA3-Start,(_0AA3-Start)/$100 ; dc.b $A3,$0A&lt;br /&gt;
 dc.b $21,$00,$08,_0AAA-Start,(_0AAA-Start)/$100 ; dc.b $AA,$0A&lt;br /&gt;
 END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Eye of the Beholder 2&lt;br /&gt;
&lt;br /&gt;
The .inf file structure and data is somewhat different from its predecessor.&lt;br /&gt;
&lt;br /&gt;
All offsets here are 16bit. All strings are null terminated c-strings. Filenames have usually 13 byte (8 letters + dot + 3 letters + null)&lt;br /&gt;
&lt;br /&gt;
There are different data blocks:&lt;br /&gt;
&lt;br /&gt;
Beginning of .inf file:&lt;br /&gt;
#x0000 offset to block_B&lt;br /&gt;
#x0002 block_A&lt;br /&gt;
 &lt;br /&gt;
block_A:&lt;br /&gt;
{&lt;br /&gt;
   subblocks belong to different sublevels:&lt;br /&gt;
   sub_block_A1:&lt;br /&gt;
   {&lt;br /&gt;
      #x0000 offset (relative to start of block_A) to sub_block_A2&lt;br /&gt;
      #x0002 control byte, when = #xEC then this block follows:&lt;br /&gt;
      #x0003:&lt;br /&gt;
      {&lt;br /&gt;
         #x0000: maze file name string usually &amp;quot;levelx.maz&amp;quot;; length: 13 byte&lt;br /&gt;
         #x000D: file name string without extention: used to load .vmp .pal; length: 13 byte&lt;br /&gt;
         #x001A: usually 0xFF, if not then the next 13 byte are again a string&lt;br /&gt;
                 without extention and used to load .pal&lt;br /&gt;
      }&lt;br /&gt;
      next: file name string without extention for sound file .adl or .snd&lt;br /&gt;
            -&amp;gt; depends on game configuration;length: 13 byte&lt;br /&gt;
      next: 2 bytes -&amp;gt; each my have the value #xEC or #xEA&lt;br /&gt;
 &lt;br /&gt;
      more to follow here (monster and decoration data)&lt;br /&gt;
   }&lt;br /&gt;
   the following blocks are optional: [&lt;br /&gt;
      sub_block_A2:&lt;br /&gt;
      {&lt;br /&gt;
         #x0000 offset to sub_block_A3&lt;br /&gt;
         ...&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
      sub_block_A3&lt;br /&gt;
      {&lt;br /&gt;
         ...&lt;br /&gt;
      } ]&lt;br /&gt;
} end of block_A&lt;br /&gt;
 &lt;br /&gt;
block_B:&lt;br /&gt;
{&lt;br /&gt;
   #x0000 offset to block_C after the scripting data&lt;br /&gt;
   #x0002 control byte, if #xEC then this block follows:&lt;br /&gt;
   {&lt;br /&gt;
      (control byte | data byte) sequence;&lt;br /&gt;
      first control byte = #xFF is already next data structure&lt;br /&gt;
   }&lt;br /&gt;
   here follows: 30*monster data structure, each with length 30 byte&lt;br /&gt;
   after that: scripting data block:&lt;br /&gt;
   {&lt;br /&gt;
      #x0000 offset (relative to scripting data block) of the first string&lt;br /&gt;
      next: events&lt;br /&gt;
      next: strings&lt;br /&gt;
   }&lt;br /&gt;
} end of block_B&lt;br /&gt;
 &lt;br /&gt;
block_C:&lt;br /&gt;
{&lt;br /&gt;
   #x0000 number of special blocks wich follow; these link maze&lt;br /&gt;
          fields to scripting data and contain flags; each 6 bytes long&lt;br /&gt;
   #x0002 maze special 1&lt;br /&gt;
   #x0008 maze special 2&lt;br /&gt;
   #x000E maze special 3&lt;br /&gt;
   ...&lt;br /&gt;
} end of block_C&lt;br /&gt;
 &lt;br /&gt;
----&lt;br /&gt;
 &lt;br /&gt;
a maze special block has the following structure:&lt;br /&gt;
{&lt;br /&gt;
   uint16: number of block in maze (0...1023)&lt;br /&gt;
   uint16: flag&lt;br /&gt;
   uint16: offset to scripting data (relative to scripting data block)&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More Eye of the beholder 2 info, nothing new here. but nice to show the data storage.&lt;br /&gt;
&lt;br /&gt;
struct sMonsterGFX&lt;br /&gt;
{&lt;br /&gt;
    bool used;&lt;br /&gt;
    int loadProg;&lt;br /&gt;
    int unk0;&lt;br /&gt;
    u8 unk1;&lt;br /&gt;
    char* label;&lt;br /&gt;
};&lt;br /&gt;
struct sDice&lt;br /&gt;
{&lt;br /&gt;
    u8 count;&lt;br /&gt;
    u8 dice;&lt;br /&gt;
    u8 plus;&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
struct sMonsterType&lt;br /&gt;
{&lt;br /&gt;
    u8 idx; // 0&lt;br /&gt;
    u8 unk0; //1&lt;br /&gt;
    u8 THAC0; //2&lt;br /&gt;
    u8 unk1; //3&lt;br /&gt;
 &lt;br /&gt;
    sDice HPDice; //4&lt;br /&gt;
    u8 numberOfAttacks; // 7&lt;br /&gt;
    sDice attackDice[3]; // 16&lt;br /&gt;
    unsigned short specialAttackFlag; //18&lt;br /&gt;
    unsigned short AbilitiesFlag; // 20&lt;br /&gt;
    unsigned short unk2;        //22&lt;br /&gt;
    unsigned short EXPGain; //24&lt;br /&gt;
 &lt;br /&gt;
    u8 size;&lt;br /&gt;
    u8 attackSound;&lt;br /&gt;
    u8 moveSound;&lt;br /&gt;
    u8 unk3;&lt;br /&gt;
    // optional&lt;br /&gt;
        bool isAttack2;&lt;br /&gt;
        u8 distantAttack;&lt;br /&gt;
        u8 MaxAttkCnt;&lt;br /&gt;
        u8 attackList[4];&lt;br /&gt;
 &lt;br /&gt;
    u8 turnUndead;&lt;br /&gt;
    u8 unk4;&lt;br /&gt;
    u8 unk5[3];&lt;br /&gt;
 &lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
struct sMonster&lt;br /&gt;
{&lt;br /&gt;
    u8 MoNo;&lt;br /&gt;
    u8 MoTime;&lt;br /&gt;
    short position;&lt;br /&gt;
    u8 subpos;&lt;br /&gt;
    u8 facing;&lt;br /&gt;
    u8 type;&lt;br /&gt;
    u8 pic;&lt;br /&gt;
    u8 phase;&lt;br /&gt;
    u8 pause;&lt;br /&gt;
    short weapon; /* Item Number */&lt;br /&gt;
    short pocket; /* Dropped on Monster killed */&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
struct sWallMapping&lt;br /&gt;
{&lt;br /&gt;
  u8 idx;&lt;br /&gt;
  u8 WallType;&lt;br /&gt;
  u8 DecorationID;&lt;br /&gt;
  u8 FileIndex;      // index number in DecorationFNames&lt;br /&gt;
  u8 unk0;&lt;br /&gt;
  u8 unk1;&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
 struct sDecorationFName&lt;br /&gt;
 {&lt;br /&gt;
  char GFXName[13];&lt;br /&gt;
  char DECName[13];&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
struct sRectangle&lt;br /&gt;
{&lt;br /&gt;
    short x;&lt;br /&gt;
    short y;&lt;br /&gt;
    short w;&lt;br /&gt;
    short h;&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
struct sDoorInfo&lt;br /&gt;
{&lt;br /&gt;
    u8 cmd;&lt;br /&gt;
    u8 idx;&lt;br /&gt;
    u8 typ;&lt;br /&gt;
    u8 knob;&lt;br /&gt;
    char GFXfile[13];&lt;br /&gt;
 &lt;br /&gt;
    sRectangle doorRect[3];&lt;br /&gt;
    sRectangle buttionRect[2];&lt;br /&gt;
    u8 buttonPos[2][2];&lt;br /&gt;
 &lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.inf EOB2 dump with comments&lt;br /&gt;
EOB2 INF resourced fro assembler 68000 (To See here for all the INF files&lt;br /&gt;
EOB2-GB-FilesToTranslate.lha&lt;br /&gt;
EOB2-GB-FilesToTranslate.lha&lt;br /&gt;
&lt;br /&gt;
    Details&lt;br /&gt;
    Download&lt;br /&gt;
    170 KB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BOPT uo+&lt;br /&gt;
BOPT ue-&lt;br /&gt;
BOPT ua+&lt;br /&gt;
OUTPUT LEVEL10.INF.dec&lt;br /&gt;
;Source Created by &amp;quot;EOB2 Language File ReSourcerINF V2&amp;quot; Beta&lt;br /&gt;
;A Tool done by CFou! on Nov 2006&lt;br /&gt;
Start&lt;br /&gt;
Hunk0:&lt;br /&gt;
dc.b Hunk1-Start,(Hunk1-Start)/$100 ; dc.b $E9,$00&lt;br /&gt;
SubHunk0:&lt;br /&gt;
dc.b SubHunk1-Start-2,(SubHunk1-Start-2)/$100 ; dc.b $E7,$00&lt;br /&gt;
dc.b $EC&lt;br /&gt;
;Maze name&lt;br /&gt;
dc.b &#039;level10.maz&#039;,0,0&lt;br /&gt;
;VCN/VMP File name&lt;br /&gt;
dc.b &#039;mezz&#039;,0,&#039;10.maz&#039;,0,0&lt;br /&gt;
;Palette File name&lt;br /&gt;
dc.b $01&lt;br /&gt;
dc.b &#039;azure&#039;,0,&#039;0.maz&#039;,0,0&lt;br /&gt;
;Sound File name&lt;br /&gt;
dc.b &#039;azure&#039;,0,&#039;0.maz&#039;,0,0&lt;br /&gt;
;Door name &amp;amp; Positions + offset&lt;br /&gt;
dc.b $EC&lt;br /&gt;
dc.b &#039;door2&#039;,0,&#039;0.maz&#039;,0,0&lt;br /&gt;
dc.b $00,$00,$00,$14,$00,$47,$00,$09,$00,$46,$00,$09,$00,$8F,$00,$07&lt;br /&gt;
dc.b $00,$2F,$00,$10,$00,$58,$00,$04,$00,$1D,$00,$10,$00,$B3,$00,$01&lt;br /&gt;
dc.b $00,$0A,$00,$7E,$00,$28,$00,$11,$00,$B3,$00,$01,$00,$06,$00,$72&lt;br /&gt;
dc.b $00,$2A,$00&lt;br /&gt;
;Door name &amp;amp; Positions + offset&lt;br /&gt;
dc.b $FF&lt;br /&gt;
 &lt;br /&gt;
;Max nb Monster ????&lt;br /&gt;
dc.b $00,$00&lt;br /&gt;
;Monster file name&lt;br /&gt;
dc.b $FF&lt;br /&gt;
;Monster file name&lt;br /&gt;
dc.b $FF&lt;br /&gt;
;Monster Struct&lt;br /&gt;
dc.b $FF&lt;br /&gt;
;Decorate Structure&lt;br /&gt;
dc.b $EC&lt;br /&gt;
; Nb Decorate Block&lt;br /&gt;
dc.b $0C,$00&lt;br /&gt;
dc.b $EC&lt;br /&gt;
; Decorate file name&lt;br /&gt;
dc.b &#039;azure1&#039;,0,&#039;.maz&#039;,0,0&lt;br /&gt;
; Decorate file name&lt;br /&gt;
dc.b &#039;azure.dec&#039;,0,&#039;z&#039;,0,0&lt;br /&gt;
; Decorate Positions/offsets&lt;br /&gt;
dc.b $FB,$1B,$01,$11,$03,$04&lt;br /&gt;
dc.b $FB,$1C,$01,$12,$04,$04&lt;br /&gt;
dc.b $FB,$23,$00,$07,$00,$03&lt;br /&gt;
dc.b $FB,$24,$00,$09,$00,$03&lt;br /&gt;
dc.b $FB,$25,$00,$0D,$00,$03&lt;br /&gt;
dc.b $FB,$29,$01,$05,$00,$04&lt;br /&gt;
dc.b $FB,$28,$01,$03,$02,$04&lt;br /&gt;
dc.b $FB,$2C,$00,$FF,$00,$07&lt;br /&gt;
dc.b $FB,$2D,$01,$0B,$0A,$84&lt;br /&gt;
dc.b $FB,$2E,$01,$FF,$00,$07&lt;br /&gt;
dc.b $FB,$4A,$00,$FF,$00,$04&lt;br /&gt;
dc.b $01,$00&lt;br /&gt;
dc.b $03,$00&lt;br /&gt;
dc.b $FF,$FF,$FF,$FF&lt;br /&gt;
SubHunk1:&lt;br /&gt;
Hunk1:&lt;br /&gt;
dc.b Hunk3-Start,(Hunk3-Start)/$100 ; dc.b $F5,$03&lt;br /&gt;
dc.b $FF&lt;br /&gt;
Hunk2:&lt;br /&gt;
;TextBank Offset&lt;br /&gt;
dc.b TextBank-Hunk2,(TextBank-Hunk2)/$100 ; dc.b $89,$02&lt;br /&gt;
;Game script&lt;br /&gt;
_0002: dc.b $EE,$E0,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0007: dc.b $FF,$EE,_0077-Hunk2,(_0077-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_000B: dc.b $EE,$ED,$D2,$02,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0010: dc.b $FF,$EE,_0027-Hunk2,(_0027-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0014: dc.b $F8,$00,$00,$05,$00 ; FCT: Display Message&lt;br /&gt;
_0019: dc.b $F6,$4F,$00,$00 ; FCT: Sound&lt;br /&gt;
_001D: dc.b $EC,$E5,$06,$00,$16,$02,$02 ; FCT: Change Level&lt;br /&gt;
_0024: dc.b $F2,_0074-Hunk2,(_0074-Hunk2)/$100 ; FCT: Jump Code&lt;br /&gt;
_0027: dc.b $F8,$01,$00,$0F,$00 ; FCT: Display Message&lt;br /&gt;
_002C: dc.b $F6,$1D,$00,$00 ; FCT: Sound&lt;br /&gt;
_0030: dc.b $EE,$D2,$02,$00,$D2,$00,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0037: dc.b $FF,$EE,_0041-Hunk2,(_0041-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_003B: dc.b $FA,$E8,$00,$00,$16,$02 ; FCT: Teleport????&lt;br /&gt;
_0041: dc.b $EE,$D2,$02,$00,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0048: dc.b $FF,$EE,_0052-Hunk2,(_0052-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_004C: dc.b $FA,$E8,$00,$00,$F5,$01 ; FCT: Teleport????&lt;br /&gt;
_0052: dc.b $EE,$D2,$02,$00,$D2,$02,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0059: dc.b $FF,$EE,_0063-Hunk2,(_0063-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_005D: dc.b $FA,$E8,$00,$00,$D6,$01 ; FCT: Teleport????&lt;br /&gt;
_0063: dc.b $EE,$D2,$02,$00,$D2,$03,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_006A: dc.b $FF,$EE,_0074-Hunk2,(_0074-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_006E: dc.b $FA,$E8,$00,$00,$F7,$01 ; FCT: Teleport????&lt;br /&gt;
_0074: dc.b $F2,_0080-Hunk2,(_0080-Hunk2)/$100 ; FCT: Jump Code&lt;br /&gt;
_0077: dc.b $FA,$F5 ; FCT: Teleport????&lt;br /&gt;
_0079: dc.b $EB,$F6,$01 ; FCT: Give Experience&lt;br /&gt;
_007C: dc.b $E5,$06,$16,$02 ; FCT: Wait&lt;br /&gt;
_0080: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_0081: dc.b $EE,$E0,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0086: dc.b $FF,$EE,_00F6-Hunk2,(_00F6-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_008A: dc.b $EE,$ED,$D2,$03,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_008F: dc.b $FF,$EE,_00A6-Hunk2,(_00A6-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0093: dc.b $F8,$02,$00,$05,$00 ; FCT: Display Message&lt;br /&gt;
_0098: dc.b $F6,$4F,$00,$00 ; FCT: Sound&lt;br /&gt;
_009C: dc.b $EC,$E5,$0B,$00,$D1,$03,$03 ; FCT: Change Level&lt;br /&gt;
_00A3: dc.b $F2,_00F3-Hunk2,(_00F3-Hunk2)/$100 ; FCT: Jump Code&lt;br /&gt;
_00A6: dc.b $F8,$01,$00,$0F,$00 ; FCT: Display Message&lt;br /&gt;
_00AB: dc.b $F6,$1D,$00,$00 ; FCT: Sound&lt;br /&gt;
_00AF: dc.b $EE,$D2,$03,$00,$D2,$00,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_00B6: dc.b $FF,$EE,_00C0-Hunk2,(_00C0-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_00BA: dc.b $FA,$E8,$00,$00,$F2,$03 ; FCT: Teleport????&lt;br /&gt;
_00C0: dc.b $EE,$D2,$03,$00,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_00C7: dc.b $FF,$EE,_00D1-Hunk2,(_00D1-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_00CB: dc.b $FA,$E8,$00,$00,$D1,$03 ; FCT: Teleport????&lt;br /&gt;
_00D1: dc.b $EE,$D2,$03,$00,$D2,$02,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_00D8: dc.b $FF,$EE,_00E2-Hunk2,(_00E2-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_00DC: dc.b $FA,$E8,$00,$00,$B2,$03 ; FCT: Teleport????&lt;br /&gt;
_00E2: dc.b $EE,$D2,$03,$00,$D2,$03,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_00E9: dc.b $FF,$EE,_00F3-Hunk2,(_00F3-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_00ED: dc.b $FA,$E8,$00,$00,$D3,$03 ; FCT: Teleport????&lt;br /&gt;
_00F3: dc.b $F2,_00FF-Hunk2,(_00FF-Hunk2)/$100 ; FCT: Jump Code&lt;br /&gt;
_00F6: dc.b $FA,$F5 ; FCT: Teleport????&lt;br /&gt;
_00F8: dc.b $EB,$D2,$03 ; FCT: Give Experience&lt;br /&gt;
_00FB: dc.b $E5,$0B,$D1,$03 ; FCT: Wait&lt;br /&gt;
_00FF: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_0100: dc.b $EE,$E7,$F6,$D2,$FF,$FF ; -&amp;gt; Condition Test&lt;br /&gt;
_0106: dc.b $FF,$EE,_010D-Hunk2,(_010D-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_010A: dc.b $FF,$ED,$03 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_010D: dc.b $EE,$E0,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0112: dc.b $FF,$EE,_0126-Hunk2,(_0126-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0116: dc.b $F6,$0F,$11,$03 ; FCT: Sound&lt;br /&gt;
_011A: dc.b $FF,$ED,$01 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_011D: dc.b $FA,$E8,$00,$00,$01,$03 ; FCT: Teleport????&lt;br /&gt;
_0123: dc.b $F2,_012E-Hunk2,(_012E-Hunk2)/$100 ; FCT: Jump Code&lt;br /&gt;
_0126: dc.b $FA,$F5 ; FCT: Teleport????&lt;br /&gt;
_0128: dc.b $EB,$11,$03 ; FCT: Give Experience&lt;br /&gt;
_012B: dc.b $EB,$01,$03 ; FCT: Give Experience&lt;br /&gt;
_012E: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_012F: dc.b $EE,$E0,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0134: dc.b $FF,$EE,_0148-Hunk2,(_0148-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0138: dc.b $F6,$0F,$C5,$03 ; FCT: Sound&lt;br /&gt;
_013C: dc.b $FF,$ED,$01 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_013F: dc.b $FA,$E8,$00,$00,$CC,$02 ; FCT: Teleport????&lt;br /&gt;
_0145: dc.b $F2,_0150-Hunk2,(_0150-Hunk2)/$100 ; FCT: Jump Code&lt;br /&gt;
_0148: dc.b $FA,$F5 ; FCT: Teleport????&lt;br /&gt;
_014A: dc.b $EB,$C5,$03 ; FCT: Give Experience&lt;br /&gt;
_014D: dc.b $EB,$CC,$02 ; FCT: Give Experience&lt;br /&gt;
_0150: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_0151: dc.b $F8,$03,$00,$01,$00 ; FCT: Display Message&lt;br /&gt;
_0156: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_0157: dc.b $F8,$04,$00,$01,$00 ; FCT: Display Message&lt;br /&gt;
_015C: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_015D: dc.b $EE,$E9,$03,$43,$02,$D2,$08,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0165: dc.b $FF,$F5,$01,$FF,$62,$02,$D2,$00,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_016E: dc.b $FB,$F9,$EE,$84,$01&lt;br /&gt;
_0173: dc.b $ED,$FE,$62,$02 ; FCT: Item Consume&lt;br /&gt;
_0177: dc.b $FD,$43,$02 ; FCT:Open Door&lt;br /&gt;
_017A: dc.b $E4 ; FCT: Update Screen&lt;br /&gt;
_017B: dc.b $E5,$01,$00 ; FCT: Wait&lt;br /&gt;
_017E: dc.b $FF,$E9,$41,$02,$01,$1B ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0184: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_0185: dc.b $EE,$E0,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_018A: dc.b $FF,$EE,_019F-Hunk2,(_019F-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_018E: dc.b $F6,$0F,$65,$02 ; FCT: Sound&lt;br /&gt;
_0192: dc.b $FC,$43,$02 ; FCT: Close Door&lt;br /&gt;
_0195: dc.b $FF,$ED,$01 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0198: dc.b $FA,$E8,$00,$00,$2C,$03 ; FCT: Teleport????&lt;br /&gt;
_019E: dc.b $F0 ; FCT: Return&lt;br /&gt;
_019F: dc.b $FA,$F5 ; FCT: Teleport????&lt;br /&gt;
_01A1: dc.b $EB,$65,$02 ; FCT: Give Experience&lt;br /&gt;
_01A4: dc.b $EB,$2C,$03 ; FCT: Give Experience&lt;br /&gt;
_01A7: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_01A8: dc.b $F6,$01,$0F,$01 ; FCT: Sound&lt;br /&gt;
_01AC: dc.b $E4 ; FCT: Update Screen&lt;br /&gt;
_01AD: dc.b $E5,$01,$00 ; FCT: Wait&lt;br /&gt;
_01B0: dc.b $FF,$E9,$0F,$01,$00,$1B ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01B6: dc.b $FF,$F7,$4F,$00,$2C ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01BB: dc.b $F7,$EF,$01 ; FCT: Set Flag&lt;br /&gt;
_01BE: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_01BF: dc.b $EE,$E0,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_01C4: dc.b $FF,$F5,$00,$FF,$4D,$00,$D2,$00,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01CD: dc.b $FF,$F9,$E0,$D2,$04,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01D3: dc.b $FF,$F5,$00,$FF,$4D,$00,$D2,$01,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01DC: dc.b $FF,$F9,$F1,$F1,$4D,$00,$D2,$00,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01E5: dc.b $FF,$F9,$F8,$EE,_01FA-Hunk2,(_01FA-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01EB: dc.b $FF,$F7,$4D,$00,$24 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01F0: dc.b $F6,$0C,$4D,$00 ; FCT: Sound&lt;br /&gt;
_01F4: dc.b $FF,$E9,$0F,$01,$00,$1B ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01FA: dc.b $EE,$E0,$D2,$02,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_01FF: dc.b $FF,$F5,$00,$FF,$4D,$00,$D2,$00,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0208: dc.b $FF,$F9,$E0,$D2,$08,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_020E: dc.b $FF,$F5,$00,$FF,$4D,$00,$D2,$00,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0217: dc.b $FF,$F9,$F1,$F1,$4D,$00,$D2,$00,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0220: dc.b $FF,$F9,$F8,$EE,_0235-Hunk2,(_0235-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0226: dc.b $FF,$F7,$4D,$00,$23 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_022B: dc.b $F6,$0C,$4D,$00 ; FCT: Sound&lt;br /&gt;
_022F: dc.b $FF,$E9,$0F,$01,$00,$01 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0235: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_0236: dc.b $EE,$EF,$01,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_023C: dc.b $FF,$EE,_025B-Hunk2,(_025B-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0240: dc.b $EE,$EF,$02,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0246: dc.b $FF,$EE,_0258-Hunk2,(_0258-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_024A: dc.b $FF,$F7,$4F,$00,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_024F: dc.b $F5,$EF,$01 ; FCT: Clear Flag&lt;br /&gt;
_0252: dc.b $F5,$EF,$02 ; FCT: Clear Flag&lt;br /&gt;
_0255: dc.b $F2,_025B-Hunk2,(_025B-Hunk2)/$100 ; FCT: Jump Code&lt;br /&gt;
_0258: dc.b $F7,$EF,$02 ; FCT: Set Flag&lt;br /&gt;
_025B: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_025C: dc.b $EE,$F7,$4F,$00,$D2,$2C,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0263: dc.b $FF,$EE,_0288-Hunk2,(_0288-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0267: dc.b $EE,$E0,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_026C: dc.b $FF,$EE,_0280-Hunk2,(_0280-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0270: dc.b $F6,$0F,$4F,$00 ; FCT: Sound&lt;br /&gt;
_0274: dc.b $FF,$ED,$01 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0277: dc.b $FA,$E8,$00,$00,$2C,$03 ; FCT: Teleport????&lt;br /&gt;
_027D: dc.b $F2,_0288-Hunk2,(_0288-Hunk2)/$100 ; FCT: Jump Code&lt;br /&gt;
_0280: dc.b $FA,$F5 ; FCT: Teleport????&lt;br /&gt;
_0282: dc.b $EB,$6F,$02 ; FCT: Give Experience&lt;br /&gt;
_0285: dc.b $EB,$2C,$03 ; FCT: Give Experience&lt;br /&gt;
_0288: dc.b $F1 ; FCT: End Code&lt;br /&gt;
 &lt;br /&gt;
;TextBank&lt;br /&gt;
TextBank:&lt;br /&gt;
dc.b &#039;going down...&#039;,0&lt;br /&gt;
dc.b &#039;you can&#039;,&amp;quot;&#039;&amp;quot;,&#039;t go that way.&#039;,0&lt;br /&gt;
dc.b &#039;going up...&#039;,0&lt;br /&gt;
dc.b &#039;the plaque reads: you will pay for your freedom...&#039;,0&lt;br /&gt;
dc.b &#039;the plaque reads: one item.&#039;,0&lt;br /&gt;
Hunk3:&lt;br /&gt;
;Special Maze Blocks Bank (offset)&lt;br /&gt;
; Nb Special Maze Blocks&lt;br /&gt;
dc.b $0C,$00&lt;br /&gt;
; Special Maze Blocks List:&lt;br /&gt;
dc.b $F6,$01,$A8,$00,_0002-Hunk2,(_0002-Hunk2)/$100 ; dc.b $02,$00&lt;br /&gt;
dc.b $D2,$03,$A8,$00,_0081-Hunk2,(_0081-Hunk2)/$100 ; dc.b $81,$00&lt;br /&gt;
dc.b $11,$03,$A8,$00,_0100-Hunk2,(_0100-Hunk2)/$100 ; dc.b $00,$01&lt;br /&gt;
dc.b $C5,$03,$A8,$00,_012F-Hunk2,(_012F-Hunk2)/$100 ; dc.b $2F,$01&lt;br /&gt;
dc.b $A4,$01,$00,$00,_0151-Hunk2,(_0151-Hunk2)/$100 ; dc.b $51,$01&lt;br /&gt;
dc.b $21,$02,$00,$00,_0157-Hunk2,(_0157-Hunk2)/$100 ; dc.b $57,$01&lt;br /&gt;
dc.b $41,$02,$00,$00,_015D-Hunk2,(_015D-Hunk2)/$100 ; dc.b $5D,$01&lt;br /&gt;
dc.b $65,$02,$A8,$00,_0185-Hunk2,(_0185-Hunk2)/$100 ; dc.b $85,$01&lt;br /&gt;
dc.b $0F,$01,$00,$00,_01A8-Hunk2,(_01A8-Hunk2)/$100 ; dc.b $A8,$01&lt;br /&gt;
dc.b $4D,$00,$78,$00,_01BF-Hunk2,(_01BF-Hunk2)/$100 ; dc.b $BF,$01&lt;br /&gt;
dc.b $01,$00,$00,$00,_0236-Hunk2,(_0236-Hunk2)/$100 ; dc.b $36,$02&lt;br /&gt;
dc.b $4F,$00,$A8,$00,_025C-Hunk2,(_025C-Hunk2)/$100 ; dc.b $5C,$02&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder_Maze_Information_Format&amp;diff=5781</id>
		<title>Eye of the Beholder Maze Information Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder_Maze_Information_Format&amp;diff=5781"/>
		<updated>2014-12-12T20:23:53Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;General&#039;&#039;&#039;&lt;br /&gt;
Each maze consist of a .maz file and an accompaning .inf file. This document describes the .inf file and how it relates to the .maz files.&lt;br /&gt;
The .inf files are standard CPS files. However the german and spanish versions are uncompressed. This document assumes that you&#039;ve depacked the .inf files using for instance uncps.exe.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Header&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct Monster&lt;br /&gt;
{&lt;br /&gt;
    unsigned char  index;&lt;br /&gt;
    unsigned char  levelType;&lt;br /&gt;
    unsigned short pos;&lt;br /&gt;
    unsigned char  subpos;&lt;br /&gt;
    unsigned char  direction;&lt;br /&gt;
    unsigned char  type;&lt;br /&gt;
    unsigned char  picture;&lt;br /&gt;
    unsigned char  phase;&lt;br /&gt;
    unsigned char  pause;&lt;br /&gt;
    unsigned short weapon;&lt;br /&gt;
    unsigned short pocket_item;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Position gives the x and y values. It&#039;s lower 5 bits are the y coordinate value and the next 5 bits are the x coordinate value.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    x_pos = (pos &amp;gt;&amp;gt; 5) &amp;amp; 0x1F;&lt;br /&gt;
    y_pos = pos &amp;amp; 0x1F;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values sign must be confirmed.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct Inf&lt;br /&gt;
{&lt;br /&gt;
    unsigned short triggersOffset;&lt;br /&gt;
    char           mazeName[12];&lt;br /&gt;
    char           vmpVcnName[12];&lt;br /&gt;
    char           paletteName[12];&lt;br /&gt;
    unsigned char  unknown[9];&lt;br /&gt;
    unsigned char  monster1CompressionMethod;&lt;br /&gt;
    unsigned char  monster1Name[12];&lt;br /&gt;
    unsigned char  monster2CompressionMethod;&lt;br /&gt;
    unsigned char  monster2Name[12];&lt;br /&gt;
    unsigned char  unknown[5];&lt;br /&gt;
    Monster        monsters[30];&lt;br /&gt;
    unsigned short nbrDecCommands;&lt;br /&gt;
    DecCommand     commands[nbrDecCommands];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Decoration data&#039;&#039;&#039;&lt;br /&gt;
After the header comes the decoration data. It&#039;s loaded as a command sequence. The first unsigned short determines number of commands to execute. After that follows the first command code. Each command code is one byte.&lt;br /&gt;
&lt;br /&gt;
Command codes&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0xec (Load overlay image picture + overlay image rectangle data)&lt;br /&gt;
&lt;br /&gt;
    graphics data name, 12 bytes containing a null terminated string. Points to a .cps file containg wall graphics data.&lt;br /&gt;
    rectangles data name, 12 bytes containing a null terminated string. Points to a .dat file containing rectangular data that point into the graphics data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0xfb (Define wall mapping)&lt;br /&gt;
&lt;br /&gt;
struct WallMapping&lt;br /&gt;
{&lt;br /&gt;
   unsigned char wallMappingIndex; /* This is the index used by the .maz file. */&lt;br /&gt;
   unsigned char wallType; /* Index to what backdrop wall type that is being used. */&lt;br /&gt;
   unsigned char decorationID; /* Index to and optional overlay decoration image in&lt;br /&gt;
                                  the DecorationData.decorations array in the&lt;br /&gt;
                                  [[eob.dat|.dat]] files. */&lt;br /&gt;
   unsigned char unknownFlags1;&lt;br /&gt;
   unsigned char unknownFlags2;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Event data&#039;&#039;&#039;&lt;br /&gt;
After the decoration data comes a sequence of event data. It&#039;s also loaded as a command sequence. Each command code is one byte.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command codes&lt;br /&gt;
&lt;br /&gt;
0xff (Set wall)&lt;br /&gt;
0xfe (Change wall)&lt;br /&gt;
0xfd (Open door)&lt;br /&gt;
0xfc (Close coor)&lt;br /&gt;
0xfb (Create monster)&lt;br /&gt;
0xfa (Teleport)&lt;br /&gt;
0xf9 (Steal small item)&lt;br /&gt;
0xf8 (Message)&lt;br /&gt;
0xf7 (Set flag)&lt;br /&gt;
0xf6 (Sound)&lt;br /&gt;
0xf5 (Clear flag)&lt;br /&gt;
0xf4 (Heal)&lt;br /&gt;
0xf3 (Damage)&lt;br /&gt;
0xf2 (Jump)&lt;br /&gt;
0xf1 (End code)&lt;br /&gt;
0xf0 (Return)&lt;br /&gt;
0xef (Call)&lt;br /&gt;
0xee (Conditions)&lt;br /&gt;
0xed (Item consume)&lt;br /&gt;
0xec (Change level)&lt;br /&gt;
0xeb (Give experience)&lt;br /&gt;
0xea (New item)&lt;br /&gt;
0xe9 (Launcher)&lt;br /&gt;
0xe8 (Turn)&lt;br /&gt;
0xe7 (Identify all items)&lt;br /&gt;
0xe6 (Encounters)&lt;br /&gt;
0xe5 (Wait)&lt;br /&gt;
0xe4 (Update screen)&lt;br /&gt;
0xe3 (Text menu)&lt;br /&gt;
0xe2 (Special window pictures)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each command code is executed using a parsing function for that specific code. Number of bytes following each code is very specific to what command it is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0xff (Set wall)&lt;br /&gt;
&lt;br /&gt;
unsigned char subcode=nextUnsignedChar();&lt;br /&gt;
 &lt;br /&gt;
switch (subcode)&lt;br /&gt;
{&lt;br /&gt;
   case 0xf7: // Set complete maze block (all four walls)&lt;br /&gt;
      unsigned short position=nextUnsignedShort();&lt;br /&gt;
      unsigned char wallMappingIndex=nextUnsignedChar();&lt;br /&gt;
      for (int i=0; i&amp;lt;4; i++)&lt;br /&gt;
         maze[position][i]=wallMappingIndex;&lt;br /&gt;
   break;&lt;br /&gt;
 &lt;br /&gt;
   case 0xe9; // Change one wall&lt;br /&gt;
      unsigned short position=nextUnsignedShort();&lt;br /&gt;
      unsigned char wallMappingIndex=nextUnsignedChar();&lt;br /&gt;
      unsigned char direction=nextUnsignedChar();&lt;br /&gt;
      maze[position][direction]=wallMappingIndex;&lt;br /&gt;
   break;&lt;br /&gt;
 &lt;br /&gt;
   case 0xed; // Turn party&lt;br /&gt;
      Party.facing = nextUnsignedChar();&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0xfe (Change wall)&lt;br /&gt;
&lt;br /&gt;
unsigned char subcode=nextUnsignedChar();&lt;br /&gt;
 &lt;br /&gt;
switch (subcode)&lt;br /&gt;
{&lt;br /&gt;
   case 0xf7: //Flip four sides&lt;br /&gt;
      unsigned short position=nextUnsignedShort();&lt;br /&gt;
      unsigned char sourceWallMappingIndex=nextUnsignedChar();&lt;br /&gt;
      unsigned char destinationWallMappingIndex=nextUnsignedChar();&lt;br /&gt;
      for (int i=0; i&amp;lt;4; i++)&lt;br /&gt;
      {&lt;br /&gt;
         if (maze[position][i] == sourceWallMappingIndex)&lt;br /&gt;
            maze[position][i] = destinationWallMappingIndex;&lt;br /&gt;
      }&lt;br /&gt;
   break;&lt;br /&gt;
 &lt;br /&gt;
   case 0xe9;// Change one wall&lt;br /&gt;
      unsigned short position=nextUnsignedShort();&lt;br /&gt;
      unsigned char direction=nextUnsignedChar();&lt;br /&gt;
      unsigned char sourceWallMappingIndex=nextUnsignedChar();&lt;br /&gt;
      unsigned char destinationWallMappingIndex=nextUnsignedChar();&lt;br /&gt;
      if (maze[position][direction] == sourceWallMappingIndex)&lt;br /&gt;
         maze[position][direction] = destinationWallMappingIndex;&lt;br /&gt;
   break;&lt;br /&gt;
 &lt;br /&gt;
   case 0xea; // Unknown&lt;br /&gt;
      unsigned short unknown=nextUnsigndShort();&lt;br /&gt;
   break;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0xfb (Monster Creation)&lt;br /&gt;
&lt;br /&gt;
char MoNo;&lt;br /&gt;
char MoTime;&lt;br /&gt;
short int position;&lt;br /&gt;
char subpos;&lt;br /&gt;
char facing;&lt;br /&gt;
char type;&lt;br /&gt;
char pic;&lt;br /&gt;
char phase;&lt;br /&gt;
char pause;&lt;br /&gt;
short int weapon; /* Item Number */&lt;br /&gt;
short int pocket; /* Dropped on Monster killed */&lt;br /&gt;
&lt;br /&gt;
0xf6 (Sound)&lt;br /&gt;
&lt;br /&gt;
char SoundId;&lt;br /&gt;
short int position;&lt;br /&gt;
&lt;br /&gt;
0xf6 (Sound) in the demo version of the EOB1&lt;br /&gt;
&lt;br /&gt;
char SoundId;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All other commands, except 0xf6, are identical in all EOB1 versions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Far from all command codes have been documented here, however most of it have already been reverse engineered. Feel free to check the source code for the script decompiler: Script Decompiler 2 at the tools section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
.inf dump with comments&lt;br /&gt;
EOB1 INF file resourced for assembler 68000 (To See here for all the INF files&lt;br /&gt;
EOB-InfFile-Asm.lha&lt;br /&gt;
EOB-InfFile-Asm.lha&lt;br /&gt;
&lt;br /&gt;
    Details&lt;br /&gt;
    Download&lt;br /&gt;
    91 KB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 BOPT uo+&lt;br /&gt;
 BOPT ue-&lt;br /&gt;
 BOPT ua+&lt;br /&gt;
 OUTPUT LEVEL1.INF.dec&lt;br /&gt;
 ;Source Created by &amp;quot;EOB Langage File ReSourcerINF&amp;quot; Beta&lt;br /&gt;
 ;A Tool done by CFou! on June 2006&lt;br /&gt;
Start&lt;br /&gt;
Hunk0:&lt;br /&gt;
 dc.b Hunk3-Start,(Hunk3-Start)/$100 ; dc.w $B10A&lt;br /&gt;
 ; Maze name&lt;br /&gt;
 dc.b &#039;level1.maz&#039;,0,0&lt;br /&gt;
 ; VCN/VMP name&lt;br /&gt;
 dc.b &#039;brick&#039;,0,&#039;.maz&#039;,0,0&lt;br /&gt;
 ; Palette name&lt;br /&gt;
 dc.b &#039;brick&#039;,0,&#039;.maz&#039;,0,0&lt;br /&gt;
_0026:&lt;br /&gt;
 ; Nb of doors and doorknobs&lt;br /&gt;
 dc.w $0000,$FF03&lt;br /&gt;
_002A:&lt;br /&gt;
 ; Max monster / tdiff etc&lt;br /&gt;
 dc.b $00,$00,$00,$00,$00&lt;br /&gt;
_002F:&lt;br /&gt;
 ; Number of procedure for extraction of monster picture&lt;br /&gt;
 dc.b $01&lt;br /&gt;
 ; Name Of Monster pic CPS file&lt;br /&gt;
 dc.b &#039;kobold&#039;,0,&#039;maz&#039;,0,0&lt;br /&gt;
_003C:&lt;br /&gt;
 ; Number of procedure for extraction of monster picture&lt;br /&gt;
 dc.b $00&lt;br /&gt;
 ; Name Of Monster pic CPS file&lt;br /&gt;
 dc.b &#039;leech&#039;,0,0,&#039;maz&#039;,0,0&lt;br /&gt;
_0049:&lt;br /&gt;
 ; Timer0 | Timer 1| Timerdiff (in Ticks)&lt;br /&gt;
 dc.b $00,$19&lt;br /&gt;
 ; Timer0 | Timer 1| Timerdiff&lt;br /&gt;
 dc.b $01,$23&lt;br /&gt;
 ; End of Timer&lt;br /&gt;
 dc.b $FF&lt;br /&gt;
_004E:&lt;br /&gt;
 ; Monster Description X 30: Start point and so on&lt;br /&gt;
 dc.b $01,$00,$14,$01,$04,$02,$00,$00,$06,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $02,$00,$F4,$00,$04,$02,$00,$00,$06,$00,$00,$00,$04,$00&lt;br /&gt;
 dc.b $03,$00,$15,$01,$04,$02,$00,$00,$06,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $04,$00,$F5,$00,$04,$02,$00,$00,$06,$00,$04,$00,$37,$00&lt;br /&gt;
 dc.b $05,$00,$B4,$01,$00,$00,$00,$00,$04,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $06,$00,$B4,$01,$01,$00,$00,$00,$04,$00,$00,$00,$04,$00&lt;br /&gt;
 dc.b $07,$00,$B4,$01,$02,$00,$00,$00,$04,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $08,$00,$B4,$01,$03,$00,$00,$00,$04,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $09,$00,$4A,$02,$04,$01,$00,$00,$05,$00,$00,$00,$04,$00&lt;br /&gt;
 dc.b $0A,$00,$4B,$02,$04,$03,$00,$00,$05,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $0B,$00,$4C,$02,$04,$01,$00,$00,$05,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $0C,$00,$2C,$03,$02,$02,$00,$00,$04,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $0D,$00,$2C,$03,$03,$02,$00,$00,$04,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $0E,$00,$59,$02,$02,$02,$00,$00,$04,$00,$00,$00,$04,$00&lt;br /&gt;
 dc.b $0F,$00,$59,$02,$03,$02,$00,$00,$04,$00,$04,$00,$00,$00&lt;br /&gt;
 dc.b $10,$00,$6B,$02,$04,$01,$00,$00,$06,$00,$04,$00,$3B,$00&lt;br /&gt;
 dc.b $11,$00,$2C,$02,$04,$02,$00,$00,$06,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $12,$00,$8F,$01,$04,$02,$00,$00,$01,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $13,$01,$86,$03,$04,$00,$01,$01,$01,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $14,$01,$66,$03,$04,$00,$01,$01,$01,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $15,$01,$45,$03,$04,$01,$01,$01,$05,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $16,$01,$2A,$03,$04,$00,$01,$01,$01,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $17,$01,$E8,$02,$04,$01,$01,$01,$01,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $18,$01,$EF,$02,$04,$03,$01,$01,$01,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00&lt;br /&gt;
 dc.b $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00&lt;br /&gt;
_01F2:&lt;br /&gt;
Hunk1:&lt;br /&gt;
 ; Nb of $EC &amp;amp; $FB command Hunk 1&lt;br /&gt;
 dc.w $1B00&lt;br /&gt;
 ; Command $EC &amp;amp; $FB&lt;br /&gt;
 dc.b $EC&lt;br /&gt;
 dc.b &#039;brick1&#039;,0,&#039;maz&#039;,0,0&lt;br /&gt;
 dc.b &#039;brick.dat&#039;,0,0,0&lt;br /&gt;
 dc.b $FB,$27,$01,$00,$03,$04&lt;br /&gt;
 dc.b $FB,$28,$01,$01,$04,$04&lt;br /&gt;
 dc.b $FB,$3E,$01,$17,$02,$04&lt;br /&gt;
 dc.b $FB,$2B,$01,$28,$02,$04&lt;br /&gt;
 dc.b $FB,$3F,$01,$16,$02,$04&lt;br /&gt;
 dc.b $FB,$32,$01,$04,$02,$04&lt;br /&gt;
 dc.b $FB,$41,$01,$1A,$02,$04&lt;br /&gt;
 dc.b $FB,$2F,$01,$30,$02,$04&lt;br /&gt;
 dc.b $FB,$2C,$01,$2F,$02,$04&lt;br /&gt;
 dc.b $FB,$2A,$01,$31,$02,$04&lt;br /&gt;
 dc.b $EC&lt;br /&gt;
 dc.b &#039;brick2&#039;,0,&#039;at&#039;,0,0,0&lt;br /&gt;
 dc.b &#039;brick.dat&#039;,0,0,0&lt;br /&gt;
 dc.b $FB,$1A,$00,$1C,$00,$03&lt;br /&gt;
 dc.b $FB,$17,$04,$21,$00,$05&lt;br /&gt;
 dc.b $FB,$18,$05,$22,$00,$05&lt;br /&gt;
 dc.b $FB,$1C,$00,$1D,$00,$03&lt;br /&gt;
 dc.b $FB,$19,$00,$FF,$00,$07&lt;br /&gt;
 dc.b $FB,$3C,$01,$24,$03,$04&lt;br /&gt;
 dc.b $FB,$3D,$01,$25,$04,$04&lt;br /&gt;
 dc.b $FB,$37,$01,$1E,$03,$04&lt;br /&gt;
 dc.b $FB,$38,$01,$1F,$04,$04&lt;br /&gt;
 dc.b $FB,$1D,$01,$20,$0A,$84&lt;br /&gt;
 dc.b $FB,$33,$01,$26,$02,$04&lt;br /&gt;
 dc.b $FB,$3A,$01,$23,$00,$04&lt;br /&gt;
 dc.b $EC&lt;br /&gt;
 dc.b &#039;brick3&#039;,0,&#039;at&#039;,0,0,0&lt;br /&gt;
 dc.b &#039;brick.dat&#039;,0,0,0&lt;br /&gt;
 dc.b $FB,$45,$00,$27,$02,$04&lt;br /&gt;
 dc.b $FB,$31,$00,$2D,$02,$04&lt;br /&gt;
 ;$1B Command Resourced&lt;br /&gt;
Hunk2:&lt;br /&gt;
 ; New Section&lt;br /&gt;
_02CF: dc.b $EE,$E0,$01&lt;br /&gt;
_02D2: dc.b $FF,$EE,_035A-Start,(_035A-Start)/$100 ; dc.b $5A,$03&lt;br /&gt;
_02D6: dc.b $EE,$ED,$01&lt;br /&gt;
_02D9: dc.b $FF,$EE,_0308-Start,(_0308-Start)/$100 ; dc.b $08,$03&lt;br /&gt;
_02DD: dc.b $EE,$EF,$1F,$00&lt;br /&gt;
_02E1: dc.b $FF,$EE,_02EA-Start,(_02EA-Start)/$100 ; dc.b $EA,$02&lt;br /&gt;
_02E5: dc.b $E6,$0A&lt;br /&gt;
_02E7: dc.b $F7,$EF,$1F&lt;br /&gt;
_02EA: dc.b $F8,&amp;quot;going down...&amp;quot;,0,$05,$00&lt;br /&gt;
_02FB: dc.b $F6,$4F,$00,$00&lt;br /&gt;
_02FF: dc.b $EC,$E5,$02,$F3,$02,$01&lt;br /&gt;
_0305: dc.b $F2,_035A-Start,(_035A-Start)/$100 ; dc.b $5A,$03&lt;br /&gt;
_0308: dc.b $F8,&amp;quot;you can&#039;t go that way.&amp;quot;,0,$0F,$00&lt;br /&gt;
_0322: dc.b $F6,$1D,$00,$00&lt;br /&gt;
_0326: dc.b $EE,$01,$00&lt;br /&gt;
_0329: dc.b $FF,$EE,_0333-Start,(_0333-Start)/$100 ; dc.b $33,$03&lt;br /&gt;
_032D: dc.b $FA,$E8,$00,$00,$12,$03&lt;br /&gt;
_0333: dc.b $EE,$01,$01&lt;br /&gt;
_0336: dc.b $FF,$EE,_0340-Start,(_0340-Start)/$100 ; dc.b $40,$03&lt;br /&gt;
_033A: dc.b $FA,$E8,$00,$00,$F1,$02&lt;br /&gt;
_0340: dc.b $EE,$01,$02&lt;br /&gt;
_0343: dc.b $FF,$EE,_034D-Start,(_034D-Start)/$100 ; dc.b $4D,$03&lt;br /&gt;
_0347: dc.b $FA,$E8,$00,$00,$D2,$02&lt;br /&gt;
_034D: dc.b $EE,$01,$03&lt;br /&gt;
_0350: dc.b $FF,$EE,_035A-Start,(_035A-Start)/$100 ; dc.b $5A,$03&lt;br /&gt;
_0354: dc.b $FA,$E8,$00,$00,$F3,$02&lt;br /&gt;
_035A: dc.b $EE,$E0,$04&lt;br /&gt;
_035D: dc.b $FF,$EE,_0395-Start,(_0395-Start)/$100 ; dc.b $95,$03&lt;br /&gt;
_0361: dc.b $EE,$01,$00&lt;br /&gt;
_0364: dc.b $FF,$EE,_036E-Start,(_036E-Start)/$100 ; dc.b $6E,$03&lt;br /&gt;
_0368: dc.b $FA,$F5,$F2,$02,$12,$03&lt;br /&gt;
_036E: dc.b $EE,$01,$01&lt;br /&gt;
_0371: dc.b $FF,$EE,_037B-Start,(_037B-Start)/$100 ; dc.b $7B,$03&lt;br /&gt;
_0375: dc.b $FA,$F5,$F2,$02,$F1,$02&lt;br /&gt;
_037B: dc.b $EE,$01,$02&lt;br /&gt;
_037E: dc.b $FF,$EE,_0388-Start,(_0388-Start)/$100 ; dc.b $88,$03&lt;br /&gt;
_0382: dc.b $FA,$F5,$F2,$02,$D2,$02&lt;br /&gt;
_0388: dc.b $EE,$01,$03&lt;br /&gt;
_038B: dc.b $FF,$EE,_0395-Start,(_0395-Start)/$100 ; dc.b $95,$03&lt;br /&gt;
_038F: dc.b $FA,$F5,$F2,$02,$F3,$02&lt;br /&gt;
_0395:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0396: dc.b $EE,$EF,$0A,$00&lt;br /&gt;
_039A: dc.b $FF,$EE,_03A5-Start,(_03A5-Start)/$100 ; dc.b $A5,$03&lt;br /&gt;
_039E: dc.b $EB,$E2,$40,$06&lt;br /&gt;
_03A2: dc.b $F7,$EF,$0A&lt;br /&gt;
_03A5:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_03A6: dc.b $EB,$E2,$10,$27&lt;br /&gt;
_03AA:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_03AB: dc.b $EE,$EF,$08,$00&lt;br /&gt;
_03AF: dc.b $FF,$EE,_03BA-Start,(_03BA-Start)/$100 ; dc.b $BA,$03&lt;br /&gt;
_03B3: dc.b $EB,$E2,$40,$06&lt;br /&gt;
_03B7: dc.b $F7,$EF,$08&lt;br /&gt;
_03BA:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_03BB: dc.b $EE,$EF,$04,$00&lt;br /&gt;
_03BF: dc.b $FF,$EE,_03CA-Start,(_03CA-Start)/$100 ; dc.b $CA,$03&lt;br /&gt;
_03C3: dc.b $EB,$E2,$90,$01&lt;br /&gt;
_03C7: dc.b $F7,$EF,$04&lt;br /&gt;
_03CA:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_03CB: dc.b $F6,$01,$AD,$01&lt;br /&gt;
_03CF: dc.b $FE,$EA,$AE,$01&lt;br /&gt;
_03D3: dc.b $EE,$EF,$01,$00&lt;br /&gt;
_03D7: dc.b $FF,$EE,_03E2-Start,(_03E2-Start)/$100 ; dc.b $E2,$03&lt;br /&gt;
_03DB: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_03DF: dc.b $F7,$EF,$01&lt;br /&gt;
_03E2:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_03E3: dc.b $EE,$F7,$75,$01,$01&lt;br /&gt;
_03E8: dc.b $FE,$EE,_03F6-Start,(_03F6-Start)/$100 ; dc.b $F6,$03&lt;br /&gt;
_03EC: dc.b $FF,$F7,$11,$02,$01&lt;br /&gt;
_03F1: dc.b $FF,$F7,$2E,$03,$01&lt;br /&gt;
_03F6: dc.b $EE,$EF,$02,$00&lt;br /&gt;
_03FA: dc.b $FF,$EE,_0405-Start,(_0405-Start)/$100 ; dc.b $05,$04&lt;br /&gt;
_03FE: dc.b $EB,$E2,$90,$01&lt;br /&gt;
_0402: dc.b $F7,$EF,$02&lt;br /&gt;
_0405:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0406: dc.b $EE,$F7,$11,$02,$01&lt;br /&gt;
_040B: dc.b $FE,$EE,_041F-Start,(_041F-Start)/$100 ; dc.b $1F,$04&lt;br /&gt;
_040F: dc.b $FF,$E9,$C9,$02,$00,$01&lt;br /&gt;
_0415: dc.b $FF,$F7,$75,$01,$01&lt;br /&gt;
_041A: dc.b $FF,$F7,$4D,$03,$01&lt;br /&gt;
_041F: dc.b $F7,$EF,$02&lt;br /&gt;
_0422:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0423: dc.b $EE,$E9,$00,$B7,$01,$01&lt;br /&gt;
_0429: dc.b $FE,$EE,_0444-Start,(_0444-Start)/$100 ; dc.b $44,$04&lt;br /&gt;
_042D: dc.b $F6,$07,$B7,$01&lt;br /&gt;
_0431: dc.b $FE,$EA,$B6,$01&lt;br /&gt;
_0435: dc.b $EE,$EF,$05,$00&lt;br /&gt;
_0439: dc.b $FF,$EE,_0444-Start,(_0444-Start)/$100 ; dc.b $44,$04&lt;br /&gt;
_043D: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_0441: dc.b $F7,$EF,$05&lt;br /&gt;
_0444:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0445: dc.b $EE,$F7,$D6,$01,$1C&lt;br /&gt;
_044A: dc.b $FF,$EE,_0465-Start,(_0465-Start)/$100 ; dc.b $65,$04&lt;br /&gt;
_044E: dc.b $F6,$0C,$D6,$01&lt;br /&gt;
_0452: dc.b $FE,$EA,$B6,$01&lt;br /&gt;
_0456: dc.b $EE,$EF,$07,$00&lt;br /&gt;
_045A: dc.b $FF,$EE,_0465-Start,(_0465-Start)/$100 ; dc.b $65,$04&lt;br /&gt;
_045E: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_0462: dc.b $F7,$EF,$07&lt;br /&gt;
_0465:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0466: dc.b $EE,$E0,$01&lt;br /&gt;
_0469: dc.b $FF,$F5,$FF,$36,$02,$00&lt;br /&gt;
_046F: dc.b $FF,$F9,$E0,$04,$FF&lt;br /&gt;
_0474: dc.b $F5,$FF,$36,$02,$01&lt;br /&gt;
_0479: dc.b $FF,$F9,$F1,$36,$02,$00&lt;br /&gt;
_047F: dc.b $FF,$F9,$F8,$EE,_048C-Start,(_048C-Start)/$100 ; dc.b $8C,$04&lt;br /&gt;
_0485: dc.b $F6,$0C,$36,$02&lt;br /&gt;
_0489: dc.b $FD,$76,$02&lt;br /&gt;
_048C: dc.b $EE,$E0,$02&lt;br /&gt;
_048F: dc.b $FF,$F5,$FF,$36,$02,$00&lt;br /&gt;
_0495: dc.b $FF,$F9,$E0,$08,$FF&lt;br /&gt;
_049A: dc.b $F5,$FF,$36,$02,$00&lt;br /&gt;
_049F: dc.b $FF,$F9,$F1,$36,$02,$00&lt;br /&gt;
_04A5: dc.b $FF,$F9,$F8,$EE,_04B2-Start,(_04B2-Start)/$100 ; dc.b $B2,$04&lt;br /&gt;
_04AB: dc.b $F6,$0C,$36,$02&lt;br /&gt;
_04AF: dc.b $FC,$76,$02&lt;br /&gt;
_04B2:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_04B3: dc.b $F6,$01,$52,$02&lt;br /&gt;
_04B7: dc.b $FE,$EA,$53,$02&lt;br /&gt;
_04BB:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_04BC: dc.b $EE,$E9,$01,$6E,$02,$01&lt;br /&gt;
_04C2: dc.b $FE,$EE,_04DD-Start,(_04DD-Start)/$100 ; dc.b $DD,$04&lt;br /&gt;
_04C6: dc.b $F6,$07,$6E,$02&lt;br /&gt;
_04CA: dc.b $FE,$EA,$4E,$02&lt;br /&gt;
_04CE: dc.b $EE,$EF,$05,$00&lt;br /&gt;
_04D2: dc.b $FF,$EE,_04DD-Start,(_04DD-Start)/$100 ; dc.b $DD,$04&lt;br /&gt;
_04D6: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_04DA: dc.b $F7,$EF,$05&lt;br /&gt;
_04DD:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_04DE: dc.b $EE,$F7,$4D,$02,$1C&lt;br /&gt;
_04E3: dc.b $FF,$EE,_04FE-Start,(_04FE-Start)/$100 ; dc.b $FE,$04&lt;br /&gt;
_04E7: dc.b $F6,$0C,$4D,$02&lt;br /&gt;
_04EB: dc.b $FE,$EA,$4E,$02&lt;br /&gt;
_04EF: dc.b $EE,$EF,$07,$00&lt;br /&gt;
_04F3: dc.b $FF,$EE,_04FE-Start,(_04FE-Start)/$100 ; dc.b $FE,$04&lt;br /&gt;
_04F7: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_04FB: dc.b $F7,$EF,$07&lt;br /&gt;
_04FE:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_04FF: dc.b $F6,$07,$B2,$02&lt;br /&gt;
_0503: dc.b $F6,$0D,$93,$02&lt;br /&gt;
_0507: dc.b $FE,$F7,$93,$02,$00,$01&lt;br /&gt;
_050D: dc.b $FA,$F3,$93,$02,$73,$02&lt;br /&gt;
_0513: dc.b $EE,$EF,$06,$00&lt;br /&gt;
_0517: dc.b $FF,$EE,_0522-Start,(_0522-Start)/$100 ; dc.b $22,$05&lt;br /&gt;
_051B: dc.b $EB,$E2,$40,$06&lt;br /&gt;
_051F: dc.b $F7,$EF,$06&lt;br /&gt;
_0522:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0523: dc.b $F6,$07,$BA,$02&lt;br /&gt;
_0527: dc.b $FA,$F3,$99,$02,$79,$02&lt;br /&gt;
_052D: dc.b $F6,$0D,$99,$02&lt;br /&gt;
_0531: dc.b $FE,$F7,$99,$02,$00,$01&lt;br /&gt;
_0537: dc.b $EE,$EF,$06,$00&lt;br /&gt;
_053B: dc.b $FF,$EE,_0546-Start,(_0546-Start)/$100 ; dc.b $46,$05&lt;br /&gt;
_053F: dc.b $EB,$E2,$40,$06&lt;br /&gt;
_0543: dc.b $F7,$EF,$06&lt;br /&gt;
_0546:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0547: dc.b $EE,$E9,$01,$E7,$02,$01&lt;br /&gt;
_054D: dc.b $FE,$EE,_0568-Start,(_0568-Start)/$100 ; dc.b $68,$05&lt;br /&gt;
_0551: dc.b $F6,$07,$E7,$02&lt;br /&gt;
_0555: dc.b $FE,$EA,$C8,$02&lt;br /&gt;
_0559: dc.b $EE,$EF,$05,$00&lt;br /&gt;
_055D: dc.b $FF,$EE,_0568-Start,(_0568-Start)/$100 ; dc.b $68,$05&lt;br /&gt;
_0561: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_0565: dc.b $F7,$EF,$05&lt;br /&gt;
_0568:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0569: dc.b $F6,$07,$C9,$02&lt;br /&gt;
_056D: dc.b $EE,$E9,$00,$C9,$02,$01&lt;br /&gt;
_0573: dc.b $FE,$EE,_0590-Start,(_0590-Start)/$100 ; dc.b $90,$05&lt;br /&gt;
_0577: dc.b $FE,$EA,$C8,$02&lt;br /&gt;
_057B: dc.b $FF,$E9,$E7,$02,$01,$01&lt;br /&gt;
_0581: dc.b $EE,$EF,$05,$00&lt;br /&gt;
_0585: dc.b $FF,$EE,_0590-Start,(_0590-Start)/$100 ; dc.b $90,$05&lt;br /&gt;
_0589: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_058D: dc.b $F7,$EF,$05&lt;br /&gt;
_0590:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0591: dc.b $F6,$0C,$11,$03&lt;br /&gt;
_0595: dc.b $FD,$F1,$02&lt;br /&gt;
_0598:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0599: dc.b $EE,$E0,$01&lt;br /&gt;
_059C: dc.b $FF,$F5,$FF,$F0,$02,$00&lt;br /&gt;
_05A2: dc.b $FF,$F9,$EE,_05AE-Start,(_05AE-Start)/$100 ; dc.b $AE,$05&lt;br /&gt;
_05A7: dc.b $F6,$0C,$F0,$02&lt;br /&gt;
_05AB: dc.b $FC,$F1,$02&lt;br /&gt;
_05AE: dc.b $EE,$E0,$04&lt;br /&gt;
_05B1: dc.b $FF,$F1,$F0,$02,$00&lt;br /&gt;
_05B6: dc.b $FF,$F5,$FF,$F0,$02,$02&lt;br /&gt;
_05BC: dc.b $FD,$F9,$F9,$EE,_05C9-Start,(_05C9-Start)/$100 ; dc.b $C9,$05&lt;br /&gt;
_05C2: dc.b $F6,$0C,$F0,$02&lt;br /&gt;
_05C6: dc.b $FC,$F1,$02&lt;br /&gt;
_05C9:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_05CA: dc.b $EE,$EF,$00,$00&lt;br /&gt;
_05CE: dc.b $FF,$EE,_05F1-Start,(_05F1-Start)/$100 ; dc.b $F1,$05&lt;br /&gt;
_05D2: dc.b $F8,&amp;quot;it smells terrible here.&amp;quot;,0,$02,$00&lt;br /&gt;
_05EE: dc.b $F7,$EF,$00&lt;br /&gt;
_05F1:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_05F2: dc.b $F8,&amp;quot;this slimy, smelly drain pipe reveals nothing.&amp;quot;,0,$02,$00&lt;br /&gt;
_0624: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_0628: dc.b $FF,$EE,_0633-Start,(_0633-Start)/$100 ; dc.b $33,$06&lt;br /&gt;
_062C: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_0630: dc.b $F7,$EF,$03&lt;br /&gt;
_0633:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0634: dc.b $F8,&amp;quot;there is a drainage grate here.&amp;quot;,0,$02,$00&lt;br /&gt;
_0657: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_065B: dc.b $FF,$EE,_0666-Start,(_0666-Start)/$100 ; dc.b $66,$06&lt;br /&gt;
_065F: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_0663: dc.b $F7,$EF,$03&lt;br /&gt;
_0666: dc.b $EE,$E7,$F5,$00&lt;br /&gt;
_066A: dc.b $FF,$EF,$01,$00&lt;br /&gt;
_066E: dc.b $FF,$F9,$EE,_067C-Start,(_067C-Start)/$100 ; dc.b $7C,$06&lt;br /&gt;
_0673: dc.b $EA,$3A,$00,$FF,$FF,$00&lt;br /&gt;
_0679: dc.b $F7,$EF,$01&lt;br /&gt;
_067C:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_067D: dc.b $F8,&amp;quot;this slimy, smelly drain pipe reveals nothing.&amp;quot;,0,$02,$00&lt;br /&gt;
_06AF: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_06B3: dc.b $FF,$EE,_06BE-Start,(_06BE-Start)/$100 ; dc.b $BE,$06&lt;br /&gt;
_06B7: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_06BB: dc.b $F7,$EF,$03&lt;br /&gt;
_06BE:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_06BF: dc.b $F8,&amp;quot;there is a drainage grate here.&amp;quot;,0,$02,$00&lt;br /&gt;
_06E2: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_06E6: dc.b $FF,$EE,_06F1-Start,(_06F1-Start)/$100 ; dc.b $F1,$06&lt;br /&gt;
_06EA: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_06EE: dc.b $F7,$EF,$03&lt;br /&gt;
_06F1:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_06F2: dc.b $F8,&amp;quot;there is a drainage grate here.&amp;quot;,0,$02,$00&lt;br /&gt;
_0715: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_0719: dc.b $FF,$EE,_0724-Start,(_0724-Start)/$100 ; dc.b $24,$07&lt;br /&gt;
_071D: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_0721: dc.b $F7,$EF,$03&lt;br /&gt;
_0724:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0725: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_0729: dc.b $FF,$EE,_0734-Start,(_0734-Start)/$100 ; dc.b $34,$07&lt;br /&gt;
_072D: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_0731: dc.b $F7,$EF,$03&lt;br /&gt;
_0734: dc.b $EE,$F1,$CE,$01,$01&lt;br /&gt;
_0739: dc.b $FF,$EE,_07AF-Start,(_07AF-Start)/$100 ; dc.b $AF,$07&lt;br /&gt;
_073D: dc.b $EE,$E9,$03,$CF,$01,$2C&lt;br /&gt;
_0743: dc.b $FF,$EE,_0789-Start,(_0789-Start)/$100 ; dc.b $89,$07&lt;br /&gt;
_0747: dc.b $F8,&amp;quot;something scurries deeper into the floor drain.&amp;quot;,0,$02,$00&lt;br /&gt;
_077A: dc.b $FF,$E9,$CF,$01,$03,$3E&lt;br /&gt;
_0780: dc.b $FF,$E9,$CF,$01,$01,$2C&lt;br /&gt;
_0786: dc.b $F2,_07AC-Start,(_07AC-Start)/$100 ; dc.b $AC,$07&lt;br /&gt;
_0789: dc.b $F8,&amp;quot;there is a drainage grate here.&amp;quot;,0,$02,$00&lt;br /&gt;
_07AC: dc.b $F2,_081E-Start,(_081E-Start)/$100 ; dc.b $1E,$08&lt;br /&gt;
_07AF: dc.b $EE,$E9,$01,$CF,$01,$2C&lt;br /&gt;
_07B5: dc.b $FF,$EE,_07FB-Start,(_07FB-Start)/$100 ; dc.b $FB,$07&lt;br /&gt;
_07B9: dc.b $F8,&amp;quot;something scurries deeper into the floor drain.&amp;quot;,0,$02,$00&lt;br /&gt;
_07EC: dc.b $FF,$E9,$CF,$01,$01,$3E&lt;br /&gt;
_07F2: dc.b $FF,$E9,$CF,$01,$03,$2C&lt;br /&gt;
_07F8: dc.b $F2,_081E-Start,(_081E-Start)/$100 ; dc.b $1E,$08&lt;br /&gt;
_07FB: dc.b $F8,&amp;quot;there is a drainage grate here.&amp;quot;,0,$02,$00&lt;br /&gt;
_081E:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_081F: dc.b $FF,$E9,$CF,$01,$03,$2C&lt;br /&gt;
_0825: dc.b $FF,$E9,$CF,$01,$01,$2C&lt;br /&gt;
_082B:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_082C: dc.b $F8,&amp;quot;this slimy, smelly drain pipe reveals nothing.&amp;quot;,0,$02,$00&lt;br /&gt;
_085E: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_0862: dc.b $FF,$EE,_086D-Start,(_086D-Start)/$100 ; dc.b $6D,$08&lt;br /&gt;
_0866: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_086A: dc.b $F7,$EF,$03&lt;br /&gt;
_086D:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_086E: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_0872: dc.b $FF,$EE,_087D-Start,(_087D-Start)/$100 ; dc.b $7D,$08&lt;br /&gt;
_0876: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_087A: dc.b $F7,$EF,$03&lt;br /&gt;
_087D: dc.b $EE,$DD,$04,$01&lt;br /&gt;
_0881: dc.b $FF,$EE,_08A7-Start,(_08A7-Start)/$100 ; dc.b $A7,$08&lt;br /&gt;
_0885: dc.b $F8,&amp;quot;kobold rune for &#039;entrance&#039;.&amp;quot;,0,$02,$00&lt;br /&gt;
_08A4: dc.b $F2,_08C5-Start,(_08C5-Start)/$100 ; dc.b $C5,$08&lt;br /&gt;
_08A7: dc.b $F8,&amp;quot;this rune is unrecognized.&amp;quot;,0,$02,$00&lt;br /&gt;
_08C5:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_08C6: dc.b $EE,$EF,$03,$00&lt;br /&gt;
_08CA: dc.b $FF,$EE,_08D5-Start,(_08D5-Start)/$100 ; dc.b $D5,$08&lt;br /&gt;
_08CE: dc.b $EB,$E2,$20,$03&lt;br /&gt;
_08D2: dc.b $F7,$EF,$03&lt;br /&gt;
_08D5: dc.b $EE,$DD,$04,$01&lt;br /&gt;
_08D9: dc.b $FF,$EE,_08FF-Start,(_08FF-Start)/$100 ; dc.b $FF,$08&lt;br /&gt;
_08DD: dc.b $F8,&amp;quot;kobold rune for &#039;entrance&#039;.&amp;quot;,0,$02,$00&lt;br /&gt;
_08FC: dc.b $F2,_091D-Start,(_091D-Start)/$100 ; dc.b $1D,$09&lt;br /&gt;
_08FF: dc.b $F8,&amp;quot;this rune is unrecognized.&amp;quot;,0,$02,$00&lt;br /&gt;
_091D:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_091E: dc.b $EE,$F5,$05,$0C,$03,$00&lt;br /&gt;
_0924: dc.b $FB,$F0,$01,$00&lt;br /&gt;
_0928: dc.b $FF,$F9,$EE,_0962-Start,(_0962-Start)/$100 ; dc.b $62,$09&lt;br /&gt;
_092D: dc.b $F8,&amp;quot;special quest for this level!&amp;quot;,0,$03,$00&lt;br /&gt;
_094E: dc.b $F6,$1C,$00,$00&lt;br /&gt;
_0952: dc.b $F7,$F0,$01&lt;br /&gt;
_0955: dc.b $ED,$05,$0C,$03&lt;br /&gt;
_0959: dc.b $EA,$31,$00,$0C,$03,$08&lt;br /&gt;
_095F: dc.b $F7,$F0,$01&lt;br /&gt;
_0962: dc.b $EE,$EF,$09,$00&lt;br /&gt;
_0966: dc.b $FF,$EE,_0971-Start,(_0971-Start)/$100 ; dc.b $71,$09&lt;br /&gt;
_096A: dc.b $EB,$E2,$90,$01&lt;br /&gt;
_096E: dc.b $F7,$EF,$09&lt;br /&gt;
_0971:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0972: dc.b $F8,&amp;quot;fallen rocks block the way.&amp;quot;,0,$02,$00&lt;br /&gt;
_0991:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0992: dc.b $FF,$E9,$CA,$01,$02,$31&lt;br /&gt;
_0998:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0999: dc.b $FF,$E9,$CA,$01,$02,$45&lt;br /&gt;
_099F:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_09A0: dc.b $EE,$E9,$03,$62,$00,$08&lt;br /&gt;
_09A6: dc.b $FF,$EE,_0A86-Start,(_0A86-Start)/$100 ; dc.b $86,$0A&lt;br /&gt;
_09AA: dc.b $EE,$E7,$E1,$26&lt;br /&gt;
_09AE: dc.b $FF,$E7,$F6,$01&lt;br /&gt;
_09B2: dc.b $FF,$F9,$EE,_09C3-Start,(_09C3-Start)/$100 ; dc.b $C3,$09&lt;br /&gt;
_09B7: dc.b $F6,$0E,$81,$00&lt;br /&gt;
_09BB: dc.b $FD,$62,$00&lt;br /&gt;
_09BE: dc.b $ED,$FF&lt;br /&gt;
_09C0: dc.b $F2,_0A83-Start,(_0A83-Start)/$100 ; dc.b $83,$0A&lt;br /&gt;
_09C3: dc.b $EE,$E7,$E1,$26&lt;br /&gt;
_09C7: dc.b $FF,$EE,_09E5-Start,(_09E5-Start)/$100 ; dc.b $E5,$09&lt;br /&gt;
_09CB: dc.b $F8,&amp;quot;it doesn&#039;t fit.&amp;quot;,0,$06,$00&lt;br /&gt;
_09DE: dc.b $F6,$51,$81,$00&lt;br /&gt;
_09E2: dc.b $F2,_0A83-Start,(_0A83-Start)/$100 ; dc.b $83,$0A&lt;br /&gt;
_09E5: dc.b $EE,$E7,$E1,$1C&lt;br /&gt;
_09E9: dc.b $FF,$EE,_0A66-Start,(_0A66-Start)/$100 ; dc.b $66,$0A&lt;br /&gt;
_09ED: dc.b $EE,$DC,$08,$01&lt;br /&gt;
_09F1: dc.b $FF,$EE,_0A43-Start,(_0A43-Start)/$100 ; dc.b $43,$0A&lt;br /&gt;
_09F5: dc.b $F6,$51,$81,$00&lt;br /&gt;
_09F9: dc.b $F8,&amp;quot;failed lock pick attempt.&amp;quot;,0,$05,$00&lt;br /&gt;
_0A16: dc.b $EE,$DB,$01,$64,$00,$01&lt;br /&gt;
_0A1C: dc.b $FF,$EE,_0A40-Start,(_0A40-Start)/$100 ; dc.b $40,$0A&lt;br /&gt;
_0A20: dc.b $F6,$52,$00,$00&lt;br /&gt;
_0A24: dc.b $F8,&amp;quot;the lock picks break!.&amp;quot;,0,$06,$00&lt;br /&gt;
_0A3E: dc.b $ED,$FF&lt;br /&gt;
_0A40: dc.b $F2,_0A63-Start,(_0A63-Start)/$100 ; dc.b $63,$0A&lt;br /&gt;
_0A43: dc.b $F8,&amp;quot;only a thief can pick locks.&amp;quot;,0,$06,$00&lt;br /&gt;
_0A63: dc.b $F2,_0A83-Start,(_0A83-Start)/$100 ; dc.b $83,$0A&lt;br /&gt;
_0A66: dc.b $F8,&amp;quot;this lock requires a key.&amp;quot;,0,$0F,$00&lt;br /&gt;
_0A83: dc.b $F2,_0AA2-Start,(_0AA2-Start)/$100 ; dc.b $A2,$0A&lt;br /&gt;
_0A86: dc.b $F8,&amp;quot;the lock appears jammed.&amp;quot;,0,$06,$00&lt;br /&gt;
_0AA2:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0AA3: dc.b $FF,$E9,$22,$00,$03,$31&lt;br /&gt;
_0AA9:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0AAA: dc.b $FF,$E9,$22,$00,$03,$45&lt;br /&gt;
_0AB0:&lt;br /&gt;
 dc.b $F1&lt;br /&gt;
_0AB1:&lt;br /&gt;
Hunk3:&lt;br /&gt;
 ; Nb reloc info&lt;br /&gt;
 dc.b $26,$00&lt;br /&gt;
 dc.b $F2,$02,$A8,_02CF-Start,(_02CF-Start)/$100 ; dc.b $CF,$02&lt;br /&gt;
 dc.b $F1,$02,$08,_0396-Start,(_0396-Start)/$100 ; dc.b $96,$03&lt;br /&gt;
 dc.b $AA,$01,$08,_03A6-Start,(_03A6-Start)/$100 ; dc.b $A6,$03&lt;br /&gt;
 dc.b $96,$02,$08,_03AB-Start,(_03AB-Start)/$100 ; dc.b $AB,$03&lt;br /&gt;
 dc.b $CE,$01,$60,_03BB-Start,(_03BB-Start)/$100 ; dc.b $BB,$03&lt;br /&gt;
 dc.b $AD,$01,$00,_03CB-Start,(_03CB-Start)/$100 ; dc.b $CB,$03&lt;br /&gt;
 dc.b $50,$01,$08,_03E3-Start,(_03E3-Start)/$100 ; dc.b $E3,$03&lt;br /&gt;
 dc.b $91,$01,$08,_0406-Start,(_0406-Start)/$100 ; dc.b $06,$04&lt;br /&gt;
 dc.b $B7,$01,$00,_0423-Start,(_0423-Start)/$100 ; dc.b $23,$04&lt;br /&gt;
 dc.b $D6,$01,$08,_0445-Start,(_0445-Start)/$100 ; dc.b $45,$04&lt;br /&gt;
 dc.b $36,$02,$78,_0466-Start,(_0466-Start)/$100 ; dc.b $66,$04&lt;br /&gt;
 dc.b $52,$02,$00,_04B3-Start,(_04B3-Start)/$100 ; dc.b $B3,$04&lt;br /&gt;
 dc.b $6E,$02,$00,_04BC-Start,(_04BC-Start)/$100 ; dc.b $BC,$04&lt;br /&gt;
 dc.b $4D,$02,$08,_04DE-Start,(_04DE-Start)/$100 ; dc.b $DE,$04&lt;br /&gt;
 dc.b $B2,$02,$00,_04FF-Start,(_04FF-Start)/$100 ; dc.b $FF,$04&lt;br /&gt;
 dc.b $BA,$02,$00,_0523-Start,(_0523-Start)/$100 ; dc.b $23,$05&lt;br /&gt;
 dc.b $E7,$02,$00,_0547-Start,(_0547-Start)/$100 ; dc.b $47,$05&lt;br /&gt;
 dc.b $C9,$02,$00,_0569-Start,(_0569-Start)/$100 ; dc.b $69,$05&lt;br /&gt;
 dc.b $11,$03,$00,_0591-Start,(_0591-Start)/$100 ; dc.b $91,$05&lt;br /&gt;
 dc.b $F0,$02,$28,_0599-Start,(_0599-Start)/$100 ; dc.b $99,$05&lt;br /&gt;
 dc.b $79,$02,$08,_05CA-Start,(_05CA-Start)/$100 ; dc.b $CA,$05&lt;br /&gt;
 dc.b $07,$03,$00,_05F2-Start,(_05F2-Start)/$100 ; dc.b $F2,$05&lt;br /&gt;
 dc.b $CD,$02,$00,_0634-Start,(_0634-Start)/$100 ; dc.b $34,$06&lt;br /&gt;
 dc.b $14,$03,$00,_067D-Start,(_067D-Start)/$100 ; dc.b $7D,$06&lt;br /&gt;
 dc.b $B8,$02,$00,_06BF-Start,(_06BF-Start)/$100 ; dc.b $BF,$06&lt;br /&gt;
 dc.b $32,$02,$00,_06F2-Start,(_06F2-Start)/$100 ; dc.b $F2,$06&lt;br /&gt;
 dc.b $CF,$01,$00,_0725-Start,(_0725-Start)/$100 ; dc.b $25,$07&lt;br /&gt;
 dc.b $8E,$01,$08,_081F-Start,(_081F-Start)/$100 ; dc.b $1F,$08&lt;br /&gt;
 dc.b $94,$01,$00,_082C-Start,(_082C-Start)/$100 ; dc.b $2C,$08&lt;br /&gt;
 dc.b $93,$01,$00,_086E-Start,(_086E-Start)/$100 ; dc.b $6E,$08&lt;br /&gt;
 dc.b $CF,$02,$00,_08C6-Start,(_08C6-Start)/$100 ; dc.b $C6,$08&lt;br /&gt;
 dc.b $0C,$03,$60,_091E-Start,(_091E-Start)/$100 ; dc.b $1E,$09&lt;br /&gt;
 dc.b $CA,$01,$00,_0972-Start,(_0972-Start)/$100 ; dc.b $72,$09&lt;br /&gt;
 dc.b $EB,$01,$08,_0992-Start,(_0992-Start)/$100 ; dc.b $92,$09&lt;br /&gt;
 dc.b $EA,$01,$08,_0999-Start,(_0999-Start)/$100 ; dc.b $99,$09&lt;br /&gt;
 dc.b $81,$00,$00,_09A0-Start,(_09A0-Start)/$100 ; dc.b $A0,$09&lt;br /&gt;
 dc.b $41,$00,$08,_0AA3-Start,(_0AA3-Start)/$100 ; dc.b $A3,$0A&lt;br /&gt;
 dc.b $21,$00,$08,_0AAA-Start,(_0AAA-Start)/$100 ; dc.b $AA,$0A&lt;br /&gt;
 END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Eye of the Beholder 2&lt;br /&gt;
&lt;br /&gt;
The .inf file structure and data is somewhat different from its predecessor.&lt;br /&gt;
&lt;br /&gt;
All offsets here are 16bit. All strings are null terminated c-strings. Filenames have usually 13 byte (8 letters + dot + 3 letters + null)&lt;br /&gt;
&lt;br /&gt;
There are different data blocks:&lt;br /&gt;
&lt;br /&gt;
Beginning of .inf file:&lt;br /&gt;
#x0000 offset to block_B&lt;br /&gt;
#x0002 block_A&lt;br /&gt;
 &lt;br /&gt;
block_A:&lt;br /&gt;
{&lt;br /&gt;
   subblocks belong to different sublevels:&lt;br /&gt;
   sub_block_A1:&lt;br /&gt;
   {&lt;br /&gt;
      #x0000 offset (relative to start of block_A) to sub_block_A2&lt;br /&gt;
      #x0002 control byte, when = #xEC then this block follows:&lt;br /&gt;
      #x0003:&lt;br /&gt;
      {&lt;br /&gt;
         #x0000: maze file name string usually &amp;quot;levelx.maz&amp;quot;; length: 13 byte&lt;br /&gt;
         #x000D: file name string without extention: used to load .vmp .pal; length: 13 byte&lt;br /&gt;
         #x001A: usually 0xFF, if not then the next 13 byte are again a string&lt;br /&gt;
                 without extention and used to load .pal&lt;br /&gt;
      }&lt;br /&gt;
      next: file name string without extention for sound file .adl or .snd&lt;br /&gt;
            -&amp;gt; depends on game configuration;length: 13 byte&lt;br /&gt;
      next: 2 bytes -&amp;gt; each my have the value #xEC or #xEA&lt;br /&gt;
 &lt;br /&gt;
      more to follow here (monster and decoration data)&lt;br /&gt;
   }&lt;br /&gt;
   the following blocks are optional: [&lt;br /&gt;
      sub_block_A2:&lt;br /&gt;
      {&lt;br /&gt;
         #x0000 offset to sub_block_A3&lt;br /&gt;
         ...&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
      sub_block_A3&lt;br /&gt;
      {&lt;br /&gt;
         ...&lt;br /&gt;
      } ]&lt;br /&gt;
} end of block_A&lt;br /&gt;
 &lt;br /&gt;
block_B:&lt;br /&gt;
{&lt;br /&gt;
   #x0000 offset to block_C after the scripting data&lt;br /&gt;
   #x0002 control byte, if #xEC then this block follows:&lt;br /&gt;
   {&lt;br /&gt;
      (control byte | data byte) sequence;&lt;br /&gt;
      first control byte = #xFF is already next data structure&lt;br /&gt;
   }&lt;br /&gt;
   here follows: 30*monster data structure, each with length 30 byte&lt;br /&gt;
   after that: scripting data block:&lt;br /&gt;
   {&lt;br /&gt;
      #x0000 offset (relative to scripting data block) of the first string&lt;br /&gt;
      next: events&lt;br /&gt;
      next: strings&lt;br /&gt;
   }&lt;br /&gt;
} end of block_B&lt;br /&gt;
 &lt;br /&gt;
block_C:&lt;br /&gt;
{&lt;br /&gt;
   #x0000 number of special blocks wich follow; these link maze&lt;br /&gt;
          fields to scripting data and contain flags; each 6 bytes long&lt;br /&gt;
   #x0002 maze special 1&lt;br /&gt;
   #x0008 maze special 2&lt;br /&gt;
   #x000E maze special 3&lt;br /&gt;
   ...&lt;br /&gt;
} end of block_C&lt;br /&gt;
 &lt;br /&gt;
----&lt;br /&gt;
 &lt;br /&gt;
a maze special block has the following structure:&lt;br /&gt;
{&lt;br /&gt;
   uint16: number of block in maze (0...1023)&lt;br /&gt;
   uint16: flag&lt;br /&gt;
   uint16: offset to scripting data (relative to scripting data block)&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More Eye of the beholder 2 info, nothing new here. but nice to show the data storage.&lt;br /&gt;
&lt;br /&gt;
struct sMonsterGFX&lt;br /&gt;
{&lt;br /&gt;
    bool used;&lt;br /&gt;
    int loadProg;&lt;br /&gt;
    int unk0;&lt;br /&gt;
    u8 unk1;&lt;br /&gt;
    char* label;&lt;br /&gt;
};&lt;br /&gt;
struct sDice&lt;br /&gt;
{&lt;br /&gt;
    u8 count;&lt;br /&gt;
    u8 dice;&lt;br /&gt;
    u8 plus;&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
struct sMonsterType&lt;br /&gt;
{&lt;br /&gt;
    u8 idx; // 0&lt;br /&gt;
    u8 unk0; //1&lt;br /&gt;
    u8 THAC0; //2&lt;br /&gt;
    u8 unk1; //3&lt;br /&gt;
 &lt;br /&gt;
    sDice HPDice; //4&lt;br /&gt;
    u8 numberOfAttacks; // 7&lt;br /&gt;
    sDice attackDice[3]; // 16&lt;br /&gt;
    unsigned short specialAttackFlag; //18&lt;br /&gt;
    unsigned short AbilitiesFlag; // 20&lt;br /&gt;
    unsigned short unk2;        //22&lt;br /&gt;
    unsigned short EXPGain; //24&lt;br /&gt;
 &lt;br /&gt;
    u8 size;&lt;br /&gt;
    u8 attackSound;&lt;br /&gt;
    u8 moveSound;&lt;br /&gt;
    u8 unk3;&lt;br /&gt;
    // optional&lt;br /&gt;
        bool isAttack2;&lt;br /&gt;
        u8 distantAttack;&lt;br /&gt;
        u8 MaxAttkCnt;&lt;br /&gt;
        u8 attackList[4];&lt;br /&gt;
 &lt;br /&gt;
    u8 turnUndead;&lt;br /&gt;
    u8 unk4;&lt;br /&gt;
    u8 unk5[3];&lt;br /&gt;
 &lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
struct sMonster&lt;br /&gt;
{&lt;br /&gt;
    u8 MoNo;&lt;br /&gt;
    u8 MoTime;&lt;br /&gt;
    short position;&lt;br /&gt;
    u8 subpos;&lt;br /&gt;
    u8 facing;&lt;br /&gt;
    u8 type;&lt;br /&gt;
    u8 pic;&lt;br /&gt;
    u8 phase;&lt;br /&gt;
    u8 pause;&lt;br /&gt;
    short weapon; /* Item Number */&lt;br /&gt;
    short pocket; /* Dropped on Monster killed */&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
struct sWallMapping&lt;br /&gt;
{&lt;br /&gt;
  u8 idx;&lt;br /&gt;
  u8 WallType;&lt;br /&gt;
  u8 DecorationID;&lt;br /&gt;
  u8 FileIndex;      // index number in DecorationFNames&lt;br /&gt;
  u8 unk0;&lt;br /&gt;
  u8 unk1;&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
 struct sDecorationFName&lt;br /&gt;
 {&lt;br /&gt;
  char GFXName[13];&lt;br /&gt;
  char DECName[13];&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
struct sRectangle&lt;br /&gt;
{&lt;br /&gt;
    short x;&lt;br /&gt;
    short y;&lt;br /&gt;
    short w;&lt;br /&gt;
    short h;&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
struct sDoorInfo&lt;br /&gt;
{&lt;br /&gt;
    u8 cmd;&lt;br /&gt;
    u8 idx;&lt;br /&gt;
    u8 typ;&lt;br /&gt;
    u8 knob;&lt;br /&gt;
    char GFXfile[13];&lt;br /&gt;
 &lt;br /&gt;
    sRectangle doorRect[3];&lt;br /&gt;
    sRectangle buttionRect[2];&lt;br /&gt;
    u8 buttonPos[2][2];&lt;br /&gt;
 &lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.inf EOB2 dump with comments&lt;br /&gt;
EOB2 INF resourced fro assembler 68000 (To See here for all the INF files&lt;br /&gt;
EOB2-GB-FilesToTranslate.lha&lt;br /&gt;
EOB2-GB-FilesToTranslate.lha&lt;br /&gt;
&lt;br /&gt;
    Details&lt;br /&gt;
    Download&lt;br /&gt;
    170 KB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BOPT uo+&lt;br /&gt;
BOPT ue-&lt;br /&gt;
BOPT ua+&lt;br /&gt;
OUTPUT LEVEL10.INF.dec&lt;br /&gt;
;Source Created by &amp;quot;EOB2 Language File ReSourcerINF V2&amp;quot; Beta&lt;br /&gt;
;A Tool done by CFou! on Nov 2006&lt;br /&gt;
Start&lt;br /&gt;
Hunk0:&lt;br /&gt;
dc.b Hunk1-Start,(Hunk1-Start)/$100 ; dc.b $E9,$00&lt;br /&gt;
SubHunk0:&lt;br /&gt;
dc.b SubHunk1-Start-2,(SubHunk1-Start-2)/$100 ; dc.b $E7,$00&lt;br /&gt;
dc.b $EC&lt;br /&gt;
;Maze name&lt;br /&gt;
dc.b &#039;level10.maz&#039;,0,0&lt;br /&gt;
;VCN/VMP File name&lt;br /&gt;
dc.b &#039;mezz&#039;,0,&#039;10.maz&#039;,0,0&lt;br /&gt;
;Palette File name&lt;br /&gt;
dc.b $01&lt;br /&gt;
dc.b &#039;azure&#039;,0,&#039;0.maz&#039;,0,0&lt;br /&gt;
;Sound File name&lt;br /&gt;
dc.b &#039;azure&#039;,0,&#039;0.maz&#039;,0,0&lt;br /&gt;
;Door name &amp;amp; Positions + offset&lt;br /&gt;
dc.b $EC&lt;br /&gt;
dc.b &#039;door2&#039;,0,&#039;0.maz&#039;,0,0&lt;br /&gt;
dc.b $00,$00,$00,$14,$00,$47,$00,$09,$00,$46,$00,$09,$00,$8F,$00,$07&lt;br /&gt;
dc.b $00,$2F,$00,$10,$00,$58,$00,$04,$00,$1D,$00,$10,$00,$B3,$00,$01&lt;br /&gt;
dc.b $00,$0A,$00,$7E,$00,$28,$00,$11,$00,$B3,$00,$01,$00,$06,$00,$72&lt;br /&gt;
dc.b $00,$2A,$00&lt;br /&gt;
;Door name &amp;amp; Positions + offset&lt;br /&gt;
dc.b $FF&lt;br /&gt;
 &lt;br /&gt;
;Max nb Monster ????&lt;br /&gt;
dc.b $00,$00&lt;br /&gt;
;Monster file name&lt;br /&gt;
dc.b $FF&lt;br /&gt;
;Monster file name&lt;br /&gt;
dc.b $FF&lt;br /&gt;
;Monster Struct&lt;br /&gt;
dc.b $FF&lt;br /&gt;
;Decorate Structure&lt;br /&gt;
dc.b $EC&lt;br /&gt;
; Nb Decorate Block&lt;br /&gt;
dc.b $0C,$00&lt;br /&gt;
dc.b $EC&lt;br /&gt;
; Decorate file name&lt;br /&gt;
dc.b &#039;azure1&#039;,0,&#039;.maz&#039;,0,0&lt;br /&gt;
; Decorate file name&lt;br /&gt;
dc.b &#039;azure.dec&#039;,0,&#039;z&#039;,0,0&lt;br /&gt;
; Decorate Positions/offsets&lt;br /&gt;
dc.b $FB,$1B,$01,$11,$03,$04&lt;br /&gt;
dc.b $FB,$1C,$01,$12,$04,$04&lt;br /&gt;
dc.b $FB,$23,$00,$07,$00,$03&lt;br /&gt;
dc.b $FB,$24,$00,$09,$00,$03&lt;br /&gt;
dc.b $FB,$25,$00,$0D,$00,$03&lt;br /&gt;
dc.b $FB,$29,$01,$05,$00,$04&lt;br /&gt;
dc.b $FB,$28,$01,$03,$02,$04&lt;br /&gt;
dc.b $FB,$2C,$00,$FF,$00,$07&lt;br /&gt;
dc.b $FB,$2D,$01,$0B,$0A,$84&lt;br /&gt;
dc.b $FB,$2E,$01,$FF,$00,$07&lt;br /&gt;
dc.b $FB,$4A,$00,$FF,$00,$04&lt;br /&gt;
dc.b $01,$00&lt;br /&gt;
dc.b $03,$00&lt;br /&gt;
dc.b $FF,$FF,$FF,$FF&lt;br /&gt;
SubHunk1:&lt;br /&gt;
Hunk1:&lt;br /&gt;
dc.b Hunk3-Start,(Hunk3-Start)/$100 ; dc.b $F5,$03&lt;br /&gt;
dc.b $FF&lt;br /&gt;
Hunk2:&lt;br /&gt;
;TextBank Offset&lt;br /&gt;
dc.b TextBank-Hunk2,(TextBank-Hunk2)/$100 ; dc.b $89,$02&lt;br /&gt;
;Game script&lt;br /&gt;
_0002: dc.b $EE,$E0,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0007: dc.b $FF,$EE,_0077-Hunk2,(_0077-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_000B: dc.b $EE,$ED,$D2,$02,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0010: dc.b $FF,$EE,_0027-Hunk2,(_0027-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0014: dc.b $F8,$00,$00,$05,$00 ; FCT: Display Message&lt;br /&gt;
_0019: dc.b $F6,$4F,$00,$00 ; FCT: Sound&lt;br /&gt;
_001D: dc.b $EC,$E5,$06,$00,$16,$02,$02 ; FCT: Change Level&lt;br /&gt;
_0024: dc.b $F2,_0074-Hunk2,(_0074-Hunk2)/$100 ; FCT: Jump Code&lt;br /&gt;
_0027: dc.b $F8,$01,$00,$0F,$00 ; FCT: Display Message&lt;br /&gt;
_002C: dc.b $F6,$1D,$00,$00 ; FCT: Sound&lt;br /&gt;
_0030: dc.b $EE,$D2,$02,$00,$D2,$00,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0037: dc.b $FF,$EE,_0041-Hunk2,(_0041-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_003B: dc.b $FA,$E8,$00,$00,$16,$02 ; FCT: Teleport????&lt;br /&gt;
_0041: dc.b $EE,$D2,$02,$00,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0048: dc.b $FF,$EE,_0052-Hunk2,(_0052-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_004C: dc.b $FA,$E8,$00,$00,$F5,$01 ; FCT: Teleport????&lt;br /&gt;
_0052: dc.b $EE,$D2,$02,$00,$D2,$02,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0059: dc.b $FF,$EE,_0063-Hunk2,(_0063-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_005D: dc.b $FA,$E8,$00,$00,$D6,$01 ; FCT: Teleport????&lt;br /&gt;
_0063: dc.b $EE,$D2,$02,$00,$D2,$03,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_006A: dc.b $FF,$EE,_0074-Hunk2,(_0074-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_006E: dc.b $FA,$E8,$00,$00,$F7,$01 ; FCT: Teleport????&lt;br /&gt;
_0074: dc.b $F2,_0080-Hunk2,(_0080-Hunk2)/$100 ; FCT: Jump Code&lt;br /&gt;
_0077: dc.b $FA,$F5 ; FCT: Teleport????&lt;br /&gt;
_0079: dc.b $EB,$F6,$01 ; FCT: Give Experience&lt;br /&gt;
_007C: dc.b $E5,$06,$16,$02 ; FCT: Wait&lt;br /&gt;
_0080: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_0081: dc.b $EE,$E0,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0086: dc.b $FF,$EE,_00F6-Hunk2,(_00F6-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_008A: dc.b $EE,$ED,$D2,$03,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_008F: dc.b $FF,$EE,_00A6-Hunk2,(_00A6-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0093: dc.b $F8,$02,$00,$05,$00 ; FCT: Display Message&lt;br /&gt;
_0098: dc.b $F6,$4F,$00,$00 ; FCT: Sound&lt;br /&gt;
_009C: dc.b $EC,$E5,$0B,$00,$D1,$03,$03 ; FCT: Change Level&lt;br /&gt;
_00A3: dc.b $F2,_00F3-Hunk2,(_00F3-Hunk2)/$100 ; FCT: Jump Code&lt;br /&gt;
_00A6: dc.b $F8,$01,$00,$0F,$00 ; FCT: Display Message&lt;br /&gt;
_00AB: dc.b $F6,$1D,$00,$00 ; FCT: Sound&lt;br /&gt;
_00AF: dc.b $EE,$D2,$03,$00,$D2,$00,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_00B6: dc.b $FF,$EE,_00C0-Hunk2,(_00C0-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_00BA: dc.b $FA,$E8,$00,$00,$F2,$03 ; FCT: Teleport????&lt;br /&gt;
_00C0: dc.b $EE,$D2,$03,$00,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_00C7: dc.b $FF,$EE,_00D1-Hunk2,(_00D1-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_00CB: dc.b $FA,$E8,$00,$00,$D1,$03 ; FCT: Teleport????&lt;br /&gt;
_00D1: dc.b $EE,$D2,$03,$00,$D2,$02,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_00D8: dc.b $FF,$EE,_00E2-Hunk2,(_00E2-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_00DC: dc.b $FA,$E8,$00,$00,$B2,$03 ; FCT: Teleport????&lt;br /&gt;
_00E2: dc.b $EE,$D2,$03,$00,$D2,$03,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_00E9: dc.b $FF,$EE,_00F3-Hunk2,(_00F3-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_00ED: dc.b $FA,$E8,$00,$00,$D3,$03 ; FCT: Teleport????&lt;br /&gt;
_00F3: dc.b $F2,_00FF-Hunk2,(_00FF-Hunk2)/$100 ; FCT: Jump Code&lt;br /&gt;
_00F6: dc.b $FA,$F5 ; FCT: Teleport????&lt;br /&gt;
_00F8: dc.b $EB,$D2,$03 ; FCT: Give Experience&lt;br /&gt;
_00FB: dc.b $E5,$0B,$D1,$03 ; FCT: Wait&lt;br /&gt;
_00FF: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_0100: dc.b $EE,$E7,$F6,$D2,$FF,$FF ; -&amp;gt; Condition Test&lt;br /&gt;
_0106: dc.b $FF,$EE,_010D-Hunk2,(_010D-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_010A: dc.b $FF,$ED,$03 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_010D: dc.b $EE,$E0,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0112: dc.b $FF,$EE,_0126-Hunk2,(_0126-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0116: dc.b $F6,$0F,$11,$03 ; FCT: Sound&lt;br /&gt;
_011A: dc.b $FF,$ED,$01 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_011D: dc.b $FA,$E8,$00,$00,$01,$03 ; FCT: Teleport????&lt;br /&gt;
_0123: dc.b $F2,_012E-Hunk2,(_012E-Hunk2)/$100 ; FCT: Jump Code&lt;br /&gt;
_0126: dc.b $FA,$F5 ; FCT: Teleport????&lt;br /&gt;
_0128: dc.b $EB,$11,$03 ; FCT: Give Experience&lt;br /&gt;
_012B: dc.b $EB,$01,$03 ; FCT: Give Experience&lt;br /&gt;
_012E: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_012F: dc.b $EE,$E0,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0134: dc.b $FF,$EE,_0148-Hunk2,(_0148-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0138: dc.b $F6,$0F,$C5,$03 ; FCT: Sound&lt;br /&gt;
_013C: dc.b $FF,$ED,$01 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_013F: dc.b $FA,$E8,$00,$00,$CC,$02 ; FCT: Teleport????&lt;br /&gt;
_0145: dc.b $F2,_0150-Hunk2,(_0150-Hunk2)/$100 ; FCT: Jump Code&lt;br /&gt;
_0148: dc.b $FA,$F5 ; FCT: Teleport????&lt;br /&gt;
_014A: dc.b $EB,$C5,$03 ; FCT: Give Experience&lt;br /&gt;
_014D: dc.b $EB,$CC,$02 ; FCT: Give Experience&lt;br /&gt;
_0150: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_0151: dc.b $F8,$03,$00,$01,$00 ; FCT: Display Message&lt;br /&gt;
_0156: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_0157: dc.b $F8,$04,$00,$01,$00 ; FCT: Display Message&lt;br /&gt;
_015C: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_015D: dc.b $EE,$E9,$03,$43,$02,$D2,$08,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0165: dc.b $FF,$F5,$01,$FF,$62,$02,$D2,$00,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_016E: dc.b $FB,$F9,$EE,$84,$01&lt;br /&gt;
_0173: dc.b $ED,$FE,$62,$02 ; FCT: Item Consume&lt;br /&gt;
_0177: dc.b $FD,$43,$02 ; FCT:Open Door&lt;br /&gt;
_017A: dc.b $E4 ; FCT: Update Screen&lt;br /&gt;
_017B: dc.b $E5,$01,$00 ; FCT: Wait&lt;br /&gt;
_017E: dc.b $FF,$E9,$41,$02,$01,$1B ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0184: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_0185: dc.b $EE,$E0,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_018A: dc.b $FF,$EE,_019F-Hunk2,(_019F-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_018E: dc.b $F6,$0F,$65,$02 ; FCT: Sound&lt;br /&gt;
_0192: dc.b $FC,$43,$02 ; FCT: Close Door&lt;br /&gt;
_0195: dc.b $FF,$ED,$01 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0198: dc.b $FA,$E8,$00,$00,$2C,$03 ; FCT: Teleport????&lt;br /&gt;
_019E: dc.b $F0 ; FCT: Return&lt;br /&gt;
_019F: dc.b $FA,$F5 ; FCT: Teleport????&lt;br /&gt;
_01A1: dc.b $EB,$65,$02 ; FCT: Give Experience&lt;br /&gt;
_01A4: dc.b $EB,$2C,$03 ; FCT: Give Experience&lt;br /&gt;
_01A7: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_01A8: dc.b $F6,$01,$0F,$01 ; FCT: Sound&lt;br /&gt;
_01AC: dc.b $E4 ; FCT: Update Screen&lt;br /&gt;
_01AD: dc.b $E5,$01,$00 ; FCT: Wait&lt;br /&gt;
_01B0: dc.b $FF,$E9,$0F,$01,$00,$1B ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01B6: dc.b $FF,$F7,$4F,$00,$2C ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01BB: dc.b $F7,$EF,$01 ; FCT: Set Flag&lt;br /&gt;
_01BE: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_01BF: dc.b $EE,$E0,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_01C4: dc.b $FF,$F5,$00,$FF,$4D,$00,$D2,$00,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01CD: dc.b $FF,$F9,$E0,$D2,$04,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01D3: dc.b $FF,$F5,$00,$FF,$4D,$00,$D2,$01,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01DC: dc.b $FF,$F9,$F1,$F1,$4D,$00,$D2,$00,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01E5: dc.b $FF,$F9,$F8,$EE,_01FA-Hunk2,(_01FA-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01EB: dc.b $FF,$F7,$4D,$00,$24 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01F0: dc.b $F6,$0C,$4D,$00 ; FCT: Sound&lt;br /&gt;
_01F4: dc.b $FF,$E9,$0F,$01,$00,$1B ; -&amp;gt;Condition branch/case&lt;br /&gt;
_01FA: dc.b $EE,$E0,$D2,$02,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_01FF: dc.b $FF,$F5,$00,$FF,$4D,$00,$D2,$00,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0208: dc.b $FF,$F9,$E0,$D2,$08,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_020E: dc.b $FF,$F5,$00,$FF,$4D,$00,$D2,$00,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0217: dc.b $FF,$F9,$F1,$F1,$4D,$00,$D2,$00,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0220: dc.b $FF,$F9,$F8,$EE,_0235-Hunk2,(_0235-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0226: dc.b $FF,$F7,$4D,$00,$23 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_022B: dc.b $F6,$0C,$4D,$00 ; FCT: Sound&lt;br /&gt;
_022F: dc.b $FF,$E9,$0F,$01,$00,$01 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0235: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_0236: dc.b $EE,$EF,$01,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_023C: dc.b $FF,$EE,_025B-Hunk2,(_025B-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0240: dc.b $EE,$EF,$02,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0246: dc.b $FF,$EE,_0258-Hunk2,(_0258-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_024A: dc.b $FF,$F7,$4F,$00,$00 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_024F: dc.b $F5,$EF,$01 ; FCT: Clear Flag&lt;br /&gt;
_0252: dc.b $F5,$EF,$02 ; FCT: Clear Flag&lt;br /&gt;
_0255: dc.b $F2,_025B-Hunk2,(_025B-Hunk2)/$100 ; FCT: Jump Code&lt;br /&gt;
_0258: dc.b $F7,$EF,$02 ; FCT: Set Flag&lt;br /&gt;
_025B: dc.b $F1 ; FCT: End Code&lt;br /&gt;
_025C: dc.b $EE,$F7,$4F,$00,$D2,$2C,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_0263: dc.b $FF,$EE,_0288-Hunk2,(_0288-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0267: dc.b $EE,$E0,$D2,$01,$00 ; -&amp;gt; Condition Test&lt;br /&gt;
_026C: dc.b $FF,$EE,_0280-Hunk2,(_0280-Hunk2)/$100 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0270: dc.b $F6,$0F,$4F,$00 ; FCT: Sound&lt;br /&gt;
_0274: dc.b $FF,$ED,$01 ; -&amp;gt;Condition branch/case&lt;br /&gt;
_0277: dc.b $FA,$E8,$00,$00,$2C,$03 ; FCT: Teleport????&lt;br /&gt;
_027D: dc.b $F2,_0288-Hunk2,(_0288-Hunk2)/$100 ; FCT: Jump Code&lt;br /&gt;
_0280: dc.b $FA,$F5 ; FCT: Teleport????&lt;br /&gt;
_0282: dc.b $EB,$6F,$02 ; FCT: Give Experience&lt;br /&gt;
_0285: dc.b $EB,$2C,$03 ; FCT: Give Experience&lt;br /&gt;
_0288: dc.b $F1 ; FCT: End Code&lt;br /&gt;
 &lt;br /&gt;
;TextBank&lt;br /&gt;
TextBank:&lt;br /&gt;
dc.b &#039;going down...&#039;,0&lt;br /&gt;
dc.b &#039;you can&#039;,&amp;quot;&#039;&amp;quot;,&#039;t go that way.&#039;,0&lt;br /&gt;
dc.b &#039;going up...&#039;,0&lt;br /&gt;
dc.b &#039;the plaque reads: you will pay for your freedom...&#039;,0&lt;br /&gt;
dc.b &#039;the plaque reads: one item.&#039;,0&lt;br /&gt;
Hunk3:&lt;br /&gt;
;Special Maze Blocks Bank (offset)&lt;br /&gt;
; Nb Special Maze Blocks&lt;br /&gt;
dc.b $0C,$00&lt;br /&gt;
; Special Maze Blocks List:&lt;br /&gt;
dc.b $F6,$01,$A8,$00,_0002-Hunk2,(_0002-Hunk2)/$100 ; dc.b $02,$00&lt;br /&gt;
dc.b $D2,$03,$A8,$00,_0081-Hunk2,(_0081-Hunk2)/$100 ; dc.b $81,$00&lt;br /&gt;
dc.b $11,$03,$A8,$00,_0100-Hunk2,(_0100-Hunk2)/$100 ; dc.b $00,$01&lt;br /&gt;
dc.b $C5,$03,$A8,$00,_012F-Hunk2,(_012F-Hunk2)/$100 ; dc.b $2F,$01&lt;br /&gt;
dc.b $A4,$01,$00,$00,_0151-Hunk2,(_0151-Hunk2)/$100 ; dc.b $51,$01&lt;br /&gt;
dc.b $21,$02,$00,$00,_0157-Hunk2,(_0157-Hunk2)/$100 ; dc.b $57,$01&lt;br /&gt;
dc.b $41,$02,$00,$00,_015D-Hunk2,(_015D-Hunk2)/$100 ; dc.b $5D,$01&lt;br /&gt;
dc.b $65,$02,$A8,$00,_0185-Hunk2,(_0185-Hunk2)/$100 ; dc.b $85,$01&lt;br /&gt;
dc.b $0F,$01,$00,$00,_01A8-Hunk2,(_01A8-Hunk2)/$100 ; dc.b $A8,$01&lt;br /&gt;
dc.b $4D,$00,$78,$00,_01BF-Hunk2,(_01BF-Hunk2)/$100 ; dc.b $BF,$01&lt;br /&gt;
dc.b $01,$00,$00,$00,_0236-Hunk2,(_0236-Hunk2)/$100 ; dc.b $36,$02&lt;br /&gt;
dc.b $4F,$00,$A8,$00,_025C-Hunk2,(_025C-Hunk2)/$100 ; dc.b $5C,$02&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder&amp;diff=5780</id>
		<title>Eye of the Beholder</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder&amp;diff=5780"/>
		<updated>2014-12-12T20:19:58Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&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 = No&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;
[[Eye of the Beholder]] is a role-playing video game for computers and video game consoles developed by Westwood Studios. It was published by Strategic Simulations, Inc. in 1991 for the MS-DOS operating system and later ported to the Amiga, the Sega CD, Game Boy Advance and the SNES. The Sega CD version features an exclusive soundtrack composed by Yuzo Koshiro&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.adl&lt;br /&gt;
 | Format = [[ADL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cps&lt;br /&gt;
 | Format = [[Westwood CPS Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cmp&lt;br /&gt;
 | Format = [[Westwood CMP Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.ega&lt;br /&gt;
 | Format = [[Westwood EGA Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.col&lt;br /&gt;
 | Format = [[Westwood COL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.pal&lt;br /&gt;
 | Format = [[Westwood PAL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = item.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder item.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = itemtype.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder itemtype.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = text.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder text.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.dat, *.dec&lt;br /&gt;
 | Format = [[Eye of the Beholder decorations Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.fnt&lt;br /&gt;
 | Format = [[Eye of the Beholder bitmap font Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.inf&lt;br /&gt;
 | Format = [[Eye of the Beholder maze information Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Westwood]]&lt;br /&gt;
[[Category:3D dungeon]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Westwood_Font_Format_v2&amp;diff=5779</id>
		<title>Westwood Font Format v2</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Westwood_Font_Format_v2&amp;diff=5779"/>
		<updated>2014-12-12T20:13:51Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contains bit-map for the fonts.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HEADER&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    short int fsize; // Size of the file&lt;br /&gt;
    short int unknown1; // Unknown entry (always 0x0500 or 0x0002)&lt;br /&gt;
    short int unknown2; // Unknown entry (always 0x000e)&lt;br /&gt;
    short int unknown3; // Unknown entry (always 0x0014)&lt;br /&gt;
    short int wpos; // Offset of char. widths array  (abs. from beg. of file)&lt;br /&gt;
    short int cdata; // Offset of char. graphics data (abs. from beg. of file)&lt;br /&gt;
    short int hpos; // Offset of char. heights array (abs. from beg. of file)&lt;br /&gt;
    short int unknown4; // Unknown entry (always 0x1012 or 0x1011) maybe a file version??&lt;br /&gt;
    unsigned char zero; //zero value&lt;br /&gt;
    unsigned char nchars; // Number of characters in font minus 1&lt;br /&gt;
    unsigned char maxh; // Font height&lt;br /&gt;
    unsigned char maxw; // Max. character width&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EOB 1 (PC) - Fixed Font&#039;&#039;&#039;&lt;br /&gt;
File Format&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
typedef struct {&lt;br /&gt;
    short int filesize;                   // the size of the file&lt;br /&gt;
    short int charoffset[128];            // the offset of the pixel data from the beginning &lt;br /&gt;
                                          // of the file, the index is the ascii value&lt;br /&gt;
    unsigned char width;                  // the width of a character in pixel&lt;br /&gt;
    unsigned char height;                 // the height of a character in pixel&lt;br /&gt;
    unsigned char data[128][height];      // the pixel data, one byte per line &lt;br /&gt;
} TFIXEDFONT;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rendering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To render a character from the font, you could use something like the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TFIXEDFONT fnt;      // assume this is loaded and initialized&lt;br /&gt;
int x, y;            // position to draw the character&lt;br /&gt;
int color;           // color of the text&lt;br /&gt;
char c;              // the character to be drawn&lt;br /&gt;
 &lt;br /&gt;
for (int h = 0; h &amp;lt; fnt.height; h++) {&lt;br /&gt;
    unsigned char line = fnt.data[c][h];&lt;br /&gt;
    unsigned char bit = 0x80;&lt;br /&gt;
    for (int w = 0; w &amp;lt; fnt.width; w++) {&lt;br /&gt;
        if ((line &amp;amp; bit) == bit)&lt;br /&gt;
            DrawPixel(x + w, y + h, color);&lt;br /&gt;
        bit = bit &amp;gt;&amp;gt; 1;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder&amp;diff=5778</id>
		<title>Eye of the Beholder</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder&amp;diff=5778"/>
		<updated>2014-12-12T20:11:50Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&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 = No&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;
[[Eye of the Beholder]] is a role-playing video game for computers and video game consoles developed by Westwood Studios. It was published by Strategic Simulations, Inc. in 1991 for the MS-DOS operating system and later ported to the Amiga, the Sega CD, Game Boy Advance and the SNES. The Sega CD version features an exclusive soundtrack composed by Yuzo Koshiro&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.adl&lt;br /&gt;
 | Format = [[ADL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cps&lt;br /&gt;
 | Format = [[Westwood CPS Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cmp&lt;br /&gt;
 | Format = [[Westwood CMP Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.ega&lt;br /&gt;
 | Format = [[Westwood EGA Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.col&lt;br /&gt;
 | Format = [[Westwood COL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.pal&lt;br /&gt;
 | Format = [[Westwood PAL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = item.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder item.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = itemtype.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder itemtype.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = text.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder text.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.dat, *.dec&lt;br /&gt;
 | Format = [[Eye of the Beholder decorations Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = eob.fnt&lt;br /&gt;
 | Format = [[Eye of the Beholder bitmap font Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Westwood]]&lt;br /&gt;
[[Category:3D dungeon]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder_Decorations_Format&amp;diff=5777</id>
		<title>Eye of the Beholder Decorations Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder_Decorations_Format&amp;diff=5777"/>
		<updated>2014-12-12T20:09:14Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document describes the decoration rectangle data files (.dat) that are bundled with each decoration image file.&lt;br /&gt;
In EOB2 they have the filename extension .dec&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All unsigned short are big endian! They are little endian in the PC version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Format&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct Decoration&lt;br /&gt;
{&lt;br /&gt;
   unsigned short nbrDecorations;&lt;br /&gt;
   struct Decoration decorations[nbrDecorations]; /* Indexed into by the WallMapping in the [[eob.inf|.inf]] file. */&lt;br /&gt;
   unsigned short nbrDecorationRectangles;&lt;br /&gt;
   struct DecorationRectangle rectangles[nbrDecorationRectangles];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sub structures&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct Decoration&lt;br /&gt;
{&lt;br /&gt;
   unsigned char rectangleIndices[10]; /* indices into DecorationData.rectangles */&lt;br /&gt;
   unsigned char linkToNextDecoration; /* index into DecorationData.decorations */&lt;br /&gt;
   unsigned char flags;&lt;br /&gt;
   unsigned short xCoords[10]; /* coordinate in the game view, where to render the overlay */&lt;br /&gt;
   unsigned short yCoords[10];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If rectangle index is 0xFF, there isn&#039;t a decoration for that view position.&lt;br /&gt;
Each of these 10 indices in the arrays corresponds to the 10 possible overlay graphics positions in the viewport.&lt;br /&gt;
TODO: Describe linkToNextDecoration, flags and the coordinate system. (JackAsser will fix this)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct DecorationRectangle&lt;br /&gt;
{&lt;br /&gt;
   unsigned short x; /* Multiply by 8 to get actual screen coord */&lt;br /&gt;
   unsigned short y;&lt;br /&gt;
   unsigned short w; /* Multiply by 8 to get actual width */&lt;br /&gt;
   unsigned short h;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each rectangle describes an area in the .cps graphics file stated by the 0xec command code in the .inf file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drawing a decoration + Pseudocode(EOB2)&lt;br /&gt;
(what about EOB1?)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
decoration wall positions (0..9):&lt;br /&gt;
&lt;br /&gt;
 9 7 3 7 9&lt;br /&gt;
 8 6 2 6 8&lt;br /&gt;
 8 5 1 5 8&lt;br /&gt;
   4 0 4&lt;br /&gt;
     ^=party pos.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following table contains drawing information for each view position:&lt;br /&gt;
xflip: for side walls: 0=left, 1=right&lt;br /&gt;
wall: decoration position number, -1=none available for this position&lt;br /&gt;
xdelta: horizontal shift (decoration on wall only) in render window for this wall position (multiply with 8)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 CDecPos: array [0 .. 25] of TPos = (&lt;br /&gt;
   (XFlip: 0; Wall: -1; XDelta: 0),&lt;br /&gt;
   (XFlip: 0; Wall: 9; XDelta: 0),&lt;br /&gt;
   (XFlip: 0; Wall: 7; XDelta: 0),&lt;br /&gt;
 &lt;br /&gt;
   (XFlip: 1; Wall: 7; XDelta: 0),&lt;br /&gt;
   (XFlip: 1; Wall: 9; XDelta: 0),&lt;br /&gt;
   (XFlip: 0; Wall: -1; XDelta: 0),&lt;br /&gt;
 &lt;br /&gt;
   (XFlip: 0; Wall: 3; XDelta: -12),&lt;br /&gt;
   (XFlip: 0; Wall: 3; XDelta: -6),&lt;br /&gt;
   (XFlip: 0; Wall: 3; XDelta: 12),&lt;br /&gt;
   (XFlip: 0; Wall: 3; XDelta: 6),&lt;br /&gt;
   (XFlip: 0; Wall: 3; XDelta: 0),    //middle front wall&lt;br /&gt;
 &lt;br /&gt;
   (XFlip: 0; Wall: 8; XDelta: 0),&lt;br /&gt;
   (XFlip: 0; Wall: 6; XDelta: 0),&lt;br /&gt;
 &lt;br /&gt;
   (XFlip: 1; Wall: 6; XDelta: 0),&lt;br /&gt;
   (XFlip: 1; Wall: 8; XDelta: 0),&lt;br /&gt;
 &lt;br /&gt;
   (XFlip: 0; Wall: 2; XDelta: -10),&lt;br /&gt;
   (XFlip: 0; Wall: 2; XDelta: 10),&lt;br /&gt;
   (XFlip: 0; Wall: 2; XDelta: 0),   //middle front wall&lt;br /&gt;
 &lt;br /&gt;
   (XFlip: 0; Wall: 5; XDelta: 0),&lt;br /&gt;
 &lt;br /&gt;
   (XFlip: 1; Wall: 5; XDelta: 0),&lt;br /&gt;
 &lt;br /&gt;
   (XFlip: 0; Wall: 1; XDelta: -16),&lt;br /&gt;
   (XFlip: 0; Wall: 1; XDelta: 16),&lt;br /&gt;
   (XFlip: 0; Wall: 1; XDelta: 0),    //middle front wall&lt;br /&gt;
 &lt;br /&gt;
   (XFlip: 0; Wall: 4; XDelta: 0),&lt;br /&gt;
 &lt;br /&gt;
   (XFlip: 1; Wall: 4; XDelta: 0),&lt;br /&gt;
   (XFlip: 0; Wall: 0; XDelta: 0)&lt;br /&gt;
 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Decorations can consist of more than one rectangle, which are drawn together.&lt;br /&gt;
They are given as a list:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
procedure DrawCompleteDecoration(GFXIndex, DecNumber, Position:longint; isAtWall:boolean);&lt;br /&gt;
begin&lt;br /&gt;
 repeat&lt;br /&gt;
  DrawDecorationPart(GFXIndex, DecNumber, Position, isAtWall); // draw a part of the decoration&lt;br /&gt;
  DecNumber:= Decoration[DecNumber].NextDecoration; // go to next part&lt;br /&gt;
 until DecNumber = 0;&lt;br /&gt;
end;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GFXIndex points to the data file where the decoration resides: for example mezz2.cps&lt;br /&gt;
DecNumber is the number of the Decoration.&lt;br /&gt;
Position (range 0..25) is the wall position (side and front walls).&lt;br /&gt;
isAtWall tells if the decoration is at a wall, this is true if the walltype in the&lt;br /&gt;
decoration mapping definition in the .inf file is unequal zero.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
procedure DrawDecorationPart(GFXIndex, DecNumber, Position:longint; isAtWall:boolean);&lt;br /&gt;
 &lt;br /&gt;
var&lt;br /&gt;
 i,j,            //pos in cps graphics&lt;br /&gt;
 s,t:longint;    //pos on screen&lt;br /&gt;
 q:byte;&lt;br /&gt;
 dx,pos : longint;&lt;br /&gt;
 mirrored : boolean;&lt;br /&gt;
begin&lt;br /&gt;
 &lt;br /&gt;
 //get the horizontal shift for the decoration according to its position.&lt;br /&gt;
 //if the decoration is drawn at a wall, we use the table above.&lt;br /&gt;
 //otherwise the decoration is placed in the middle of a field,&lt;br /&gt;
 // for example a pit or pressure plate...&lt;br /&gt;
 dx := 0;&lt;br /&gt;
 if isAtWall then&lt;br /&gt;
  dx := 8*CDecPos[Position].XDelta&lt;br /&gt;
 else&lt;br /&gt;
  case Position of&lt;br /&gt;
   6 : dx := -88;&lt;br /&gt;
   7 : dx := -40;&lt;br /&gt;
   8 : dx := 88;&lt;br /&gt;
   9 : dx := 40;&lt;br /&gt;
 &lt;br /&gt;
   15 : dx := -59;&lt;br /&gt;
   16 : dx := 59;&lt;br /&gt;
 &lt;br /&gt;
   20 : dx := -98;&lt;br /&gt;
   21 : dx := 98;&lt;br /&gt;
  end;&lt;br /&gt;
 &lt;br /&gt;
 //translate view positions (0..25) to decoration view position (0..9)&lt;br /&gt;
 pos := CDecPos[Position].Wall;&lt;br /&gt;
 &lt;br /&gt;
 if pos &amp;gt;= 0 then&lt;br /&gt;
 begin&lt;br /&gt;
 &lt;br /&gt;
  //get the number of the decoration rectangle for the corresponding view position&lt;br /&gt;
  q := Decoration[DecNumber].RectangleIndices[pos];&lt;br /&gt;
 &lt;br /&gt;
  //if rectangle index is $FF, then there doesn&#039;t exist a decoration for this view position&lt;br /&gt;
  if q &amp;lt;&amp;gt; $FF then&lt;br /&gt;
  begin&lt;br /&gt;
 &lt;br /&gt;
   //Bit 0 in Flags: for front walls (and not for side walls):&lt;br /&gt;
   // for example, a decoration consists of two parts,&lt;br /&gt;
   // and the second part is the first one, but mirrored..&lt;br /&gt;
   mirrored := false;&lt;br /&gt;
   case Position of&lt;br /&gt;
   6..10, 15..17, 20..22, 25: mirrored := boolean(Decoration[DecNumber].Flags and $01);&lt;br /&gt;
   end;&lt;br /&gt;
 &lt;br /&gt;
    t:= Decoration[DecNumber].YCoords[pos];&lt;br /&gt;
 &lt;br /&gt;
    for j:= Rectangles[q].y to Rectangles[q].y+Rectangles[q].Height-1 do&lt;br /&gt;
    begin&lt;br /&gt;
 &lt;br /&gt;
      if mirrored then&lt;br /&gt;
       s := 22*8 - Decoration[DecNumber].XCoords[pos] - 1&lt;br /&gt;
      else&lt;br /&gt;
       s := Decoration[DecNumber].XCoords[pos];&lt;br /&gt;
 &lt;br /&gt;
     for i := Rectangles[q].x*8 to Rectangles[q].x*8+Rectangles[q].Width*8-1 do&lt;br /&gt;
     begin&lt;br /&gt;
 &lt;br /&gt;
       if mirrored then&lt;br /&gt;
       begin&lt;br /&gt;
        PutPixel(s+dx, t, Graphics[GFXIndex][320*j + i]);&lt;br /&gt;
        Dec(s);&lt;br /&gt;
       end else&lt;br /&gt;
       begin&lt;br /&gt;
         if CDecPos[Position].XFlip = 0 then&lt;br /&gt;
          PutPixel(s+dx, t, Graphics[GFXIndex][320*j + i]) //left side walls; front walls&lt;br /&gt;
         else&lt;br /&gt;
          PutPixel(22*8-(s+dx), t, Graphics[GFXIndex][320*j + i]); //right side walls only&lt;br /&gt;
         Inc(s);&lt;br /&gt;
       end;&lt;br /&gt;
 &lt;br /&gt;
     end; //for i&lt;br /&gt;
 &lt;br /&gt;
     Inc(t);&lt;br /&gt;
    end; //for j&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
  end; // q&amp;lt;&amp;gt;$FF&lt;br /&gt;
 &lt;br /&gt;
 end; //pos&amp;gt;0&lt;br /&gt;
 &lt;br /&gt;
end;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder&amp;diff=5776</id>
		<title>Eye of the Beholder</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder&amp;diff=5776"/>
		<updated>2014-12-12T20:05:38Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&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 = No&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;
[[Eye of the Beholder]] is a role-playing video game for computers and video game consoles developed by Westwood Studios. It was published by Strategic Simulations, Inc. in 1991 for the MS-DOS operating system and later ported to the Amiga, the Sega CD, Game Boy Advance and the SNES. The Sega CD version features an exclusive soundtrack composed by Yuzo Koshiro&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.adl&lt;br /&gt;
 | Format = [[ADL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cps&lt;br /&gt;
 | Format = [[Westwood CPS Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cmp&lt;br /&gt;
 | Format = [[Westwood CMP Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.ega&lt;br /&gt;
 | Format = [[Westwood EGA Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.col&lt;br /&gt;
 | Format = [[Westwood COL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.pal&lt;br /&gt;
 | Format = [[Westwood PAL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = item.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder item.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = itemtype.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder itemtype.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = text.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder text.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.dat, *.dec&lt;br /&gt;
 | Format = [[Eye of the Beholder decorations Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Westwood]]&lt;br /&gt;
[[Category:3D dungeon]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder_text.dat_Format&amp;diff=5775</id>
		<title>Eye of the Beholder text.dat Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder_text.dat_Format&amp;diff=5775"/>
		<updated>2014-12-12T20:04:13Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
2b absolute file offset to string&lt;br /&gt;
... string offsets table&lt;br /&gt;
first string null terminated&lt;br /&gt;
... strings table&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note - String special char:&lt;br /&gt;
00 end string&lt;br /&gt;
0D new line&lt;br /&gt;
20 space&lt;br /&gt;
06 xx change color. xx is one of the 16 color vga standard (09=light cyan, 06=White, etc.)&lt;br /&gt;
01 page break&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder&amp;diff=5774</id>
		<title>Eye of the Beholder</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder&amp;diff=5774"/>
		<updated>2014-12-12T19:56:08Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&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 = No&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;
[[Eye of the Beholder]] is a role-playing video game for computers and video game consoles developed by Westwood Studios. It was published by Strategic Simulations, Inc. in 1991 for the MS-DOS operating system and later ported to the Amiga, the Sega CD, Game Boy Advance and the SNES. The Sega CD version features an exclusive soundtrack composed by Yuzo Koshiro&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.adl&lt;br /&gt;
 | Format = [[ADL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cps&lt;br /&gt;
 | Format = [[Westwood CPS Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cmp&lt;br /&gt;
 | Format = [[Westwood CMP Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.ega&lt;br /&gt;
 | Format = [[Westwood EGA Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.col&lt;br /&gt;
 | Format = [[Westwood COL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.pal&lt;br /&gt;
 | Format = [[Westwood PAL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = item.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder item.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = itemtype.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder itemtype.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = text.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder text.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Westwood]]&lt;br /&gt;
[[Category:3D dungeon]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder_itemtype.dat_Format&amp;diff=5773</id>
		<title>Eye of the Beholder itemtype.dat Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder_itemtype.dat_Format&amp;diff=5773"/>
		<updated>2014-12-12T19:52:46Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
short int NumberOfItems;&lt;br /&gt;
ItemType Items[NumberOfItems];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct Dice {&lt;br /&gt;
   unsigned char rolls; // F.e. 4&lt;br /&gt;
   unsigned char sides; // F.e. T6&lt;br /&gt;
   unsigned char base;  // F.e. +7&lt;br /&gt;
                        //   =  4T6+7&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct ItemType {&lt;br /&gt;
    unsigned short invbits;    // At which position in inventory it is allowed to be put. See INVENTORY_USAGE_* above.&lt;br /&gt;
    short int handbits;        // In which hand it can be used&lt;br /&gt;
    char acadd;                // Adds to armor class&lt;br /&gt;
    unsigned char profallowed; // Allowed for this profession. See CLASS_USAGE_* above.&lt;br /&gt;
    unsigned char handallowed; // Allowed for this hand&lt;br /&gt;
 &lt;br /&gt;
    /* Damage versus small */&lt;br /&gt;
    Dice damageVsSmall;&lt;br /&gt;
 &lt;br /&gt;
    /* Damage versus big */&lt;br /&gt;
    Dice damageVsBig;&lt;br /&gt;
 &lt;br /&gt;
    char unknown1; // Always 0 in EotB 1&lt;br /&gt;
    char unknown2; // Always 0 in EotB 2&lt;br /&gt;
    char unknown3;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
typedef enum {&lt;br /&gt;
    INVENTORY_USAGE_NONE     = 0,&lt;br /&gt;
    INVENTORY_USAGE_QUIVER   = 1 &amp;lt;&amp;lt; 0,&lt;br /&gt;
    INVENTORY_USAGE_ARMOUR   = 1 &amp;lt;&amp;lt; 1,&lt;br /&gt;
    INVENTORY_USAGE_BRACERS  = 1 &amp;lt;&amp;lt; 2,&lt;br /&gt;
    INVENTORY_USAGE_BACKPACK = 1 &amp;lt;&amp;lt; 3,&lt;br /&gt;
    INVENTORY_USAGE_BOOTS    = 1 &amp;lt;&amp;lt; 4,&lt;br /&gt;
    INVENTORY_USAGE_HELMET   = 1 &amp;lt;&amp;lt; 5,&lt;br /&gt;
    INVENTORY_USAGE_NECKLACE = 1 &amp;lt;&amp;lt; 6,&lt;br /&gt;
    INVENTORY_USAGE_BELT     = 1 &amp;lt;&amp;lt; 7,&lt;br /&gt;
    INVENTORY_USAGE_RING     = 1 &amp;lt;&amp;lt; 8&lt;br /&gt;
} InventoryUsage;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
typedef enum {&lt;br /&gt;
    CLASS_USAGE_NONE    = 0,&lt;br /&gt;
    CLASS_USAGE_FIGHTER = 1 &amp;lt;&amp;lt; 0,&lt;br /&gt;
    CLASS_USAGE_MAGE    = 1 &amp;lt;&amp;lt; 1,&lt;br /&gt;
    CLASS_USAGE_CLERIC  = 1 &amp;lt;&amp;lt; 2,&lt;br /&gt;
    CLASS_USAGE_THIEF   = 1 &amp;lt;&amp;lt; 3,&lt;br /&gt;
} ClassUsage;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder&amp;diff=5772</id>
		<title>Eye of the Beholder</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder&amp;diff=5772"/>
		<updated>2014-12-12T19:50:54Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&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 = No&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;
[[Eye of the Beholder]] is a role-playing video game for computers and video game consoles developed by Westwood Studios. It was published by Strategic Simulations, Inc. in 1991 for the MS-DOS operating system and later ported to the Amiga, the Sega CD, Game Boy Advance and the SNES. The Sega CD version features an exclusive soundtrack composed by Yuzo Koshiro&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.adl&lt;br /&gt;
 | Format = [[ADL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cps&lt;br /&gt;
 | Format = [[Westwood CPS Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cmp&lt;br /&gt;
 | Format = [[Westwood CMP Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.ega&lt;br /&gt;
 | Format = [[Westwood EGA Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.col&lt;br /&gt;
 | Format = [[Westwood COL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.pal&lt;br /&gt;
 | Format = [[Westwood PAL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = item.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder item.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = itemtype.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder itemtype.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Westwood]]&lt;br /&gt;
[[Category:3D dungeon]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder_item.dat_Format&amp;diff=5771</id>
		<title>Eye of the Beholder item.dat Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Eye_of_the_Beholder_item.dat_Format&amp;diff=5771"/>
		<updated>2014-12-12T19:49:22Z</updated>

		<summary type="html">&lt;p&gt;The coder: Saving now defunt EOB wiki&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
short int NumberOfItems;&lt;br /&gt;
struct Item {&lt;br /&gt;
 &lt;br /&gt;
    char unid;      /* Number of name string, if not identified */&lt;br /&gt;
    char id;        /* Number of name string if identified      */&lt;br /&gt;
    char bits;      /* Magic and so on                          */&lt;br /&gt;
                    /* 0x80 = Bit = GlowMagic                   */&lt;br /&gt;
                    /* 0x40 = Bit = IsIdentified                */&lt;br /&gt;
                    /* 0x20 = Bit = IsCursed                    */&lt;br /&gt;
                    /* 0x08 = Bit = Sucks damage points from    */&lt;br /&gt;
                    /*              target to attacker          */&lt;br /&gt;
    char pic;       /* Number of icon picture                   */&lt;br /&gt;
    char type;      /* Axe, Long Sword etc. see below           */&lt;br /&gt;
    char subpos;    /* Where the item lies at position          */&lt;br /&gt;
                    /* In Maze:                                 */&lt;br /&gt;
                    /*      0..3-&amp;gt; Bottom                       */&lt;br /&gt;
                    /*      4..7-&amp;gt; Wall (N,E,S,W)               */&lt;br /&gt;
                    /* For EotB I: 0..3-&amp;gt; Floor NW,NE,SW,SE     */&lt;br /&gt;
                    /*                8-&amp;gt; Compartment           */&lt;br /&gt;
                    /* If in inventory:                         */&lt;br /&gt;
                    /*      0..26-&amp;gt; Position in Inventory       */&lt;br /&gt;
    short int pos;  /* Position in maze x+y*32                  */&lt;br /&gt;
                    /* &amp;lt;= 0: Consumed                           */&lt;br /&gt;
    short int next; /* Number of next item in list (position)   */&lt;br /&gt;
    short int prev; /* Number of previous item in list (pos)    */&lt;br /&gt;
                    /* New: Single linked list                  */&lt;br /&gt;
    char level;     /* Level, where the item lies, &amp;lt;= no level  */&lt;br /&gt;
    char value;     /* The value of item, -1 if consumed        */&lt;br /&gt;
                    /* Kind of keys/potions/wands               */&lt;br /&gt;
 &lt;br /&gt;
} [NumberOfItems];&lt;br /&gt;
 &lt;br /&gt;
short int NumberOfItemName;&lt;br /&gt;
char ItemName[NumberOfItemName][35];&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
item &#039;&#039;&#039;type&#039;&#039;&#039; correspondance&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0: &amp;quot;Axe&amp;quot;        / &#039;Drow Cleaver&#039;&lt;br /&gt;
 1: &amp;quot;Long Sword&amp;quot; / Adamantite Long Sword /&lt;br /&gt;
 2: &amp;quot;Short Sword&amp;quot;&lt;br /&gt;
 3: &amp;quot;Orb of Power&amp;quot;&lt;br /&gt;
 4: ???&lt;br /&gt;
 5: &amp;quot;Dagger&amp;quot; / &#039;Guinsoo&#039; / &#039;Backstabber&#039;&lt;br /&gt;
 6: &amp;quot;Potion&amp;quot; / Dwarfen Healing Potion&lt;br /&gt;
 7: &amp;quot;Bow&amp;quot;&lt;br /&gt;
 8: ???&lt;br /&gt;
 9: &amp;quot;Spear&amp;quot;&lt;br /&gt;
10: &amp;quot;Halberd&amp;quot;&lt;br /&gt;
11: &amp;quot;Mace&amp;quot;&lt;br /&gt;
12: &amp;quot;Flail&amp;quot;     ; ( Geissel )&lt;br /&gt;
13: &amp;quot;Staff&amp;quot; / Staff&lt;br /&gt;
14: &amp;quot;Sling&amp;quot;&lt;br /&gt;
15: &amp;quot;Dart&amp;quot; / Adamantite Dart&lt;br /&gt;
16: &amp;quot;Arrow&amp;quot;&lt;br /&gt;
17: ???&lt;br /&gt;
18: &amp;quot;Rock&amp;quot; / Igneous Rock&lt;br /&gt;
19: ???&lt;br /&gt;
20: &amp;quot;Chainmail&amp;quot;&lt;br /&gt;
21: &amp;quot;Helmet&amp;quot; / Dwarf Helmet&lt;br /&gt;
22: &amp;quot;Leather armor&amp;quot;&lt;br /&gt;
23: ???&lt;br /&gt;
24: &amp;quot;Plate Mail&amp;quot;&lt;br /&gt;
25: &amp;quot;Scale Mail&amp;quot;&lt;br /&gt;
26: ???&lt;br /&gt;
27: &amp;quot;Shield&amp;quot;&lt;br /&gt;
28: &amp;quot;Lock Picks&amp;quot;&lt;br /&gt;
29: &amp;quot;Spellbook&amp;quot;&lt;br /&gt;
30: &amp;quot;Holy Symbol&amp;quot; / Cleric Holy Symbol / Paladin Holy Symbol&lt;br /&gt;
31: &amp;quot;Food&amp;quot; / Iron Rations&lt;br /&gt;
32: &amp;quot;Boots&amp;quot; / Leather Boots&lt;br /&gt;
33: &amp;quot;Bones&amp;quot; / Dwarf Bones / Halfling Bones /&lt;br /&gt;
34: &amp;quot;Mage Scroll&amp;quot;  / Scroll&lt;br /&gt;
35: &amp;quot;Cleric Scroll&amp;quot; / Scroll /&lt;br /&gt;
36: &amp;quot;Text Scroll&amp;quot; / Commission and Letter of Marquee&lt;br /&gt;
37: &amp;quot;Stone&amp;quot;       / Stone        Item&lt;br /&gt;
    Stone Holy Symbol (1) /  Stone Necklace (2) /&lt;br /&gt;
    Stone Orb (3) / Stone Dagger (4) / Medaillon (5) /&lt;br /&gt;
    Stone Scepter (6) / Stone Ring (7) /&lt;br /&gt;
38: &amp;quot;Key&amp;quot;&lt;br /&gt;
    Silver Key (1) / Gold Key (2) / Dwarfen Key (3)/&lt;br /&gt;
    Key (4) / Skull Key (5) / Drow Key (6) /&lt;br /&gt;
    Jeweled Key (7) / Ruby Key (8)&lt;br /&gt;
39: &amp;quot;Potion&amp;quot;&lt;br /&gt;
40: &amp;quot;Gem&amp;quot;&lt;br /&gt;
41: &amp;quot;Robe&amp;quot; / Fancy Robe /&lt;br /&gt;
42: &amp;quot;Ring of Protection +2&amp;quot;&lt;br /&gt;
43: &amp;quot;Bracers&amp;quot;&lt;br /&gt;
44: &amp;quot;Necklace&amp;quot; / Medaillon&lt;br /&gt;
45: ????&lt;br /&gt;
46: &amp;quot;Medaillon&amp;quot; Luck Stone Medaillon (1)&lt;br /&gt;
47: &amp;quot;Ring&amp;quot;&lt;br /&gt;
48: &amp;quot;Wand&amp;quot; / Wand of Slivias&lt;br /&gt;
49: &amp;quot;Kenku Egg&amp;quot;&lt;br /&gt;
;--&lt;br /&gt;
50: ??? -&amp;gt; Usename 1&lt;br /&gt;
;---------------&lt;br /&gt;
; Handspell-Itemtypes&lt;br /&gt;
51:&lt;br /&gt;
52:&lt;br /&gt;
53:&lt;br /&gt;
54:&lt;br /&gt;
55:&lt;br /&gt;
56:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:The_coder&amp;diff=5754</id>
		<title>User talk:The coder</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:The_coder&amp;diff=5754"/>
		<updated>2014-12-07T09:27:16Z</updated>

		<summary type="html">&lt;p&gt;The coder: answer&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi The coder - any chance you can reupload [[:File:Eye of the Beholder.gif]] as a 320x200 .png?  Then it will match all the other title screens and show up on the game&#039;s page automatically. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 13:09, 6 December 2014 &lt;br /&gt;
[[User:The coder|The coder]] ([[User talk:The coder|talk]]) I just can&#039;t figure out how to do this correctly :(&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=File:Eye_of_the_Beholder.png&amp;diff=5753</id>
		<title>File:Eye of the Beholder.png</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=File:Eye_of_the_Beholder.png&amp;diff=5753"/>
		<updated>2014-12-07T09:25:27Z</updated>

		<summary type="html">&lt;p&gt;The coder: Eye of the Beholder title screen&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Eye of the Beholder title screen&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Westwood_CPS_Format&amp;diff=5722</id>
		<title>Westwood CPS Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Westwood_CPS_Format&amp;diff=5722"/>
		<updated>2014-12-02T17:01:31Z</updated>

		<summary type="html">&lt;p&gt;The coder: Saving of now defunct eob.wikispaces.com&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
	&lt;br /&gt;
This kind of file contains images. Usually are 320x200 pixel in size, 256 colors for PC version, 32 colors for Amiga version.&lt;br /&gt;
The images can be compressed with different compression method. They may or may not contain a palette. The palette in case that it exist is placed just after the header. The image data is placed after the header and the palette.&lt;br /&gt;
&lt;br /&gt;
It start with an header, with is the same used for compressed file&lt;br /&gt;
&lt;br /&gt;
struct FHeader {&lt;br /&gt;
    unsigned short FileSize;&lt;br /&gt;
    unsigned short CompressionType;&lt;br /&gt;
    unsigned int   UncompressedSize;&lt;br /&gt;
    unsigned short PaletteSize;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FileSize&lt;br /&gt;
&amp;lt;Size of file with Header&amp;gt; for compression method 1, 2 and 3.&lt;br /&gt;
&amp;lt;Size of file with Header&amp;gt;-02h for compression method 0 and 4.&lt;br /&gt;
&lt;br /&gt;
Compression Type&lt;br /&gt;
Indicate the compression method used to store the image.&lt;br /&gt;
&lt;br /&gt;
0000h uncompressed&lt;br /&gt;
0001h [[Crunch-1]]&lt;br /&gt;
0002h [[Westwood Compression Method 2]]&lt;br /&gt;
0003h [[Westwood Compression Method 3]]&lt;br /&gt;
0004h [[Westwood Format-80 Compression]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Uncompressed size&lt;br /&gt;
Size of uncompressed file without header.&lt;br /&gt;
Usually is 64000, that is right 320x200&lt;br /&gt;
&lt;br /&gt;
Palette size&lt;br /&gt;
Is the size of the palette.&lt;br /&gt;
0000h palette not present&lt;br /&gt;
0300h 256 colors palette (Lands Of Lore)&lt;br /&gt;
0040h 1 palette of 32 Colors for EOB2 AMIGA (Muli window screens CPS as &#039; SCOUx.CPS&#039;)&lt;br /&gt;
0080h 2 palettes of 32 Colors for EOB2 AMIGA (Muli window screens CPS as &#039; SCOUx.CPS&#039;)&lt;br /&gt;
00C0h 3 palettes of 32 Colors palettes for EOB2 AMIGA (Muli window screens CPS as &#039; SCOUx.CPS&#039;)&lt;br /&gt;
0100h 4 palettes of 32 Colors palettes for EOB2 AMIGA (Muli window screens CPS as &#039; SCOUx.CPS&#039;)&lt;br /&gt;
&lt;br /&gt;
PC: Once decompressed, the image is in standard VGA format 320x200 pixel, where 1 byte is 1 pixel.&lt;br /&gt;
AMIGA: Once decompressed, the image is in standard 5 bimaps 320x200 screen (32 colors).&lt;br /&gt;
&lt;br /&gt;
for EOB2 Amiga it can have 1 to 4 inside palettes of 16 colors for multiscreen CPS files as SCOUx.CPS&lt;br /&gt;
&lt;br /&gt;
For EOB1 Amiga palette can be found at the end of decompressed datas (offset $1f40*5 to see after)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
AMIGA SPEC&lt;br /&gt;
&lt;br /&gt;
After image decompression the size is either 40000 bytes or 40064 bytes in size (EOB1).&lt;br /&gt;
&lt;br /&gt;
The first 40000 bytes contain five 320x200 bitplanes. Each bitplane is 320x200/8 (8000) bytes big. This is standard amiga graphics data, please consult your nearest amiga reference for information.&lt;br /&gt;
&lt;br /&gt;
Palette data&lt;br /&gt;
The optional 64 bytes are palette data. Each palette entry is 16 bits in the following format:&lt;br /&gt;
&lt;br /&gt;
    111111&lt;br /&gt;
Bit 5432109876543210&lt;br /&gt;
    ____RRRRGGGGBBBB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In other words, 12 bit RGB in _RGB pixel format.&lt;br /&gt;
&lt;br /&gt;
In total there are 32 palette entries, consistent with 5 bitplanes (32 colors).&lt;br /&gt;
&lt;br /&gt;
Image data&lt;br /&gt;
The resolution of the images are the same as in the PC version. However, since we only use 32 colors a pixel only need 5 bit each.&lt;br /&gt;
The pixels are arranged as follows:&lt;br /&gt;
&lt;br /&gt;
          byte 0   byte 1   byte 2   ... 40 bytes per line (40*8=320 pixels)&lt;br /&gt;
 plane 0: .......x ........ ........&lt;br /&gt;
 plane 1:        x&lt;br /&gt;
 plane 2:        x&lt;br /&gt;
 plane 3:        x&lt;br /&gt;
 plane 4:        x&lt;br /&gt;
&lt;br /&gt;
Each byte consists of 8 pixels. Each bit plane consists of 320*200 pixels = 320*200/8 bytes.&lt;br /&gt;
The color of each pixel is made up of the corresponding bits down the same bit position in the bitplanes. This gives each pixels a 5-bit value which is an index into the 32-color palette. In the example above the pixel at position (0,7) is described.&lt;br /&gt;
&lt;br /&gt;
Pseudo code for a planar to chunky implementation&lt;br /&gt;
&lt;br /&gt;
unsigned char bitPlanes[5][8000];&lt;br /&gt;
int bytePos=x/8+y*40;&lt;br /&gt;
int bitPos=7-x&amp;amp;7;&lt;br /&gt;
unsigned char colorIndex=((!!(bitPlanes[0][bytePos]&amp;amp;(1&amp;lt;&amp;lt;bitPos)))&amp;lt;&amp;lt;0) |&lt;br /&gt;
                         ((!!(bitPlanes[1][bytePos]&amp;amp;(1&amp;lt;&amp;lt;bitPos)))&amp;lt;&amp;lt;1) |&lt;br /&gt;
                         ((!!(bitPlanes[2][bytePos]&amp;amp;(1&amp;lt;&amp;lt;bitPos)))&amp;lt;&amp;lt;2) |&lt;br /&gt;
                         ((!!(bitPlanes[3][bytePos]&amp;amp;(1&amp;lt;&amp;lt;bitPos)))&amp;lt;&amp;lt;3) |&lt;br /&gt;
                         ((!!(bitPlanes[4][bytePos]&amp;amp;(1&amp;lt;&amp;lt;bitPos)))&amp;lt;&amp;lt;4);&lt;br /&gt;
unsigned short paletteValue=palette[colorIndex];&lt;br /&gt;
&lt;br /&gt;
The above code can seem a bit unreadable to the untrained C-eye. !! simply turns a non zero value to 1, zero stays zero. It&#039;s actually a double negation, but I&#039;d like to call it a normalize operator.&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Westwood_CPS_Format&amp;diff=5721</id>
		<title>Westwood CPS Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Westwood_CPS_Format&amp;diff=5721"/>
		<updated>2014-12-02T16:57:31Z</updated>

		<summary type="html">&lt;p&gt;The coder: Saving of now defunct eob.wikispaces.com&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
	&lt;br /&gt;
This kind of file contains images. Usually are 320x200 pixel in size, 256 colors for PC version, 32 colors for Amiga version.&lt;br /&gt;
The images can be compressed with different compression method. They may or may not contain a palette. The palette in case that it exist is placed just after the header. The image data is placed after the header and the palette.&lt;br /&gt;
&lt;br /&gt;
It start with an header, with is the same used for compressed file&lt;br /&gt;
&lt;br /&gt;
struct FHeader {&lt;br /&gt;
    unsigned short FileSize;&lt;br /&gt;
    unsigned short CompressionType;&lt;br /&gt;
    unsigned int   UncompressedSize;&lt;br /&gt;
    unsigned short PaletteSize;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FileSize&lt;br /&gt;
&amp;lt;Size of file with Header&amp;gt; for compression method 1, 2 and 3.&lt;br /&gt;
&amp;lt;Size of file with Header&amp;gt;-02h for compression method 0 and 4.&lt;br /&gt;
&lt;br /&gt;
Compression Type&lt;br /&gt;
Indicate the compression method used to store the image.&lt;br /&gt;
0000h uncompressed&lt;br /&gt;
0001h [Crunch 1]&lt;br /&gt;
0002h [Format 2]&lt;br /&gt;
0003h [Format 3]&lt;br /&gt;
0004h [Format 80]&lt;br /&gt;
&lt;br /&gt;
Uncompressed size&lt;br /&gt;
Size of uncompressed file without header.&lt;br /&gt;
Usually is 64000, that is right 320x200&lt;br /&gt;
&lt;br /&gt;
Palette size&lt;br /&gt;
Is the size of the palette.&lt;br /&gt;
0000h palette not present&lt;br /&gt;
0300h 256 colors palette (Lands Of Lore)&lt;br /&gt;
0040h 1 palette of 32 Colors for EOB2 AMIGA (Muli window screens CPS as &#039; SCOUx.CPS&#039;)&lt;br /&gt;
0080h 2 palettes of 32 Colors for EOB2 AMIGA (Muli window screens CPS as &#039; SCOUx.CPS&#039;)&lt;br /&gt;
00C0h 3 palettes of 32 Colors palettes for EOB2 AMIGA (Muli window screens CPS as &#039; SCOUx.CPS&#039;)&lt;br /&gt;
0100h 4 palettes of 32 Colors palettes for EOB2 AMIGA (Muli window screens CPS as &#039; SCOUx.CPS&#039;)&lt;br /&gt;
&lt;br /&gt;
PC: Once decompressed, the image is in standard VGA format 320x200 pixel, where 1 byte is 1 pixel.&lt;br /&gt;
AMIGA: Once decompressed, the image is in standard 5 bimaps 320x200 screen (32 colors).&lt;br /&gt;
&lt;br /&gt;
for EOB2 Amiga it can have 1 to 4 inside palettes of 16 colors for multiscreen CPS files as SCOUx.CPS&lt;br /&gt;
&lt;br /&gt;
For EOB1 Amiga palette can be found at the end of decompressed datas (offset $1f40*5 to see after)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
AMIGA SPEC&lt;br /&gt;
&lt;br /&gt;
After image decompression the size is either 40000 bytes or 40064 bytes in size (EOB1).&lt;br /&gt;
&lt;br /&gt;
The first 40000 bytes contain five 320x200 bitplanes. Each bitplane is 320x200/8 (8000) bytes big. This is standard amiga graphics data, please consult your nearest amiga reference for information.&lt;br /&gt;
&lt;br /&gt;
Palette data&lt;br /&gt;
The optional 64 bytes are palette data. Each palette entry is 16 bits in the following format:&lt;br /&gt;
&lt;br /&gt;
    111111&lt;br /&gt;
Bit 5432109876543210&lt;br /&gt;
    ____RRRRGGGGBBBB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In other words, 12 bit RGB in _RGB pixel format.&lt;br /&gt;
&lt;br /&gt;
In total there are 32 palette entries, consistent with 5 bitplanes (32 colors).&lt;br /&gt;
&lt;br /&gt;
Image data&lt;br /&gt;
The resolution of the images are the same as in the PC version. However, since we only use 32 colors a pixel only need 5 bit each.&lt;br /&gt;
The pixels are arranged as follows:&lt;br /&gt;
&lt;br /&gt;
          byte 0   byte 1   byte 2   ... 40 bytes per line (40*8=320 pixels)&lt;br /&gt;
 plane 0: .......x ........ ........&lt;br /&gt;
 plane 1:        x&lt;br /&gt;
 plane 2:        x&lt;br /&gt;
 plane 3:        x&lt;br /&gt;
 plane 4:        x&lt;br /&gt;
&lt;br /&gt;
Each byte consists of 8 pixels. Each bit plane consists of 320*200 pixels = 320*200/8 bytes.&lt;br /&gt;
The color of each pixel is made up of the corresponding bits down the same bit position in the bitplanes. This gives each pixels a 5-bit value which is an index into the 32-color palette. In the example above the pixel at position (0,7) is described.&lt;br /&gt;
&lt;br /&gt;
Pseudo code for a planar to chunky implementation&lt;br /&gt;
&lt;br /&gt;
unsigned char bitPlanes[5][8000];&lt;br /&gt;
int bytePos=x/8+y*40;&lt;br /&gt;
int bitPos=7-x&amp;amp;7;&lt;br /&gt;
unsigned char colorIndex=((!!(bitPlanes[0][bytePos]&amp;amp;(1&amp;lt;&amp;lt;bitPos)))&amp;lt;&amp;lt;0) |&lt;br /&gt;
                         ((!!(bitPlanes[1][bytePos]&amp;amp;(1&amp;lt;&amp;lt;bitPos)))&amp;lt;&amp;lt;1) |&lt;br /&gt;
                         ((!!(bitPlanes[2][bytePos]&amp;amp;(1&amp;lt;&amp;lt;bitPos)))&amp;lt;&amp;lt;2) |&lt;br /&gt;
                         ((!!(bitPlanes[3][bytePos]&amp;amp;(1&amp;lt;&amp;lt;bitPos)))&amp;lt;&amp;lt;3) |&lt;br /&gt;
                         ((!!(bitPlanes[4][bytePos]&amp;amp;(1&amp;lt;&amp;lt;bitPos)))&amp;lt;&amp;lt;4);&lt;br /&gt;
unsigned short paletteValue=palette[colorIndex];&lt;br /&gt;
&lt;br /&gt;
The above code can seem a bit unreadable to the untrained C-eye. !! simply turns a non zero value to 1, zero stays zero. It&#039;s actually a double negation, but I&#039;d like to call it a normalize operator.&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Category:Eye_of_the_Beholder&amp;diff=5720</id>
		<title>Category:Eye of the Beholder</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Category:Eye_of_the_Beholder&amp;diff=5720"/>
		<updated>2014-12-02T16:42:20Z</updated>

		<summary type="html">&lt;p&gt;The coder: partial submit&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 = No&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;
[[Eye of the Beholder]] is a role-playing video game for computers and video game consoles developed by Westwood Studios. It was published by Strategic Simulations, Inc. in 1991 for the MS-DOS operating system and later ported to the Amiga, the Sega CD, Game Boy Advance and the SNES. The Sega CD version features an exclusive soundtrack composed by Yuzo Koshiro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.adl&lt;br /&gt;
 | Format = [[ADL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cps&lt;br /&gt;
 | Format = [[Westwood CPS Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.cmp&lt;br /&gt;
 | Format = [[Westwood CMP Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.ega&lt;br /&gt;
 | Format = [[Westwood EGA Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.col&lt;br /&gt;
 | Format = [[Westwood COL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.pal&lt;br /&gt;
 | Format = [[Westwood PAL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Image&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = item.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder item.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = item.dat&lt;br /&gt;
 | Format = [[Eye of the Beholder item.dat Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Items&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Westwood]]&lt;br /&gt;
[[Category:3D dungeon]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=ADL_Format&amp;diff=5719</id>
		<title>ADL Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=ADL_Format&amp;diff=5719"/>
		<updated>2014-12-02T16:32:18Z</updated>

		<summary type="html">&lt;p&gt;The coder: Saving of now defunct eob.wikispaces.com&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
	&lt;br /&gt;
ADL files are used in the PC-DOS version of EOB1&amp;amp;2 to play sound through an adlib compatible sound card.&lt;br /&gt;
&lt;br /&gt;
For EOB2:&lt;br /&gt;
Offset:&lt;br /&gt;
#x0000: 120 bytes which are indices for the following pointer array&lt;br /&gt;
#x0078: 250*16bit pointers for sound/music tracks&lt;br /&gt;
#x026C: start of configuration data for adlib instruments&lt;br /&gt;
#x????: tracks&lt;br /&gt;
&lt;br /&gt;
EOB1 ADL files are adlib.dat and sound.dat. The difference to EOB2 is the size of the pointer array for tracks which is here 300 bytes instead of 500.&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Category:Eye_of_the_Beholder&amp;diff=5717</id>
		<title>Category:Eye of the Beholder</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Category:Eye_of_the_Beholder&amp;diff=5717"/>
		<updated>2014-12-02T16:28:54Z</updated>

		<summary type="html">&lt;p&gt;The coder: Saving of now defunct eob.wikispaces.com&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 = No&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;
[[Eye of the Beholder]] is a role-playing video game for computers and video game consoles developed by Westwood Studios. It was published by Strategic Simulations, Inc. in 1991 for the MS-DOS operating system and later ported to the Amiga, the Sega CD, Game Boy Advance and the SNES. The Sega CD version features an exclusive soundtrack composed by Yuzo Koshiro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.adl&lt;br /&gt;
 | Format = [[ADL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Sound&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Westwood]]&lt;br /&gt;
[[Category:3D dungeon]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Westwood_XOR_Delta&amp;diff=5695</id>
		<title>Westwood XOR Delta</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Westwood_XOR_Delta&amp;diff=5695"/>
		<updated>2014-11-20T20:13:43Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Format40&lt;br /&gt;
----------&lt;br /&gt;
&lt;br /&gt;
As I said before the images in Format40 must be xor-ed over a previous image,&lt;br /&gt;
or against a black screen (as in the .WSA format).&lt;br /&gt;
It is used when there are only minor changes between an image and a following&lt;br /&gt;
one.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll assume that the old image is in Dest, and that the Dest pointer is&lt;br /&gt;
set to the beginning of that buffer.&lt;br /&gt;
&lt;br /&gt;
As for the Format80, there are many commands:&lt;br /&gt;
&lt;br /&gt;
(1) 1 byte&lt;br /&gt;
               byte&lt;br /&gt;
  +---+---+---+---+---+---+---+---+&lt;br /&gt;
  | 1 |   |   |   |   |   |   |   |&lt;br /&gt;
  +---+---+---+---+---+---+---+---+&lt;br /&gt;
      \___________________________/&lt;br /&gt;
                   |&lt;br /&gt;
                 Count&lt;br /&gt;
&lt;br /&gt;
Skip count bytes in Dest (move the pointer forward).&lt;br /&gt;
&lt;br /&gt;
(2) 3 bytes&lt;br /&gt;
              byte                           word&lt;br /&gt;
  +---+---+---+---+---+---+---+---+  +---+-----+-------+&lt;br /&gt;
  | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  | 0 | ... |       |&lt;br /&gt;
  +---+---+---+---+---+---+---+---+  +---+-----+-------+&lt;br /&gt;
                                         \_____________/&lt;br /&gt;
                                                |&lt;br /&gt;
                                              Count&lt;br /&gt;
&lt;br /&gt;
Skip count bytes.&lt;br /&gt;
&lt;br /&gt;
(3) 3 bytes&lt;br /&gt;
                byte                              word&lt;br /&gt;
  +---+---+---+---+---+---+---+---+  +---+---+-----+-------+&lt;br /&gt;
  | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  | 1 | 0 | ... |       |&lt;br /&gt;
  +---+---+---+---+---+---+---+---+  +---+---+-----+-------+&lt;br /&gt;
                                             \_____________/&lt;br /&gt;
                                                   |&lt;br /&gt;
                                                 Count&lt;br /&gt;
&lt;br /&gt;
Xor next count bytes. That means xor count bytes from Source with bytes in Dest.&lt;br /&gt;
&lt;br /&gt;
(4) 4 bytes&lt;br /&gt;
              byte                               word           byte&lt;br /&gt;
  +---+---+---+---+---+---+---+---+  +---+---+-----+-------+  +-------+&lt;br /&gt;
  | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  | 1 | 1 | ... |       |  |       |&lt;br /&gt;
  +---+---+---+---+---+---+---+---+  +---+---+-----+-------+  +-------+&lt;br /&gt;
                                             \_____________/    value&lt;br /&gt;
                                                   |&lt;br /&gt;
                                                 Count&lt;br /&gt;
&lt;br /&gt;
Xor next count bytes in Dest with value.&lt;br /&gt;
&lt;br /&gt;
5) 1 byte&lt;br /&gt;
               byte&lt;br /&gt;
  +---+---+---+---+---+---+---+---+&lt;br /&gt;
  | 0 |   |   |   |   |   |   |   |&lt;br /&gt;
  +---+---+---+---+---+---+---+---+&lt;br /&gt;
      \___________________________/&lt;br /&gt;
                   |&lt;br /&gt;
                 Count&lt;br /&gt;
&lt;br /&gt;
Xor next count bytes from source with dest.&lt;br /&gt;
&lt;br /&gt;
6) 3 bytes&lt;br /&gt;
              byte                     byte       byte&lt;br /&gt;
  +---+---+---+---+---+---+---+---+  +-------+  +-------+&lt;br /&gt;
  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |       |  |       |&lt;br /&gt;
  +---+---+---+---+---+---+---+---+  +-------+  +-------+&lt;br /&gt;
                                       Count      Value&lt;br /&gt;
&lt;br /&gt;
Xor next count bytes with value.&lt;br /&gt;
&lt;br /&gt;
All images end with a 80h 00h 00h command.&lt;br /&gt;
&lt;br /&gt;
I think these are all the commands, but there might be some other.&lt;br /&gt;
If you find anything new, please add them.&lt;br /&gt;
&lt;br /&gt;
As before here&#039;s some code :&lt;br /&gt;
&lt;br /&gt;
DP = destination pointer&lt;br /&gt;
SP = source pointer&lt;br /&gt;
Source is buffer containing the Format40 data&lt;br /&gt;
Dest is the buffer containing the image over which the second has&lt;br /&gt;
to be xor-ed&lt;br /&gt;
&lt;br /&gt;
  SP:=0;&lt;br /&gt;
  DP:=0;&lt;br /&gt;
  repeat&lt;br /&gt;
    Com:=Source[SP];&lt;br /&gt;
    Inc(SP);&lt;br /&gt;
 &lt;br /&gt;
    if (Com and $80)&amp;lt;&amp;gt;0 then {if bit 7 set}&lt;br /&gt;
    begin&lt;br /&gt;
      if Com&amp;lt;&amp;gt;$80 then  {small skip command (1)}&lt;br /&gt;
      begin&lt;br /&gt;
        Count:=Com and $7F;&lt;br /&gt;
        Inc(DP,Count);&lt;br /&gt;
      end&lt;br /&gt;
      else  {Big commands}&lt;br /&gt;
      begin&lt;br /&gt;
        Count:=Word(Source[SP]);&lt;br /&gt;
        if Count=0 then break;&lt;br /&gt;
        Inc(SP,2);&lt;br /&gt;
 &lt;br /&gt;
        Tc:=(Count and $C000) shr 14;  {Tc=two topmost bits of count}&lt;br /&gt;
 &lt;br /&gt;
        case Tc of&lt;br /&gt;
          0,1 : begin  {Big skip (2)}&lt;br /&gt;
                  Inc(DP,Count);&lt;br /&gt;
                end;&lt;br /&gt;
          2 : begin {big xor (3)}&lt;br /&gt;
                Count:=Count and $3FFF;&lt;br /&gt;
                for i:=1 to Count do&lt;br /&gt;
                begin&lt;br /&gt;
                  Dest[DP]:=Dest[DP] xor Source[SP];&lt;br /&gt;
                  Inc(DP);&lt;br /&gt;
                  Inc(SP);&lt;br /&gt;
                end;&lt;br /&gt;
              end;&lt;br /&gt;
          3 : begin  {big repeated xor (4)}&lt;br /&gt;
                Count:=Count and $3FFF;&lt;br /&gt;
                b:=Source[SP];&lt;br /&gt;
                Inc(SP);&lt;br /&gt;
                for i:=1 to Count do&lt;br /&gt;
                begin&lt;br /&gt;
                  Dest[DP]:=Dest[DP] xor b;&lt;br /&gt;
                  Inc(DP);&lt;br /&gt;
                end;&lt;br /&gt;
              end;&lt;br /&gt;
        end;&lt;br /&gt;
      end;&lt;br /&gt;
    end else  {xor command}&lt;br /&gt;
    begin&lt;br /&gt;
      Count:=Com;&lt;br /&gt;
      if Count=0 then&lt;br /&gt;
      begin {repeated xor (6)}&lt;br /&gt;
        Count:=Source[SP];&lt;br /&gt;
        Inc(SP);&lt;br /&gt;
        b:=Source[SP];&lt;br /&gt;
        Inc(SP);&lt;br /&gt;
        for i:=1 to Count do&lt;br /&gt;
        begin&lt;br /&gt;
          Dest[DP]:=Dest[DP] xor b;&lt;br /&gt;
          Inc(DP);&lt;br /&gt;
        end;&lt;br /&gt;
      end else  {copy xor (5)}&lt;br /&gt;
        for i:=1 to Count do&lt;br /&gt;
        begin&lt;br /&gt;
          Dest[DP]:=Dest[DP] xor Source[SP];&lt;br /&gt;
          Inc(DP);&lt;br /&gt;
          Inc(SP);&lt;br /&gt;
        end;&lt;br /&gt;
    end;&lt;br /&gt;
  until false;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File Formats]]&lt;br /&gt;
[[Category:Compressed Files]]&lt;br /&gt;
[[Category:Compression Algorithms]]&lt;br /&gt;
[[Category:Lands Of Lore]]&lt;br /&gt;
[[Category:Eye of the Beholder]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Westwood_RLE&amp;diff=5694</id>
		<title>Westwood RLE</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Westwood_RLE&amp;diff=5694"/>
		<updated>2014-11-20T20:11:40Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Format 3&lt;br /&gt;
----------&lt;br /&gt;
&lt;br /&gt;
I called this method &amp;quot;compression 3&amp;quot;, since there are 3 different commands to draw an image. Here I will explain that decompression method.&lt;br /&gt;
&lt;br /&gt;
As I said before, we have 3 different commands; to find which command to execute, we have to read a byte from the file, and we must read it as a signed one:&lt;br /&gt;
&lt;br /&gt;
Command 0: copy&lt;br /&gt;
&lt;br /&gt;
1 signed byte&lt;br /&gt;
[x|x|x|x|x|x|x|x] &amp;gt; 0&lt;br /&gt;
          count&lt;br /&gt;
&lt;br /&gt;
command : Copy next _count_ pixels from source buffer to dest buffer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Command 1: fill (1)&lt;br /&gt;
&lt;br /&gt;
1 signed byte&lt;br /&gt;
[0|0|0|0|0|0|0|0]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have to read the next word (2 bytes) from src buffer (And swap bytes inside that word if we are working on a little endian machine (x86, for example)); that value will be &amp;quot;count&amp;quot;.&lt;br /&gt;
Then we read another byte, which is the &amp;quot;code&amp;quot;.&lt;br /&gt;
command: Fill _count_ pixels with _code_ color.&lt;br /&gt;
&lt;br /&gt;
Command 2: fill (2)&lt;br /&gt;
&lt;br /&gt;
1 signed byte&lt;br /&gt;
[x|x|x|x|x|x|x|x] &amp;lt; 0&lt;br /&gt;
&lt;br /&gt;
This byte, after we subtract it from 0, is &amp;quot;count&amp;quot;.&lt;br /&gt;
We then read another byte, which will be &amp;quot;code&amp;quot;.&lt;br /&gt;
command : Fill _count_ pixels with _code_ color.&lt;br /&gt;
&lt;br /&gt;
Example decompression code&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that is actually uses Signed bytes for the command, the other code didn&#039;t and I think that was the main issue.&lt;br /&gt;
&lt;br /&gt;
int cps_rle(unsigned char *src, unsigned char *dest, int len, bool swapWord)  // Source data, Dest Data, and source size.&lt;br /&gt;
{&lt;br /&gt;
 &lt;br /&gt;
  s8 com;   // s8 is a signed byte&lt;br /&gt;
  s16 count;// signed word or short.&lt;br /&gt;
  u8 col, debug;&lt;br /&gt;
  int DP, SP, i;&lt;br /&gt;
  DP=0;&lt;br /&gt;
  SP=0;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
  while( SP&amp;lt; len)&lt;br /&gt;
  {&lt;br /&gt;
    com = src[SP];&lt;br /&gt;
    SP++;&lt;br /&gt;
    if (com &amp;gt; 0)  // Copy command&lt;br /&gt;
    {&lt;br /&gt;
        for(i=0;i&amp;lt;com; i++)&lt;br /&gt;
        {&lt;br /&gt;
            dest[DP] = src[SP];&lt;br /&gt;
            DP++; SP++;&lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
    }else&lt;br /&gt;
    {&lt;br /&gt;
        if(com &amp;lt; 0 ) //Command 2 &amp;lt; fill 2&lt;br /&gt;
        {&lt;br /&gt;
            count = -com;  // invert the count to make it a positive number.&lt;br /&gt;
 &lt;br /&gt;
        }else // Other wise, Command 1 Fill 1&lt;br /&gt;
        {&lt;br /&gt;
            // This fixes beholde1.cps for the amiga EOB1&lt;br /&gt;
            if( swapWord == true)&lt;br /&gt;
               count = (src[SP+1] * 256 )+ src[SP];&lt;br /&gt;
            else&lt;br /&gt;
               count = (src[SP] * 256 )+ src[SP+1];&lt;br /&gt;
 &lt;br /&gt;
            SP +=2;&lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
        col = src[SP];  // Grab the colour to fill with.&lt;br /&gt;
        SP++;&lt;br /&gt;
 &lt;br /&gt;
        for(i=0;i&amp;lt;count; i++)&lt;br /&gt;
        {&lt;br /&gt;
            dest[DP] = col;&lt;br /&gt;
            DP++;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
  }&lt;br /&gt;
  return DP;  // This should be 64000.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
[[Category:File Formats]]&lt;br /&gt;
[[Category:Compressed Files]]&lt;br /&gt;
[[Category:Compression Algorithms]]&lt;br /&gt;
[[Category:Lands Of Lore]]&lt;br /&gt;
[[Category:Eye of the Beholder]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Westwood_LZW-14&amp;diff=5693</id>
		<title>Westwood LZW-14</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Westwood_LZW-14&amp;diff=5693"/>
		<updated>2014-11-20T20:07:33Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; Westwood compression method two&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
As with compression method one this method has been seen in the game BattleTech: The Crescent Hawk&#039;s Revenge. But also in the demo version of Eye of the Beholder, the first game in the series.&lt;br /&gt;
&lt;br /&gt;
Compressed structure&lt;br /&gt;
&lt;br /&gt;
The limitation of 4095 indexes in method one has been overcome by increasing the bit length of the groups in method two. Other than that the compression is almost identical.&lt;br /&gt;
The groups are thus 14 bits in length throughout the compressed data stream. The last group is set to 0x3fff and is used as the end marker. Finally the stream ends with 8 bits set to zero for files with even length.&lt;br /&gt;
&lt;br /&gt;
Byte group&lt;br /&gt;
000000 cccccccc - When the first six bits are set to zero the following eight&lt;br /&gt;
                  bits represents a byte to store in the decompressed data stream.&lt;br /&gt;
 &lt;br /&gt;
Index group&lt;br /&gt;
xxxxxx yyyyyyyy - When the first six bits are not set to zero the whole group&lt;br /&gt;
                  represents an index value which points to a previous group in&lt;br /&gt;
                  the compressed data stream.&lt;br /&gt;
                  To get the correct index value you first need to decrease the&lt;br /&gt;
                  first six bits by one.&lt;br /&gt;
&lt;br /&gt;
Other than that the decompression should work the same as with [[Westwood Compression Method One]].&lt;br /&gt;
&lt;br /&gt;
/ Linus Kalliope&lt;br /&gt;
&lt;br /&gt;
[[Category:File Formats]]&lt;br /&gt;
[[Category:Compressed Files]]&lt;br /&gt;
[[Category:Compression Algorithms]]&lt;br /&gt;
[[Category:Lands Of Lore]]&lt;br /&gt;
[[Category:Eye of the Beholder]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Westwood_LZW-12&amp;diff=5692</id>
		<title>Westwood LZW-12</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Westwood_LZW-12&amp;diff=5692"/>
		<updated>2014-11-20T20:03:37Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Westwood compression method one&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
This compression method was used by Westwood in PC games such as BattleTech: The Crescent Hawk&#039;s Revenge and the first game in the Eye of the Beholder series.&lt;br /&gt;
&lt;br /&gt;
Compressed structure&lt;br /&gt;
The compressed data stream is made up of groups which are 12 bits long each. The last group is set to 0xfff and should only be treated as an end marker. Finally the stream ends with 8 bits set to zero for files with even length or 12 bits for files with uneven length.&lt;br /&gt;
The contents of the groups have two functions.&lt;br /&gt;
&lt;br /&gt;
Byte group&lt;br /&gt;
0000 cccc cccc - When the first four bits are set to zero the following eight&lt;br /&gt;
                 bits represents a byte to store in the decompressed data stream.&lt;br /&gt;
 &lt;br /&gt;
Index group&lt;br /&gt;
xxxx yyyy yyyy - When the first four bits are not set to zero the whole group&lt;br /&gt;
                 represents an index value which points to a previous group in&lt;br /&gt;
                 the compressed data stream.&lt;br /&gt;
                 To get the correct index value you first need to decrease the&lt;br /&gt;
                 first four bits by one.&lt;br /&gt;
&lt;br /&gt;
Decompression explained&lt;br /&gt;
When processing a byte group its byte value is simply stored as is into the decompressed data stream.&lt;br /&gt;
Index groups on the other hand will always store at least two bytes. First the byte value retrieved from where the index pointed to. Secondly the byte value from the group next to where we got the first byte value.&lt;br /&gt;
Since index groups may point to other index groups we have to travel through the index tree until we end up at a byte group to know which byte we can store. Thus for each extra jump in the index tree we will store one byte value next to each traveled index group.&lt;br /&gt;
&lt;br /&gt;
Decompression illustrated&lt;br /&gt;
To better explain how this works, here is the first part of one of the files from the PC version of the first game in the Eye of the Beholder series.&lt;br /&gt;
&lt;br /&gt;
BlUE.EGA&lt;br /&gt;
                              »&lt;br /&gt;
7a 36 01 00 00 fa 00 00 00 00 00 01 00 10 00 08&lt;br /&gt;
00 60 08 10 51 01 10 7. .. .. .. .. .. .. .. ..&lt;br /&gt;
&lt;br /&gt;
And here is the compressed data formed in 12 bit groups.&lt;br /&gt;
&lt;br /&gt;
Index   Group   Description                 Decompressed data&lt;br /&gt;
0       000     Byte group&lt;br /&gt;
                * Store byte value 0        0&lt;br /&gt;
1       100     Index group&lt;br /&gt;
                * Jump to group index 0&lt;br /&gt;
                * Store byte value 0        0&lt;br /&gt;
                * Advance to next group&lt;br /&gt;
                * Jump to group index 0&lt;br /&gt;
                * Store byte value 0        0&lt;br /&gt;
2       100     Index group&lt;br /&gt;
                * Jump to group index 0&lt;br /&gt;
                * Store byte value 0        0&lt;br /&gt;
                * Advance to next group&lt;br /&gt;
                * Jump to group index 0&lt;br /&gt;
                * Store byte value 0        0&lt;br /&gt;
3       008     Byte group&lt;br /&gt;
                * Store byte value 8        8&lt;br /&gt;
4       006     Byte group&lt;br /&gt;
                * Store byte value 6        6&lt;br /&gt;
5       008     Byte group&lt;br /&gt;
                * Store byte value 8        8&lt;br /&gt;
6       105     Index group&lt;br /&gt;
                * Jump to group index 5&lt;br /&gt;
                * Store byte value 8        8&lt;br /&gt;
                * Advance to next group&lt;br /&gt;
                * Jump to group index 5&lt;br /&gt;
                * Store byte value 8        8&lt;br /&gt;
7       101     Index group&lt;br /&gt;
                * Jump to group index 1&lt;br /&gt;
                * Jump to group index 0&lt;br /&gt;
                * Store byte value 0        0&lt;br /&gt;
                * Advance to next group&lt;br /&gt;
                * Jump to group index 0&lt;br /&gt;
                * Store byte value 0        0&lt;br /&gt;
                * Return to group index 1&lt;br /&gt;
                * Advance to next group&lt;br /&gt;
                * Jump to group index 0&lt;br /&gt;
                * Store byte value 0        0&lt;br /&gt;
8       107     Index group&lt;br /&gt;
                * Jump to group index 7&lt;br /&gt;
                * Jump to group index 1&lt;br /&gt;
                * Jump to group index 0&lt;br /&gt;
                * Store byte value 0        0&lt;br /&gt;
                * Advance to next group&lt;br /&gt;
                * Jump to group index 0&lt;br /&gt;
                * Store byte value 0        0&lt;br /&gt;
                * Return to group index 1&lt;br /&gt;
                * Advance to next group&lt;br /&gt;
                * Jump to group index 0&lt;br /&gt;
                * Store byte value 0        0&lt;br /&gt;
                * Return to group index 7&lt;br /&gt;
                * Advance to next group&lt;br /&gt;
                * Jump to group index 7&lt;br /&gt;
                * Jump to group index 1&lt;br /&gt;
                * Jump to group index 0&lt;br /&gt;
                * Store byte value 0        0&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Decompression sample code&lt;br /&gt;
Here is a working sample code which was the result of the compressed data pattern analysis.&lt;br /&gt;
&lt;br /&gt;
private byte[] Decompress1(Content c)&lt;br /&gt;
{&lt;br /&gt;
    Header h = GetHeader(c.data);&lt;br /&gt;
    byte[] data = new byte[h.originalSize];&lt;br /&gt;
    int a = 10 + h.paletteSize, b = 0;&lt;br /&gt;
    bool low = false;&lt;br /&gt;
    byte[] tribbles = new byte[(c.data.Length - (a + 1)) * 2 / 3 * 2];&lt;br /&gt;
    if (c.data[c.data.Length - 1] != 0x00) return null;&lt;br /&gt;
    while (true)&lt;br /&gt;
    {&lt;br /&gt;
        if (a &amp;gt;= c.data.Length - 1) return null;&lt;br /&gt;
        byte[] nibbles = new byte[3];&lt;br /&gt;
        for (int n = 0; n != 3; n++)&lt;br /&gt;
        {&lt;br /&gt;
            if (low == false)&lt;br /&gt;
            {&lt;br /&gt;
                nibbles[n] = (byte)(c.data[a] &amp;gt;&amp;gt; 4);&lt;br /&gt;
                low = true;&lt;br /&gt;
            }&lt;br /&gt;
            else&lt;br /&gt;
            {&lt;br /&gt;
                nibbles[n] = (byte)(c.data[a] &amp;amp; 0x0f);&lt;br /&gt;
                low = false;&lt;br /&gt;
                a++;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        if (b + 1 &amp;gt;= tribbles.Length) return null;&lt;br /&gt;
        tribbles[b] = nibbles[0];&lt;br /&gt;
        tribbles[b + 1] = (byte)((nibbles[1] &amp;lt;&amp;lt; 4) | nibbles[2]);&lt;br /&gt;
        if (tribbles[b] == 0x0f &amp;amp;&amp;amp; tribbles[b + 1] == 0xff) break;&lt;br /&gt;
        b += 2;&lt;br /&gt;
    }&lt;br /&gt;
    if (a + 1 != c.data.Length &amp;amp;&amp;amp; a + 2 != c.data.Length &amp;amp;&amp;amp; b + 2 != tribbles.Length) return null;&lt;br /&gt;
    for (a = 0, b = 0; a != tribbles.Length - 2; a += 2)&lt;br /&gt;
    {&lt;br /&gt;
        int offset = a;&lt;br /&gt;
        int count = 0;&lt;br /&gt;
        while (tribbles[offset] != 0x00)&lt;br /&gt;
        {&lt;br /&gt;
            offset = (((tribbles[offset] - 1) &amp;lt;&amp;lt; 8) | tribbles[offset + 1]) * 2;&lt;br /&gt;
            if (offset &amp;gt;= a) return null;&lt;br /&gt;
            count++;&lt;br /&gt;
        }&lt;br /&gt;
        if (b == data.Length) return null;&lt;br /&gt;
        data[b] = tribbles[offset + 1];&lt;br /&gt;
        b++;&lt;br /&gt;
        if (count == 0) continue;&lt;br /&gt;
        while (count != 0)&lt;br /&gt;
        {&lt;br /&gt;
            offset += 2;&lt;br /&gt;
            int o = offset;&lt;br /&gt;
            while (tribbles[offset] != 0x00)&lt;br /&gt;
            {&lt;br /&gt;
                offset = (((tribbles[offset] - 1) &amp;lt;&amp;lt; 8) | tribbles[offset + 1]) * 2;&lt;br /&gt;
                if (offset &amp;gt;= o) return null;&lt;br /&gt;
            }&lt;br /&gt;
            if (b == data.Length) return null;&lt;br /&gt;
            data[b] = tribbles[offset + 1];&lt;br /&gt;
            b++;&lt;br /&gt;
            count--;&lt;br /&gt;
            offset = a;&lt;br /&gt;
            int counter = 0;&lt;br /&gt;
            while (counter != count)&lt;br /&gt;
            {&lt;br /&gt;
                offset = (((tribbles[offset] - 1) &amp;lt;&amp;lt; 8) | tribbles[offset + 1]) * 2;&lt;br /&gt;
                if (offset &amp;gt;= a) return null;&lt;br /&gt;
                counter++;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return data;&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
/ Linus Kalliope &lt;br /&gt;
[[Category:File Formats]]&lt;br /&gt;
[[Category:Compressed Files]]&lt;br /&gt;
[[Category:Compression Algorithms]]&lt;br /&gt;
[[Category:Eye of the Beholder]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Westwood_LCW&amp;diff=5691</id>
		<title>Westwood LCW</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Westwood_LCW&amp;diff=5691"/>
		<updated>2014-11-20T19:40:14Z</updated>

		<summary type="html">&lt;p&gt;The coder: Trying to save pages from now defunct Eye of the Beholder Wiki (eob.wikispaces.com)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;----------&lt;br /&gt;
Format80&lt;br /&gt;
----------&lt;br /&gt;
&lt;br /&gt;
Basically, it&#039;s part of RLE family.&lt;br /&gt;
&lt;br /&gt;
There are several different commands, with different sizes : form 1 to 5&lt;br /&gt;
bytes.&lt;br /&gt;
The positions mentioned below always refer to the destination buffer (i.e.&lt;br /&gt;
the uncompressed image). The relative positions are relative to the current&lt;br /&gt;
position in the destination buffer, which is one byte beyond the last written&lt;br /&gt;
byte.&lt;br /&gt;
I will give some sample code at the end.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
(1) 1 byte&lt;br /&gt;
      +---+---+---+---+---+---+---+---+&lt;br /&gt;
      | 1 | 0 |   |   |   |   |   |   |&lt;br /&gt;
      +---+---+---+---+---+---+---+---+&lt;br /&gt;
              \_______________________/&lt;br /&gt;
                         |&lt;br /&gt;
                       Count&lt;br /&gt;
&lt;br /&gt;
This one means : copy next Count bytes as is from Source to Dest.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
(2) 2 bytes&lt;br /&gt;
  +---+---+---+---+---+---+---+---+   +---+---+---+---+---+---+---+---+&lt;br /&gt;
  | 0 |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |&lt;br /&gt;
  +---+---+---+---+---+---+---+---+   +---+---+---+---+---+---+---+---+&lt;br /&gt;
      \___________/\__________________________________________________/&lt;br /&gt;
            |                             |&lt;br /&gt;
         Count-3                    Relative Pos.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
This means copy Count bytes from Dest at Current Pos.-Rel. Pos. to&lt;br /&gt;
Current position.&lt;br /&gt;
Note that you have to add 3 to the number you find in the bits 4-6 of the&lt;br /&gt;
first byte to obtain the Count.&lt;br /&gt;
Note that if the Rel. Pos. is 1, that means repeat Count times the previous&lt;br /&gt;
byte.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
(3) 3 bytes&lt;br /&gt;
  +---+---+---+---+---+---+---+---+   +---------------+---------------+&lt;br /&gt;
  | 1 | 1 |   |   |   |   |   |   |   |               |               |&lt;br /&gt;
  +---+---+---+---+---+---+---+---+   +---------------+---------------+&lt;br /&gt;
          \_______________________/                  Pos&lt;br /&gt;
                     |&lt;br /&gt;
                 Count-3&lt;br /&gt;
&lt;br /&gt;
Copy Count bytes from Pos, where Pos is absolute from the start of the&lt;br /&gt;
destination buffer. (Pos is a word, that means that the images can&#039;t be&lt;br /&gt;
larger than 64K)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
(4) 4 bytes&lt;br /&gt;
  +---+---+---+---+---+---+---+---+   +-------+-------+  +-------+&lt;br /&gt;
  | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |   |       |       |  |       |&lt;br /&gt;
  +---+---+---+---+---+---+---+---+   +-------+-------+  +-------+&lt;br /&gt;
                                            Count          Color&lt;br /&gt;
&lt;br /&gt;
Write Color Count times.&lt;br /&gt;
(Count is a word, color is a byte)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
(5) 5 bytes&lt;br /&gt;
  +---+---+---+---+---+---+---+---+   +-------+-------+  +-------+-------+&lt;br /&gt;
  | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |   |       |       |  |       |       |&lt;br /&gt;
  +---+---+---+---+---+---+---+---+   +-------+-------+  +-------+-------+&lt;br /&gt;
                                            Count               Pos&lt;br /&gt;
&lt;br /&gt;
Copy Count bytes from Dest. starting at Pos. Pos is absolute from the start&lt;br /&gt;
of the Destination buffer.&lt;br /&gt;
Both Count and Pos are words.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are all the commands I found out. Maybe there are other ones, but I&lt;br /&gt;
haven&#039;t seen them yet.&lt;br /&gt;
All the images end with a 80h command.&lt;br /&gt;
&lt;br /&gt;
To make things more clearer here&#039;s a piece of code that will uncompress the&lt;br /&gt;
image.&lt;br /&gt;
DP = destination pointer&lt;br /&gt;
SP = source pointer&lt;br /&gt;
Source and Dest are the two buffers&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
  SP:=0;&lt;br /&gt;
  DP:=0;&lt;br /&gt;
  repeat&lt;br /&gt;
    Com:=Source[SP];&lt;br /&gt;
    inc(SP);&lt;br /&gt;
    b7:=Com shr 7;  {b7 is bit 7 of Com}&lt;br /&gt;
    case b7 of&lt;br /&gt;
      0 : begin  {copy command (2)}&lt;br /&gt;
            {Count is bits 4-6 + 3}&lt;br /&gt;
            Count:=(Com and $7F) shr 4 + 3;&lt;br /&gt;
            {Position is bits 0-3, with bits 0-7 of next byte}&lt;br /&gt;
            Posit:=(Com and $0F) shl 8+Source[SP];&lt;br /&gt;
            Inc(SP);&lt;br /&gt;
            {Starting pos=Cur pos. - calculated value}&lt;br /&gt;
            Posit:=DP-Posit;&lt;br /&gt;
            for i:=Posit to Posit+Count-1 do&lt;br /&gt;
            begin&lt;br /&gt;
              Dest[DP]:=Dest[i];&lt;br /&gt;
              Inc(DP);&lt;br /&gt;
            end;&lt;br /&gt;
          end;&lt;br /&gt;
      1 : begin&lt;br /&gt;
            {Check bit 6 of Com}&lt;br /&gt;
            b6:=(Com and $40) shr 6;&lt;br /&gt;
            case b6 of&lt;br /&gt;
              0 : begin  {Copy as is command (1)}&lt;br /&gt;
                    Count:=Com and $3F;  {mask 2 topmost bits}&lt;br /&gt;
                    if Count=0 then break; {EOF marker}&lt;br /&gt;
                    for i:=1 to Count do&lt;br /&gt;
                    begin&lt;br /&gt;
                      Dest[DP]:=Source[SP];&lt;br /&gt;
                      Inc(DP);&lt;br /&gt;
                      Inc(SP);&lt;br /&gt;
                    end;&lt;br /&gt;
                  end;&lt;br /&gt;
              1 : begin  {large copy, very large copy and fill commands}&lt;br /&gt;
                    {Count = (bits 0-5 of Com) +3}&lt;br /&gt;
                    {if Com=FEh then fill, if Com=FFh then very large copy}&lt;br /&gt;
                    Count:=Com and $3F;&lt;br /&gt;
                    if Count&amp;lt;$3E then {large copy (3)}&lt;br /&gt;
                    begin&lt;br /&gt;
                      Inc(Count,3);&lt;br /&gt;
                      {Next word = pos. from start of image}&lt;br /&gt;
                      Posit:=Word(Source[SP]);&lt;br /&gt;
                      Inc(SP,2);&lt;br /&gt;
                      for i:=Posit to Posit+Count-1 do&lt;br /&gt;
                      begin&lt;br /&gt;
                        Dest[DP]:=Dest[i];&lt;br /&gt;
                        Inc(DP);&lt;br /&gt;
                      end;&lt;br /&gt;
                    end&lt;br /&gt;
                    else if Count=$3F then   {very large copy (5)}&lt;br /&gt;
                    begin&lt;br /&gt;
                      {next 2 words are Count and Pos}&lt;br /&gt;
                      Count:=Word(Source[SP]);&lt;br /&gt;
                      Posit:=Word(Source[SP+2]);&lt;br /&gt;
                      Inc(SP,4);&lt;br /&gt;
                      for i:=Posit to Posit+Count-1 do&lt;br /&gt;
                      begin&lt;br /&gt;
                        Dest[DP]:=Dest[i];&lt;br /&gt;
                        Inc(DP);&lt;br /&gt;
                      end;&lt;br /&gt;
                    end else&lt;br /&gt;
                    begin   {Count=$3E, fill (4)}&lt;br /&gt;
                      {Next word is count, the byte after is color}&lt;br /&gt;
                      Count:=Word(Source[SP]);&lt;br /&gt;
                      Inc(SP,2);&lt;br /&gt;
                      b:=Source[SP];&lt;br /&gt;
                      Inc(SP);&lt;br /&gt;
                      for i:=0 to Count-1 do&lt;br /&gt;
                      begin&lt;br /&gt;
                        Dest[DP]:=b;&lt;br /&gt;
                        inc(DP);&lt;br /&gt;
                      end;&lt;br /&gt;
                    end;&lt;br /&gt;
                  end;&lt;br /&gt;
            end;&lt;br /&gt;
          end;&lt;br /&gt;
    end;&lt;br /&gt;
  until false;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note that you won&#039;t be able to compile this code, because the typecasting&lt;br /&gt;
won&#039;t work. (But I&#039;m sure you&#039;ll be able to fix it).&lt;br /&gt;
&lt;br /&gt;
(C) Vladan Bato&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File Formats]]&lt;br /&gt;
[[Category:Compressed Files]]&lt;br /&gt;
[[Category:Compression Algorithms]]&lt;br /&gt;
[[Category:Lands Of Lore]]&lt;br /&gt;
[[Category:Eye of the Beholder]]&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=ModdingWiki:Community_portal&amp;diff=5650</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=5650"/>
		<updated>2014-10-28T13:42:21Z</updated>

		<summary type="html">&lt;p&gt;The coder: added archived version link for Rewiki (the site is down)&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] 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] - 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>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:TheAlmightyGuru&amp;diff=5649</id>
		<title>User talk:TheAlmightyGuru</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:TheAlmightyGuru&amp;diff=5649"/>
		<updated>2014-10-28T13:32:12Z</updated>

		<summary type="html">&lt;p&gt;The coder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, &lt;br /&gt;
please see this viewer http://oezmen.eu/gameresources/files/holmes.zip&lt;br /&gt;
[[User:The coder|The coder]] ([[User talk:The coder|talk]]) 12:49, 28 October 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
Thank you, that saves me some time; now I just have to translate Pascal! :-) --[[User:TheAlmightyGuru|TheAlmightyGuru]] ([[User talk:TheAlmightyGuru|talk]]) 13:18, 28 October 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
Better then nothing :) [[User:The coder|The coder]] ([[User talk:The coder|talk]]) 13:32, 28 October 2014 (UTC)&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User_talk:TheAlmightyGuru&amp;diff=5647</id>
		<title>User talk:TheAlmightyGuru</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User_talk:TheAlmightyGuru&amp;diff=5647"/>
		<updated>2014-10-28T12:49:50Z</updated>

		<summary type="html">&lt;p&gt;The coder: The lost files of the Sherlock Holmes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, &lt;br /&gt;
please see this viewer http://oezmen.eu/gameresources/files/holmes.zip&lt;br /&gt;
[[User:The coder|The coder]] ([[User talk:The coder|talk]]) 12:49, 28 October 2014 (UTC)&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=GameMaps_Format&amp;diff=5376</id>
		<title>GameMaps Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=GameMaps_Format&amp;diff=5376"/>
		<updated>2014-08-10T17:56:58Z</updated>

		<summary type="html">&lt;p&gt;The coder: /* Utilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Map Infobox&lt;br /&gt;
 | Type = 2D tile-based&lt;br /&gt;
 | Layers = 3&lt;br /&gt;
 | Viewport = &#039;&#039;Varies by game&#039;&#039;&lt;br /&gt;
 | Game1 = Bio Menace&lt;br /&gt;
 | Game2 = Blake Stone&lt;br /&gt;
 | Game3 = Catacomb 3-D&lt;br /&gt;
 | Game4 = Catacomb Abyss&lt;br /&gt;
 | Game5 = Commander Keen&lt;br /&gt;
 | Game6 = Corridor 7 Alien Invasion&lt;br /&gt;
 | Game7 = Dangerous Dave 3&lt;br /&gt;
 | Game8 = Dangerous Dave 4&lt;br /&gt;
 | Game9 = Noah&#039;s Ark 3D&lt;br /&gt;
 | Game10 = Operation Body Count&lt;br /&gt;
 | Game11 = Spear of Destiny&lt;br /&gt;
 | Game12 = Wolfenstein 3D&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The GameMaps format is how the levels in a number of [[Id Software]] games is stored. The filenames and compression varies somewhat across different games but all files stored in this format were produced by the program [[TED5]] or a close analogue.&lt;br /&gt;
&lt;br /&gt;
There are three main varieties of the GameMaps format, uncompressed, [[Carmack compression|carmackized]], and  [[Huffman Compression|huffman compressed]]. Each variation has its own file naming scheme  and pattern of external\internal files.&lt;br /&gt;
&lt;br /&gt;
There are two main components to the format, the game maps proper, which contain the game level data and the map headers, which contain both the locations of the start of level data in the game maps file and the tile info for the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Structure of uncompressed data ==&lt;br /&gt;
&lt;br /&gt;
The uncompressed format is used by several games including [[Bio Menace]] and [[Wolfenstein 3D]]. In this format map data is stored in &amp;lt;tt&amp;gt;MAPTEMP.xxx&amp;lt;/tt&amp;gt; and map headers in &amp;lt;tt&amp;gt;MAPTHEAD.xxx&amp;lt;/tt&amp;gt; this is the format saved by [[TED5]] when maps are being edited and can be directly accessed and edited by this utility, allowing changes to be made to the game.&lt;br /&gt;
&lt;br /&gt;
Note that filenames differ and that Wolfenstein 3D uses &amp;lt;tt&amp;gt;GAMEMAPS.WLx&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MAPHEAD.xxx&amp;lt;/tt&amp;gt; files to store data. The main indicator of this format being used is that in the unaltered game the map header file is external.&lt;br /&gt;
&lt;br /&gt;
Only the latest Id Software games lacked compression, when file size was no longer an issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Map headers ===&lt;br /&gt;
&lt;br /&gt;
 0    2    Magic word       Magic word for [[RLEW compression]]&lt;br /&gt;
 2    400  Level ptr        100 4-byte pointers to start of level 0-99 data in game maps file&lt;br /&gt;
 402  ???  Tileinfo         Tileinfo data&lt;br /&gt;
&lt;br /&gt;
The map header file is of varying length and contains three main types of data. The first is the magic word or flag used for RLEW compression, it is always $ABCD. The second is 100 level pointers which give the location of the start of level data in the game maps file, relative to the start of that file. A value of 0 indicates no level. The third is the tileinfo data, tile properties for each tile used in level creation. (These are masked and unmasked and either 8x8, 16x16 or 32x32)&lt;br /&gt;
&lt;br /&gt;
Many programs treat the tileinfo as a separate file from the maphead and it is possible to modify a game in this manner. Indeed, some games, such as Wolfenstein 3D do not have any tileinfo data at all in the map header file (Giving a total file length of 402 bytes.) However TED5 works with any tileinfo data in the maphead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Game maps ===&lt;br /&gt;
&lt;br /&gt;
The game maps file consists of the string &#039;TED5v1.0.&#039; and a number of RLEW compressed chunks of varying length. Each level in GameMaps will have from two to four chunks (usually four), depending on game, with all levels in a given game having the same number of chunks. These are the level header and 1-3 planes (Foreground, background and sprite or info.) The chunks are in no particular order and it is possible to read through the entire file decompressing chunks as they&#039;re found.&lt;br /&gt;
&lt;br /&gt;
Chunks are ordered by the map header file, which will point to the level header chunks which in turn contain pointers to the other chunks used by that level. It is possible the string at the start of the file is to avoid the possibility of a level header at the start of the file which would be read as not existing.&lt;br /&gt;
&lt;br /&gt;
All data in game maps file is in the form of words (Or in the case of pointers, dwords.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Level headers ===&lt;br /&gt;
&lt;br /&gt;
The header for each level that is pointed to by MAPHEAD is 42 bytes long and RLEW compressed, though this is difficult to see since the data is so short and nonrepetitive. For the offsets to level planes a value of 0 indicates the plane does not exist.&lt;br /&gt;
&lt;br /&gt;
Plane 1 is background using unmasked tiles, plane 2 is foreground and uses masked tiles. Plane 3 is sprite or info. Levels must contain c background plane and usually an infoplane.&lt;br /&gt;
&lt;br /&gt;
 0   4    Offset in GAMEMAPS to beginning of compressed plane 0 data&lt;br /&gt;
 4   4    Offset in GAMEMAPS to beginning of compressed plane 1 data&lt;br /&gt;
 8   4    Offset in GAMEMAPS to beginning of compressed plane 2 data&lt;br /&gt;
 12  2    Length of compressed plane 0 data (in bytes)&lt;br /&gt;
 14  2    Length of compressed plane 1 data (in bytes)&lt;br /&gt;
 16  2    Length of compressed plane 2 data (in bytes)&lt;br /&gt;
 18  2    Width of level (in tiles)&lt;br /&gt;
 20  2    Height of level (in tiles)&lt;br /&gt;
 22  16   Internal name for level (used only by editor, not displayed in-game. null-terminated)&lt;br /&gt;
&lt;br /&gt;
== Carmack compression ==&lt;br /&gt;
&lt;br /&gt;
[[Carmack compression]] is the method used to compress later Id Software games, when file size was an issue. It is the most efficient and complex compression method and was created specifically to work with the word structure of the game maps file. The compression is detailed on its [[Carmack compression|own page.]]&lt;br /&gt;
&lt;br /&gt;
Carmackized game maps files are external &amp;lt;tt&amp;gt;GAMEMAPS.xxx&amp;lt;/tt&amp;gt; files and the map header is stored internally in the executable. The map header must be extracted and the game maps decompressed before TED5 can access them. TED5 itself can produce carmackized files and external &amp;lt;tt&amp;gt;MAPHEAD.xxx&amp;lt;/tt&amp;gt; files. Carmackization does not replace the RLEW compression used in uncompressed data, but compresses this data, that is, the data is doubly compressed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Huffman compression ==&lt;br /&gt;
&lt;br /&gt;
Huffman compression was used by earlier versions of TED5 (possibly not TED5 at all.) before carmackization was created. It uses the same method to compress its data as is used by Id Software games to compress their graphics and sounds. Again this compression method works with RLEW compressed data and has its [[Huffman Compression|own page.]]&lt;br /&gt;
&lt;br /&gt;
Huffman compression is easily detected since it works on the bit level and thus disrupts the word structure of the game data. This is easily seen in a hex editor. Compressed data will not contain the string $00 $00 or indeed even $00 very often (In contrast even carmackized data contains both strings hundreds of times.)&lt;br /&gt;
&lt;br /&gt;
There will be two internal files for this format, the map header and the huffman dictionary (which is always the first dictionary in the executable.) The map header format is also slightly different, being 502 bytes long, the extra 100 bytes being the length of the compressed level headers in the game maps data (These can be ignored when decompressing since huffman data can be read until the decompressed level header&#039;s fixed size is reached.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Location of internal files ==&lt;br /&gt;
&lt;br /&gt;
Game maps are always external, but in the case of compression the map header file is stored internally in the executable. Executables are themselves compressed wither with LZEXE or PKLite. Once decompressed it is a trivial task to find the map header file as it will start with the word $ABCD For level editing purposes only the first 402 (or 502) bytes of the file needs to be extracted, though it is possible to read the maphead file to calculate its length.&lt;br /&gt;
&lt;br /&gt;
The following addresses are in the locations in the [[UNLZEXE|decompressed]] executables for the start of the Map header files. Values are different for different versions.&lt;br /&gt;
&lt;br /&gt;
TODO: Add all known versions of all games.&lt;br /&gt;
&lt;br /&gt;
External files&lt;br /&gt;
 Biomenace&lt;br /&gt;
 Blake Stone 2: Planet Strike&lt;br /&gt;
 Corridor 7 Demo&lt;br /&gt;
 Noahs Ark 3D&lt;br /&gt;
 Operation Body Count&lt;br /&gt;
 Spear of Destiny&lt;br /&gt;
 Wolfenstein 3D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Internal files:&lt;br /&gt;
  Catacomb 3-D (1.00): $1C570 from start of file CAT3D.EXE (after file is UNLZEXE)&lt;br /&gt;
  Catacomb 4 Abyss (1.13): $1C510 from start of file CATABYSS.EXE (after file is UNLZEXE)&lt;br /&gt;
  Catacomb 5 Armageddon (1.01a): $1D900 from start of file CATARMA.EXE (after file is UNLZEXE)&lt;br /&gt;
  Catacomb 6 Apocalypse (1.00b): $1DD50 from start of file CATAPOC.EXE (after file is UNLZEXE)&lt;br /&gt;
  Corridor 7 CD (): $30D50 from start of file CORR7CD.EXE (file is not compressed)&lt;br /&gt;
  Corridor 7 Floppy (): $24BF0 from start of file C7.EXE (file is not compressed)&lt;br /&gt;
  Keen 4 (Special Demo): (file is PKLite compressed)&lt;br /&gt;
  Keen 4 (1.4): $24830&lt;br /&gt;
  Keen 5 (1.4): $25990&lt;br /&gt;
  Keen 6 (1.4): $25080&lt;br /&gt;
 (Keen D (1.13): $1FA50)&lt;br /&gt;
&lt;br /&gt;
== Utilities ==&lt;br /&gt;
&lt;br /&gt;
[[TED5]] This program can edit the &amp;lt;tt&amp;gt;GAMEMAPS&amp;lt;/tt&amp;gt; format of any games that use it. It is the original editor used to create these files.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
This format was reverse engineered by Andrew Durdin (adurdin).&lt;/div&gt;</summary>
		<author><name>The coder</name></author>
	</entry>
</feed>