Editing BUN 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:
'''BUN''' files (short for '''Bundle''' files) are a Binary Large Object (BLOB) archive format used in ''[[Pikmin]]''.  '''ANM''' files (likely short for '''Animation Folder''') use the structure of BUN files as well.  With minimal metadata, the bundle archive was likely used to reduce load time by packing several files into one.  The purpose they serve is different from the [[Pikmin Paired ARC+DIR Files|Paired ARC+DIR Files]], however, as all of the files within a bundle are unpacked into RAM as soon as one is loaded, as shown by the [[OpenGl / Dolphin System]] it is structurally similar.
+
'''BUN''' files (short for '''Bundle''' files) are a Binary Large Object (BLOB) archive format used in Pikmin 1.  '''ANM''' files (likely short for '''Animation Folder''') use the structure of BUN files as well.  With minimal metadata, {{unsure|the bundle archive was likely used to reduce load time by packing several files into one}}.  The purpose they serve is different from the [[Pikmin Paired ARC+DIR Files|Paired ARC+DIR Files]], however, as all of the files within a bundle are unpacked into RAM as soon as they one is loaded, as shown by the [[OpenGl / Dolphin System]].
 +
 
  
 
__TOC__
 
__TOC__
  
==File structure==
+
 
 +
==File Structure==
 
The bundle file is very simple.  There is a header, followed by a repeating struct for every file contained within the BUN.  Each struct has a subheader and file contained within it.
 
The bundle file is very simple.  There is a header, followed by a repeating struct for every file contained within the BUN.  Each struct has a subheader and file contained within it.
  
Here is <code>/dataDir/bosses/mizu/mizu.anm</code> annotated for reference.
+
Here is <code>root\dataDir\bosses\mizu\mizu.anm</code> annotated for reference.
  
 
[[File:BUN_and_ANM_file_documentation.png]]
 
[[File:BUN_and_ANM_file_documentation.png]]
 
[[File:Minty_Meeo_Documentation_Legend.png]]
 
[[File:Minty_Meeo_Documentation_Legend.png]]
  
{| class="wikitable"
+
{| class="wikitable"  
 
|+ Header
 
|+ Header
! Offset || Size || Purpose
+
! Offset || Size || Purpose
 
|-
 
|-
| 0x00 || 4 || Number of structs
+
| 0x00 || 4 || Number of structs
 
|-
 
|-
 
|}
 
|}
  
{| class="wikitable"
+
{| class="wikitable"  
|+ File entry struct
+
|+ File Entry Struct
! Offset || Size || Purpose
+
! Offset || Size || Purpose
 
|-
 
|-
| 0x00 || 4 || File content indicator
+
| 0x00 || 4 || File Content Indicator
 
|-
 
|-
| 0x04 || 4 || Enclosed file size
+
| 0x04 || 4 || Enclosed File Size
 
|-
 
|-
| 0x08 || 4 || Mock-directory string length
+
| 0x08 || 4 || Mock-Directory String Length
 
|-
 
|-
| 0x0c || 0x08 value || Mock-directory path
+
| 0x0c || 0x08 value || Mock-Directory Path
 
|-
 
|-
| 0x0c + 0x08 value || 0x04 value || Enclosed file
+
| 0x0c + 0x08 value || 0x04 value || Enclosed File
 
|-
 
|-
 
|}
 
|}
  
===Mock-directory===
+
 
 +
===Mock-Directory===
 
Similar to the [[Pikmin Paired ARC+DIR Files|Paired ARC+DIR Files]], the bundle archive emulates a folder path.  When the file is unpacked in-game, it is assumed that whatever code is responsible treats the contents of the bundle files as if they were in the folder path described, starting from the root of the disc.
 
Similar to the [[Pikmin Paired ARC+DIR Files|Paired ARC+DIR Files]], the bundle archive emulates a folder path.  When the file is unpacked in-game, it is assumed that whatever code is responsible treats the contents of the bundle files as if they were in the folder path described, starting from the root of the disc.
  
===File content indicator===
+
 
The file content indicator appears to be vestigial in most cases.  However, in-game cutscenes use it to know what type of animation file is being loaded. The following filetypes have been observed to have these values assigned to them:
+
===File Content Indicator===
* 0 = [[PCR file|PCR]]
+
The file content indicator is a seemingly vestigial function.  However, it has been observed that it always is set to specific values that reflect the type of file contained within the struct.
 +
* 0 = [[Pikmin_PCR_Files|PCR]]
 
* 1 = [http://wiki.tockdom.com/wiki/BTI BTI]
 
* 1 = [http://wiki.tockdom.com/wiki/BTI BTI]
 
* 2 = DCA
 
* 2 = DCA
 
* 3 = DCK
 
* 3 = DCK
  
{{Credits|[[User:Minty_Meeo|Minty_Meeo]]|[[User:Patrick_Anton]|Ambrosia]]}}
 
  
 
[[Category:Pikmin]]
 
[[Category:Pikmin]]
 
[[Category:File formats]]
 
[[Category:File formats]]
 +
{{Credits|[[User:Minty_Meeo|Minty_Meeo]]}}

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: