DDI Wad: Difference between revisions

From Research Realm
No edit summary
Line 1: Line 1:
'''DDI Wad''' is an [[Wikipedia:Archive file format|archive file format]] developed by [[Data Design Interactive]] for storing files in video games. The format was first used in their 1997 game [[Wikipedia:Conquest Earth|''Conquest Earth'']]. DDI Wad files usually use the file extension '''.wad'''. The format is unrelated to [[Wikipedia:Doom WAD|Doom WAD]] or Wii WAD files.
'''DDI Wad''' is an [[Wikipedia:Archive file format|archive file format]] developed by [[Data Design Interactive]] for storing files in video games. The format was first used in their 1997 game [[Wikipedia:Conquest Earth|''Conquest Earth'']]. DDI Wad files usually use the file extension '''.wad'''. The format is unrelated to <!--[[Wikipedia:Doom WAD|Doom WAD]]-->[https://doomwiki.org/wiki/WAD Doom WAD] or [https://wiibrew.org/wiki/WAD_files Wii WAD] files.


== File formats ==
== File formats ==
There are currently five known WAD formats: ''Conquest Earth'' Wad, ''LEGO Rock Raiders'' Wad, PlayStation Padded Wad for ''LEGO Rock Raiders'', PWP for ''Tonka Space Station'', and ''Tonka Space Station''-onward Wads. Currently only LRR Wad and PWP are understood, with some research into TSS Wad.
=== ''LEGO Rock Raiders'' PC WAD ===
=== ''LEGO Rock Raiders'' PC WAD ===
Format for the PC WAD format used in the Windows version of [[LEGO Rock Raiders (video game)|''LEGO Rock Raiders'']].<ref name="Format WAD"/>
Format for the PC WAD format used in the Windows version of [[LEGO Rock Raiders (video game)|''LEGO Rock Raiders'']].<ref name="Format WAD"/>
Line 8: Line 10:


The game searches for up to ten WAD files while loading, LegoRR0.wad to LegoRR9.wad. The WAD files do not have to have sequential numbers. The contents of WAD files with higher numbers take precedence over those with lower numbers (so if a file with the same name and path is stored in LegoRR0 and LegoRR1, only the file in LegoRR1 will be loaded).
The game searches for up to ten WAD files while loading, LegoRR0.wad to LegoRR9.wad. The WAD files do not have to have sequential numbers. The contents of WAD files with higher numbers take precedence over those with lower numbers (so if a file with the same name and path is stored in LegoRR0 and LegoRR1, only the file in LegoRR1 will be loaded).
''LEGO Rock Raiders''  WAD file names are determined by the name of the game's executable file. When loading, ''LEGO Rock Raiders'' looks for WAD files sharing a name with the game's executable, following the format of <samp><exename>#.wad</samp>. As the game's executable is named <samp>LegoRR.exe</samp> by default, the game looks for WAD files named <samp>LegoRR#.wad</samp> (the same functionality is used with the <code>Lego* {}</code> and <code>LegoRR {}</code> sections in its configuration-format files).<ref name="RRU priority"/>


{| class="wikitable"
{| class="wikitable"
|+ Caption text
|+ WAD header
|-
|-
! Type !! Value !! Description
! Type !! Value !! Description
Line 18: Line 22:
| uint32 || Count || Number of file entries in the WAD file.
| uint32 || Count || Number of file entries in the WAD file.
|-
|-
| cstring[] || Names || Relative file entry paths within the WAD file ("Relative directories" or "Reldirs"). Example: <code>Languages\ObjectiveText.txt</code>.
| cstring[] || Names || Relative file entry paths within the WAD file ("Relative directories" or "Reldirs").<br>
Example: <code>Languages\ObjectiveText.txt</code>
|-
|-
| cstring[] || BuildNames || Absolute paths of files used when
| cstring[] || BuildNames || Original file paths used when building the WAD file ("Absolute directories" or "Absdirs"). These have no effect on the actual WAD data.<br>
building the WAD file ("Absolute directories" or "Absdirs"). Example: <code>\\ROBW\C\Dev\SourceSafe\Lego\Languages\0009-English\Data\Languages\ObjectiveText.txt</code>.
Example: <code>\\ROBW\C\Dev\SourceSafe\Lego\Languages\0009-English\Data\Languages\ObjectiveText.txt</code>
|-
|-
| Entry[] || Entries || File entry storage metadata (Location, size, and storage format). See below table for more information.
| Entry[] || Entries || File entry storage metadata (Location, size, and storage format). See below table for more information.
Line 29: Line 34:
Each file entry is 16 bytes, containing four 32-bit integer values.
Each file entry is 16 bytes, containing four 32-bit integer values.
{| class="wikitable"
{| class="wikitable"
|+ Caption text
|+ File entry structure
|-
|-
! Type !! Value !! Description
! Type !! Value !! Description
|-
|-
| uint32 || Flags || Flag determining  
| uint32 || Flags || Flag determining what storage format the WAD uses. <code>01</code> for Store (uncompressed), <code>02</code> for [https://segaretro.org/Rob_Northen_compression Rob Northern compression] (RNC). The game does not check for the Store flag, rather it checks ''against'' the RNC flag.<ref name="Format WAD"/> RNC is not known to be used in ''LEGO Rock Raiders'', but it may be used in some ''Conquest Earth'' WADs. For more information on RNC, see [https://segaretro.org/Rob_Northen_compression Sega Retro] and [https://moddingwiki.shikadi.net/wiki/Rob_Northern_Compression ModdingWiki].
<code>01</code> for Store (uncompressed), <code>02</code> for [https://segaretro.org/Rob_Northen_compression Rob Northern compression] (RNC). The game does not check for the Store flag, rather it checks ''against'' the RNC flag. RNC is not known to be used in ''LEGO Rock Raiders''.
|-
|-
| uint32 || PackedSize || Example
| uint32 || PackedSize || The packed size each file's data in bytes. If the WAD entry is uncompressed, this entry must be identical to UnpackedSize.<ref name="Format WAD"/>
|-
|-
| uint32 || UnpackedSize || Example
| uint32 || UnpackedSize || The original unpacked size of each file in bytes.
|-
|-
| uint32 || Offset || Example
| uint32 || Offset || The absolute offset in bytes from the start of the WAD to each file's data.
|}
|}
[[Category:LEGO Rock Raiders]]
=== PlayStation Padded Wad ===


== References ==
== References ==
{{Reflist|refs=
{{Reflist|refs=
<ref name="Format WAD">Jordan, Robert [trigger_segfault] (9 July 2021). [https://github.com/trigger-segfault/legorockraiders-analysis/wiki/Format:-WAD-file "Format: WAD file"]. ''LEGO Rock Raiders Assembly Analysis wiki''. [[Wikipedia:GitHub|GitHub]]. [https://web.archive.org/web/2/https://github.com/trigger-segfault/legorockraiders-analysis/wiki/Format:-WAD-file Archived] from the original on 15 July 2023.</ref>
<ref name="Format WAD">Jordan, Robert [trigger_segfault] (9 July 2021). [https://github.com/trigger-segfault/legorockraiders-analysis/wiki/Format:-WAD-file "Format: WAD file"]. ''LEGO Rock Raiders Assembly Analysis wiki''. [[Wikipedia:GitHub|GitHub]]. [https://web.archive.org/web/2/https://github.com/trigger-segfault/legorockraiders-analysis/wiki/Format:-WAD-file Archived] from the original on 15 July 2023.</ref>
<ref name="RRU priority">(9 July 2021). [https://rockraidersunited.com/topic/234-no-wads-or-10-wads/?do=findComment&comment=141160 " I can clarify a bit more on some of the loose ends like the CD priority, and expand on some information..."] (comment on forum topic "NO WADS! or 10 Wads"). [https://web.archive.org/web/20240220101608/https://rockraidersunited.com/topic/234-no-wads-or-10-wads/page/3/#comment-141160 Archived] from the original on 20 February 2024.</ref>
}}
}}
[[Category:Data Design Interactive]]
[[Category:LEGO Rock Raiders file formats]]

Revision as of 12:31, 20 February 2024

DDI Wad is an archive file format developed by Data Design Interactive for storing files in video games. The format was first used in their 1997 game Conquest Earth. DDI Wad files usually use the file extension .wad. The format is unrelated to Doom WAD or Wii WAD files.

File formats

There are currently five known WAD formats: Conquest Earth Wad, LEGO Rock Raiders Wad, PlayStation Padded Wad for LEGO Rock Raiders, PWP for Tonka Space Station, and Tonka Space Station-onward Wads. Currently only LRR Wad and PWP are understood, with some research into TSS Wad.

LEGO Rock Raiders PC WAD

Format for the PC WAD format used in the Windows version of LEGO Rock Raiders.[1]

LEGO Rock Raiders uses two WAD files by default. These files are located in the game's install directory along with its executable file. LegoRR0.wad stores the majority of the game's data, while LegoRR1.wad stores the Main Lego Config File and language-related files. Additional streamed files are also stored in the Data folder, while streamed FMV files are stored in a separate Data folder on the game's disc.

The game searches for up to ten WAD files while loading, LegoRR0.wad to LegoRR9.wad. The WAD files do not have to have sequential numbers. The contents of WAD files with higher numbers take precedence over those with lower numbers (so if a file with the same name and path is stored in LegoRR0 and LegoRR1, only the file in LegoRR1 will be loaded).

LEGO Rock Raiders WAD file names are determined by the name of the game's executable file. When loading, LEGO Rock Raiders looks for WAD files sharing a name with the game's executable, following the format of <exename>#.wad. As the game's executable is named LegoRR.exe by default, the game looks for WAD files named LegoRR#.wad (the same functionality is used with the Lego* {} and LegoRR {} sections in its configuration-format files).[2]

WAD header
Type Value Description
char[4] "WWAD" ASCII file signature. Always WWAD for PC WAD files.
uint32 Count Number of file entries in the WAD file.
cstring[] Names Relative file entry paths within the WAD file ("Relative directories" or "Reldirs").

Example: Languages\ObjectiveText.txt

cstring[] BuildNames Original file paths used when building the WAD file ("Absolute directories" or "Absdirs"). These have no effect on the actual WAD data.

Example: \\ROBW\C\Dev\SourceSafe\Lego\Languages\0009-English\Data\Languages\ObjectiveText.txt

Entry[] Entries File entry storage metadata (Location, size, and storage format). See below table for more information.

Each file entry is 16 bytes, containing four 32-bit integer values.

File entry structure
Type Value Description
uint32 Flags Flag determining what storage format the WAD uses. 01 for Store (uncompressed), 02 for Rob Northern compression (RNC). The game does not check for the Store flag, rather it checks against the RNC flag.[1] RNC is not known to be used in LEGO Rock Raiders, but it may be used in some Conquest Earth WADs. For more information on RNC, see Sega Retro and ModdingWiki.
uint32 PackedSize The packed size each file's data in bytes. If the WAD entry is uncompressed, this entry must be identical to UnpackedSize.[1]
uint32 UnpackedSize The original unpacked size of each file in bytes.
uint32 Offset The absolute offset in bytes from the start of the WAD to each file's data.

References

  1. 1.0 1.1 1.2 Jordan, Robert [trigger_segfault] (9 July 2021). "Format: WAD file". LEGO Rock Raiders Assembly Analysis wiki. GitHub. Archived from the original on 15 July 2023.
  2. (9 July 2021). " I can clarify a bit more on some of the loose ends like the CD priority, and expand on some information..." (comment on forum topic "NO WADS! or 10 Wads"). Archived from the original on 20 February 2024.