SpotPass: Difference between revisions
Meleemeister (talk | contribs) |
DaniElectra (talk | contribs) →Payload Content Header: Expand documentation |
||
(One intermediate revision by the same user not shown) | |||
Line 127: | Line 127: | ||
|} | |} | ||
The first 0x10-bytes are all-zero except the first byte | The first 0x10-bytes are all-zero except the first byte. If the 7th bit (0x80) is not set, the arrived flag will only be marked if the session for the target program ID was made with a privileged session. Otherwise, the arrived flag will always be marked. | ||
The 16-bit value at 0x10 tells how many payload contents follow after this the content header. For example there can be a downloaded file for a game followed by a message for the news system module. | The 16-bit value at 0x10 tells how many payload contents follow after this the content header. For example there can be a downloaded file for a game followed by a message for the news system module. | ||
Line 142: | Line 142: | ||
| 0x0 | | 0x0 | ||
| 0x8 | | 0x8 | ||
| | | Program ID | ||
|- | |- | ||
| 0x8 | | 0x8 | ||
Line 176: | Line 176: | ||
This signature is signed by Nintendo with the same key-pair as the content header. | This signature is signed by Nintendo with the same key-pair as the content header. | ||
The hash at offset 0x1C hashes the 0x1C-byte data at offset 0x0 followed by a zero u16, followed by all of the remaining cleartext data following this header(the actual content data). | The hash at offset 0x1C hashes the 0x1C-byte data at offset 0x0 followed by a zero u16, followed by all of the remaining cleartext data following this header (the actual content data). | ||
The downloaded boss data is written in the following format to extdata. | The file name of the downloaded boss data is Ascii85 encoded with the following data: | ||
First an extdata header in the following format | |||
{| class="wikitable" | |||
! Offset !! Length !! Description | |||
|- | |||
| 0x0 || 0x5 || NS Data ID | |||
|- | |||
| 0x5 || 0x5 || Version | |||
|- | |||
| 0xA || 0x5 || Content datatype | |||
|- | |||
| 0xF || 0x1 || New flag | |||
|} | |||
The downloaded boss data is written in the following format to extdata. First an extdata header in the following format: | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 191: | Line 204: | ||
|- | |- | ||
| 0x1 | | 0x1 | ||
| | | 0x3 | ||
| | | Padding | ||
|- | |||
| 0x4 | |||
| 0x4 | |||
| [[BOSSU:GetNsDataAdditionalInfo|Additional info]] | |||
|- | |- | ||
| | | 0x8 | ||
| 0x4 | | 0x4 | ||
| Unknown | | Unknown | ||
|- | |- | ||
| | | 0xC | ||
| | | 0x8 | ||
| | | [[BOSSU:GetNsDataLastUpdate|Last update]] in number of seconds since the year 2000 | ||
|- | |- | ||
| 0x14 | | 0x14 | ||
| 0x4 | | 0x4 | ||
| | | Padding | ||
|} | |} | ||
Followed by the Payload Content Header without the hash and signature (first 0x1C bytes) and the actual payload. | Followed by the Payload Content Header without the hash and signature (first 0x1C bytes) and the actual payload. | ||