Filesystem services: Difference between revisions
EvilFlight (talk | contribs) |
TimmSkiller (talk | contribs) |
||
(36 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
= Services = | = Services = | ||
{{Anchor|FS}}{{Anchor|FSUSER}}{{Anchor|fs:USER}} | |||
== Filesystem service "fs:USER" == | == Filesystem service "fs:USER" == | ||
You can at most have 32 FS archive handles. | You can at most have 32 FS archive handles. | ||
Line 554: | Line 553: | ||
| 0x086B00C2 | | 0x086B00C2 | ||
|? | |? | ||
|SetOtherSaveDataSecureValue | | [[FS:SetOtherSaveDataSecureValue|SetOtherSaveDataSecureValue]] | ||
| | | 0x121004 | ||
|- | |- | ||
| 0x086C00C2 | | 0x086C00C2 | ||
|? | |? | ||
|GetOtherSaveDataSecureValue | | [[FS:GetOtherSaveDataSecureValue|GetOtherSaveDataSecureValue]] | ||
| | | 0x121004 | ||
|- | |- | ||
| | | 0x086D0080 | ||
|? | |? | ||
| | | [[FS:BeginSaveDataMove|BeginSaveDataMove]] | ||
| | | 0x20004 | ||
|- | |- | ||
| 0x086E00C0 | | 0x086E00C0 | ||
| | |? | ||
|SetThisSaveDataSecureValue | | [[FS:SetThisSaveDataSecureValue|SetThisSaveDataSecureValue]] | ||
|None | |None | ||
|- | |- | ||
| 0x086F0040 | | 0x086F0040 | ||
| | |? | ||
|GetThisSaveDataSecureValue | | [[FS:GetThisSaveDataSecureValue|GetThisSaveDataSecureValue]] | ||
| | | None | ||
|- | |- | ||
| 0x087000C2 | | 0x087000C2 | ||
|? | |? | ||
| | | [[FS:CheckArchive|CheckArchive]] | ||
|None | |None | ||
|- | |- | ||
| | | 0x08710140 | ||
|? | | ? | ||
| | | [[FS:TransferSaveDataCMAC|TransferSaveDataCMAC]] | ||
| | | 0x20004 | ||
|- | |- | ||
| | | 0x08720200 | ||
|? | |? | ||
| | | [[FS:RegisterTitleContentOverlay|RegisterTitleContentOverlay]] | ||
| | | 0x80004 | ||
|- | |- | ||
| | | 0x08730100 | ||
|? | |? | ||
| | | [[FS:UnregisterTitleContentOverlay|UnregisterTitleContentOverlay]] | ||
| 0x80004 | |||
|- | |- | ||
| 0x08740000 | | 0x08740000 | ||
|? | |? | ||
| | | [[FS:UnregisterAllTitleContentOverlays|UnregisterAllTitleContentOverlays]] | ||
| | | 0x80004 | ||
|- | |- | ||
| 0x08750140 | | 0x08750140 | ||
|? | |? | ||
| | | [[FS:SetSaveArchiveSecureValue|SetSaveArchiveSecureValue]] | ||
|None | |None | ||
|- | |- | ||
| 0x087600C0 | | 0x087600C0 | ||
|? | |? | ||
| | | [[FS:GetSaveArchiveSecureValue|GetSaveArchiveSecureValue]] | ||
|None | |None | ||
|- | |- | ||
| | | 0x08770140 | ||
|? | |? | ||
| [[FS:RegisterSpecialTitleContent|RegisterSpecialTitleContent]] | |||
| 0x80004 | |||
|- | |- | ||
| | | 0x08780100 | ||
|? | |? | ||
| [[FS:UnregisterSpecialTitleContent|UnregisterSpecialTitleContent]] | |||
| 0x80004 | |||
|- | |- | ||
| 0x087900C2 | | 0x087900C2 | ||
| ? | | ? | ||
| Same as GetLegacyBannerData, except for the last parameter this passes u8 value 0x1 instead of 0x0, for the FSPXI command. | | Same as [[FS:GetLegacyBannerData|GetLegacyBannerData]], except for the last parameter this internally passes u8 value 0x1 instead of 0x0, for the FSPXI command. | ||
| | | 0x101015 | ||
|- | |- | ||
| 0x087A0180 | | 0x087A0180 | ||
| [[9.6.0-24|9.6.0-X]] | | [[9.6.0-24|9.6.0-X]] | ||
| [[FS:AddSeed|AddSeed]] | | [[FS:AddSeed|AddSeed]] | ||
| | | 0x200000 | ||
|- | |- | ||
| | | 0x087B0080 | ||
| [[9.6.0-24|9.6.0-X]] | | [[9.6.0-24|9.6.0-X]] | ||
| | | [[FS:GetSeed|GetSeed]] | ||
| | | 0x200000 | ||
|- | |- | ||
| | | 0x087C0080 | ||
| [[9.6.0-24|9.6.0-X]] | | [[9.6.0-24|9.6.0-X]] | ||
| | | [[FS:DeleteSeed|DeleteSeed]] | ||
| | | 0x200000 | ||
|- | |- | ||
| 0x087D0000 | | 0x087D0000 | ||
| [[9.6.0-24|9.6.0-X]] | | [[9.6.0-24|9.6.0-X]] | ||
| GetNumSeeds | | [[FS:GetNumSeeds|GetNumSeeds]] | ||
| | | 0x200000 | ||
|- | |- | ||
| 0x087E0042 | | 0x087E0042 | ||
| [[9.6.0-24|9.6.0-X]] | | [[9.6.0-24|9.6.0-X]] | ||
| | | [[FS:ListSeeds|ListSeeds]] | ||
| | | 0x200000 | ||
|- | |- | ||
| | | 0x087F0100 | ||
| [[9.6.0-24|9.6.0-X]] | | [[9.6.0-24|9.6.0-X]] | ||
| | | [[FS:TitleContentHasSeed|TitleContentHasSeed]] | ||
| | | 0x200000 | ||
|- | |- | ||
| | | 0x08800880 | ||
| [[9.6.0-24|9.6.0-X]] | | [[9.6.0-24|9.6.0-X]] | ||
| | | [[FS:AddTitleTag|AddTitleTag]] | ||
| | | 0x200000 | ||
|- | |- | ||
| | | 0x08810080 | ||
| [[9.6.0-24|9.6.0-X]] | | [[9.6.0-24|9.6.0-X]] | ||
| | | [[FS:GetTitleTag|GetTitleTag]] | ||
| | | 0x200000 | ||
|- | |- | ||
| | | 0x08820080 | ||
| [[9.6.0-24|9.6.0-X]] | | [[9.6.0-24|9.6.0-X]] | ||
| | | [[FS:DeleteTitleTag|DeleteTitleTag]] | ||
| | | 0x200000 | ||
|- | |- | ||
| 0x08830000 | | 0x08830000 | ||
| [[9.6.0-24|9.6.0-X]] | | [[9.6.0-24|9.6.0-X]] | ||
| | | [[FS:GetNumTitleTags|GetNumTitleTags]] | ||
| | | 0x200000 | ||
|- | |- | ||
| 0x08840042 | | 0x08840042 | ||
| [[9.6.0-24|9.6.0-X]] | | [[9.6.0-24|9.6.0-X]] | ||
| | | [[FS:ListTitleTags|ListTitleTags]] | ||
| | | 0x200000 | ||
|- | |- | ||
| | | 0x088500C0 | ||
| [[9.6.0-24|9.6.0-X]] | | [[9.6.0-24|9.6.0-X]] | ||
| | | [[FS:CheckTitleSeed|CheckTitleSeed]] | ||
| | | 0x200000 | ||
|- | |- | ||
| 0x088600C0 | | 0x088600C0 | ||
| [[11.1.0-34|11.1.0-X]] | | [[11.1.0-34|11.1.0-X]] | ||
| [[FS:CheckUpdatedDat|CheckUpdatedDat]] | | [[FS:CheckUpdatedDat|CheckUpdatedDat]] | ||
| | | 0x80000 | ||
|} | |} | ||
Line 698: | Line 697: | ||
Each session for fs:USER has separate permissions, initially these are set to all zero's for new fs:USER sessions. The permissions/etc for fs:USER sessions are initialized via [[FS:Initialize]](loaded from the user process exheader). | Each session for fs:USER has separate permissions, initially these are set to all zero's for new fs:USER sessions. The permissions/etc for fs:USER sessions are initialized via [[FS:Initialize]](loaded from the user process exheader). | ||
{{Anchor|FSLDR}}{{Anchor|fs:LDR}} | |||
== Filesystem service "fs:LDR" == | == Filesystem service "fs:LDR" == | ||
This service is identical to fs:USER, except [[FS:OpenArchive]] archive 0x2345678E can only be accessed with fs:LDR. | This service is identical to fs:USER, except [[FS:OpenArchive]] archive 0x2345678E can only be accessed with fs:LDR. | ||
{{Anchor|FSReg}}{{Anchor|FSREG}}{{Anchor|fs:REG}} | |||
== ProgramRegistry service "fs:REG" == | == ProgramRegistry service "fs:REG" == | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 734: | Line 736: | ||
=File and directory access= | =File and directory access= | ||
==Files== | ==Files== | ||
File session handles obtained via [[FS:OpenFile]] | File session handles obtained via [[FS:OpenFile]] and [[FS:OpenFileDirectly]] can be used to access files through a service-like interface, despite not being an actual service registered using [[SRV:RegisterService]]. To use this service-like interface, simply call the SendSyncRequest SVC with a file session handle, using the IPC buffer in thread-local storage for parameters and responses, just like you would with a proper service. | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 788: | Line 790: | ||
==Directories== | ==Directories== | ||
Directory session handles obtained via [[FS:OpenDirectory]] are usable via a service-like interface, following the exact same procedure described above for file sessions. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 943: | 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 951: | Line 954: | ||
|- | |- | ||
| 0x12345681 | | 0x12345681 | ||
| | | System Savedata transfer. Used for transferring [[System_SaveData|System Save Data]] during [[System_Transfer#System_Save_Data_/_Shared_Extdata_Transfer|system tranfers]]. | ||
| | | Yes | ||
| | | Yes | ||
| No | | No | ||
| | | Yes | ||
| ? | | ? | ||
|- | |- | ||
Line 967: | 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 975: | 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 983: | 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 991: | 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 999: | 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,047: | 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,069: | Line 1,072: | ||
| Yes | | Yes | ||
| 0x6 | | 0x6 | ||
|- | |||
| 0x567890B3 | |||
| [[3DS_Virtual_Console#NAND_Savegame|AGB Save Data]] | |||
| No | |||
| No | |||
| Yes | |||
| No | |||
| - | |||
|- | |- | ||
| 0x567890B4 | | 0x567890B4 | ||
Line 1,088: | Line 1,099: | ||
= Filenames and Paths = | = Filenames and Paths = | ||
PathType: | {{Anchor|PathType}} PathType: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,139: | 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 === | ||
==== | |||
==== DataAccessPath ==== | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! | ! Offset !! Size !! Description | ||
! | |||
|- | |- | ||
| | | 0x0 || 0x1 || u8 [[Mediatypes|Mediatype]] | ||
| [[Mediatypes|Mediatype]] | |||
|- | |- | ||
| | | 0x1 || 0x1 || only for NAND data (System Savedata / Shared Extdata), otherwise left 0: | ||
| | |||
| | |||
{| class="wikitable" border="1" | {| 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,172: | Line 1,186: | ||
|- | |- | ||
| 0 | | 0 | ||
| [[ | | [[Filesystem_services#DataAccessPath|DataAccessPath]] | ||
|- | |- | ||
| 1 | | 1 | ||
| | | save ID low (save ID high is 0) | ||
|} | |} | ||
=== | ====== 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,189: | Line 1,207: | ||
|- | |- | ||
| 0 | | 0 | ||
| [[ | | [[Filesystem_services#DataAccessPath|DataAccessPath]] | ||
|} | |} | ||
=== | ====== File Path ====== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! | ! Index word !! Description | ||
! | |- | ||
| 0 || save ID low | |||
|- | |- | ||
| 1 || save ID high | |||
| 1 | |||
| | |||
| | |||
|} | |} | ||
=== | 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" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,221: | Line 1,232: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 | ||
| | | [[Filesystem_services#DataAccessPath|DataAccessPath]] | ||
|- | |- | ||
| 1 | | 1 | ||
| | | ext save ID low | ||
|- | |- | ||
| 2 | | 2 | ||
| | | ext save ID high | ||
|} | |} | ||
File | 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 === | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,240: | Line 1,257: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 | ||
| | | [[Mediatypes|Mediatype]] (must be non-zero) | ||
|- | |- | ||
| 1 | | 1 | ||
| | | Lower word saveid | ||
|- | |- | ||
| 2 | | 2 | ||
| | | Upper word saveid | ||
|} | |} | ||
The | The file/directory lowpath for this FS archive is a text path in the [[Savegames|savegame]] filesystem. | ||
=== | === 0x567890B4 Archive Path Data Format === | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,267: | Line 1,275: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 | ||
| | | [[Mediatypes|Mediatype]] | ||
|- | |- | ||
| 1-2 | | 1 | ||
| | | <code><nowiki>Lower_word_saveid >> 8</nowiki></code> ? | ||
|- | |||
| 2 | |||
| Unknown. Game calculate this using formula <code><nowiki>0xFFFFFF00 | unknown_b</nowiki></code> | |||
|} | |} | ||
= | === 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 | | 0 || RomFS | ||
| | |||
|- | |- | ||
| 1 | | 1 || <code>exefs:/.code</code> | ||
| | |||
|- | |- | ||
| 2 | | 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" | ||
|- | |- | ||
! | ! Index word | ||
! Description | ! Description | ||
|- | |- | ||
| | | 0 | ||
| | | Lower word programID | ||
|- | |- | ||
| | | 1 | ||
| | | Upper word programID | ||
|- | |- | ||
| | | 2 | ||
| | | [[Mediatypes|Media Type]] | ||
| | |||
|- | |- | ||
| | | 3 | ||
| | | unused | ||
|} | |} | ||
== | ==== File Path ==== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! | ! Index word | ||
! Description | ! Description | ||
|- | |- | ||
| | | 0 | ||
| | | [[Filesystem_services#Title_Access_Type|Title Access Type]] | ||
| | |||
|- | |- | ||
| | | 1 | ||
| | | TMD content index / NCSD partition index. | ||
|- | |- | ||
| | | 2 | ||
| | | Type: 0=romfs(0 for non-NCCH as well), 1=exefs ".code"(?), 2=exefs "icon"/"banner"/"logo", 3=unknown, 4=unknown, 5=unknown. | ||
|- | |- | ||
| | | 3-4 | ||
| | | Filename for ExeFS. | ||
|} | |} | ||
== | The 0x14-byte lowpath is all-zero for accessing the title's main RomFS. | ||
=== [[RomFS]] === | |||
Archives 0x3 and 0x2345678E both allow for accessing the [[RomFS#Level_3_Format|level-3 IVFC images]] for RomFS access. The main CXI RomFS is accessible via an all-zero 0xc-byte binary file-lowpath. The update RomFS can be accessed with the first u32 in the binary file-lowpath being set to 0x5. The user must handle parsing the filesystem used in the exposed image itself. | |||
With FSPXI the returned data for RomFS is the entire RomFS section from the NCCH, starting at the IVFC header. | |||
The 0x3 archive is an interface for the 0x2345678E archive with the current process programID+mediatype. The file lowpath is 3-words. These words are written to 0x2345678E-archive file_lowpath+0, with the rest of that lowpath set to all-zero(lowpath is different from archive 0x2345678A). File lowpath: | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! | ! Index word | ||
! Description | ! Description | ||
|- | |- | ||
| | | 0 | ||
| | | See above. The only values which FS-module doesn't allow to be used here are: | ||
* 0x1: Error 0xE0E046BE. | |||
* 0x3: Error 0xE0E046BE. | |||
* 0x4: FS-module executes svcBreak when using this. | |||
|- | |- | ||
| | | 1-2 | ||
| | | See above. Not validated by FS-module. | ||
| | |} | ||
=SEEDDB= | |||
With [[9.6.0-24|9.6.0-X]] new [[System_SaveData]] with saveID 0001000F was added, this seems to be handled by FS-module itself, probably via the new service-cmds added to fsuser. [[Home Menu]] and [[NIM_Services|NIM]] module have access to those commands. | |||
The SEEDDB savedata contains the title-unique seed-data used for the new [[NCCH]] keyY generation added with FIRM [[9.6.0-24|9.6.0-X]]. | |||
= Common Types = | |||
== MediaType == | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
! Value | |||
! Description | |||
|- | |- | ||
| | | 0 | ||
| | | NAND | ||
|- | |- | ||
| | | 1 | ||
| | | SD | ||
|- | |- | ||
| | | 2 | ||
| | | Game Card | ||
|} | |} | ||
== | == SystemMediaType == | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! | ! Value | ||
! Description | ! Description | ||
|- | |- | ||
| | | 0 | ||
| | | CTR NAND | ||
|- | |- | ||
| | | 1 | ||
| | | TWL NAND | ||
|- | |- | ||
| | | 2 | ||
| | | SD | ||
|- | |- | ||
| | | 3 | ||
| | | TWL Photo | ||
|} | |} | ||
== | == OpenFlags == | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! | ! Bit | ||
! Description | ! Description | ||
|- | |- | ||
| | | 0 | ||
| | | Read | ||
|- | |- | ||
| | | 1 | ||
| | | Write | ||
|- | |- | ||
| | | 2 | ||
| | | Create | ||
|} | |} | ||
== | == Attributes == | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,470: | Line 1,459: | ||
|- | |- | ||
| 0x0 | | 0x0 | ||
| | | 0x1 | ||
| | | Is Directory | ||
|- | |||
| 0x1 | |||
| 0x1 | |||
| Is Hidden | |||
|- | |- | ||
| 0x2 | | 0x2 | ||
| | | 0x1 | ||
| Is Archive | |||
|- | |- | ||
| | | 0x3 | ||
| | | 0x1 | ||
| | | Is Read-Only | ||
|} | |} | ||
== | == WriteOption == | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,489: | Line 1,482: | ||
! Description | ! Description | ||
|- | |- | ||
| | | 0x0 | ||
| | | 0x1 | ||
| | | Flush | ||
|- | |||
| 0x1 | |||
| 0x1 | |||
| Update Time Stamp | |||
|- | |||
| 0x2 | |||
| 0x1 | |||
| Reserved | |||
|- | |- | ||
| | | 0x3 | ||
| | | 0x1 | ||
| | | Reserved | ||
|} | |} | ||
== | == DirectoryEntry == | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,506: | Line 1,507: | ||
|- | |- | ||
| 0x0 | | 0x0 | ||
| | | 0x20C | ||
| | | UTF-16 Entry Name | ||
|- | |- | ||
| 0x20C | |||
| 0xA | |||
| 8.3 short filename name | |||
|- | |||
| 0x216 | |||
| 0x4 | |||
| 8.3 short filename extension | |||
|- | |||
| 0x21A | |||
| 0x1 | | 0x1 | ||
| Always 1 | |||
|- | |||
| 0x21B | |||
| 0x1 | | 0x1 | ||
| Reserved | | Reserved | ||
|- | |- | ||
| 0x21C | |||
| 0x4 | | 0x4 | ||
| [[Filesystem_services#Attributes|Attributes]] | |||
|- | |||
| 0x220 | |||
| 0x8 | | 0x8 | ||
| | | Entry Size | ||
|} | |} | ||
== | == ArchiveResource == | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,534: | Line 1,543: | ||
|- | |- | ||
| 0x0 | | 0x0 | ||
| 0x1 | | 0x4 | ||
| [[Filesystem_services#MediaType|Media Type]] | | Sector byte-size | ||
|- | |- | ||
| | | 0x4 | ||
| | | 0x4 | ||
| | | Cluster byte-size | ||
|- | |- | ||
| 0x2 | | 0x8 | ||
| 0x2 | | 0x4 | ||
| Reserved | | Partition capacity in clusters | ||
|- | |- | ||
| 0x4 | | 0xC | ||
| 0x4 | | 0x4 | ||
| Save ID | | Available free space in clusters | ||
|} | |} | ||
== SecureValueSlot == | == ProgramInfo == | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Value | ! Offset | ||
! Description | ! Size | ||
|- | ! Description | ||
| 0x1000 | |- | ||
| SD Application | | 0x0 | ||
|} | | 0x8 | ||
| Program ID | |||
== CardSpiBaudRate == | |- | ||
{| class="wikitable" border="1" | | 0x8 | ||
|- | | 0x1 | ||
! Value | | [[Filesystem_services#MediaType|Media Type]] | ||
! Description | |- | ||
|- | | 0x9 | ||
| 0x0 | | 0x7 | ||
| Padding | |||
|} | |||
== ProductInfo == | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x10 | |||
| Product Code | |||
|- | |||
| 0x10 | |||
| 0x2 | |||
| Company Code | |||
|- | |||
| 0x12 | |||
| 0x2 | |||
| Remaster Version | |||
|} | |||
== IntegrityVerificationSeed == | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x10 | |||
| AES-CBC MAC over a SHA256 hash, which hashes the first 0x110-bytes of the cleartext SEED. | |||
|- | |||
| 0x10 | |||
| 0x120 | |||
| The [[nand/private/movable.sed]], encrypted with AES-CBC using the above MAC for the counter. | |||
|} | |||
== ExtSaveDataInfo == | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x4 | |||
| [[Filesystem_services#DataAccessPath|DataAccessPath]] | |||
|- | |||
| 0x4 | |||
| 0x8 | |||
| Save ID | |||
|- | |||
| 0xC | |||
| 0x4 | |||
| Reserved | |||
|} | |||
== SystemSaveDataInfo == | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x4 | |||
| [[Filesystem_services#DataAccessPath|DataAccessPath]] | |||
|- | |||
| 0x4 | |||
| 0x4 | |||
| Save ID | |||
|} | |||
== SecureValueSlot == | |||
{| class="wikitable" border="1" | |||
|- | |||
! Value | |||
! Description | |||
|- | |||
| 0x1000 | |||
| SD Application | |||
|} | |||
== SecureValueEntry == | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset !! Size !! Description | |||
|- | |||
| 0x0 || 0x4 || u32, [[Filesystem_services#SecureValueSlot|Secure Value Slot]] | |||
|- | |||
| 0x4 || 0x1 || When used as an input entry: | |||
{| class="wikitable" border="1" | |||
|- | |||
! Value !! Description | |||
|- | |||
| 0 || This entry should be removed. | |||
|- | |||
| 1 || This entry should be updated with the given value. | |||
|} | |||
When returned from a command: | |||
{| class="wikitable" border="1" | |||
|- | |||
! Value !! Description | |||
|- | |||
| 0 || No entry with the given slot and title ID was found, or: this entry is unused. | |||
|- | |||
| 1 || The entry with the given slot and title ID was found, or: this entry is used. | |||
|} | |||
|- | |||
| 0x5 || 0x3 || padding | |||
|- | |||
| 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) | |||
|} | |||
== CardSpiBaudRate == | |||
{| class="wikitable" border="1" | |||
|- | |||
! Value | |||
! Description | |||
|- | |||
| 0x0 | |||
| 512KHz | | 512KHz | ||
|- | |- | ||
Line 1,603: | Line 1,759: | ||
! Value | ! Value | ||
! Description | ! Description | ||
! Found in | |||
|- | |- | ||
| 0x1 | | 0x1 | ||
| Update | | CTR (Old3DS) Update Partition | ||
| Gamecards | |||
|- | |- | ||
| 0x2 | | 0x2 | ||
| Manual | | Manual | ||
| Gamecards, Digital titles | |||
|- | |- | ||
| 0x3 | | 0x3 | ||
| DLP Child | | DLP Child | ||
| Gamecards, Digital titles | |||
|- | |||
| 0x4 | |||
| KTR (New3DS) Update Partition | |||
| Gamecards | |||
|- | |||
|} | |} | ||
Line 1,623: | 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) | ||
|} | |} | ||
=Errors= | =Errors= | ||
See [[Filesystem_services_PXI]]. | See [[Filesystem_services_PXI]]. | ||
[[Category:Services]] |