Changes

1,640 bytes added ,  07:10, 19 August 2017
Line 5: Line 5:     
RomFS structure:
 
RomFS structure:
* "MetaDataContentHeader.bin": Unknown, size is 0x44-bytes.
+
* "MetaDataContentHeader.bin": Describes the number of themes and languages in the control content.
 
* "ContentInfoArchive_<region>_<lang>.bin" Contains the list of ''all'' DLC content available under this DLC title(which can include DLC that's not yet accessible via the shop). <region> can be "USA", etc. <lang>, for the US title: "en", "es", "fr", and "pt".
 
* "ContentInfoArchive_<region>_<lang>.bin" Contains the list of ''all'' DLC content available under this DLC title(which can include DLC that's not yet accessible via the shop). <region> can be "USA", etc. <lang>, for the US title: "en", "es", "fr", and "pt".
 
* "icons/<decimal_id>.icn" Contains the raw DLC icon image data, without any header. 48x48 tiled RGB565.
 
* "icons/<decimal_id>.icn" Contains the raw DLC icon image data, without any header. 48x48 tiled RGB565.
   −
ContentInfoArchive entry format, size 0xC8(this file contains the following entry for each of the DLC content):
+
The below structures are little-endian.
 +
 
 +
MetaDataContentHeader.bin format:
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 18: Line 20:  
| 0x0
 
| 0x0
 
| 0x4
 
| 0x4
| Content index - 1
+
| Version - always 0x1
 
|-
 
|-
 
| 0x4
 
| 0x4
 
| 0x4
 
| 0x4
| 0x0 = disabled, 0x1 = enabled.
+
| Number of enabled themes
 
|-
 
|-
 
| 0x8
 
| 0x8
 +
| 0x4
 +
| Total number of themes
 +
|-
 +
| 0xC
 +
| 0x4
 +
| Observed 0x300030
 +
|-
 +
| 0x10
 +
| 0x4
 +
| Magic, 0xDEADBEEF
 +
|-
 +
| 0x14..0x2C
 +
| 0x2
 +
| This data is sorted by region (JPN at 0x14, US at 0x18, etc.). This is the target region.
 +
|-
 +
| 0x16..0x2E
 +
| 0x2
 +
| Primary language for region? (0x0 for JPN, 0x1 for US and EU)
 +
|-
 +
| 0x30
 +
| 0x4
 +
| Number of ContentInfoArchive languages
 +
|-
 +
| 0x34+i
 +
| 0x2
 +
| ContentInfoArchive [[Nandrw/sys/SecureInfo_A|region]]
 +
|-
 +
| 0x36+i
 +
| 0x2
 +
| ContentInfoArchive [[Config_Savegame#Languages|language]]
 +
|}
 +
 +
ContentInfoArchive header format, size 0x08:
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Relative offset
 +
!  Size
 +
!  Description
 +
|-
 +
| 0x0
 +
| 0x4
 +
| Version? - always 0x1
 +
|-
 +
| 0x4
 +
| 0x4
 +
| Number of theme entries that follow.
 +
|}
 +
 +
ContentInfoArchive theme entry format, size 0xC8 (the file contains the following entry for each of the DLC themes):
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Relative offset
 +
!  Size
 +
!  Description
 +
|-
 +
| 0x0
 
| 0x40
 
| 0x40
 
| char string for the title text.
 
| char string for the title text.
 
|-
 
|-
| 0x48
+
| 0x40
| 0x88
+
| 0x80
 
| char string for the description text.
 
| char string for the description text.
 +
|-
 +
| 0xC0
 +
| 0x4
 +
| Content index
 +
|-
 +
| 0xC4
 +
| 0x4
 +
| 0x0 = disabled, 0x1 = enabled.
 
|}
 
|}
   −
The first entry is a "header": contentindex val=1, second word = <total DLC content excluding DLC control content>. The two strings are set to dummy text.
+
The first entry is set to dummy text, "content index" of 0 (invalid), and disabled.
    
=Theme Content=
 
=Theme Content=
 
RomFS structure:
 
RomFS structure:
* "bgm.bcstm": Background music, see [[CSTRM|here]].
+
* "bgm.bcstm": Background music, see [[BCSTM|here]].
 
* "body_LZ.bin": LZ11 compressed blob containing the rest of the theme data(graphics + optional [[BCWAV|CWAVs]]).
 
* "body_LZ.bin": LZ11 compressed blob containing the rest of the theme data(graphics + optional [[BCWAV|CWAVs]]).
   Line 77: Line 143:  
| 0x18
 
| 0x18
 
| 0x4
 
| 0x4
| Top screen texture offset, see below.
+
| Top screen texture offset, if draw-type has value 2 this offset points to texture5
 
|-
 
|-
 
| 0x1C
 
| 0x1C
 
| 0x4
 
| 0x4
| Additional top-screen texture offset, used with draw-type has value 2. This is optional when using draw-type val2.
+
| Additional top-screen texture offset, used with draw-type has value 2, this offset points to texture6. This is optional when using draw-type val2.
 
|-
 
|-
 
| 0x20
 
| 0x20
Line 117: Line 183:  
| 0x40
 
| 0x40
 
| 0x4
 
| 0x4
| Offset to the data for texture6.
+
| Offset to the data for texture7.
 
|-
 
|-
 
| 0x44
 
| 0x44
 
| 0x4
 
| 0x4
| Offset to the data for texture7.
+
| Offset to the data for texture8.
 
|-
 
|-
 
| 0x48
 
| 0x48
Line 137: Line 203:  
| 0x54
 
| 0x54
 
| 0x4
 
| 0x4
| Offset to the data for texture8.
+
| Offset to the data for texture9.
 
|-
 
|-
 
| 0x58
 
| 0x58
 
| 0x4
 
| 0x4
| Offset to the data for texture9.
+
| Offset to the data for texture10.
 
|-
 
|-
 
| 0x5C
 
| 0x5C
Line 310: Line 376:  
| 64x64
 
| 64x64
 
| 64x64
 
| 64x64
| This is used with the top-screen when top-screen draw-type is val2, see above. Used to tile the top screen in much the same way as the white squares that appear when no theme is selected.
+
| This is used with the top-screen when top-screen draw-type is val2, see above. Used to tile the top screen in much the same way as the white squares that appear when no theme is selected, this is the moving pattern, it is rotated 90 degrees.
 
|-
 
|-
 
| 6
 
| 6
 +
| Tiled A8
 +
| 64x64
 +
| 64x64
 +
| This is used with the top-screen when top-screen draw-type is val2, see above. Used to tile the top screen in much the same way as the white squares that appear when no theme is selected, this is the still pattern, it is rotated 90 degrees.
 +
|-
 +
| 7
 
| Tiled BGR888
 
| Tiled BGR888
 
| 74x64
 
| 74x64
Line 318: Line 390:  
| This is used for folder's on the main menu.
 
| This is used for folder's on the main menu.
 
|-
 
|-
| 7
+
| 8
 
| Tiled BGR888
 
| Tiled BGR888
 
| 82x64
 
| 82x64
Line 324: Line 396:  
| This is used for open folder's on the main menu.
 
| This is used for open folder's on the main menu.
 
|-
 
|-
| 8
+
| 9
 
| Tiled BGR888
 
| Tiled BGR888
 
| 36x72
 
| 36x72
Line 330: Line 402:  
| This is used for 48x48 icon borders on the main menu.
 
| This is used for 48x48 icon borders on the main menu.
 
|-
 
|-
| 9
+
| 10
 
| Tiled BGR888
 
| Tiled BGR888
 
| 25x50
 
| 25x50
Line 346: Line 418:  
| 0x0
 
| 0x0
 
| 0x4
 
| 0x4
| Unknown
+
| Unknown  
 
|-
 
|-
 
| 0x4
 
| 0x4
Line 354: Line 426:  
| 0x8
 
| 0x8
 
|  
 
|  
| Beginning of the audio data entries.
+
| Beginning of the audio data entries.Each .cwav has an 8 byte "header" before the "Magic" (cwav) the first two bytes tell the 3ds where the next audio entry isand is the same as its cwav's filesize (See below). Bytes 3 + 4 are zeroes and byte 5 controls the cwav's volume (0-100) the last three bytes are zeroes again
 
|}
 
|}
   Line 424: Line 496:  
* 5: When cursor is moved a screen-worth of icons across
 
* 5: When cursor is moved a screen-worth of icons across
 
* 6: Folder buttons
 
* 6: Folder buttons
 +
    
=Built-in themes=
 
=Built-in themes=
 
The built-in themes are stored at Home Menu RomFS:/theme/<Color>_LZ.bin, the format appears to be the same as body_LZ.bin in the theme DLC content.
 
The built-in themes are stored at Home Menu RomFS:/theme/<Color>_LZ.bin, the format appears to be the same as body_LZ.bin in the theme DLC content.