Swapdoodle: Difference between revisions

DaniElectra (talk | contribs)
m BPK1 header: Define maximum block name length field
DaniElectra (talk | contribs)
m BPK1: Fix typos
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:


== [[SpotPass]] usage ==
== [[SpotPass]] usage ==
Currently, only three SpotPass endpoints are known to exist:
Currently, only these SpotPass endpoints are known to exist:
* <nowiki>https://npdl.cdn.nintendowifi.net/p01/nsa/<regionID>/RNG_LS1/dstsetting</nowiki> LZ10 compressed BPK1 structure
* <nowiki>https://npdl.cdn.nintendowifi.net/p01/nsa/<regionID>/RNG_LS1/dstsetting</nowiki> LZ11 compressed BPK1 structure
* <nowiki>https://npdl.cdn.nintendowifi.net/p01/nsa/<regionID>/RNG_EC1/1.dlp</nowiki>
* <nowiki>https://npdl.cdn.nintendowifi.net/p01/nsa/<regionID>/RNG_EC1/x.dlp</nowiki> BPK1 structure with all game lessons (x = 1, 2 or 3)
* <nowiki>https://npdl.cdn.nintendowifi.net/p01/nsa/<regionID>/RNG_MD1/dstdatList.bin</nowiki>
* <nowiki>https://npdl.cdn.nintendowifi.net/p01/nsa/<regionID>/RNG_MD1/dstdatList.bin</nowiki> BPK1 structure with game metadata
* <nowiki>https://npdl.cdn.nintendowifi.net/p01/nsa/<regionID>/RNG_NTX/<language>/ntx</nowiki> For game notifications (x = 1 or 2)


Where regionID goes the value from the below table.
Where regionID goes the value from the below table.
Line 23: Line 24:
|}
|}


Also, the game uses Hpp servers for posting doodles and making status updates.
Also, the game uses Hpp[https://github.com/kinnay/NintendoClients/wiki/Hpp-Server] servers for posting doodles and making status updates.


== BPK1 ==
== BPK1 ==
The BPK1 structure is used in almost all game data files. Some of the files that use this structure are LZ10 compressed (like the ones used for doodles and stationery).
The BPK1 structure is used in almost all game data files. Some of the files that use this structure are either LZ11 or LZ10 compressed (like the ones used for doodles and stationery).


The structure starts with a BPK1 header, followed by all of its block headers, which can share names between each other. The headers are the followed by each block's data, which can hold any data (including another BPK1 structure).
The structure starts with a BPK1 header, followed by all of its block headers, which can share names between each other. The headers are the followed by each block's data, which can hold any data (including another BPK1 structure).
Line 39: Line 40:
|-
|-
| 0x0
| 0x0
| 0x44
| 0x40
| BPK1 header
| BPK1 header
|-
|-
| 0x44
| 0x40
|  
|  
| Block header
| Block header
Line 77: Line 78:
| 0x8
| 0x8
| 0x4
| 0x4
| Maximum block name length
| Maximum block name length?
|-
|-
| 0xC
| 0xC
Line 90: Line 91:
| 0x2C
| 0x2C
| Padding
| Padding
|-
| 0x40
| 0x4
| Header length
|}
|}


Line 105: Line 102:
|-
|-
| 0x0
| 0x0
| 0x4
| Block data offset
|-
| 0x4
| 0x4
| 0x4
| Block size
| Block size
|-
|-
| 0x4
| 0x8
| 0x4
| 0x4
| Checksum of block data
| Checksum of block data
|-
|-
| 0x10
| 0x8
| 0x8
|
| Block name (if the name is smaller than 0x8, the rest is filled with NULL bytes)
| Block name (null terminated)
|-
|
| 0x4
| Size of BPK1 header and previous blocks (including this one)
|}
|}