Filesystem services: Difference between revisions
TimmSkiller (talk | contribs) |
TimmSkiller (talk | contribs) |
||
(16 intermediate revisions by the same user not shown) | |||
Line 946: | Line 946: | ||
|- | |- | ||
| 0x12345680 | | 0x12345680 | ||
| | | Extdata transfer. Used for transferring [[Extdata#NAND_Shared_Extdata|NAND Shared Extdata]] during [[System_Transfer#System_Save_Data_/_Shared_Extdata_Transfer|system tranfers]]. | ||
| Yes | |||
| Yes | | Yes | ||
| No | | No | ||
| Yes | | Yes | ||
Line 954: | Line 954: | ||
|- | |- | ||
| 0x12345681 | | 0x12345681 | ||
| Used for | | System Savedata transfer. Used for transferring [[System_SaveData|System Save Data]] during [[System_Transfer#System_Save_Data_/_Shared_Extdata_Transfer|system tranfers]]. | ||
| Yes | | Yes | ||
| Yes | | Yes | ||
Line 970: | Line 970: | ||
|- | |- | ||
| 0x2345678A | | 0x2345678A | ||
| | | Title access. With FS, this allows accessing NCCH/NCSD contents (ExeFS, RomFS, checking if a content uses a seed, checking the validity of the installed seed). FSPXI, additionally, allows opening raw NCCH/NCSD NCCH contents and DSiWare contents for reading, along with encrypted save data. | ||
| Yes | | Yes | ||
| Yes | | Yes | ||
Line 978: | Line 978: | ||
|- | |- | ||
| 0x2345678B | | 0x2345678B | ||
| | | Used internally by Process9 as the lowest level title access archive. Allows for opening various sections of a title (TMD, CMD, raw contents, DLC contents, raw save data (including public/private/banner saves for DSiWare), title and/or content import context files and /data directories for save data. | ||
| No | | No | ||
| No | | No | ||
Line 986: | Line 986: | ||
|- | |- | ||
| 0x2345678C | | 0x2345678C | ||
| Used internally to access [[Title_Database|/dbs]] files | | Used internally to access [[Title_Database|Title Database (/dbs)]] files. For SD, <code>title.db</code> and <code>import.db</code>. For NAND, <code>title.db</code>, <code>import.db</code>, <code>tmp_t.db</code>, <code>tmp_i.db</code>, and <code>jumpid.db</code>. | ||
| No | | No | ||
| No | | No | ||
Line 994: | Line 994: | ||
|- | |- | ||
| 0x2345678D | | 0x2345678D | ||
| | | Used internally to access non-title /dbs files on the NAND: <code>certs.db</code> and <code>ticket.db</code>. | ||
| No | | No | ||
| No | | No | ||
Line 1,002: | Line 1,002: | ||
|- | |- | ||
| 0x2345678E | | 0x2345678E | ||
| FSPXI: | | FSPXI: Program Access (limited subset of merged main title + update/patch title access). For fs:LDR(used by the "loader" FIRM ARM11-process), only ExeFS. Not accessible with fs:USER. | ||
| Yes | | Yes | ||
| Yes | | Yes | ||
Line 1,050: | Line 1,050: | ||
|- | |- | ||
| 0x567890B0 | | 0x567890B0 | ||
| | | Internally creates the same "ID Storage" wrapper over the NAND that is used for SystemSaveData and Shared ExtData, but all operations are stubbed and return 0xE0C046F8. | ||
| No | | No | ||
| Yes | | Yes | ||
Line 1,072: | Line 1,072: | ||
| Yes | | Yes | ||
| 0x6 | | 0x6 | ||
|- | |||
| 0x567890B3 | |||
| [[3DS_Virtual_Console#NAND_Savegame|AGB Save Data]] | |||
| No | |||
| No | |||
| Yes | |||
| No | |||
| - | |||
|- | |- | ||
| 0x567890B4 | | 0x567890B4 | ||
Line 1,142: | Line 1,150: | ||
Note that ExeFS files only support reading from offset=0 and with size=file_size. | Note that ExeFS files only support reading from offset=0 and with size=file_size. | ||
=== SystemSaveData Archive Path Data Format === | === SystemSaveData / Extdata / Shared Extdata Archive Path Data Format === | ||
==== FS ==== | |||
==== DataAccessPath ==== | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset !! Size !! Description | |||
|- | |||
| 0x0 || 0x1 || u8 [[Mediatypes|Mediatype]] | |||
|- | |||
| 0x1 || 0x1 || only for NAND data (System Savedata / Shared Extdata), otherwise left 0: | |||
{| class="wikitable" border="1" | |||
|- | |||
! Value !! Description | |||
|- | |||
| 0 || Accesses from/to <code>nand:/data/<ID0 of current system></code> | |||
|- | |||
| 1 || Accesses from/to <code>nand:/fixdata</code> | |||
|- | |||
| 2 || Accesses from/to <code>nand:/data/<ID0 from source console's [[Filesystem_services#DeviceMoveContext|Device Move Context]]></code> | |||
|} | |||
|- | |||
| 0x2 || 0x2 || padding | |||
|} | |||
==== SystemSaveData ==== | |||
===== FS ===== | |||
====== Archive Path ====== | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,150: | Line 1,186: | ||
|- | |- | ||
| 0 | | 0 | ||
| [[ | | [[Filesystem_services#DataAccessPath|DataAccessPath]] | ||
|- | |- | ||
| 1 | | 1 | ||
| | | save ID low (save ID high is 0) | ||
|} | |} | ||
==== FSPXI ==== | ====== File Path ====== | ||
The file path is a cleartext ASCII or UTF16 file path (<code><file path></code>). | |||
The file path would access the file at <code><base path>/sysdata/<save ID low>/<save ID high>/<file path></code>. | |||
Note that <code>/<file path></code> refers to the virtual file system inside the </code><save ID high></code> file. | |||
===== FSPXI / FS System Savedata Transfer / FSPXI System Savedata Transfer ===== | |||
====== Archive Path ====== | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,164: | Line 1,207: | ||
|- | |- | ||
| 0 | | 0 | ||
| | | [[Filesystem_services#DataAccessPath|DataAccessPath]] | ||
|} | |} | ||
The file | |||
====== File Path ====== | |||
{| class="wikitable" border="1" | |||
|- | |||
! Index word !! Description | |||
|- | |||
| 0 || save ID low | |||
|- | |||
| 1 || save ID high | |||
|} | |||
The file path would access the file at <code><base path>/sysdata/<save ID low>/<save ID high></code>. | |||
==== Extdata / Shared Extdata ==== | |||
===== FS / FS Extdata Transfer / FSPXI Extdata Transfer ===== | |||
====== Archive Path ====== | |||
{| class="wikitable" border="1" | |||
|- | |||
! Index word | |||
! Description | |||
|- | |||
| 0 | |||
| [[Filesystem_services#DataAccessPath|DataAccessPath]] | |||
|- | |||
| 1 | |||
| ext save ID low | |||
|- | |||
| 2 | |||
| ext save ID high | |||
|} | |||
This refers to the extdata filesystem structure's base directory at <code><base path>/extdata/<ext save ID low>/<ext save ID high></code>. | |||
====== File Path ====== | |||
The file path is a cleartext ASCII or UTF16 file path (<code><file path></code>). | |||
For FS Extdata, this would acccess <code><base path>/extdata/<save ID low>/<save ID high>/<directory ID>/<file ID>/<file path></code>, and <code>/<file path></code> refers to the virtual file system inside the </code><file ID></code> file. | |||
For FS / FSPXI Extdata Transfer, this accesses <code><base path>/extdata/<save ID low>/<save ID high>/<file path></code>. | |||
=== UserSaveDataForCheck Archive Path Data Format === | === UserSaveDataForCheck Archive Path Data Format === | ||
Line 1,183: | Line 1,266: | ||
| Upper word saveid | | Upper word saveid | ||
|} | |} | ||
The file/directory lowpath for this FS archive is a text path in the [[Savegames|savegame]] filesystem. | The file/directory lowpath for this FS archive is a text path in the [[Savegames|savegame]] filesystem. | ||
Line 1,201: | Line 1,285: | ||
|} | |} | ||
=== | === Title Access Archive Path Data Format === | ||
==== Title Access Type ==== | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! | ! Value !! Description | ||
|- | |- | ||
| 0 || High-level NCCH content access | |||
|- | |- | ||
| | | 1 || Save data access (high-level, decrypted) | ||
|- | |- | ||
| | | 2 || Raw content (low-level NCCH/SRL) access | ||
|- | |- | ||
| | | 5 || Save data access (low-level, encrypted) | ||
|} | |} | ||
==== NCCH Access Type ==== | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! | ! Value !! Description | ||
|- | |||
| 0 || RomFS | |||
|- | |||
| 1 || <code>exefs:/.code</code> | |||
|- | |||
| 2 || System Menu Data (<code>exefs:/icon</code>, <code>exefs:/banner</code>, <code>exefs:/logo</code>) | |||
|- | |||
| 3 || NCCH Header(s) | |||
|- | |- | ||
| | | 4 || "is seeded" check | ||
|- | |- | ||
| | | 5 || Seed verify/validate | ||
|} | |} | ||
=== | ==== NCCH Header Access Type ==== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! | ! Value !! Description | ||
! | |||
|- | |- | ||
| 0 | | 0 || [[NCCH/Extended_Header|Extheader]] without AccessDesc (0x0-0x400) | ||
| [[ | |||
|- | |- | ||
| 1 | | 1 || [[NCCH/Extended_Header|Extheader]] with AccessDesc (0x0-0x800) | ||
| | |||
|- | |- | ||
| 2 | | 2 || Raw [[NCCH#NCCH_Header|NCCH Header]] | ||
| | |||
|} | |} | ||
=== | ==== Archive Path ==== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,260: | Line 1,344: | ||
|- | |- | ||
| 2 | | 2 | ||
| | | [[Mediatypes|Media Type]] | ||
|- | |- | ||
| 3 | | 3 | ||
| | | unused | ||
|} | |} | ||
File | ==== File Path ==== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,273: | Line 1,358: | ||
|- | |- | ||
| 0 | | 0 | ||
| | | [[Filesystem_services#Title_Access_Type|Title Access Type]] | ||
|- | |- | ||
| 1 | | 1 | ||
Line 1,538: | Line 1,623: | ||
|- | |- | ||
| 0x0 | | 0x0 | ||
| | | 0x4 | ||
| [[Filesystem_services# | | [[Filesystem_services#DataAccessPath|DataAccessPath]] | ||
|- | |- | ||
| 0x4 | | 0x4 | ||
Line 1,566: | Line 1,643: | ||
|- | |- | ||
| 0x0 | | 0x0 | ||
| | | 0x4 | ||
| [[Filesystem_services# | | [[Filesystem_services#DataAccessPath|DataAccessPath]] | ||
|- | |- | ||
| 0x4 | | 0x4 | ||
Line 1,621: | Line 1,690: | ||
|- | |- | ||
| 0x8 || 0x8 || u64, Secure Value | | 0x8 || 0x8 || u64, Secure Value | ||
|} | |||
== TitleTag == | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset !! Size !! Description | |||
|- | |||
| 0x0 || 0x4 || Magic, <code>PREP</code> (PREPurchase install) | |||
|- | |||
| 0x4 || 0x4 || s32, Release date year | |||
|- | |||
| 0x8 || 0x1 || u8, Release date month | |||
|- | |||
| 0x9 || 0x1 || u8, Release date day | |||
|- | |||
| 0xA || 0x2 || u16, Country code | |||
|- | |||
| 0xC || 0x4 || u32, Seed status (0: not downloaded yet, 1: last download attempt failed, 2: seed installed successfully) | |||
|- | |||
| 0x10 || 0x4 || Result code from last seed installation attempt | |||
|- | |||
| 0x14 || 0x4 || Support error code from last seed installation attempt | |||
|- | |||
| 0x18 || 0x68 || reserved padding (unused) | |||
|} | |} | ||
Line 1,695: | Line 1,788: | ||
| 0x0 | | 0x0 | ||
| 0x10 | | 0x10 | ||
| IVs | | IVs (ID0 of source console) | ||
|- | |- | ||
| 0x10 | | 0x10 | ||
| 0x10 | | 0x10 | ||
| Encrypt Parameter | | Encrypt Parameter (used to calculate the IV for encryption) | ||
|} | |} | ||