# DID archive extraction

The standalone [did-unpack tool](../did-unpack/README.md) reads the archive index, decodes RA version 2 resources and implements the TFX filename lookup/hash routine. It has its own Git repository at https://github.com/Lost-Engines/did-unpack.

The September 1994 TFX 2.05 archive has been extracted under [resources](../extracted/cd_1994_09/resources/), retaining native formats. Its manifest records all 3,488 entries, source offsets, hashes, name guesses and exact-content reference matches. There are 2,057 entries named by a single candidate and six verified against installed loose files; 173 ambiguous entries and 1,252 unknown entries remain under identifier-based paths.

A hash match alone does not prove a filename. The three known music files exposed actual collisions with guessed paths; verified loose-file content resolves those. Model conversion has begun in the [model browser](models/index.html); images and animations are available in the [media browser](media/index.html).

[Full validation results](did-unpack-validation.json) compare every RA payload in three CD builds, two floppy installations and the bundled Inferno demo against Benjamin Haisch's C decoder: 17,090 total entries, 11,866 RA entries and no differing decoded payloads. The Python decoder carries the required attribution; the tool is GPL-3.0-or-later.

See the tool's [format notes](../did-unpack/docs/format.md), [validation summary](../did-unpack/docs/validation.md) and [credits](../did-unpack/NOTICE.md).

## First resource inspection

The archive contains 2,416 RA-compressed resources and 1,072 uncompressed resources. After decoding, 81 entries begin with `OSL1` (native synthesised-music resources), and 165 begin with `INIT:` mission-script text (allowing leading CRLF). These content counts do not depend on guessed filenames. OSL1 resources divide into the three header variants seen in the known intro ADL/RLD/SCC files: 27 FM-family, 31 Roland-family and 23 SCC/General MIDI-family entries. They are resource entries, not necessarily 81 distinct compositions.

The separately installed `TUNES/INTRO.ADL`, `INTRO.RLD`, `INTRO.SCC` and `MISSIONS/MISS830.MIS` are individual RA v2 streams, not DID archive containers. Their decoded copies are present in the resource extraction. The music files begin with OSL1 after decompression; they are native sequenced music data rather than rendered CD audio.

`TFX.DAT` is a DOS executable and `DISK1.DAT` is an installer payload; neither is the main DID archive format. The Inferno hard-disk installer payload also starts with an RA stream, with additional installation data following it. The December CD's separately runnable Inferno DID.DAT was validated as another archive of the same container family. The September copy's Inferno DID.DAT fails index bounds validation; its differences from December require separate investigation.

Useful starting points in the decoded 2.05 archive:

- [Main game-flow/presentation resource](../extracted/cd_1994_09/resources/tfx.par) (candidate filename; compiled binary script).
- [CD intro resource](../extracted/cd_1994_09/resources/cdintro.par) (candidate filename; compiled binary script).
- [Verified mission 830 resource](../extracted/cd_1994_09/resources/missions/miss830.mis) (readable text, beginning with Yugoslavia world selection, initial landed position, waypoints, aircraft/weapon selection and flak areas).
- [Verified FM intro music](../extracted/cd_1994_09/resources/tunes/intro.adl), [Roland intro](../extracted/cd_1994_09/resources/tunes/intro.rld), and [SCC/GM intro](../extracted/cd_1994_09/resources/tunes/intro.scc).

The named directories also provide candidate groups for models (`3/`), terrain (`lev/`), scenery/entity definitions (`ss/`), palettes (`colours/`), graphics, samples, waypoints and translated text. Individual names and the detailed native formats still need validation.

The verified intro music resources have now been rendered through the native drivers and reused hardware emulators: [auditions and playback research](audio/README.md).

The [model-format study](model-format.md) now identifies 1,012 shape resources by structure, including models previously left under unknown names. The local [model browser](models/index.html) renders an initial inspection view and provides OBJ/MTL exports.

The [complete resource catalogue](resources/index.html) adds format classification and new naming evidence without changing the original extraction paths. The [analysis index](index.html) now links maps, assembled scenery, model previews, presentations, translated text and sampled audio. See [extraction coverage](resource-formats.md) for confirmed formats and unresolved details.

The [complete floppy comparison](floppy-resources.md) now extracts all 84 floppy payloads absent from the reference CD, records both retained floppy archives and inventories every shared entry without copying the common resources again.
