Changes

Jump to: navigation, search

Filesystem services

3,153 bytes added, 11 September
no edit summary
{| class="wikitable" border="1"
|-
! Cmd || Name || Arguments || Notes
|-
| 0 || OpenCodeFileSystem || u64 TitleId + X descriptor [[#ContentPath]] || Returns an [[#IFileSystemOpenCodeFileSystem]].
|-
| 1 || IsArchivedProgram || u64 ProcessId || Returns a bool (1 if the process id's [[#ContentPathIsArchivedProgram]] ends in ".nca").
|-
| 2 || [4.0.0+] [[#SetCurrentProcess || PID descriptor ||]]
|}
 
== OpenCodeFileSystem ==
Takes an u64 TitleId and a [[#ContentPath]]. Returns an [[#IFileSystem]].
 
== IsArchivedProgram ==
Takes an u64 ProcessId. Returns a bool (1 if the process id's [[#ContentPath]] ends in ".nca").
 
== SetCurrentProcess ==
Takes a PID descriptor.
= fsp-pr =
{| class="wikitable" border="1"
|-
! Cmd || Name || Notes
|-
| 0 || [[#RegisterProgram]] ||
|-
| 1 || [[#UnregisterProgram]] ||
|-
| 2 || [4.0.0+] [[#SetCurrentProcess ||]]
|-
| 256 || [[#SetEnabledProgramVerification]] ||
|}
| 34 || [5.0.0+] GetCacheStorageSize
|-
| 35 || [6.0.0+] CreateSaveDataFileSystemByHashSalt (Unofficial name, takes a total of 0xB0[[#OpenSaveDataFileSystemByHashSalt]]|-bytes of input, no output)| 36 || [9.0.0+] OpenHostFileSystemWithOption
|-
| 51 || [[#OpenSaveDataFileSystem]]
| 66 || [5.0.0+] WriteSaveDataFileSystemExtraDataWithMask
|-
| 67 || [6.0.0+] [[#FindSaveDataWithFilter (Takes a total of 0x50-bytes of input, returns 8-bytes of output, and a type-0x6 output buffer)]]
|-
| 68 || [6.0.0+] [[#OpenSaveDataInfoReaderWithFilter (Takes a total of 0x50-bytes of input, returns an #ISaveDataInfoReader)]]
|-
| 69 || [8.0.0+] ReadSaveDataFileSystemExtraDataBySaveDataAttribute
| 80 || OpenSaveDataMetaFile
|-
| 81 || [4.0.0+] [[#OpenSaveDataTransferManager (No input, returns an ]]|-| 82 || [5.0.0+] [[#ISaveDataTransferManagerOpenSaveDataTransferManagerVersion2]])
|-
| 82 83 || [56.0.0+] OpenSaveDataTransferManagerVersion2 (No input, returns an [[#ISaveDataTransferManagerWithDivisionOpenSaveDataTransferProhibiterForCloudBackUp]])
|-
| 83 84 || [6.0.0+] OpenSaveDataTransferProhibiterForCloudBackUp (Takes an input u64, returns an [[#ISaveDataTransferProhibiterListApplicationAccessibleSaveDataOwnerId]])
|-
| 84 85 || [69.0.0+] ListApplicationAccessibleSaveDataOwnerId (Takes a total of 0x10-bytes of input, returns 4-bytes of output, and a type-0x6 output buffer)[[#OpenSaveDataTransferManagerForSaveDataRepair]]
|-
| 100 || OpenImageDirectoryFileSystem
| 110 || [[#OpenContentStorageFileSystem]]
|-
| 120 || [6.0.0+] OpenCloudBackupWorkStorageFileSystem (Takes 4-bytes of input, returns an [[#IFileSystemOpenCloudBackupWorkStorageFileSystem]])
|-
| 130 || [7.0.0+] [[#OpenCustomStorageFileSystem]] (Takes 4-bytes of input, returns an [[#IFileSystem]])
|-
| 200 || OpenDataStorageByCurrentProcess
| 203 || OpenPatchDataStorageByCurrentProcess
|-
| 204 || [7.0.0+] OpenDataFileSystemWithProgramIndex (Takes an input u8, returns an [[#IFileSystemOpenDataFileSystemWithProgramIndex]])
|-
| 205 || [7.0.0+] OpenDataStorageWithProgramIndex (Takes an input u8, returns an [[#IStorageOpenDataStorageWithProgramIndex]])
|-
| 400 || [[#OpenDeviceOperator]]
| 511 || [5.0.0+] NotifySystemDataUpdateEvent
|-
| 520 || [6.0.0+] [[#SimulateDeviceDetectionEvent (Takes a total of 0xC-bytes of input, no output)]]
|-
| 600 || [1.0.0-3.0.2] SetCurrentPosixTime
| 1010 || [5.1.0-6.2.0] SetDataStorageRedirectTarget
|-
| 1011 || [7.0.0+] [[#GetProgramIndexForAccessLog (No input, returns two 32]]|-bit values "version" and "program_index")| 1012 || [9.0.0+] GetFsStackUsage|-| 1013 || [9.0.0+] UnsetSaveDataRootPath
|-
| 1100 || [4.0.0+] OverrideSaveDataTransferTokenSignVerificationKey
| 1110 || [6.0.0+] CorruptSaveDataFileSystemByOffset
|-
| 1200 || [6.0.0+] [[#OpenMultiCommitManager (No input, returns an output #IMultiCommitManager)]]
|}
Mounts a [[Gamecard_Partition|gamecard partition]].
 
== OpenSaveDataFileSystemByHashSalt ==
Takes a total of 0xB0-bytes of input, no output.
== OpenSaveDataFileSystem ==
== OpenSaveDataInfoReaderBySaveDataSpaceId ==
Takes an input u8 [[#SaveDataSpaceId]], returns an output [[#ISaveDataInfoReader]].
 
== FindSaveDataWithFilter ==
Takes a total of 0x50-bytes of input, returns 8-bytes of output and a type-0x6 output buffer.
 
== OpenSaveDataInfoReaderWithFilter ==
Takes a total of 0x50-bytes of input, returns an [[#ISaveDataInfoReader]].
 
== OpenSaveDataTransferManager ==
No input, returns an [[#ISaveDataTransferManager]].
 
== OpenSaveDataTransferManagerVersion2 ==
No input, returns an [[#ISaveDataTransferManagerWithDivision]].
 
== OpenSaveDataTransferProhibiterForCloudBackUp ==
Takes an input u64, returns an [[#ISaveDataTransferProhibiter]].
 
== ListApplicationAccessibleSaveDataOwnerId ==
Takes a total of 0x10-bytes of input, returns 4-bytes of output and a type-0x6 output buffer.
 
== OpenSaveDataTransferManagerForSaveDataRepair ==
No input, returns an output [[#ISaveDataTransferManagerForSaveDataRepair]].
== OpenContentStorageFileSystem ==
Returns an [[#IFileSystem]] with NCA files. The read data from these files is identical to the data read by [[NCM_services#ReadContentIdFile]].
 
== OpenCloudBackupWorkStorageFileSystem ==
Takes 4-bytes of input, returns an [[#IFileSystem]].
== OpenCustomStorageFileSystem ==
Returns a [[IPC_Marshalling#Domain_message|domain object ID]] implementing the [[#IStorage]] interface for data archives.
 
== OpenDataFileSystemWithProgramIndex ==
Takes an input u8, returns an [[#IFileSystem]].
 
== OpenDataStorageWithProgramIndex ==
Takes an input u8, returns an [[#IStorage]].
== OpenDeviceOperator ==
== OpenGameCardDetectionEventNotifier ==
This command returns a session to a port implementing the [[#IEventNotifier]] interface.
 
== SimulateDeviceDetectionEvent ==
Takes a total of 0xC-bytes of input, no output.
== VerifySaveDataFileSystem ==
The input buffer is written to the "$FsAccessLog:/FsAccessLog.txt" file, where "$FsAccessLog" is the SD-card mount-name. It's written to the current end of the file(appended).
 
== GetProgramIndexForAccessLog ==
No input, returns two 32-bit values "version" and "program_index".
 
== OpenMultiCommitManager ==
No input, returns an output [[#IMultiCommitManager]].
= IStorage =
{| class="wikitable" border="1"
|-
! Cmd || Name || Arguments
|-
| 0 || [[#Read || Takes a type-0x46 buffer, an offset and length ]]
|-
| 1 || [[#Write || Takes a type-0x45 buffer, an offset and length ]]
|-
| 2 || [[#Flush || None]]
|-
| 3 || [[#SetSize || Takes a size]]
|-
| 4 || [[#GetSize || None]]
|-
| 5 || [4.0.0+] OperateRange ||
|}
 
== Read ==
Takes a type-0x46 buffer, an offset and length.
 
== Write ==
Takes a type-0x45 buffer, an offset and length.
 
== Flush ==
No input.
 
== SetSize ==
Takes a size.
 
== GetSize ==
Returns a size.
= IFileSystem =
|-
| 219 || [8.0.0+] ChallengeCardExistence
|-
| 220 || [9.0.0+] GetGameCardCompatibilityType
|-
| 300 || SetSpeedEmulationMode
| 401 || [5.0.0+] ResumeSdmmcControl
|-
| 402 || [6.0.0+] [[#GetSdmmcConnectionStatus (Takes a total of 4-bytes of input, returns a total of 8-bytes of output)]]
|-
| 500 || [6.0.0+] [[#SetDeviceSimulationEvent (Takes a total of 0x14-bytes of input, no output)]]
|-
| 501 || [6.0.0+] [[#ClearDeviceSimulationEvent (Takes a total of 4-bytes of input, no output)]]
|}
[[NS_Services|NS]] appears to only use this with [[Content_Manager_services#GetTitleIdInfo]] and [[Content_Manager_services#GetUpdateTitleList]] with storageid=nandsys, for checking whether a sysupdate is required.
 
== GetSdmmcConnectionStatus ==
Takes a total of 4-bytes of input, returns a total of 8-bytes of output.
 
== SetDeviceSimulationEvent ==
Takes a total of 0x14-bytes of input, no output.
 
== ClearDeviceSimulationEvent ==
Takes a total of 4-bytes of input, no output.
= IEventNotifier =
= ISaveDataTransferManager =
This is "nn::fssrv::sf::ISaveDataTransferManager".
 
This was added with [[4.0.0]].
{| class="wikitable" border="1"
| 64 || [[#OpenSaveDataImporter]]
|}
 
This was added with [[4.0.0]].
== GetChallenge ==
== OpenSaveDataImporter ==
Takes an input u8 [[#SaveDataSpaceId]] and a 0x10-byte userID, and a type-0x5 input buffer. Returns an output u64 and an [[#ISaveDataImporter]].
 
= ISaveDataTransferManagerForSaveDataRepair =
This is "nn::fssrv::sf::ISaveDataTransferManagerForSaveDataRepair".
 
This was added with [[9.0.0]].
 
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 || [[#GetChallenge]]
|-
| 16 || [[#SetKeyPackage]]
|-
| 80 || [[#OpenSaveDataExporterAndGetEncryptedKey]]
|-
| 81 || [[#PrepareOpenSaveDataImporter]]
|-
| 90 || [[#OpenSaveDataImporter]]
|-
| 91 || [[#OpenSaveDataImporter2]]
|-
| 100 || [[#OpenSaveDataExporterWithKey]]
|-
| 110 || [[#OpenSaveDataImporterWithKey]]
|}
 
== SetKeyPackage ==
No input/output, takes a type-0x5 input buffer.
 
== OpenSaveDataExporterAndGetEncryptedKey ==
Takes a total of 0x10-bytes of input and a type-0x1A output buffer to receive a RsaEncryptedKey. Returns an [[#ISaveDataDivisionExporter]].
 
== PrepareOpenSaveDataImporter ==
Takes a type-0x1A output buffer to receive a RsaEncryptedKey.
 
== OpenSaveDataImporter ==
Takes a total of 0x18-bytes of input and two type-0x5 input buffers, returns an [[#ISaveDataDivisionImporter]].
 
== OpenSaveDataImporter2 ==
Takes a total of 0x18-bytes of input and a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].
 
== OpenSaveDataExporterWithKey ==
Takes a total of 0x20-bytes of input, returns an [[#ISaveDataDivisionExporter]].
 
== OpenSaveDataImporterWithKey ==
Takes a total of 0x28-bytes of input and a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].
= ISaveDataExporter =
This is "nn::fssrv::sf::ISaveDataExporter".
 
This was added with [[4.0.0]].
{| class="wikitable" border="1"
| 17 || [[#PullInitialData]]
|}
 
This was added with [[4.0.0]].
== GetSaveDataInfo ==
= ISaveDataImporter =
This is "nn::fssrv::sf::ISaveDataImporter".
 
This was added with [[4.0.0]].
{| class="wikitable" border="1"
| 17 || [[#Finalize]]
|}
 
This was added with [[4.0.0]].
== GetSaveDataInfo ==
= ISaveDataTransferManagerWithDivision =
This is "nn::fssrv::sf::ISaveDataTransferManagerWithDivision".
 
This was added with [[5.0.0]].
{| class="wikitable" border="1"
| 69 || [6.0.0+] [[#CancelSuspendingImport]]
|}
 
This was added with [[5.0.0]].
== GetChallenge ==
= ISaveDataDivisionExporter =
This is "nn::fssrv::sf::ISaveDataDivisionExporter".
 
This was added with [[5.0.0]].
{| class="wikitable" border="1"
! Cmd || Name
|-
| 0 || [[#SetDivisionCount (Takes an input u32, no output)]]|-| 1 || [6.0.0+] [[#GetSaveDataInfo]]
|-
| 1 16 || [6.0.0+[#OpenSaveDataDiffChunkIterator]] GetSaveDataInfo (No input/output, takes a type-0x6 output buffer)
|-
| 16 48 || OpenSaveDataDiffChunkIterator (No input, returns an [[#ISaveDataChunkIteratorOpenSaveDataChunkExporter]])
|-
| 48 64 || OpenSaveDataChunkExporter (Takes an input u32, returns an [6.0.0-8.1.0] [[#ISaveDataChunkExporterFinalizeFullExport]])
|-
| 64 65 || [6.0.0+-8.1.0] [[#FinalizeDiffExport]] FinalizeFullExport (No input, returns two 0x10-byte output structs)
|-
| 65 66 || [6.0.0+] FinalizeDiffExport (No input, returns an output 0x10-byte struct)[[#CancelExport]]
|-
| 66 67 || [6.0.0+] CancelExport (No input/output)[[#SuspendExport]]
|-
| 67 70 || [6.0.0+] SuspendExport (No input/output, takes a type-0x6 output buffer)[[#GetKeySeed]]
|-
| 70 71 || [6.0.0+] GetKeySeed (No input, returns an output 0x10-byte struct)[[#GetInitialDataMac]]
|-
| 71 72 || [6.0.0+] GetInitialDataMac (No input, returns an output 0x10-byte struct)[[#FinalizeExport]]
|-
| 72 73 || [69.0.0+] FinalizeExport (No input/output)[[#GetInitialDataMacKeyGeneration]]
|-
| 80 || [6.0.0+] [[#GetImportInitialDataAad (No input, returns an output 0x20-byte struct)]]
|-
| 81 || [6.0.0+] [[#SetExportInitialDataAad (Takes an input 0x20-byte struct, no output)]]
|-
| 96 || [6.0.0+] [[#GetReportInfo (No input, returns an output 0x20-byte struct)]]
|}
This was added with == SetDivisionCount ==Takes an input u32, no output. == OpenSaveDataChunkExporter ==Takes an input u32, returns an [[5#ISaveDataChunkExporter]]. == FinalizeFullExport ==No input, returns two 0x10-byte output structs.0 == FinalizeDiffExport ==No input, returns an output 0x10-byte struct.0]] == CancelExport ==No input/output. == SuspendExport ==No input/output, takes a type-0x6 output buffer. == GetKeySeed ==No input, returns an output 0x10-byte struct. == GetInitialDataMac ==No input, returns an output 0x10-byte struct. == FinalizeExport ==No input/output. == SetExportInitialDataAad ==Takes an input 0x20-byte struct, no output.
= ISaveDataDivisionImporter =
This is "nn::fssrv::sf::ISaveDataDivisionImporter".
 
This was added with [[5.0.0]].
{| class="wikitable" border="1"
! Cmd || Name
|-
| 0 || [6.0.0+] [[#GetSaveDataInfo (No input/output, takes a type-0x6 output buffer)]]
|-
| 16 || OpenSaveDataDiffChunkIterator (No input, returns an [[#ISaveDataChunkIteratorOpenSaveDataDiffChunkIterator]])
|-
| 32 || [[#InitializeImport (No input, returns an output u64)]]
|-
| 33 || [[#FinalizeImport (No input/output)]]
|-
| 34 || [6.0.0+] [[#CancelImport (No input/output)]]
|-
| 35 || [6.0.0+] [[#GetImportContext (No input/output, takes a type-0x6 output buffer)]]
|-
| 36 || [6.0.0+] [[#SuspendImport (No input/output)]]
|-
| 48 || OpenSaveDataChunkImporter (Takes an input u32, returns an [[#ISaveDataChunkImporterOpenSaveDataChunkImporter]])
|-
| 64 || [6.0.0+] [[#GetImportInitialDataAad (No input, returns an output 0x20-byte struct)]]
|-
| 80 || [6.0.0+] [[#GetReportInfo (No input, returns an output 0x20-byte struct)]]
|}
This was added with == GetSaveDataInfo ==No input/output, takes a type-0x6 output buffer. == OpenSaveDataDiffChunkIterator ==No input, returns an [[5#ISaveDataChunkIterator]]. == InitializeImport ==No input, returns an output u64.0 == FinalizeImport ==No input/output.0 == CancelImport ==No input/output. == GetImportContext ==No input/output, takes a type-0x6 output buffer. == SuspendImport ==No input/output. == OpenSaveDataChunkImporter ==Takes an input u32, returns an [[#ISaveDataChunkImporter]]. == GetImportInitialDataAad == No input, returns an output 0x20-byte struct. == GetReportInfo ==No input, returns an output 0x20-byte struct.
= ISaveDataChunkIterator =
This is "nn::fssrv::sf::ISaveDataChunkIterator".
 
This was added with [[5.0.0]].
{| class="wikitable" border="1"
! Cmd || Name
|-
| 0 || [[#Next (No input/output)]]
|-
| 1 || [[#IsEnd (No input, returns an output u8)]]
|-
| 16 || [[#GetId (No input, returns an output u32)]]
|}
This was added with [[5== Next ==No input/output.0 == IsEnd ==No input, returns an output u8.0]] == GetId ==No input, returns an output u32.
= ISaveDataChunkExporter =
This is "nn::fssrv::sf::ISaveDataChunkExporter".
 
This was added with [[5.0.0]].
{| class="wikitable" border="1"
! Cmd || Name
|-
| 0 || [[#Pull (Takes an input u64 and a type-0x6 output buffer, returns an output u64)|-| 16 || [6.0.0+] GetRestRawDataSize (No input, returns an output u64)]
|-
| 16 || [6.0.0+] [[#GetRestRawDataSize]]
|}
This was added with [[5== Pull ==Takes an input u64 and a type-0x6 output buffer, returns an output u64.0.0]] == GetRestRawDataSize ==No input, returns an output u64.
= ISaveDataChunkImporter =
This is "nn::fssrv::sf::ISaveDataChunkImporter".
 
This was added with [[5.0.0]].
{| class="wikitable" border="1"
! Cmd || Name
|-
| 0 || [[#Push (Takes an input u64 and a type-0x5 input buffer, no output)]]
|}
This was added with [[5.0.0]]== Push ==Takes an input u64 and a type-0x5 input buffer, no output.
= ISaveDataTransferProhibiter =
= IMultiCommitManager =
This was added with [[6.0.0]].
 
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 1 || Add (Takes an input [[#IFilesystemAdd]], no output)
|-
| 2 || [[#Commit (No input/output)]]
|}
This was added with == Add ==Takes an input [[6.0.0#IFilesystem]], no output. == Commit ==No input/output.
= FileSystemType =

Navigation menu