Difference between revisions of "Paired ARC+DIR file"
m (Espyo moved page Pikmin Paired ARC+DIR Files to Paired ARC+DIR file without leaving a redirect: Consistency.) |
m (Minor cleanup.) |
||
Line 1: | Line 1: | ||
− | '''ARC''' files (likely short for '''Archive''') and '''DIR''' files (technically short for '''Bundle''', though '''Directory''' makes more sense and avoids conflict with [[ | + | '''ARC''' files (likely short for '''Archive''') and '''DIR''' files (technically short for '''Bundle''', though '''Directory''' makes more sense and avoids conflict with [[BUN file|'''BUN''' files]]) are two peas in a pod, together representing one of the many Binary Large Object (BLOB) archive formats used in ''[[Pikmin]]''. Together, they will henceforth be referred to as the ''paired ARC+DIR file'' archive. |
− | |||
− | |||
+ | With minimal metadata, {{unsure|the paired ARC+DIR file archive was likely used to reduce load time by packing several files into one}}. The purpose it serves is different from the [[BUN file|bundle]] archive, however, {{unsure|as standalone files within the archive can be unpacked independently of the files before it}}. This makes the paired ARC+DIR file useful for archiving large directories with varied purposes. | ||
__TOC__ | __TOC__ | ||
+ | == File structure == | ||
+ | As mentioned before, the paired ARC+DIR file archive consists of two files: the mock-directory (DIR) and the BLOB archive (ARC). Think of the mock-directory as a map to navigate through the BLOB archive. | ||
− | + | === DIR === | |
− | |||
− | |||
− | ===DIR=== | ||
DIR files consist of a header followed by a repeating struct for each mock-filepath. | DIR files consist of a header followed by a repeating struct for each mock-filepath. | ||
− | Here is <code> | + | Here is <code>/dataDir/archives/pelletsbin.dir</code> annotated for reference. |
[[File:DIR_file_documentation.png]][[File:Minty_Meeo_Documentation_Legend.png]] | [[File:DIR_file_documentation.png]][[File:Minty_Meeo_Documentation_Legend.png]] | ||
Line 28: | Line 26: | ||
{| class="wikitable" | {| class="wikitable" | ||
− | |+ Mock- | + | |+ Mock-directory struct |
! Offset || Size || Purpose | ! Offset || Size || Purpose | ||
|- | |- | ||
Line 35: | Line 33: | ||
| 0x04 || 4 || Size of file in ARC | | 0x04 || 4 || Size of file in ARC | ||
|- | |- | ||
− | | 0x08 || 4 || Mock- | + | | 0x08 || 4 || Mock-directory string length |
|- | |- | ||
− | | 0x0C || 0x08 value || Mock- | + | | 0x0C || 0x08 value || Mock-directory path |
|- | |- | ||
|} | |} | ||
− | ====Mock- | + | ==== Mock-directory ==== |
The DIR file emulates filepaths. When a file is unpacked in-game, it is assumed that whatever code is responsible treats the entry in the DIR file as a legitimate filepath on the disc, starting from the root. | The DIR file emulates filepaths. When a file is unpacked in-game, it is assumed that whatever code is responsible treats the entry in the DIR file as a legitimate filepath on the disc, starting from the root. | ||
− | ===ARC=== | + | === ARC === |
− | Here is <code> | + | Here is <code>/dataDir/archives/pelletsbin.arc</code> annotated to demonstrate searching the BLOB archive. Without the DIR file as a guide, the only way you could possibly differentiate between files would be with the <code>0xCC</code> padding between files. |
[[File:ARC_file_documentation.png]][[File:Minty_Meeo_Documentation_Legend.png]] | [[File:ARC_file_documentation.png]][[File:Minty_Meeo_Documentation_Legend.png]] | ||
− | ====<code>0xCC</code> | + | ==== <code>0xCC</code> padding ==== |
For whatever reason, files in the ARC are always padded out to have an amount of bytes that is a multiple of 32. These bytes are not included in the file size recorded in the DIR for each file, so the exact purpose of this is unknown. {{unsure|It could be an absolute necessity, or it could be completely unnecessary.}} | For whatever reason, files in the ARC are always padded out to have an amount of bytes that is a multiple of 32. These bytes are not included in the file size recorded in the DIR for each file, so the exact purpose of this is unknown. {{unsure|It could be an absolute necessity, or it could be completely unnecessary.}} | ||
+ | == Extra information == | ||
+ | Every paired ARC+DIR file archive has an uncompressed copy elsewhere on the disc. | ||
+ | * In <code>/dataDir/tekis</code> and <code>/dataDir/bosses</code>, a file named <code>arc_all.ini</code> can be found. These INI files holds nothing, but give us a hint at how the developer's archiving tool functioned. | ||
+ | * It is unknown if every file in the archives is identical to its uncompressed sister file. | ||
+ | In the [[OpenGL / Dolphin System]], many files are not read from the paired ARC+DIR file archives like they are in the final game, and are instead read from the un-archived versions. | ||
− | + | Paired ARC+DIR file archives that have "bin" in their filename curiously only contain the '''BIN''' files from their respective directory. | |
− | |||
− | |||
− | |||
− | |||
− | + | The <code>log.txt</code> files left in the root of [[Pikmin|''Pikmin'' versions USA Demo, USA v1.00, and JPN v1.02]] detail the plugin "[[OpenGL / Dolphin System|plugTexConv]]" creating a paired ARC+DIR file archive. | |
− | |||
− | The <code>log.txt</code> files left in the root of | ||
+ | {{Credits|[[User:Minty_Meeo|Minty_Meeo]]}} | ||
[[Category:Pikmin]] | [[Category:Pikmin]] | ||
[[Category:File formaats]] | [[Category:File formaats]] | ||
− |
Revision as of 17:23, 30 June 2018
ARC files (likely short for Archive) and DIR files (technically short for Bundle, though Directory makes more sense and avoids conflict with BUN files) are two peas in a pod, together representing one of the many Binary Large Object (BLOB) archive formats used in Pikmin. Together, they will henceforth be referred to as the paired ARC+DIR file archive.
With minimal metadata, the paired ARC+DIR file archive was likely used to reduce load time by packing several files into one[unsure]. The purpose it serves is different from the bundle archive, however, as standalone files within the archive can be unpacked independently of the files before it[unsure]. This makes the paired ARC+DIR file useful for archiving large directories with varied purposes.
Contents
File structure
As mentioned before, the paired ARC+DIR file archive consists of two files: the mock-directory (DIR) and the BLOB archive (ARC). Think of the mock-directory as a map to navigate through the BLOB archive.
DIR
DIR files consist of a header followed by a repeating struct for each mock-filepath.
Here is /dataDir/archives/pelletsbin.dir
annotated for reference.
Offset | Size | Purpose |
---|---|---|
0x00 | 4 | Size of DIR file |
0x04 | 4 | Number of structs |
Offset | Size | Purpose |
---|---|---|
0x00 | 4 | Offset of file in ARC |
0x04 | 4 | Size of file in ARC |
0x08 | 4 | Mock-directory string length |
0x0C | 0x08 value | Mock-directory path |
Mock-directory
The DIR file emulates filepaths. When a file is unpacked in-game, it is assumed that whatever code is responsible treats the entry in the DIR file as a legitimate filepath on the disc, starting from the root.
ARC
Here is /dataDir/archives/pelletsbin.arc
annotated to demonstrate searching the BLOB archive. Without the DIR file as a guide, the only way you could possibly differentiate between files would be with the 0xCC
padding between files.
0xCC
padding
For whatever reason, files in the ARC are always padded out to have an amount of bytes that is a multiple of 32. These bytes are not included in the file size recorded in the DIR for each file, so the exact purpose of this is unknown. It could be an absolute necessity, or it could be completely unnecessary.[unsure]
Extra information
Every paired ARC+DIR file archive has an uncompressed copy elsewhere on the disc.
- In
/dataDir/tekis
and/dataDir/bosses
, a file namedarc_all.ini
can be found. These INI files holds nothing, but give us a hint at how the developer's archiving tool functioned. - It is unknown if every file in the archives is identical to its uncompressed sister file.
In the OpenGL / Dolphin System, many files are not read from the paired ARC+DIR file archives like they are in the final game, and are instead read from the un-archived versions.
Paired ARC+DIR file archives that have "bin" in their filename curiously only contain the BIN files from their respective directory.
The log.txt
files left in the root of Pikmin versions USA Demo, USA v1.00, and JPN v1.02 detail the plugin "plugTexConv" creating a paired ARC+DIR file archive.