Changes

Adding part B header
Line 18: Line 18:  
|- style="background-color: #ddd;"
 
|- style="background-color: #ddd;"
 
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | variable, padded to 64-byte boundary
 
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | variable, padded to 64-byte boundary
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #edd;" | Part B: Encrypted channel logo/preview
+
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #edd;" | Part B: Encrypted banner
 
|- style="background-color: #ddd;"
 
|- style="background-color: #ddd;"
 
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | 0x70, padded to 64-byte boundary
 
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | 0x70, padded to 64-byte boundary
Line 179: Line 179:  
For Metroid Prime 3 Preview, this field was not completely zero. The three bytes with positions 0x313, 0x367 and 0x3BB was 0x20 instead of 0. My guess is that this doesn't matter, but then again, it could have something to do with the weird IMET data of MP3preview.
 
For Metroid Prime 3 Preview, this field was not completely zero. The three bytes with positions 0x313, 0x367 and 0x3BB was 0x20 instead of 0. My guess is that this doesn't matter, but then again, it could have something to do with the weird IMET data of MP3preview.
   −
===Part B: Encrypted channel logo/preview===
+
===Part B: Encrypted banner===
   −
This part is is also encrypted by the SD key and SD IV. The precise format of this part has not yet been fully analyzed. It seems to contain code/data for displaying the animated logo/channel preview in the channel selector.
+
This part is is also encrypted by the SD key and SD IV. It contains a small header followed by LZ77 compressed data. The compressed data is presumably the opening banner (the animated logo/channel preview in the channel selector), and it is similar to at least a part of the file [[opening.bnr]].
   −
: This part is compressed using a LZ77 like algorithm (just like the Nintendo DS). Here ([[Content.bin Part B decompresser|local]] & [http://pastebin.com/f43e9b2cc mirror]) is a little snippet of code to decompress it (uses XXXX_02_gameinfo.bin files as output by [[User:Magicus|Magicus]] [[parse-channel.c]], downloadable here). This code is NOT fully functional, because sometimes the algorithm request data not present in the buffer, and fills it with 'X' instead. Maybe someone can fix it, I think it's not difficult ;) [[User:Arcnor|Arcnor]] 21:40, 27 February 2008 (GMT)
+
{| style="border-collapse: collapse; padding: 0.2em 0.2em 0.2em 0.2em;"
 +
|- style="background-color: #ddd;"
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #cdc;" | '''Start'''
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ccd;" | '''End'''
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ccc;" | '''Length'''
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #dcc;" | '''Description'''
 +
|- style="background-color: #ddd;"
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ded;" | 0x000
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #dde;" | 0x003
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | 4
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #edd;" | IMD5 header "IMD5"
 +
|- style="background-color: #ddd;"
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ded;" | 0x004
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #dde;" | 0x007
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | 4
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #edd;" | * Size.
 +
|- style="background-color: #ddd;"
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ded;" | 0x008
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #dde;" | 0x00F
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | 8
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #edd;" | Zeroes
 +
|- style="background-color: #ddd;"
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ded;" | 0x010
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #dde;" | 0x01F
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | 16
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #edd;" | Crypto usage (?). Could be an MD5 sum.
 +
|- style="background-color: #ddd;"
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ded;" | 0x020
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #dde;" | 0x023
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | 4
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #edd;" | LZ77 tag "LZ77"
 +
|- style="background-color: #ddd;"
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ded;" | 0x024
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #dde;" | 0x027
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | 4
 +
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #edd;" | * Unknown (flags?).
 +
|}
 +
 
 +
 
 +
* Size.
 +
This value is the size of Part B (as stored in Part A), minus 32 bytes. Another way to see this is as the size from (and including) the LZ77 header.
 +
 
 +
* Unknown (flags?).
 +
There is some kind of pattern to this field, but it's not obvious what it is. The first byte always seem to be 0x10. The last byte is almost always 0x00, but has been seen to be 0x01 in Internet Channel and Mii Contest. This could indicate some kind of flags.
 +
 
 +
: The remaining part is compressed using a LZ77 like algorithm (just like the Nintendo DS). Here ([[Content.bin Part B decompresser|local]] & [http://pastebin.com/f43e9b2cc mirror]) is a little snippet of code to decompress it (uses XXXX_02_gameinfo.bin files as output by [[User:Magicus|Magicus]] [[parse-channel.c]], downloadable here). This code is NOT fully functional, because sometimes the algorithm request data not present in the buffer, and fills it with 'X' instead. Maybe someone can fix it, I think it's not difficult ;) [[User:Arcnor|Arcnor]] 21:40, 27 February 2008 (GMT)
 
:: The latest version of [[parse_channel.c]] now properly handles LZ77 compression. Thanks for the hint! [[User:Magicus|Magicus]] 10:23, 1 March 2008 (PST)
 
:: The latest version of [[parse_channel.c]] now properly handles LZ77 compression. Thanks for the hint! [[User:Magicus|Magicus]] 10:23, 1 March 2008 (PST)
  
68

edits