Editing Paired ARC+DIR file

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
'''ARC''' files (short for '''Archive''') and '''DIR''' files (internally named '''Bundle''' ; not to be confused with [[BUN file|'''BUN''' files]]) make up one of ''Pikmin''<nowiki>'s</nowiki> proprietary data storage formats. The '''DIR''' file contains all necessary information about the data in the '''ARC''' file, which stores the aforementioned data.
+
'''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, the Bundled Archive file format was used to reduce load time by packing several files into one. The purpose it serves is different from the [[BUN file|bundle]] archive, however, as standalone files within the archive can be read independently of the files before it.  This makes the Bundled Archive file format useful for archiving large directories with varied purposes, as to its name.
+
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__
Line 9: Line 9:
  
 
=== DIR ===
 
=== DIR ===
DIR files consist of a header followed by a repeating entry for each mock-filepath.
+
DIR files consist of a header followed by a repeating struct for each mock-filepath.
  
 
Here is <code>/dataDir/archives/pelletsbin.dir</code> annotated for reference.
 
Here is <code>/dataDir/archives/pelletsbin.dir</code> annotated for reference.
Line 21: Line 21:
 
| 0x00 || 4 || Size of DIR file
 
| 0x00 || 4 || Size of DIR file
 
|-
 
|-
| 0x04 || 4 || Number of entries
+
| 0x04 || 4 || Number of structs
 
|-
 
|-
 
|}
 
|}
  
 
{| class="wikitable"  
 
{| class="wikitable"  
|+ Mock-directory entry
+
|+ Mock-directory struct
 
! Offset || Size || Purpose
 
! Offset || Size || Purpose
 
|-
 
|-
Line 43: Line 43:
  
 
=== ARC ===
 
=== ARC ===
Here is <code>/dataDir/archives/pelletsbin.arc</code> annotated to show how mapping the ARC file would look like with information from the corresponding DIR. 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.
+
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> padding ====
 
==== <code>0xCC</code> padding ====
Files in the ARC always have padding to nearest multiple of 32, or 0x20. This is because data loading into the Gamecube's register's in multiples of 32 is an optimization.
+
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 ==
 
== Extra information ==
Every paired Bundled Archive file archive has an uncompressed copy elsewhere on the disc.
+
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 are an indicator to the archiving tool to bundle the directory's contents.
+
* 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.
 
* 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.   
 
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.   
  
Bundled Archives that have "bin" in their filename only contain the '''BIN''' files from their respective directory.
+
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 [[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.
  
{{Credits|[[User:Minty_Meeo|Minty_Meeo]], [[User:Patrick_Anton|Ambrosia]]}}
+
{{Credits|[[User:Minty_Meeo|Minty_Meeo]]}}
  
 
[[Category:Pikmin]]
 
[[Category:Pikmin]]
 
[[Category:File formats]]
 
[[Category:File formats]]

Please note that all contributions to Pikmin Technical Knowledge Base are considered to be released under the Creative Commons Attribution-ShareAlike (see Pikmin Technical Knowledge Base:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Template used on this page: