417
edits
(Added information about Operation Stealth's PC version's savegame file format.) |
(Added more detail to chapter title "Compression format" with "Compression format (Bytekiller 1.3)".) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
===.ADL files=== | ===.ADL files=== | ||
AdLib music. | |||
===.AMI files=== | ===.AMI files=== | ||
Line 121: | Line 121: | ||
* Object structs: | * Object structs: | ||
** 0x00AB: Entry count (Uint16BE), 255 in the PC version of Operation Stealth | ** 0x00AB: Entry count (Uint16BE), value discarded on load and assumed to be 255 in the PC version of Operation Stealth | ||
** 0x00AD: Entry size (Uint16BE), 32 in the PC version of Operation Stealth | ** 0x00AD: Entry size (Uint16BE), 32 in the PC version of Operation Stealth | ||
** 0x00AF: Object structs (Entry count structs, entry size bytes each): | ** 0x00AF: Object structs (Entry count structs, entry size bytes each): | ||
Line 127: | Line 127: | ||
*** x (Int16BE) | *** x (Int16BE) | ||
*** y (Int16BE) | *** y (Int16BE) | ||
*** mask (Uint16BE) | *** mask (Uint16BE), seems to be a priority or a Z-buffer value this one | ||
*** frame (Int16BE) | *** frame (Int16BE), indexes the animDataTable | ||
*** costume (Int16BE) | *** costume (Int16BE), maybe this should be named room number instead? | ||
*** name (String, 20 bytes) | *** name (String, 20 bytes) | ||
*** part (Uint16BE) | *** part (Uint16BE) | ||
Line 135: | Line 135: | ||
* Palettes: | * Palettes: | ||
** 0x208F: Temporary color palette (256 colors, 3 bytes per color, 768 bytes total) | ** 0x208F: Temporary color palette (256 colors, 3 bytes per color, 768 bytes total) | ||
*** TODO: Make sure whether this is the backup color palette or the active one | |||
** 0x238F: Color palette (256 colors, 3 bytes per color, 768 bytes total) | ** 0x238F: Color palette (256 colors, 3 bytes per color, 768 bytes total) | ||
*** TODO: Make sure whether this is the active color palette or the backup one | |||
* 0x268F: Global variables (255 Uint16BE values, 510 bytes total) | * 0x268F: Global variables (255 Uint16BE values, 510 bytes total) | ||
Line 167: | Line 169: | ||
* Animation data structs: | * Animation data structs: | ||
** 0x295A: Entry count (Uint16BE), 255 in the PC version of Operation Stealth | ** 0x295A: Entry count (Uint16BE), value discarded on load and assumed to be 255 in the PC version of Operation Stealth | ||
** 0x295C: Entry size (Uint16BE), 36 in the PC version of Operation Stealth | ** 0x295C: Entry size (Uint16BE), 36 in the PC version of Operation Stealth | ||
** 0x295E: Animation data structs (Entry count structs, entry size bytes each): | ** 0x295E: Animation data structs (Entry count structs, entry size bytes each): | ||
Line 183: | Line 185: | ||
* Global scripts: | * Global scripts: | ||
** 0x4D46: Entry count (Uint16BE) | ** 0x4D46: Entry count (Uint16BE) | ||
** 0x4D48 | ** 0x4D48: Global script structs (Entry count structs, entry size undetermined) | ||
*** TODO: Determine the entry size used by a global script | |||
* Object scripts: | * Object scripts: | ||
** Entry count (Uint16BE) | ** Entry count (Uint16BE) | ||
** Object script structs (Entry count structs, entry size undetermined) | |||
** Object script structs (Entry count structs, entry size | *** TODO: Determine the entry size used by an object script | ||
* seqList elements: | * seqList elements: | ||
** Entry count (Uint16BE) | ** Entry count (Uint16BE) | ||
** seqList element structs (Entry count structs, 32 bytes each) | |||
** seqList element structs (Entry count structs, | |||
* Overlays: | * Overlays: | ||
** Entry count (Uint16BE) | ** Entry count (Uint16BE) | ||
** Overlay structs (Entry count structs, 22 bytes each) | |||
** Overlay structs (Entry count structs, | |||
* Background incrusts | * Background incrusts | ||
** Entry count (Uint16BE) | ** Entry count (Uint16BE) | ||
** Background incrust structs (Entry count structs, 22 bytes each) | |||
** Background incrust structs (Entry count structs, | |||
And there the savegame file ends. | And there the savegame file ends. | ||
Line 306: | Line 305: | ||
</pre> | </pre> | ||
===Compression format=== | ===Compression format (Bytekiller 1.3) === | ||
The compression algorithm used by all Delphine's adventure games uses | The compression algorithm used by all Delphine's adventure games uses | ||
sliding window compression (Quite like [http://en.wikipedia.org/wiki/LZ77 LZ77]) | sliding window compression (Quite like [http://en.wikipedia.org/wiki/LZ77 LZ77]) | ||
combined with a fixed non-adaptive [http://en.wikipedia.org/wiki/Entropy_coding entropy coding] scheme | combined with a fixed non-adaptive [http://en.wikipedia.org/wiki/Entropy_coding entropy coding] | ||
scheme. It seems that the algorithm is [http://www.pouet.net/prod.php?which=47994 Bytekiller 1.3]. | |||
This is based on comparing the reverse engineered | |||
[https://github.com/scummvm/scummvm/blob/branch-2-0-0/engines/cine/unpack.cpp#L92 decompression routine] | |||
in ScummVM with the | |||
[https://github.com/aperture-software/colditz-escape/blob/v1.2/low-level.c#L150 uncompress]-function | |||
from [https://github.com/aperture-software/colditz-escape Colditz Escape]'s source code. | |||
The compressed data is in big endian 32-bit chunks, working backwards from the buffer's end. | The compressed data is in big endian 32-bit chunks, working backwards from the buffer's end. | ||
Line 406: | Line 411: | ||
error detection method, it lets errors through relatively easily if compared to other more robust | error detection method, it lets errors through relatively easily if compared to other more robust | ||
error detection methods like [http://en.wikipedia.org/wiki/SHA-1 SHA-1] or even [http://en.wikipedia.org/wiki/Cyclic_redundancy_check CRC]). | error detection methods like [http://en.wikipedia.org/wiki/SHA-1 SHA-1] or even [http://en.wikipedia.org/wiki/Cyclic_redundancy_check CRC]). | ||
===Fonts=== | |||
Fonts are loaded from file "TEXTE.DAT". | |||
====TEXTE.DAT file's format==== | |||
<pre> | |||
Byte Meaning | |||
------ ------------------------------------------------------------ | |||
0-1 Entry size (16-bit big endian integer) | |||
2-3 Entry count (16-bit big endian integer) | |||
4-end Font data (4-bit bitplaned data in 16-bit big endian chunks) | |||
------ ------------------------------------------------------------ | |||
</pre> | |||
* Characters are 16x8 in size | |||
* Entry size has been 8 in all observed data | |||
* Entry count divided by entry size gives the number of characters in the font | |||
* Take a look at [http://scummvm.svn.sourceforge.net/viewvc/scummvm/scummvm/trunk/engines/cine/gfx.cpp?revision=33976&view=markup#l_1669 gfxConvertSpriteToRaw] to see how the font data can be unpacked | |||
====Known different font versions==== | |||
There are 4 known different font versions: | |||
=====78 characters version===== | |||
* Used by most PC, Amiga and Atari ST versions of Future Wars, but also by Operation Stealth's Amiga demo | |||
* [[Image:Cinematique-78_characters_font.png]] | |||
=====85 characters version===== | |||
* Used by all observed versions of German Future Wars (Amiga and PC), possibly by Spanish Future Wars too | |||
* [[Image:Cinematique-85_characters_font.png]] | |||
=====90 characters version===== | |||
* Used by most PC, Amiga and Atari ST versions of Operation Stealth | |||
* [[Image:Cinematique-90_characters_font.png]] | |||
=====93 characters version===== | |||
* Used by all observed versions of German Operation Stealth (Amiga and PC) | |||
* [[Image:Cinematique-93_characters_font.png]] |
edits