Difference between revisions of "Extended Banner"

From 3dbrew
Jump to navigation Jump to search
(Created page with "== Overview == The Extended Banner format is ridiculously simple. The Extended Banner is used to add text (and optionally an extra texture) to a given banner. It can also (optio...")
 
(Fixed the rest of the offset values)
 
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
== Overview ==
 
== Overview ==
  
The Extended Banner format is ridiculously simple. The Extended Banner is used to add text (and optionally an extra texture) to a given banner. It can also (optionally) be used to set an expiration date for a banner.
+
The Extended Banner format is very simple. The Extended Banner is used to add text (and optionally an extra texture) to a given banner. It can also (optionally) be used to set an expiration date for a banner.
 +
 
 +
See [[Extdata|here]] for how the extended-banners are loaded from extdata. The Home Menu extended-banner loading function will immediately return without loading anything if the programID is for System Settings.
 +
 
 +
=== SpotPass ===
 +
When Home Menu loads extended-banners, it also attempts to load a "[[CBMD]]" banner via [[BOSS_Services|SpotPass]] service commands. Normally this CBMD banner doesn't exist in extended-banner extdata. This is [[BOSS_Services|broken]] with New3DS titles since Home Menu uses these BOSS commands with the New3DS bitmask in the programID set. The common and language-specific(when offset is non-zero) "CGFX" specified by the CBMD are decompressed and processed.
 +
 
 +
The "CGFX" sections in this CBMD are actually the exact same exbanners loaded from normal extdata. The exbanner data from SpotPass is stored to the same state as the extdata-exbanners. No CWAV is loaded from SpotPass data.
 +
 
 +
The exbanners from SpotPass must have a timestamp less than current_datetime, otherwise they won't be parsed. The timestamp for the banner is calculated with: <code>nintimestamp_mktime(out, exbanner->year, exbanner->month, exbanner->day, <hour=23>, <minute = 59>, <second = 59>, <millisecond = 999>);</code>
  
 
== Format ==
 
== Format ==
Line 15: Line 24:
 
|  0x000
 
|  0x000
 
|  0x002
 
|  0x002
|  Texture Width. (if texture is used)
+
|  Texture width (if texture is used)
 
|-
 
|-
 
|  0x002
 
|  0x002
 
|  0x002
 
|  0x002
|  Texture Height. (if texture is used)
+
|  Texture height (if texture is used)
 
|-
 
|-
 
|  0x004
 
|  0x004
 
|  0x002
 
|  0x002
|  Texture Colour Format. (if texture is used)
+
|  Texture colour format (if texture is used)
 
|-
 
|-
0x008
+
0x006
 
|  0x004
 
|  0x004
|  Year to expire (0x34 0x08 if never expires) Convert 2000-2099 (only permitted years) to bytes for value.
+
|  Year to expire
 
|-
 
|-
0x00C
+
0x00A
 
|  0x002
 
|  0x002
|  Month to expire (0x01 if never expires)
+
|  Month to expire
 
|-
 
|-
0x010
+
0x00C
 
|  0x002
 
|  0x002
|  Day to expire (0x01 if never expires)
+
|  Day to expire
 
|-
 
|-
0x014
+
0x00E
0x015
+
0x016
 
|  Name of texture (if texture is used)
 
|  Name of texture (if texture is used)
 
|-
 
|-
 
|  0x024
 
|  0x024
0x255
+
0x200
Plaintext comment to be displayed in the banner on the HOME Menu.
+
Plain text comment (255 character max) to be displayed in the banner on the HOME Menu
 
|-
 
|-
0x2A4
+
0x224
 
|   
 
|   
 
|  If used, this is where the extra texture is located, otherwise file ends.
 
|  If used, this is where the extra texture is located, otherwise file ends.
 
|-
 
|-
 
|}
 
|}
 +
 +
The date used for never-expiring exbanners varies, on retail like with Mii Maker this is December 31, 2099, where year is 0x833, month is 0xC, and day is 0x1F. The expiration-timestamp is only used for SpotPass exbanners, not extdata-exbanners.
  
 
== Texture Colour Formats ==
 
== Texture Colour Formats ==
Line 88: Line 99:
 
|  LA4
 
|  LA4
 
|-
 
|-
0x10
+
0x0A
 
|  L4
 
|  L4
 
|-
 
|-
0x11
+
0x0B
 
|  A4
 
|  A4
 
|-
 
|-
0x12
+
0x0C
 
|  ETC1
 
|  ETC1
 
|-
 
|-
0x13
+
0x0D
 
|  ETC1A4
 
|  ETC1A4
 
|-
 
|-
 
|}
 
|}
 +
 +
== Titles using extended banners ==
 +
System:
 +
* [[Mii Maker]]
 +
* [[Face Raiders]]

Latest revision as of 20:57, 13 November 2020

Overview[edit]

The Extended Banner format is very simple. The Extended Banner is used to add text (and optionally an extra texture) to a given banner. It can also (optionally) be used to set an expiration date for a banner.

See here for how the extended-banners are loaded from extdata. The Home Menu extended-banner loading function will immediately return without loading anything if the programID is for System Settings.

SpotPass[edit]

When Home Menu loads extended-banners, it also attempts to load a "CBMD" banner via SpotPass service commands. Normally this CBMD banner doesn't exist in extended-banner extdata. This is broken with New3DS titles since Home Menu uses these BOSS commands with the New3DS bitmask in the programID set. The common and language-specific(when offset is non-zero) "CGFX" specified by the CBMD are decompressed and processed.

The "CGFX" sections in this CBMD are actually the exact same exbanners loaded from normal extdata. The exbanner data from SpotPass is stored to the same state as the extdata-exbanners. No CWAV is loaded from SpotPass data.

The exbanners from SpotPass must have a timestamp less than current_datetime, otherwise they won't be parsed. The timestamp for the banner is calculated with: nintimestamp_mktime(out, exbanner->year, exbanner->month, exbanner->day, <hour=23>, <minute = 59>, <second = 59>, <millisecond = 999>);

Format[edit]

Extension: .BIN

OFFSET SIZE DESCRIPTION
0x000 0x002 Texture width (if texture is used)
0x002 0x002 Texture height (if texture is used)
0x004 0x002 Texture colour format (if texture is used)
0x006 0x004 Year to expire
0x00A 0x002 Month to expire
0x00C 0x002 Day to expire
0x00E 0x016 Name of texture (if texture is used)
0x024 0x200 Plain text comment (255 character max) to be displayed in the banner on the HOME Menu
0x224 If used, this is where the extra texture is located, otherwise file ends.

The date used for never-expiring exbanners varies, on retail like with Mii Maker this is December 31, 2099, where year is 0x833, month is 0xC, and day is 0x1F. The expiration-timestamp is only used for SpotPass exbanners, not extdata-exbanners.

Texture Colour Formats[edit]

CODE ENCODING
0x00 RGBA8
0x01 RGB8
0x02 RGBA5551
0x03 RGBA565
0x04 RGBA4
0x05 LA8
0x06 HILO8
0x07 L8
0x08 A8
0x09 LA4
0x0A L4
0x0B A4
0x0C ETC1
0x0D ETC1A4

Titles using extended banners[edit]

System: