In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Changes

Jump to navigation Jump to search
1,588 bytes added ,  02:28, 20 April 2008
Mostly formatting changes but highlighting areas that need updating where new info is found.
Line 1: Line 1:  
'''Opening.bnr''' is a file related to Wii homebrew development. The file is one of the first read by the Wii when a new DVD is inserted, and it is used to display the banner (the channel animation). Even though it shares the name with the file on the GameCube, the content of the file has no resemblance to the GC Opening.bnr file.
 
'''Opening.bnr''' is a file related to Wii homebrew development. The file is one of the first read by the Wii when a new DVD is inserted, and it is used to display the banner (the channel animation). Even though it shares the name with the file on the GameCube, the content of the file has no resemblance to the GC Opening.bnr file.
   −
A tool for parsing the opening.bnr and split it into parts for further analysis is available at [[parse-opening.c]].
+
==Description==
 +
Opening.bnr consists of two parts, an IMET header which is (almost) identical to the latter of part A (starting from Zeroes_1) in [[Content.bin]] (see [[Content.bin file structure]]). However, the last 16 bytes contain some randomly-looking bytes, most likely an MD5 sum.
   −
==Description==
+
Opening.bnr is also stored in the console specific encrypted area of content.bin (a copy of icon.bin is in the SD encrypted area). For some of the channels a generic opening.bnr (which doesn't resemble the actual banner) is stored in the NAND under the \META tree as TITLE.MET. Their purpose is unknown.
Opening.bnr consists of two parts, a header which is (almost) identical to the latter of part A (starting from Zeroes_1) in [[Content.bin]] (see [[Content.bin file structure]]). However, the last 16 bytes contain some randomly-looking bytes, most likely an MD5 sum.
+
The proper ones can be found in the unencrypted NAND as one of the .app files, however currently there doesn't appear to be any logic to which one is which.  Also some of those the offset to the IMET header is at 0x80 instead of 0x40.
    
After the header follows an [[U8 archive]]. This is an archive consisting of the following contents:
 
After the header follows an [[U8 archive]]. This is an archive consisting of the following contents:
<pre>
  −
/meta/
  −
/meta/banner.bin
  −
/meta/icon.bin
  −
/meta/sound.bin
  −
</pre>
     −
The banner.bin and icon.bin files are LZ77 compressed U8 archives themselves, each with an IMD5 header, containing the MD5 of the file. 
     −
More information on LZ77 compression can be found on [http://en.wikipedia.org/wiki/LZ77_and_LZ78 Wikipedia].
+
{{ Table }}
 +
{{ Table/Header | Full Path | Description }}
 +
{{ Table/Row | /meta/ | Directory }}
 +
{{ Table/Row | [[#banner.bin and icon.bin|/meta/banner.bin]] | Contains the images and animation displayed when the channel is selected. }}
 +
{{ Table/Row | [[#banner.bin and icon.bin|/meta/icon.bin]] | Contains the images and animation displayed when the channel is in the menu. }}
 +
{{ Table/Row | [[#sound.bin|/meta/sound.bin]] | Contains the audio that is played when the channel is selected. }}
 +
|}
 +
 
 +
==banner.bin and icon.bin==
 +
The banner.bin and icon.bin files are LZ77 compressed [[U8 archive|U8 archives]] themselves, each with an IMD5 header, containing the MD5 of the file.
 +
 
 +
More information on LZ77 compression can be found on [http://en.wikipedia.org/wiki/LZ77_and_LZ78 Wikipedia].  Example C# source is available in the [[#Tools and Example Source|Tools and Example Source]] section.
    
The banner.bin and icon.bin U8 archives have a file format like this:
 
The banner.bin and icon.bin U8 archives have a file format like this:
Line 29: Line 34:  
</pre>
 
</pre>
   −
The TPL files are textures. They can be read by the tplx program from the gcube library. gcube can be found here: http://gcube.exemu.net/, however, the download link to the source is broken. A mirror of version 0.4 (which is, strangely enough, a newer version than what's on the homepage...) is available here: http://download.chinaunix.net/down.php?id=6661&ResourceID=3477&site=1. The format is also described in [[YAGCD]] at http://pabut.homeip.net:8000/yagcd/chap14.html#sec14.4.
+
===TPL Files===
 +
The TPL files are textures. They can be read by the tplx program from the gcube library.
   −
==brlan Files==
      +
The format is also described in [[YAGCD]] at http://pabut.homeip.net:8000/yagcd/chap14.html#sec14.4.
 +
 +
===brlan Files===
 +
'''Outdated info - in progress of being updated''':
 
The brlan files (located in the "anim" folder), are some kind of animation scripts. There could be multiple scripts, for example:
 
The brlan files (located in the "anim" folder), are some kind of animation scripts. There could be multiple scripts, for example:
 
   Banner_Start.brlan
 
   Banner_Start.brlan
Line 64: Line 73:  
</pre>
 
</pre>
   −
 
+
===brlyt Files (Layout)===
==brlyt Files (Layout)==
+
'''Outdated info - in progress of being updated''':
 
The blyt-file contains information about every object, what file it is in, index in file (a TPL can hold more than 1 picture), plus a bunch of unknown properties.
 
The blyt-file contains information about every object, what file it is in, index in file (a TPL can hold more than 1 picture), plus a bunch of unknown properties.
 
I've also found if-statements in the bottom of the .brlyt file. They change the objects depending on what language your system uses (either TM or (R)).
 
I've also found if-statements in the bottom of the .brlyt file. They change the objects depending on what language your system uses (either TM or (R)).
 +
    
The data structure worked out so far has been (as with brlan, only icon.bin has been used so far):
 
The data structure worked out so far has been (as with brlan, only icon.bin has been used so far):
Line 129: Line 139:     
==sound.bin==
 
==sound.bin==
 +
sound.bin has an IMD5 header, currently 3 formats have been discovered.
   −
sound.bin has an IMD5 header, and can be of at least 3 formats, BNS, RIFF (wav), and AIFF. (RIFF and AIFF have been seen LZ77 compressed)
  −
  −
The BNS format is similar to the brstm format found in Wii games, however it has a few differences.
  −
* The HEAD section is called INFO and is shorter.
  −
* Stereo files are split as separate channels and not interleaved.
  −
* The BNS files appear to always in the NGC-DSP ADPCM format, whereas the BRSTMs can be 8bit or 16bit Big Endian PCM.
  −
  −
A C# Class that outputs the raw data to the temp dir can be found here: [http://pastebin.com/f34b2d3f0 BNRSound.cs]
      +
{{ Table }}
 +
{{ Table/Header | Format | Hex Identifier |  Description }}
 +
{{ Table/Row | BNS | 0x42 0x4E 0x53 0x20 (BNS ) | Similar to the brstm format, always in the NGC-DSP ADPCM format, supports having an intro sound and a loop point. }}
 +
{{ Table/Row | WAV | 0x52 0x49 0x46 0x46 (RIFF) | Standard wav/pcm format, only plays once. Can be LZ77 compressed. }}
 +
{{ Table/Row | AIFF | 0x46 0x4F 0x52 0x4D (FORM) | Standard AIFF/pcm format, only plays once. Can be LZ77 compressed. }}
 +
|}
    +
==Tools and Example Source==
   −
==External link==
+
{{ Table }}
*http://pastie.caboo.se/168489
+
{{ Table/Header | Name | Language | Author | Description }}
[[Category:File formats]]
+
{{ Table/Row | [[parse-opening.c]] | C | [[User:magicus|magicus]] | Extracts the contents of the opening.bnr file to a file structure. }}
 +
{{ Table/Row | [http://pastebin.com/f30596571 LZ77Stream.cs] | C# | [[User:Atacama|Atacama]] | C# Stream object for decompressing LZ77 Files. }}
 +
{{ Table/Row | [http://pastebin.com/f332ae5e4 BNRSound.cs] | C# | [[User:Atacama|Atacama]] | C# Class which processes sound.bin so it can be read as PCM data. }}
 +
{{ Table/Row | [http://tinyurl.com/62w7kt tplx] | C | monk | Command line tool included with gcube that extracts the textures in tpl files to seperate tga files. }}
 +
{{ Table/Row | [http://pastie.caboo.se/168489 bnrstruct.c] | C | [[User:dasda|dasda]] | [[User:dasda|dasda's]] structures for the brlan and brlyt files }}
 +
|}
21

edits

Navigation menu