Filesystem services: Difference between revisions

No edit summary
No edit summary
 
(66 intermediate revisions by 5 users not shown)
Line 16: Line 16:
Takes a type-0x19 input buffer containing a [[#FspPath]] and an input [[NCM_services#ProgramId|ProgramId]]. Returns an [[#IFileSystem]].
Takes a type-0x19 input buffer containing a [[#FspPath]] and an input [[NCM_services#ProgramId|ProgramId]]. Returns an [[#IFileSystem]].


[10.0.0+] This now takes an additional type-0x1A output buffer.
[10.0.0+] Now takes an additional type-0x1A output buffer.


[16.0.0+] This now takes an additional input [[#ContentAttributes]].
[16.0.0+] Now takes an additional input [[#ContentAttributes]].


[17.0.0+] This now takes a type-0x6 output buffer instead of a type-0x1A output buffer.
[17.0.0+] Now takes a type-0x6 output buffer instead of a type-0x1A output buffer.
 
[20.0.0+] Now no longer takes a type-0x19 input buffer containing a [[#FspPath]] and instead takes an input [[NCM_services#StorageId|StorageId]].


== IsArchivedProgram ==
== IsArchivedProgram ==
Line 45: Line 47:


== RegisterProgram ==
== RegisterProgram ==
Takes a [[NCM_services#StorageId|StorageId]], an u64 ProcessId, a [[NCM_services#ProgramId|ProgramId]], a 0x1C type-A buffer for the [[NPDM#FS_Access_Header| FS Access Header]], and a 0x2C type-A buffer for the [[NPDM#FS_Access_Control| FS Access Control]]
Takes an input [[NCM_services#StorageId|StorageId]], an input u64 ProcessId, an input [[NCM_services#ProgramId|ProgramId]], a type-0x5 input buffer containing an [[NPDM#ACID|ACID]] [[NPDM#FsAccessControl|FsAccessControl]], and a type-0x5 input buffer containing an [[NPDM#ACI0|ACI0]] [[NPDM#FsAccessControl|FsAccessControl]].


Final FS permissions are stored as (ACI0_perms & ACID_perms). Will panic(svcBreak) when buffer sizes from ipc-rawdata are invalid.
Final FS permissions are stored as (ACI0_perms & ACID_perms). Will panic(svcBreak) when buffer sizes from ipc-rawdata are invalid.
[20.0.0+] Now takes an additional input [[#FsAccessControlRestrictionMode]].


== UnregisterProgram ==
== UnregisterProgram ==
Takes a pid. Removes registered FS permissions for that PID.
Takes an input u64 ProcessId. No output.
 
Removes registered FS permissions for that PID.


== SetEnabledProgramVerification ==
== SetEnabledProgramVerification ==
Seems to sets a global flag to inputval & 1.
Takes an input bool. No output.


When the flag is zero, it will set ret=0 instead of ret={error} when verifying the fixed-key [[NPDM]] ACID signature fails. This also skips verifying the [[NCA_Format|NCA Header]] signature using the ACID key. Note that if verifying the fixed-key ACID signature is successful, and verifying the ACID-key NCA header signature fails, it will throw an error and abort.
When the flag is zero, it will set ret=0 instead of ret={error} when verifying the fixed-key [[NPDM]] ACID signature fails. This also skips verifying the [[NCA_Format|NCA Header]] signature using the ACID key. Note that if verifying the fixed-key ACID signature is successful, and verifying the ACID-key NCA header signature fails, it will throw an error and abort.
Line 107: Line 113:
|-
|-
| 28 || [4.0.0+] DeleteSaveDataFileSystemBySaveDataAttribute
| 28 || [4.0.0+] DeleteSaveDataFileSystemBySaveDataAttribute
|-
| 29 || [19.0.0+] IsInitializationMode
|-
|-
| 30 || [[#OpenGameCardStorage]]
| 30 || [[#OpenGameCardStorage]]
Line 123: Line 131:
|-
|-
| 37 || [14.0.0+] CreateSaveDataFileSystemWithCreationInfo2
| 37 || [14.0.0+] CreateSaveDataFileSystemWithCreationInfo2
|-
| 38 || [20.0.0+] DetachSdCard
|-
| 39 || [21.0.0+] ShutdownStorage
|-
| 40 || [21.0.0+] FixSaveDataCertificate
|-
|-
| 51 || [[#OpenSaveDataFileSystem]]
| 51 || [[#OpenSaveDataFileSystem]]
Line 173: Line 187:
|-
|-
| 87 || [11.0.0+] [[#OpenSaveDataTransferManagerForRepair]]
| 87 || [11.0.0+] [[#OpenSaveDataTransferManagerForRepair]]
|-
| 88 || [21.0.0+] OpenSaveDataTransferManagerForSaveDataRepairWithPolicy
|-
|-
| 100 || OpenImageDirectoryFileSystem
| 100 || OpenImageDirectoryFileSystem
Line 207: Line 223:
|-
|-
| 501 || [[#OpenGameCardDetectionEventNotifier]]
| 501 || [[#OpenGameCardDetectionEventNotifier]]
|-
| 502 || [20.0.0+] OpenSdCardAwakenReadyEventNotifier
|-
| 503 || [19.0.0+] OpenGameCardAwakenReadyEventNotifier
|-
|-
| 510 || [5.0.0+] OpenSystemDataUpdateEventNotifier
| 510 || [5.0.0+] OpenSystemDataUpdateEventNotifier
Line 257: Line 277:
|-
|-
| 631 || [4.0.0+] IsSdCardAccessible
| 631 || [4.0.0+] IsSdCardAccessible
|-
| 632 || [19.0.0+] TestExternalKey
|-
|-
| 640 || [4.0.0-7.0.1] IsSignedSystemPartitionOnSdCardValid
| 640 || [4.0.0-7.0.1] IsSignedSystemPartitionOnSdCardValid
|-
| 650 || [S2] RegisterTicketVersionKeys
|-
| 651 || [S2] RegisterCpDeviceUniqueKey
|-
| 660 || [S2] GetProcessEnvironmentSource
|-
|-
| 700 || [5.0.0+] [[#OpenAccessFailureDetectionEventNotifier]]
| 700 || [5.0.0+] [[#OpenAccessFailureDetectionEventNotifier]]
Line 270: Line 298:
| 720 || [5.0.0+] AbandonAccessFailure
| 720 || [5.0.0+] AbandonAccessFailure
|-
|-
| 800 || [2.0.0+] GetAndClearErrorInfo
| 800 || [2.0.0+] [[#GetAndClearErrorInfo]]
|-
|-
| 810 || [7.0.0+] RegisterProgramIndexMapInfo
| 810 || [7.0.0+] RegisterProgramIndexMapInfo
|-
| 820 || [19.0.0+] GetContentStorageInfoIndex
|-
|-
| 1000 || [1.0.0-9.2.0] SetBisRootForHost
| 1000 || [1.0.0-9.2.0] SetBisRootForHost
Line 280: Line 310:
| 1002 || [[#SetSaveDataRootPath]]
| 1002 || [[#SetSaveDataRootPath]]
|-
|-
| 1003 || DisableAutoSaveDataCreation
| 1003 || [1.0.0-21.2.0] DisableAutoSaveDataCreation
|-
|-
| 1004 || [[#SetGlobalAccessLogMode]]
| 1004 || [[#SetGlobalAccessLogMode]]
Line 312: Line 342:
| 1019 || [13.0.0+] UnsetDebugOption
| 1019 || [13.0.0+] UnsetDebugOption
|-
|-
| 1100 || [4.0.0+] OverrideSaveDataTransferTokenSignVerificationKey
| 1020 || [18.0.0+] [[#OpenMemoryStressor]]
|-
| 1100 || [4.0.0-17.0.1] OverrideSaveDataTransferTokenSignVerificationKey
|-
| 1101 || [18.0.0+] OverrideSaveDataTransferKeyForTest
|-
|-
| 1110 || [6.0.0+] CorruptSaveDataFileSystemByOffset
| 1110 || [6.0.0+] CorruptSaveDataFileSystemByOffset
Line 329: Line 363:


Note that the functions check whether or not at least one bit is set in the mask. This means that, you don't need to set 0xFFFFFFFFFFFFFFFF to get all permissions: it suffices to set 0x8000000000000000.
Note that the functions check whether or not at least one bit is set in the mask. This means that, you don't need to set 0xFFFFFFFFFFFFFFFF to get all permissions: it suffices to set 0x8000000000000000.
If nn::spl::IsDebugMode() is disabled (retail behavior), the FS sysmodule masks the permission descriptor with 0x3FFFFFFFFFFFFFFF upon process registration.


If the code were to request an invalid input type, panic. But this never happens.
If the code were to request an invalid input type, panic. But this never happens.
Line 367: Line 403:
| 0xD || CanMountBisSystem || 0x8000000000008080 || RW || [[#OpenBisFileSystem]]
| 0xD || CanMountBisSystem || 0x8000000000008080 || RW || [[#OpenBisFileSystem]]
|-
|-
| 0xE || CanMountBisSystemProperEncryption || 0x8000000000000080 || RW || [[#OpenBisFileSystem]]
| [21.0.0+] 0xE || CanMountBisUserProperPartition || 0x8000000000008080 || RW || [[#OpenBisFileSystem]]
|-
|-
| 0xF || CanMountBisSystemProperPartition || 0x8000000000000080 || RW || [[#OpenBisFileSystem]]
| [21.0.0+] 0xF || CanMountBisSystemProperEncryption || 0x8000000000000080 || RW || [[#OpenBisFileSystem]]
|-
|-
| 0x10 || CanMountSdCard || 0xC000000000200000 || RW || [[#OpenSdCardFileSystem]]
| [21.0.0+] 0x10 || CanMountBisSystemProperPartition || 0x8000000000008080 || RW || [[#OpenBisFileSystem]]
|-
|-
| 0x11 || CanMountGameCard || 0x8000000000000010 || R- || [[#OpenGameCardFileSystem]]
| [21.0.0+] 0x11 ([-20.5.0] 0x10) || CanMountSdCard || 0xC000000000200000 || RW || [[#OpenSdCardFileSystem]]
|-
|-
| 0x12 || CanMountDeviceSaveData || 0x8000000000040020 || RW || [[#OpenSaveDataFileSystem]]
| [21.0.0+] 0x12 ([-20.5.0] 0x11) || CanMountGameCard || 0x8000000000000010 || R- || [[#OpenGameCardFileSystem]]
|-
|-
| 0x13 || CanMountSystemSaveData || 0x8000000000000028 || RW || [[#OpenSaveDataFileSystemBySystemSaveDataId]]
| [21.0.0+] 0x13 ([-20.5.0] 0x12) || CanMountDeviceSaveData || 0x8000000000040020 || RW || [[#OpenSaveDataFileSystem]]
|-
|-
| 0x14 || CanMountOthersSaveData || 0x8000000000000020 || RW || [[#OpenSaveDataFileSystem]]
| [21.0.0+] 0x14 ([-20.5.0] 0x13) || CanMountSystemSaveData || 0x8000000000000028 || RW || [[#OpenSaveDataFileSystemBySystemSaveDataId]]
|-
|-
| 0x15 || CanMountOthersSystemSaveData || 0x8000000000000020 || RW || [[#OpenSaveDataFileSystemBySystemSaveDataId]]
| [21.0.0+] 0x15 ([-20.5.0] 0x14) || CanMountOthersSaveData || 0x8000000000000020 || RW || [[#OpenSaveDataFileSystem]]
|-
|-
| 0x16 || CanOpenBisPartitionBootPartition1Root || 0x8000000000010082 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x16 ([-20.5.0] 0x15) || CanMountOthersSystemSaveData || 0x8000000000000020 || RW || [[#OpenSaveDataFileSystemBySystemSaveDataId]]
|-
|-
| 0x17 || CanOpenBisPartitionBootPartition2Root || 0x8000000000010080 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x17 ([-20.5.0] 0x16) || CanOpenBisPartitionBootPartition1Root || 0x8000000000010082 || RW || [[#OpenBisStorage]]
|-
|-
| 0x18 || CanOpenBisPartitionUserDataRoot || 0x8000000000000080 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x18 ([-20.5.0] 0x17) || CanOpenBisPartitionBootPartition2Root || 0x8000000000010080 || RW || [[#OpenBisStorage]]
|-
|-
| 0x19 || CanOpenBisPartitionBootConfigAndPackage2Part1 || 0x8000000000010080 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x19 ([-20.5.0] 0x18) || CanOpenBisPartitionUserDataRoot || 0x8000000000000080 || RW || [[#OpenBisStorage]]
|-
|-
| 0x1A || CanOpenBisPartitionBootConfigAndPackage2Part2 || 0x8000000000010080 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x1A ([-20.5.0] 0x19) || CanOpenBisPartitionBootConfigAndPackage2Part1 || 0x8000000000010080 || RW || [[#OpenBisStorage]]
|-
|-
| 0x1B || CanOpenBisPartitionBootConfigAndPackage2Part3 || 0x8000000000010080 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x1B ([-20.5.0] 0x1A) || CanOpenBisPartitionBootConfigAndPackage2Part2 || 0x8000000000010080 || RW || [[#OpenBisStorage]]
|-
|-
| 0x1C || CanOpenBisPartitionBootConfigAndPackage2Part4 || 0x8000000000010080 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x1C ([-20.5.0] 0x1B) || CanOpenBisPartitionBootConfigAndPackage2Part3 || 0x8000000000010080 || RW || [[#OpenBisStorage]]
|-
|-
| 0x1D || CanOpenBisPartitionBootConfigAndPackage2Part5 || 0x8000000000010080 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x1D ([-20.5.0] 0x1C) || CanOpenBisPartitionBootConfigAndPackage2Part4 || 0x8000000000010080 || RW || [[#OpenBisStorage]]
|-
|-
| 0x1E || CanOpenBisPartitionBootConfigAndPackage2Part6 || 0x8000000000010080 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x1E ([-20.5.0] 0x1D) || CanOpenBisPartitionBootConfigAndPackage2Part5 || 0x8000000000010080 || RW || [[#OpenBisStorage]]
|-
|-
| 0x1F || CanOpenBisPartitionCalibrationBinary || 0x8000000000000084 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x1F ([-20.5.0] 0x1E) || CanOpenBisPartitionBootConfigAndPackage2Part6 || 0x8000000000010080 || RW || [[#OpenBisStorage]]
|-
|-
| 0x20 || CanOpenBisPartitionCalibrationFile || 0x8000000000000084 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x20 ([-20.5.0] 0x1F) || CanOpenBisPartitionCalibrationBinary || 0x8000000000000084 || RW || [[#OpenBisStorage]]
|-
|-
| 0x21 || CanOpenBisPartitionSafeMode || 0x8000000000000080 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x21 ([-20.5.0] 0x20) || CanOpenBisPartitionCalibrationFile || 0x8000000000000084 || RW || [[#OpenBisStorage]]
|-
|-
| 0x22 || CanOpenBisPartitionUser || 0x8000000000000080 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x22 ([-20.5.0] 0x21) || CanOpenBisPartitionSafeMode || 0x8000000000000080 || RW || [[#OpenBisStorage]]
|-
|-
| 0x23 || CanOpenBisPartitionSystem || 0x8000000000000080 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x23 ([-20.5.0] 0x22) || CanOpenBisPartitionUser || 0x8000000000000080 || RW || [[#OpenBisStorage]]
|-
|-
| 0x24 || CanOpenBisPartitionSystemProperEncryption || 0x8000000000000080 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x24 ([-20.5.0] 0x23) || CanOpenBisPartitionSystem || 0x8000000000000080 || RW || [[#OpenBisStorage]]
|-
|-
| 0x25 || CanOpenBisPartitionSystemProperPartition || 0x8000000000000080 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x25 ([-20.5.0] 0x24) || CanOpenBisPartitionSystemProperEncryption || 0x8000000000000080 || RW || [[#OpenBisStorage]]
|-
|-
| 0x26 || CanOpenBisPartitionDeviceTreeBlob || 0x8000002000000080 || RW || [[#OpenBisStorage]]
| [21.0.0+] 0x26 ([-20.5.0] 0x25) || CanOpenBisPartitionSystemProperPartition || 0x8000000000000080 || RW || [[#OpenBisStorage]]
|-
|-
| [3.0.0+] 0x27 || CanOpenSdCardStorage || 0xC000000000200000 || RW ||  
| [21.0.0+] 0x27 ([-20.5.0] 0x26) || CanOpenBisPartitionDeviceTreeBlob || 0x8000002000000080 || RW || [[#OpenBisStorage]]
|-
|-
| [3.0.0+] 0x28 || CanOpenGameCardStorage || 0x8000000000000100 || RW || [[#OpenGameCardStorage]], [[#EraseGameCard]] (bit1), [[#WriteToGameCard]] (bit1), [[#GetGameCardErrorInfo]] (bit1), [[#EraseAndWriteParamDirectly]] (bit1), [[#ReadParamDirectly]] (bit1), [[#ForceEraseGameCard]] (bit1)
| [21.0.0+] 0x28 ([3.0.0-20.5.0] 0x27) || CanOpenSdCardStorage || 0xC000000000200000 || RW ||  
|-
|-
| [4.0.0+] 0x29 || CanMountSystemDataPrivate || 0x8000000000100008 || R- || [[#OpenFileSystem]], [[#OpenDataStorageByDataId]]
| [21.0.0+] 0x29 ([3.0.0-20.5.0] 0x28) || CanOpenGameCardStorage || 0x8000000000000100 || RW || [[#OpenGameCardStorage]], [[#EraseGameCard]] (bit1), [[#WriteToGameCardDirectly]] (bit1), [[#GetGameCardErrorInfo]] (bit1), [[#EraseAndWriteParamDirectly]] (bit1), [[#ReadParamDirectly]] (bit1), [[#ForceEraseGameCard]] (bit1)
|-
|-
| [5.0.0+] 0x2A || CanMountHost || 0xC000000000400000 || RW || [[#OpenHostFileSystem]]
| [21.0.0+] 0x2A ([4.0.0-20.5.0] 0x29) || CanMountSystemDataPrivate || 0x8000000000100008 || R- || [[#OpenFileSystem]], [[#OpenDataStorageByDataId]]
|-
|-
| [6.0.0+] 0x2B || CanMountRegisteredUpdatePartition || 0x8000000000010000 || R- || [[#OpenRegisteredUpdatePartition]]
| [21.0.0+] 0x2B || CanMountSystemDataPrivateIdRestricted || 0x8000200000000000 || R- || [[#OpenFileSystem]], [[#OpenDataStorageByDataId]]
|-
|-
| [7.0.0+] 0x2C || CanOpenSaveDataInternalStorage || 0x8000000000000000 || RW || [[#OpenSaveDataInternalStorageFileSystem]]
| [21.0.0+] 0x2C ([5.0.0-20.5.0] 0x2A) || CanMountHost || 0xC000000000400000 || RW || [[#OpenHostFileSystem]]
|-
|-
| [7.0.0+] 0x2D || CanMountTemporaryDirectory || 0xC000000000000000 || RW ||  
| [21.0.0+] 0x2D ([6.0.0-20.5.0] 0x2B) || CanMountRegisteredUpdatePartition || 0x8000000000010000 || R- || [[#OpenRegisteredUpdatePartition]]
|-
|-
| [11.0.0+] 0x2E || CanMountAllBaseFilesystem || 0x8000000000000000 || RW || OpenBaseFileSystem
| [21.0.0+] 0x2E ([7.0.0-20.5.0] 0x2C) || CanOpenSaveDataInternalStorage || [20.0.0+] 0x8000000000000020 ([-19.0.0] 0x8000000000000000) || RW || [[#OpenSaveDataInternalStorageFileSystem]]
|-
|-
| [15.0.0+] 0x2F || CanNotMount || 0x0000000000000000 || -- || OpenCustomStorageFileSystem
| [21.0.0+] 0x2F ([7.0.0-20.5.0] 0x2D) || CanMountTemporaryDirectory || 0xC000000000000000 || RW || [11.0.0+] OpenBaseFileSystem, [12.0.0+] FormatBaseFileSystem
|-
| [21.0.0+] 0x30 ([11.0.0-20.5.0] 0x2E) || CanMountAllBaseFilesystem || 0x8000000000000000 || RW || OpenBaseFileSystem, [12.0.0+] FormatBaseFileSystem
|-
| [21.0.0+] 0x31 ([15.0.0-20.5.0] 0x2F) || CanNotMount || 0x0000000000000000 || -- || OpenCustomStorageFileSystem
|}
|}


Line 445: Line 485:
| 0x1 || CanEraseMmc || 0x8000000000000080 || EraseMmc
| 0x1 || CanEraseMmc || 0x8000000000000080 || EraseMmc
|-
|-
| 0x2 || CanGetGameCardDeviceCertificate || 0x8000000000000010 || GetGameCardDeviceCertificate
| [20.0.0+] 0x2 || CanMarkBeforeEraseMmcPartitionUserData || 0x8000100000000080 ||
|-
|-
| 0x3 || CanGetGameCardIdSet || 0x8000000000000010 || GetGameCardIdSet
| [20.0.0+] 0x3 ([-19.0.0] 0x2) || CanGetGameCardDeviceCertificate || 0x8000000000000010 || GetGameCardDeviceCertificate
|-
|-
| 0x4 || CanFinalizeGameCardDriver || 0x8000000000000200 || FinalizeGameCardDriver
| [20.0.0+] 0x4 ([-19.0.0] 0x3) || CanGetGameCardIdSet || 0x8000000000000010 || GetGameCardIdSet
|-
|-
| 0x5 || CanGetGameCardAsicInfo || 0x8000000000000200 || GetGameCardAsicInfo
| [20.0.0+] 0x5 ([-19.0.0] 0x4) || CanFinalizeGameCardDriver || 0x8000000000000200 || FinalizeGameCardDriver
|-
|-
| 0x6 || CanGetGameCardAsicCertificate || 0x8000000000000200 || GetGameCardAsicCertificate
| [20.0.0+] 0x6 ([-19.0.0] 0x5) || CanGetGameCardAsicInfo || 0x8000000000000200 || GetGameCardAsicInfo
|-
|-
| 0x7 || CanCreateSaveData || 0x8000000000002020 || [[#CreateSaveDataFileSystem]]
| [20.0.0+] 0x7 ([-19.0.0] 0x6) || CanGetGameCardAsicCertificate || 0x8000000000000200 || GetGameCardAsicCertificate
|-
|-
| 0x8 || CanDeleteSaveData || 0x8000000000000060 || [[#DeleteSaveDataFileSystem]], RegisterSaveDataFileSystemAtomicDeletion
| [20.0.0+] 0x8 || CanGetGameCardCardHeader || 0x8000100000000080 ||
|-
|-
| 0x9 || CanCreateSystemSaveData || 0x8000000000000028 || CreateSaveDataFileSystemBySystemSaveDataId
| [20.0.0+] 0x9 || CanGetGameCardApplicationIdList || 0x8000100000000080 ||
|-
|-
| 0xA || CanCreateOthersSystemSaveData || 0x8000000000000020 || CreateSaveDataFileSystemBySystemSaveDataId
| [20.0.0+] 0xA || CanGetGameCardDetailedErrorReportInfo || 0x8000080000000000 ||
|-
|-
| 0xB || CanDeleteSystemSaveData || 0x8000000000004028 || [[#DeleteSaveDataFileSystem]], RegisterSaveDataFileSystemAtomicDeletion
| [20.0.0+] 0xB || CanSetGameCardSessionCreationDelay || 0x8000000000000010 ||
|-
|-
| 0xC || CanOpenSaveDataInfoReader || 0x8000000000000060 || [[#OpenSaveDataInfoReaderBySaveDataSpaceId]], [[#OpenSaveDataInfoReader]]
| [20.0.0+] 0xC || CanRegisterGameCardConfigurationData || 0x8000100000000080 ||
|-
|-
| 0xD || CanOpenSaveDataInfoReaderForSystem || 0x8000000000004020 || [[#OpenSaveDataInfoReaderBySaveDataSpaceId]], [[#OpenSaveDataInfoReader]]
| [20.0.0+] 0xD ([-19.0.0] 0x7) || CanCreateSaveData || 0x8000000000002020 || [[#CreateSaveDataFileSystem]]
|-
|-
| 0xE || CanOpenSaveDataInfoReaderForInternal || 0x8000000000000040 || [[#OpenSaveDataInfoReaderWithFilter]]
| [20.0.0+] 0xE ([-19.0.0] 0x8) || CanDeleteSaveData || 0x8000000000000060 || [[#DeleteSaveDataFileSystem]], RegisterSaveDataFileSystemAtomicDeletion
|-
|-
| 0xF || CanOpenSaveDataMetaFile || 0x8000000000020000 || OpenSaveDataMetaFile
| [20.0.0+] 0xF ([-19.0.0] 0x9) || CanCreateSystemSaveData || 0x8000000000000028 || CreateSaveDataFileSystemBySystemSaveDataId
|-
|-
| 0x10 || CanSetCurrentPosixTime || 0x8000000000000400 || SetCurrentPosixTime, SetCurrentPosixTimeWithTimeDifference
| [20.0.0+] 0x10 ([-19.0.0] 0xA) || CanCreateOthersSystemSaveData || 0x8000000000000020 || CreateSaveDataFileSystemBySystemSaveDataId
|-
|-
| 0x11 || CanReadSaveDataFileSystemExtraData || 0x8000000000004060 || [[#ReadSaveDataFileSystemExtraData]]
| [20.0.0+] 0x11 ([-19.0.0] 0xB) || CanDeleteSystemSaveData || 0x8000000000004028 || [[#DeleteSaveDataFileSystem]], RegisterSaveDataFileSystemAtomicDeletion
|-
|-
| 0x12 || CanSetGlobalAccessLogMode || 0x8000000000080000 || [[#SetGlobalAccessLogMode]]
| [20.0.0+] 0x12 ([-19.0.0] 0xC) || CanOpenSaveDataInfoReader || 0x8000000000000060 || [[#OpenSaveDataInfoReaderBySaveDataSpaceId]], [[#OpenSaveDataInfoReader]]
|-
|-
| 0x13 || CanSetSpeedEmulationMode || 0x8000000000080000 || SetSpeedEmulationMode
| [20.0.0+] 0x13 ([-19.0.0] 0xD) || CanOpenSaveDataInfoReaderForSystem || 0x8000000000004020 || [[#OpenSaveDataInfoReaderBySaveDataSpaceId]], [[#OpenSaveDataInfoReader]]
|-
|-
| 0x14 || CanDebug || 0xC000000000000000 ||  
| [20.0.0+] 0x14 ([-19.0.0] 0xE) || CanOpenSaveDataInfoReaderForInternal || 0x8000000000000040 || [[#OpenSaveDataInfoReaderWithFilter]]
|-
|-
| 0x15 || CanFillBis || 0xC000000000800000 || CreatePaddingFile, DeleteAllPaddingFiles
| [20.0.0+] 0x15 ([-19.0.0] 0xF) || CanOpenSaveDataMetaFile || 0x8000000000020000 || OpenSaveDataMetaFile
|-
|-
| [2.0.0+] 0x16 || CanCorruptSaveData || 0xC000000001000000 || CorruptSaveDataFileSystem, CorruptSaveDataFileSystemBySaveDataSpaceId
| [20.0.0+] 0x16 ([-19.0.0] 0x10) || CanSetCurrentPosixTime || 0x8000000000000400 || SetCurrentPosixTime, SetCurrentPosixTimeWithTimeDifference
|-
|-
| [2.0.0+] 0x17 || CanCorruptSystemSaveData || 0x8000000001000060 || CorruptSaveDataFileSystem, CorruptSaveDataFileSystemBySaveDataSpaceId
| [20.0.0+] 0x17 ([-19.0.0] 0x11) || CanReadSaveDataFileSystemExtraData || 0x8000000000004060 || [[#ReadSaveDataFileSystemExtraData]]
|-
|-
| [2.0.0+] 0x18 || CanVerifySaveData || 0x8000000000000060 || [[#VerifySaveDataFileSystem]], VerifySaveDataFileSystemBySaveDataSpaceId
| [20.0.0+] 0x18 ([-19.0.0] 0x12) || CanSetGlobalAccessLogMode || 0x8000000000080000 || [[#SetGlobalAccessLogMode]]
|-
|-
| [2.0.0+] 0x19 || CanDebugSaveData || 0xC000000002000000 || [[#CreateSaveDataFileSystem]], [[#OpenSaveDataFileSystem]], [[#SetSaveDataRootPath]]
| [20.0.0+] 0x19 ([-19.0.0] 0x13) || CanSetSpeedEmulationMode || 0x8000000000080000 || SetSpeedEmulationMode
|-
|-
| [2.0.0+] 0x1A || CanFormatSdCard || 0x8000000004000000 || FormatSdCardFileSystem
| [20.0.0+] 0x1A || CanSetApplicationStorageSpeed || 0x8000000400080000 ||
|-
|-
| [3.0.0+] 0x1B || CanGetRightsId || 0x8000000008000000 || GetRightsId, GetRightsIdAndKeyGenerationByPath, GetRightsIdByPath
| [20.0.0+] 0x1B || CanSetGameCardClockRateForSpeedEmulation || 0x8000000400080000 ||
|-
|-
| [3.0.0+] 0x1C || CanRegisterExternalKey || 0x8000000010000000 || RegisterExternalKey, UnregisterAllExternalKey
| [20.0.0+] 0x1C ([-19.0.0] 0x14) || CanDebug || 0xC000000000000000 ||  
|-
|-
| [4.0.0+] 0x1D || CanSetEncryptionSeed || 0x8000000000000800 || [[#SetSdCardEncryptionSeed]]
| [20.0.0+] 0x1D ([-19.0.0] 0x15) || CanFillBis || 0xC000000000800000 || CreatePaddingFile, DeleteAllPaddingFiles
|-
|-
| [4.0.0+] 0x1E || CanWriteSaveDataFileSystemExtraDataTimeStamp || 0x8000000000000020 || WriteSaveDataFileSystemExtraData, WriteSaveDataFileSystemExtraDataWithMask
| [20.0.0+] 0x1E ([2.0.0-19.0.0] 0x16) || CanCorruptSaveData || 0xC000000001000000 || CorruptSaveDataFileSystem, CorruptSaveDataFileSystemBySaveDataSpaceId
|-
|-
| [4.0.0+] 0x1F || CanWriteSaveDataFileSystemExtraDataFlags || 0x8000000000004020 || WriteSaveDataFileSystemExtraData, WriteSaveDataFileSystemExtraDataWithMask
| [20.0.0+] 0x1F ([2.0.0-19.0.0] 0x17) || CanCorruptSystemSaveData || 0x8000000001000060 || CorruptSaveDataFileSystem, CorruptSaveDataFileSystemBySaveDataSpaceId
|-
|-
| [4.0.0+] 0x20 || CanWriteSaveDataFileSystemExtraDataCommitId || 0x8000000000000020 || WriteSaveDataFileSystemExtraData, WriteSaveDataFileSystemExtraDataWithMask
| [20.0.0+] 0x20 ([2.0.0-19.0.0] 0x18) || CanVerifySaveData || 0x8000000000000060 || [[#VerifySaveDataFileSystem]], VerifySaveDataFileSystemBySaveDataSpaceId
|-
|-
| [5.0.0+] 0x21 || CanWriteSaveDataFileSystemExtraDataAll || 0x8000000000000000 || WriteSaveDataFileSystemExtraData, WriteSaveDataFileSystemExtraDataWithMask
| [20.0.0+] 0x21 ([2.0.0-19.0.0] 0x19) || CanDebugSaveData || 0xC000000002000000 || [[#CreateSaveDataFileSystem]], [[#OpenSaveDataFileSystem]], [[#SetSaveDataRootPath]]
|-
|-
| [5.0.0+] 0x22 || CanExtendSaveData || 0x8000000000002020 || ExtendSaveDataFileSystem
| [20.0.0+] 0x22 ([2.0.0-19.0.0] 0x1A) || CanFormatSdCard || 0x8000000004000000 || FormatSdCardFileSystem
|-
|-
| [5.0.0+] 0x23 || CanExtendSystemSaveData || 0x8000000000000028 || ExtendSaveDataFileSystem
| [20.0.0+] 0x23 ([3.0.0-19.0.0] 0x1B) || CanGetRightsId || 0x8000000008000000 || GetRightsId, GetRightsIdAndKeyGenerationByPath, GetRightsIdByPath
|-
|-
| [5.0.0+] 0x24 || CanExtendOthersSystemSaveData || 0x8000000000000020 || ExtendSaveDataFileSystem
| [20.0.0+] 0x24 ([3.0.0-19.0.0] 0x1C) || CanRegisterExternalKey || 0x8000000010000000 || RegisterExternalKey, UnregisterAllExternalKey
|-
|-
| [5.0.0+] 0x25 || CanRegisterUpdatePartition || 0x8000000020000000 || RegisterUpdatePartition
| [20.0.0+] 0x25 ([4.0.0-19.0.0] 0x1D) || CanSetEncryptionSeed || 0x8000000000000800 || [[#SetSdCardEncryptionSeed]]
|-
|-
| [5.0.0+] 0x26 || CanOpenSaveDataTransferManager || 0x8000000040000000 || [[#OpenSaveDataTransferManager]]
| [20.0.0+] 0x26 ([4.0.0-19.0.0] 0x1E) || CanWriteSaveDataFileSystemExtraDataTimeStamp || 0x8000000000000020 || WriteSaveDataFileSystemExtraData, WriteSaveDataFileSystemExtraDataWithMask
|-
|-
| [5.0.0+] 0x27 || CanOpenSaveDataTransferManagerVersion2 || 0x8000000200000000 || [[#OpenSaveDataTransferManagerVersion2]]
| [20.0.0+] 0x27 ([4.0.0-19.0.0] 0x1F) || CanWriteSaveDataFileSystemExtraDataFlags || 0x8000000000004020 || WriteSaveDataFileSystemExtraData, WriteSaveDataFileSystemExtraDataWithMask
|-
|-
| [5.0.0+] 0x28 || CanOpenSaveDataTransferManagerForSaveDataRepair || 0x8000000200000000 || OpenSaveDataTransferManagerForSaveDataRepair
| [20.0.0+] 0x28 ([4.0.0-19.0.0] 0x20) || CanWriteSaveDataFileSystemExtraDataCommitId || 0x8000000000000020 || WriteSaveDataFileSystemExtraData, WriteSaveDataFileSystemExtraDataWithMask
|-
|-
| [5.0.0+] 0x29 || CanOpenSaveDataTransferManagerForSaveDataRepairTool || 0x8000000000000000 || OpenSaveDataTransferManagerForSaveDataRepair
| [20.0.0+] 0x29 ([5.0.0-19.0.0] 0x21) || CanWriteSaveDataFileSystemExtraDataAll || 0x8000000000000000 || WriteSaveDataFileSystemExtraData, WriteSaveDataFileSystemExtraDataWithMask
|-
|-
| [5.0.0+] 0x2A || CanOpenOpenSaveDataTransferProhibiter || 0x8000000200002000 || [[#OpenSaveDataTransferProhibiter]]
| [20.0.0+] 0x2A ([5.0.0-19.0.0] 0x22) || CanExtendSaveData || 0x8000000000002020 || ExtendSaveDataFileSystem
|-
|-
| [5.0.0+] 0x2B || CanOpenSaveDataMover || 0x8000001000000000 || [[#OpenSaveDataMover]]
| [20.0.0+] 0x2B ([5.0.0-19.0.0] 0x23) || CanExtendSystemSaveData || 0x8000000000000028 || ExtendSaveDataFileSystem
|-
|-
| [5.0.0+] 0x2C || CanOpenBisWiper || 0x8000000000000800 || [[#OpenBisWiper]]
| [20.0.0+] 0x2C ([5.0.0-19.0.0] 0x24) || CanExtendOthersSystemSaveData || 0x8000000000000020 || ExtendSaveDataFileSystem
|-
|-
| [5.0.0+] 0x2D || CanListAccessibleSaveDataOwnerId || 0x8000000240002000 || [[#ListAccessibleSaveDataOwnerId]]
| [20.0.0+] 0x2D ([5.0.0-19.0.0] 0x25) || CanRegisterUpdatePartition || 0x8000000020000000 || RegisterUpdatePartition
|-
|-
| [5.0.0+] 0x2E || CanControlMmcPatrol || 0x8000000000000000 || SuspendMmcPatrol, ResumeMmcPatrol
| [20.0.0+] 0x2E ([5.0.0-19.0.0] 0x26) || CanOpenSaveDataTransferManager || 0x8000000040000000 || [[#OpenSaveDataTransferManager]]
|-
|-
| [5.0.0+] 0x2F || CanOverrideSaveDataTransferTokenSignVerificationKey || 0x8000000000000000 || OverrideSaveDataTransferTokenSignVerificationKey
| [20.0.0+] 0x2F ([5.0.0-19.0.0] 0x27) || CanOpenSaveDataTransferManagerVersion2 || 0x8000000200000000 || [[#OpenSaveDataTransferManagerVersion2]]
|-
|-
| [5.1.0+] 0x30 || CanOpenSdCardDetectionEventNotifier || 0x8000000080200000 || [[#OpenSdCardDetectionEventNotifier]]
| [20.0.0+] 0x30 ([5.0.0-19.0.0] 0x28) || CanOpenSaveDataTransferManagerForSaveDataRepair || 0x8000000200000000 || OpenSaveDataTransferManagerForSaveDataRepair
|-
|-
| [6.0.0+] 0x31 || CanOpenGameCardDetectionEventNotifier || 0x8000000080000110 || [[#OpenGameCardDetectionEventNotifier]]
| [20.0.0+] 0x31 ([5.0.0-19.0.0] 0x29) || CanOpenSaveDataTransferManagerForSaveDataRepairTool || 0x8000000000000000 || OpenSaveDataTransferManagerForSaveDataRepair
|-
|-
| [6.0.0+] 0x32 || CanOpenSystemDataUpdateEventNotifier || 0x8000000000100008 || OpenSystemDataUpdateEventNotifier
| [20.0.0+] 0x32 ([5.0.0-19.0.0] 0x2A) || CanOpenOpenSaveDataTransferProhibiter || 0x8000000200002000 || [[#OpenSaveDataTransferProhibiter]]
|-
|-
| [6.0.0+] 0x33 || CanNotifySystemDataUpdateEvent || 0x8000000000010000 || NotifySystemDataUpdateEvent
| [20.0.0+] 0x33 ([5.0.0-19.0.0] 0x2B) || CanOpenSaveDataMover || 0x8000001000000000 || [[#OpenSaveDataMover]]
|-
|-
| [6.0.0+] 0x34 || CanOpenAccessFailureDetectionEventNotifier || 0x8000000100000000 || [[#OpenAccessFailureDetectionEventNotifier]]
| [20.0.0+] 0x34 ([5.0.0-19.0.0] 0x2C) || CanOpenBisWiper || 0x8000000000000800 || [[#OpenBisWiper]]
|-
|-
| [6.0.0+] 0x35 || CanGetAccessFailureDetectionEvent || 0x8000000100000000 || GetAccessFailureDetectionEvent
| [20.0.0+] 0x35 ([5.0.0-19.0.0] 0x2D) || CanListAccessibleSaveDataOwnerId || 0x8000000240002000 || [[#ListAccessibleSaveDataOwnerId]]
|-
|-
| [6.0.0+] 0x36 || CanIsAccessFailureDetected || 0x8000000100000000 || IsAccessFailureDetected
| [20.0.0+] 0x36 ([5.0.0-19.0.0] 0x2E) || CanControlMmcPatrol || 0x8000000000000000 || SuspendMmcPatrol, ResumeMmcPatrol
|-
|-
| [6.0.0+] 0x37 || CanResolveAccessFailure || 0x8000000100000000 || ResolveAccessFailure
| [20.0.0+] 0x37 ([5.0.0-19.0.0] 0x2F) || CanOverrideSaveDataTransferTokenSignVerificationKey || 0x8000000000000000 || OverrideSaveDataTransferTokenSignVerificationKey
|-
|-
| [6.0.0+] 0x38 || CanAbandonAccessFailure || 0x8000000100000000 || AbandonAccessFailure
| [20.0.0+] 0x38 ([5.1.0-19.0.0] 0x30) || CanOpenSdCardDetectionEventNotifier || 0x8000000080200000 || [[#OpenSdCardDetectionEventNotifier]]
|-
|-
| [8.0.0+] 0x39 || CanQuerySaveDataInternalStorageTotalSize || 0x8000000040000000 || QuerySaveDataInternalStorageTotalSize
| [20.0.0+] 0x39 || CanOpenSdCardAwakenReadyEventNotifier || 0x8000000000200000 ||
|-
|-
| [9.0.0+] 0x3A || CanGetSaveDataCommitId || 0x8000000200000020 || [[#GetSaveDataCommitId]]
| [20.0.0+] 0x3A ([6.0.0-19.0.0] 0x31) || CanOpenGameCardDetectionEventNotifier || 0x8000000080000110 || [[#OpenGameCardDetectionEventNotifier]]
|-
|-
| [9.0.0+] 0x3B || CanSetSdCardAccessibility || 0x8000000000200000 || SetSdCardAccessibility
| [20.0.0+] 0x3B || CanOpenGameCardAwakenReadyEventNotifier || 0x8000000080000110 || OpenGameCardAwakenReadyEventNotifier
|-
|-
| [9.0.0+] 0x3C || CanSimulateDevice || 0x4000000000000000 || SimulateDeviceDetectionEvent, SetSimulationEvent, ClearSimulationEvent
| [20.0.0+] 0x3C ([6.0.0-19.0.0] 0x32) || CanOpenSystemDataUpdateEventNotifier || 0x8000000000100008 || OpenSystemDataUpdateEventNotifier
|-
|-
| [9.0.0+] 0x3D || CanCreateSaveDataWithHashSalt || 0x8000000000000000 || [[#CreateSaveDataFileSystem]], [[#CreateSaveDataFileSystemWithHashSalt]]
| [20.0.0+] 0x3D ([6.0.0-19.0.0] 0x33) || CanNotifySystemDataUpdateEvent || 0x8000000000010000 || NotifySystemDataUpdateEvent
|-
|-
| [9.0.0+] 0x3E || CanRegisterProgramIndexMapInfo || 0x8000000400000000 || RegisterProgramIndexMapInfo
| [20.0.0+] 0x3E ([6.0.0-19.0.0] 0x34) || CanOpenAccessFailureDetectionEventNotifier || 0x8000000100000000 || [[#OpenAccessFailureDetectionEventNotifier]]
|-
|-
| [9.0.0+] 0x3F || CanChallengeCardExistence || 0x8000000000000010 || ChallengeCardExistence
| [20.0.0+] 0x3F ([6.0.0-19.0.0] 0x35) || CanGetAccessFailureDetectionEvent || 0x8000000100000000 || GetAccessFailureDetectionEvent
|-
|-
| [9.0.0+] 0x40 || CanCreateOwnSaveData || 0x8000000800000000 || [[#CreateSaveDataFileSystem]], CreateSaveDataFileSystemWithHashSalt
| [20.0.0+] 0x40 ([6.0.0-19.0.0] 0x36) || CanIsAccessFailureDetected || 0x8000000100000000 || IsAccessFailureDetected
|-
|-
| [9.0.0+] 0x41 || CanDeleteOwnSaveData || 0x8000000800000000 || [[#DeleteSaveDataFileSystem]]
| [20.0.0+] 0x41 ([6.0.0-19.0.0] 0x37) || CanResolveAccessFailure || 0x8000000100000000 || ResolveAccessFailure
|-
|-
| [10.0.0+] 0x42 || CanReadOwnSaveDataFileSystemExtraData || 0x8000000800000000 || [[#ReadSaveDataFileSystemExtraData]]
| [20.0.0+] 0x42 ([6.0.0-19.0.0] 0x38) || CanAbandonAccessFailure || 0x8000000100000000 || AbandonAccessFailure
|-
|-
| [10.0.0+] 0x43 || CanExtendOwnSaveData || 0x8000000800000000 || ExtendSaveDataFileSystem
| [20.0.0+] 0x43 ([8.0.0-19.0.0] 0x39) || CanQuerySaveDataInternalStorageTotalSize || 0x8000000040000000 || QuerySaveDataInternalStorageTotalSize
|-
|-
| [10.2.0+] 0x44 || CanOpenOwnSaveDataTransferProhibiter || 0x8000000800000000 || [[#OpenSaveDataTransferProhibiter]]
| [20.0.0+] 0x44 ([9.0.0-19.0.0] 0x3A) || CanGetSaveDataCommitId || 0x8000000200000020 || [[#GetSaveDataCommitId]]
|-
|-
| [11.0.0+] 0x45 || CanFindOwnSaveDataWithFilter || 0x8000000800000000 || [[#FindSaveDataWithFilter]]
| [20.0.0+] 0x45 || CanSetSdCardAccessibility || 0x8000000000200000 || SetSdCardAccessibility
|-
|-
| [13.0.0+] 0x46 || CanOpenSaveDataTransferManagerForRepair || 0x8000000000000020 || [[#OpenSaveDataTransferManagerForRepair]]
| [20.0.0+] 0x46 ([9.0.0-19.0.0] 0x3B) || CanSimulateDevice || 0x4000000000000000 || SimulateDeviceDetectionEvent, SetSimulationEvent, ClearSimulationEvent
|-
|-
| [13.0.0+] 0x47 || CanSetDebugConfiguration || 0x8000000000000000 || SetDebugOption, UnsetDebugOption
| [20.0.0+] 0x47 ([9.0.0-19.0.0] 0x3C) || CanCreateSaveDataWithHashSalt || 0x8000000000000000 || [[#CreateSaveDataFileSystem]], [[#CreateSaveDataFileSystemWithHashSalt]]
|-
|-
| [15.0.0+] 0x48 || CanOpenDataStorageByPath || 0x8000000000000000 || OpenDataStorageByPath
| [20.0.0+] 0x48 ([9.0.0-19.0.0] 0x3D) || CanRegisterProgramIndexMapInfo || RegisterProgramIndexMapInfo
|-
|-
| [17.0.0+] 0x49 || CanNotifyErrorContextServiceReady || 0x8000004000000000 || NotifyErrorContextServiceReady
| [20.0.0+] 0x49 ([9.0.0-19.0.0] 0x3E) || CanChallengeCardExistence || 0x8000000000000010 || ChallengeCardExistence
|-
|-
| [17.0.0+] 0x4A || CanGetProgramId || 0x8000000008000000 || GetProgramId
| [20.0.0+] 0x4A ([9.0.0-19.0.0] 0x3F) || CanCreateOwnSaveData || 0x8000000800000000 || [[#CreateSaveDataFileSystem]], CreateSaveDataFileSystemWithHashSalt
|}
|-
 
| [20.0.0+] 0x4B ([9.0.0-19.0.0] 0x40) || CanDeleteOwnSaveData || 0x8000000800000000 || [[#DeleteSaveDataFileSystem]]
== OpenFileSystem ==
|-
Takes a type-0x19 input buffer containing a [[#FspPath]] and an input [[#FileSystemProxyType]]. Returns an [[#IFileSystem]].
| [20.0.0+] 0x4C ([9.0.0-19.0.0] 0x41) || CanReadOwnSaveDataFileSystemExtraData || 0x8000000800000000 || [[#ReadSaveDataFileSystemExtraData]]
 
|-
[2.0.0+] This function was removed.
| [20.0.0+] 0x4D ([10.0.0-19.0.0] 0x42) || CanExtendOwnSaveData || 0x8000000800000000 || ExtendSaveDataFileSystem
|-
| [20.0.0+] 0x4E ([10.0.0-19.0.0] 0x43) || CanOpenOwnSaveDataTransferProhibiter || 0x8000000800000000 || [[#OpenSaveDataTransferProhibiter]]
|-
| [20.0.0+] 0x4F ([10.2.0-19.0.0] 0x44) || CanFindOwnSaveDataWithFilter || 0x8000000800000000 || [[#FindSaveDataWithFilter]]
|-
| [20.0.0+] 0x50 ([11.0.0-19.0.0] 0x45) || CanOpenSaveDataTransferManagerForRepair || 0x8000000000000020 || [[#OpenSaveDataTransferManagerForRepair]]
|-
| [20.0.0+] 0x51 ([13.0.0-19.0.0] 0x46) || CanSetDebugConfiguration || 0x8000000000000000 || SetDebugOption, UnsetDebugOption
|-
| [20.0.0+] 0x52 ([13.0.0-19.0.0] 0x47) || CanOpenDataStorageByPath || 0x8000000000000000 || OpenDataStorageByPath
|-
| [20.0.0+] 0x53 ([15.0.0-19.0.0] 0x48) || CanNotifyErrorContextServiceReady || 0x8000004000000000 || NotifyErrorContextServiceReady
|-
| [20.0.0+] 0x54 ([17.0.0-19.0.0] 0x49) || CanGetProgramId || 0x8000000008000000 || GetProgramId
|-
| [20.0.0+] 0x55 || CanGetContentStorageInfo || 0x8000000000000800 ||
|-
| [20.0.0+] 0x56 || CanDetachSdCard || 0x8000000004000000 ||
|-
| [20.0.0+] 0x57 || CanSetSdCardActivationMode || 0x8000000004000000 ||
|-
| [21.0.0+] 0x58 || CanEnableSdCardMalfunctionSimulation || 0x8000000000080000 ||
|-
| [21.0.0+] 0x59 || CanDisableSdCardMalfunctionSimulation || 0x8000000000080000 ||
|-
| [22.0.0+] 0x5A || CanShutdownStorage || 0x8000000000000000 ||
|}
 
== OpenFileSystem ==
Takes a type-0x19 input buffer containing a [[#FspPath]] and an input [[#FileSystemProxyType]]. Returns an [[#IFileSystem]].
 
[2.0.0+] This function was removed.


== SetCurrentProcess ==
== SetCurrentProcess ==
Line 603: Line 675:
Takes an input [[#FileSystemProxyType]] and an input [[NCM_services#ProgramId|ProgramId]]. Returns an [[#IFileSystem]].
Takes an input [[#FileSystemProxyType]] and an input [[NCM_services#ProgramId|ProgramId]]. Returns an [[#IFileSystem]].


Web-applet loads the [[#FileSystemProxyType]] (which must be '''Manual''') from u32_table[inparam].
The [[#FileSystemProxyType]] must be '''Manual'''.


Note: web-applet strings refer to both this cmd and [[#OpenFileSystemWithId]] as "MountContent", but official nn_sf_sync symbols use "OpenXX" names.
Note: web-applet strings refer to both this cmd and [[#OpenFileSystemWithId]] as "MountContent", but official nn_sf_sync symbols use "OpenXX" names.
Line 686: Line 758:


== ReadSaveDataFileSystemExtraDataBySaveDataSpaceId ==
== ReadSaveDataFileSystemExtraDataBySaveDataSpaceId ==
Takes an input u8 [[#SaveDataSpaceId]], an input u64 saveID, and a type-0x6 output buffer containing the [[#SaveDataFileSystemExtraData]].
Takes an input u8 [[#SaveDataSpaceId]], an input u64 saveID, and a type-0x6 output buffer containing the [[#SaveDataExtraData]].


== ReadSaveDataFileSystemExtraData ==
== ReadSaveDataFileSystemExtraData ==
Takes an input u64 saveID and a type-0x6 output buffer containing the [[#SaveDataFileSystemExtraData]].
Takes an input u64 saveID and a type-0x6 output buffer containing the [[#SaveDataExtraData]].


== OpenSaveDataInfoReader ==
== OpenSaveDataInfoReader ==
Line 705: Line 777:
== OpenSaveDataTransferManager ==
== OpenSaveDataTransferManager ==
No input, returns an [[#ISaveDataTransferManager]].
No input, returns an [[#ISaveDataTransferManager]].
[S2] Stubbed, just returns Result 0x177202.


== OpenSaveDataTransferManagerVersion2 ==
== OpenSaveDataTransferManagerVersion2 ==
Line 741: Line 815:


Returns a [[IPC_Marshalling#Domain_message|domain object ID]] implementing the [[#IStorage]] interface for data archives.
Returns a [[IPC_Marshalling#Domain_message|domain object ID]] implementing the [[#IStorage]] interface for data archives.
[[NCA|PublicData]] is exempt from the [[#Permissions|permissions]] check.


== OpenDataFileSystemWithProgramIndex ==
== OpenDataFileSystemWithProgramIndex ==
Line 777: Line 853:


[8.0.0+] Now takes an additional 8-bytes of input.
[8.0.0+] Now takes an additional 8-bytes of input.
== GetAndClearErrorInfo ==
[21.0.0+] Now takes a type-0x1A output buffer and no longer returns 0x80-bytes of output.


== SetSaveDataSize ==
== SetSaveDataSize ==
Line 814: Line 893:
== GetProgramIndexForAccessLog ==
== GetProgramIndexForAccessLog ==
No input, returns two 32-bit values "version" and "program_index".
No input, returns two 32-bit values "version" and "program_index".
== OpenMemoryStressor ==
No input. Returns an output [[#IMemoryStressor]].


== OpenMultiCommitManager ==
== OpenMultiCommitManager ==
Line 1,051: Line 1,133:
| 5 || [2.0.0+] [[#GetAndClearSdCardErrorInfo]]
| 5 || [2.0.0+] [[#GetAndClearSdCardErrorInfo]]
|-
|-
| 6 || [17.0.0+] GetSdCardHostControllerStatus
| 6 || [17.0.0+] [[#GetSdCardHostControllerStatus]]
|-
| 7 || [20.0.0+] [[#SetSdCardActivationMode]]
|-
| 8 || [20.0.0+] [S1] [[#TryGetSdCardInfo]]
|-
|-
| 100 || [[#GetMmcCid]]
| 100 || [[#GetMmcCid]]
Line 1,071: Line 1,157:
| 116 || [4.0.0+] [[#ResumeMmcPatrol]]
| 116 || [4.0.0+] [[#ResumeMmcPatrol]]
|-
|-
| 117 || [17.0.0+] EraseMmcWithRange
| 117 || [17.0.0+] [[#EraseMmcWithRange]]
|-
|-
| 200 || [[#IsGameCardInserted]]
| 118 || [20.0.0+] [[#MarkBeforeEraseMmcPartitionUserData]]
|-
|-
| 201 || [[#EraseGameCard]]
| 119 || [20.0.0+] [[#CheckAfterEraseMmcPartitionUserData]]
|-
|-
| 202 || [[#GetGameCardHandle]]
| 200 || [S1] [[#IsGameCardInserted]]
|-
|-
| 203 || [[#GetGameCardUpdatePartitionInfo]]
| 201 || [S1] [[#EraseGameCard]]
|-
|-
| 204 || [[#FinalizeGameCardDriver]]
| 202 || [S1] [[#GetGameCardHandle]]
|-
|-
| 205 || [[#GetGameCardAttribute]]
| 203 || [S1] [[#GetGameCardUpdatePartitionInfo]]
|-
|-
| 206 || [[#GetGameCardDeviceCertificate]]
| 204 || [S1] [[#FinalizeGameCardDriver]]
|-
|-
| 207 || [[#GetGameCardAsicInfo]]
| 205 || [S1] [[#GetGameCardAttribute]]
|-
|-
| 208 || [[#GetGameCardIdSet]]
| 206 || [S1] [[#GetGameCardDeviceCertificate]]
|-
|-
| 209 || [[#WriteToGameCardDirectly]]
| 207 || [S1] [[#GetGameCardAsicInfo]]
|-
|-
| 210 || [[#SetVerifyWriteEnalbleFlag]]
| 208 || [S1] [[#GetGameCardIdSet]]
|-
|-
| 211 || [[#GetGameCardImageHash]]
| 209 || [S1] [[#WriteToGameCardDirectly]]
|-
|-
| 212 || [2.0.0+] [[#GetGameCardDeviceIdForProdCard]]
| 210 || [S1] [[#SetVerifyWriteEnalbleFlag]]
|-
|-
| 213 || [2.0.0+] [[#EraseAndWriteParamDirectly]]
| 211 || [S1] [[#GetGameCardImageHash]]
|-
|-
| 214 || [2.0.0+] [[#ReadParamDirectly]]
| 212 || [S1] [2.0.0+] [[#GetGameCardDeviceIdForProdCard]]
|-
|-
| 215 || [2.0.0+] [[#ForceEraseGameCard]]
| 213 || [S1] [2.0.0+] [[#EraseAndWriteParamDirectly]]
|-
|-
| 216 || [2.0.0+] [[#GetGameCardErrorInfo]]
| 214 || [S1] [2.0.0+] [[#ReadParamDirectly]]
|-
|-
| 217 || [2.1.0+] [[#GetGameCardErrorReportInfo]]
| 215 || [S1] [2.0.0+] [[#ForceEraseGameCard]]
|-
|-
| 218 || [3.0.0+] [[#GetGameCardDeviceId]]
| 216 || [S1] [2.0.0+] [[#GetGameCardErrorInfo]]
|-
|-
| 219 || [8.0.0+] [[#ChallengeCardExistence]]
| 217 || [S1] [2.1.0+] [[#GetGameCardErrorReportInfo]]
|-
|-
| 220 || [9.0.0+] [[#GetGameCardCompatibilityType]]
| 218 || [S1] [3.0.0+] [[#GetGameCardDeviceId]]
|-
|-
| 221 || [17.0.0+] GetGameCardAsicCertificate
| 219 || [S1] [8.0.0+] [[#ChallengeCardExistence]]
|-
| 220 || [S1] [9.0.0+] [[#GetGameCardCompatibilityType]]
|-
| 221 || [S1] [17.0.0+] [[#GetGameCardAsicCertificate]]
|-
| 222 || [S1] [18.0.0+] [[#GetGameCardCardHeader]]
|-
| 223 || [S1] [19.0.0+] [[#SetGameCardSessionCreationDelay]]
|-
| 224 || [S1] [19.0.0+] [[#GetGameCardApplicationIdList]]
|-
| 225 || [S1] [20.0.0+] [[#RegisterGameCardConfigurationData]]
|-
| 226 || [S1] [20.0.0+] [[#GetGameCardDetailedErrorReportInfo]]
|-
|-
| 300 || [[#SetSpeedEmulationMode]]
| 300 || [[#SetSpeedEmulationMode]]
|-
|-
| 301 || [[#GetSpeedEmulationMode]]
| 301 || [[#GetSpeedEmulationMode]]
|-
| 302 || [18.0.0+] [[#SetApplicationStorageSpeed]]
|-
| 303 || [20.0.0+] [[#SetGameCardClockRateForSpeedEmulation]]
|-
| 304 || [20.0.0+] [[#ClearGameCardClockRateForSpeedEmulation]]
|-
|-
| 400 || [5.0.0+] [[#SuspendSdmmcControl]]
| 400 || [5.0.0+] [[#SuspendSdmmcControl]]
Line 1,130: Line 1,236:
|-
|-
| 501 || [6.0.0+] [[#ClearDeviceSimulationEvent]]
| 501 || [6.0.0+] [[#ClearDeviceSimulationEvent]]
|-
| 800 || [S2] [[#OpenStorageDeviceManager]]
|}
|}


Line 1,149: Line 1,257:
== GetAndClearSdCardErrorInfo ==
== GetAndClearSdCardErrorInfo ==
Takes a type-0x6 output buffer '''LogBuffer''' and an input s64 '''LogBufferSize'''. Returns an output [[#StorageErrorInfo]] and an output s64 '''LogSize'''.
Takes a type-0x6 output buffer '''LogBuffer''' and an input s64 '''LogBufferSize'''. Returns an output [[#StorageErrorInfo]] and an output s64 '''LogSize'''.
== GetSdCardHostControllerStatus ==
No input. Returns an output [[#HostControllerStatus]].
== SetSdCardActivationMode ==
Takes an input [[#SdCardActivationMode]]. No output.
== TryGetSdCardInfo ==
Takes a type-0x6 output buffer and an input s64. No output.


== GetMmcCid ==
== GetMmcCid ==
Line 1,175: Line 1,292:


== ResumeMmcPatrol ==
== ResumeMmcPatrol ==
No input/output.
== EraseMmcWithRange ==
Takes an input [[#MmcPartition]] and two input u64s. No output.
== MarkBeforeEraseMmcPartitionUserData ==
No input/output.
== CheckAfterEraseMmcPartitionUserData ==
No input/output.
No input/output.


Line 1,197: Line 1,323:
== GetGameCardDeviceCertificate ==
== GetGameCardDeviceCertificate ==
Takes a type-0x6 output buffer, an input s64 '''BufferSize''' and an input [[#GameCardHandle]]. No output.
Takes a type-0x6 output buffer, an input s64 '''BufferSize''' and an input [[#GameCardHandle]]. No output.
[19.0.0+] Now returns an output s64 '''OutSize''' which can be 0x200 or 0x400.


== GetGameCardAsicInfo ==
== GetGameCardAsicInfo ==
Line 1,241: Line 1,369:
== GetGameCardCompatibilityType ==
== GetGameCardCompatibilityType ==
Takes an input [[#GameCardHandle]]. Returns an output [[#GameCardCompatibilityType]].
Takes an input [[#GameCardHandle]]. Returns an output [[#GameCardCompatibilityType]].
== GetGameCardAsicCertificate ==
Takes a type-0x6 output buffer and an input s64 '''BufferSize'''. No output.
== GetGameCardCardHeader ==
Takes a type-0x6 output buffer, an input s64 '''BufferSize''' and an input [[#GameCardHandle]]. No output.
== SetGameCardSessionCreationDelay ==
Takes two input bools and an input u32. No output.
== GetGameCardApplicationIdList ==
Takes a type-0x6 output buffer, an input s64 '''BufferSize''' and an input [[#GameCardHandle]]. Returns an output u16.
== RegisterGameCardConfigurationData ==
Takes a type-0x5 input buffer and an input s64. No output.
== GetGameCardDetailedErrorReportInfo ==
Takes a type-0x6 output buffer and an input s64. No output.


== SetSpeedEmulationMode ==
== SetSpeedEmulationMode ==
Line 1,247: Line 1,393:
== GetSpeedEmulationMode ==
== GetSpeedEmulationMode ==
No input. Returns an output [[#SpeedEmulationMode]].
No input. Returns an output [[#SpeedEmulationMode]].
== SetApplicationStorageSpeed ==
Takes an input s32. No output.
== SetGameCardClockRateForSpeedEmulation ==
Takes an input s32. No output.
== ClearGameCardClockRateForSpeedEmulation ==
No input/output.


== SuspendSdmmcControl ==
== SuspendSdmmcControl ==
Line 1,262: Line 1,417:
== ClearDeviceSimulationEvent ==
== ClearDeviceSimulationEvent ==
Takes a total of 4-bytes of input. No output.
Takes a total of 4-bytes of input. No output.
== OpenStorageDeviceManager ==
Takes a byte. Returns an [[#IStorageDeviceManager]].


= IEventNotifier =
= IEventNotifier =
Line 1,285: Line 1,443:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#GetChallenge]]
| 0 || [[#GetChallenge|GetChallenge]]
|-
|-
| 16 || [[#SetToken]]
| 16 || [[#SetToken|SetToken]]
|-
|-
| 32 || [[#OpenSaveDataExporter]]
| 32 || [[#OpenSaveDataExporter|OpenSaveDataExporter]]
|-
|-
| 64 || [[#OpenSaveDataImporter]]
| 64 || [[#OpenSaveDataImporter|OpenSaveDataImporter]]
|}
|}


== GetChallenge ==
== GetChallenge ==
No input/output, takes a type-0x6 output buffer.
Takes a type-0x6 output buffer. No output.


== SetToken ==
== SetToken ==
No input/output, takes a type-0x5 input buffer.
Takes a type-0x5 input buffer. No output.


== OpenSaveDataExporter ==
== OpenSaveDataExporter ==
Takes an input u8 [[#SaveDataSpaceId]] and u64, returns an [[#ISaveDataExporter]].
Takes an input u8 [[#SaveDataSpaceId]] and u64. Returns an [[#ISaveDataExporter]].


== OpenSaveDataImporter ==
== OpenSaveDataImporter ==
Line 1,315: Line 1,473:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#GetChallenge]]
| 0 || [[#GetChallenge|GetChallenge]]
|-
|-
| 16 || [[#SetKeyPackage]]
| 16 || [[#SetKeyPackage|SetKeyPackage]]
|-
|-
| 80 || [[#OpenSaveDataExporterAndGetEncryptedKey]]
| 80 || [[#OpenSaveDataExporterAndGetEncryptedKey|OpenSaveDataExporterAndGetEncryptedKey]]
|-
|-
| 81 || [[#PrepareOpenSaveDataImporter]]
| 81 || [[#PrepareOpenSaveDataImporter|PrepareOpenSaveDataImporter]]
|-
|-
| 90 || [[#OpenSaveDataImporter]]
| 90 || [[#OpenSaveDataImporter_2|OpenSaveDataImporter]]
|-
|-
| 91 || [[#OpenSaveDataImporter2]]
| 91 || [[#OpenSaveDataImporter2|OpenSaveDataImporter2]]
|-
|-
| 100 || [[#OpenSaveDataExporterWithKey]]
| 100 || [[#OpenSaveDataExporterWithKey|OpenSaveDataExporterWithKey]]
|-
|-
| 110 || [[#OpenSaveDataImporterWithKey]]
| 110 || [[#OpenSaveDataImporterWithKey|OpenSaveDataImporterWithKey]]
|}
|}


== SetKeyPackage ==
== SetKeyPackage ==
No input/output, takes a type-0x5 input buffer.
Takes a type-0x5 input buffer. No output.  


== OpenSaveDataExporterAndGetEncryptedKey ==
== OpenSaveDataExporterAndGetEncryptedKey ==
Line 1,339: Line 1,497:


== PrepareOpenSaveDataImporter ==
== PrepareOpenSaveDataImporter ==
Takes a type-0x1A output buffer to receive a RsaEncryptedKey.
Takes a type-0x1A output buffer to receive a RsaEncryptedKey. No output.


== OpenSaveDataImporter ==
== OpenSaveDataImporter ==
Takes a total of 0x18-bytes of input and two type-0x5 input buffers, returns an [[#ISaveDataDivisionImporter]].
Takes a total of 0x18-bytes of input and two type-0x5 input buffers. Returns an [[#ISaveDataDivisionImporter]].


== OpenSaveDataImporter2 ==
== OpenSaveDataImporter2 ==
Takes a total of 0x18-bytes of input and a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].
Takes a total of 0x18-bytes of input and a type-0x5 input buffer. Returns an [[#ISaveDataDivisionImporter]].


== OpenSaveDataExporterWithKey ==
== OpenSaveDataExporterWithKey ==
Takes a total of 0x20-bytes of input, returns an [[#ISaveDataDivisionExporter]].
Takes a total of 0x20-bytes of input. Returns an [[#ISaveDataDivisionExporter]].


== OpenSaveDataImporterWithKey ==
== OpenSaveDataImporterWithKey ==
Takes a total of 0x28-bytes of input and a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].
Takes a total of 0x28-bytes of input and a type-0x5 input buffer. Returns an [[#ISaveDataDivisionImporter]].


[17.0.0+] Now only takes 0x18-bytes of input and an additional type-0x5 input buffer.
[17.0.0+] Now only takes 0x18-bytes of input and an additional type-0x5 input buffer.
Line 1,364: Line 1,522:
! Cmd || Name
! Cmd || Name
|-
|-
| 8 || [[#Register]]
| 8 || [[#Register|Register]]
|-
|-
| 16 || [[#Process]]
| 16 || [[#Process|Process]]
|-
|-
| 18 || [[#Cancel]]
| 18 || [[#Cancel|Cancel]]
|}
|}


== Register ==
== Register ==
Takes an input u64, no output.
Takes an input u64. No output.


== Process ==
== Process ==
Takes an input u64, returns an output u64.
Takes an input u64. Returns an output u64.


== Cancel ==
== Cancel ==
Line 1,389: Line 1,547:
! Cmd || Name
! Cmd || Name
|-
|-
| 80 || [[#OpenSaveDataExporter]]
| 80 || [[#OpenSaveDataExporter_2|OpenSaveDataExporter]]
|-
|-
| 90 || [[#OpenSaveDataImporter]]
| 90 || [[#OpenSaveDataImporter_3|OpenSaveDataImporter]]
|}
|}


== OpenSaveDataExporter ==
== OpenSaveDataExporter ==
Takes a total of 0x10-bytes of input, returns an [[#ISaveDataDivisionExporter]].
Takes a total of 0x10-bytes of input. Returns an [[#ISaveDataDivisionExporter]].


== OpenSaveDataImporter ==
== OpenSaveDataImporter ==
Takes 1-byte of input, a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].
Takes 1-byte of input, a type-0x5 input buffer. Returns an [[#ISaveDataDivisionImporter]].


= ISaveDataExporter =
= ISaveDataExporter =
Line 1,409: Line 1,567:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#GetSaveDataInfo]]
| 0 || [[#GetSaveDataInfo|GetSaveDataInfo]]
|-
|-
| 1 || [[#GetRestSize]]
| 1 || [[#GetRestSize|GetRestSize]]
|-
|-
| 16 || [[#Pull]]
| 16 || [[#Pull|Pull]]
|-
|-
| 17 || [[#PullInitialData]]
| 17 || [[#PullInitialData|PullInitialData]]
|}
|}


== GetSaveDataInfo ==
== GetSaveDataInfo ==
No input/output, takes a type-0x1A [[#SaveDataInfo]] output buffer.
Takes a type-0x1A [[#SaveDataInfo]] output buffer. No output.


The actual name for this is the SaveDataExporter constructor. This is used automatically after [[#OpenSaveDataExporter]] by official sw.
The actual name for this is the SaveDataExporter constructor. This is used automatically after [[#OpenSaveDataExporter]] by official sw.


== GetRestSize ==
== GetRestSize ==
No input, returns an output u64.
No input. Returns an output u64.


== Pull ==
== Pull ==
Takes a type-0x6 output buffer, returns an output u64.
Takes a type-0x6 output buffer. Returns an output u64.


== PullInitialData ==
== PullInitialData ==
No input/output, takes a type-0x6 output buffer.
Takes a type-0x6 output buffer. No output.


= ISaveDataImporter =
= ISaveDataImporter =
Line 1,441: Line 1,599:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#GetSaveDataInfo]]
| 0 || [[#GetSaveDataInfo_2|GetSaveDataInfo]]
|-
|-
| 1 || [[#GetRestSize]]
| 1 || [[#GetRestSize_2|GetRestSize]]
|-
|-
| 16 || [[#Push]]
| 16 || [[#Push|Push]]
|-
|-
| 17 || [[#Finalize]]
| 17 || [[#Finalize|Finalize]]
|}
|}


== GetSaveDataInfo ==
== GetSaveDataInfo ==
No input/output, takes a type-0x1A [[#GetSaveDataInfo]] output buffer.
Takes a type-0x1A [[#GetSaveDataInfo]] output buffer. No output.


The actual name for this is the SaveDataImporter constructor. This is used automatically after [[#OpenSaveDataImporter]] by official sw.
The actual name for this is the SaveDataImporter constructor. This is used automatically after [[#OpenSaveDataImporter]] by official sw.


== GetRestSize ==
== GetRestSize ==
No input, returns an output u64.
No input. Returns an output u64.


== Push ==
== Push ==
No input/output, takes a type-0x5 input buffer.
Takes a type-0x5 input buffer. No output.


== Finalize ==
== Finalize ==
Line 1,473: Line 1,631:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#GetChallenge]]
| 0 || [[#GetChallenge_2|GetChallenge]]
|-
|-
| 16 || [[#SetKeySeedPackage]]
| 8 || [18.0.0+] SetMode
|-
|-
| 32 || [[#OpenSaveDataExporter]]
| 9 || [18.0.0+] SetAttribute
|-
|-
| 33 || [[#OpenSaveDataExporterForDiffExport]]
| 16 || [[#SetKeySeedPackage_2|SetKeySeedPackage]]
|-
|-
| 34 || [6.0.0+] [[#OpenSaveDataExporterByContext]]
| 17 || [20.0.0+] [[#SetLocalKeySeedPackage|SetLocalKeySeedPackage]]
|-
|-
| 63 || [17.0.0+] OpenSaveDataImporter
| 32 || [[#OpenSaveDataExporter_3|OpenSaveDataExporter]]
|-
|-
| 64 || [6.0.0+] [[#OpenSaveDataImporterDeprecated]] ([5.0.0-5.1.0] OpenSaveDataImporter)
| 33 || [[#OpenSaveDataExporterForDiffExport|OpenSaveDataExporterForDiffExport]]
|-
|-
| 65 || [[#OpenSaveDataImporterForDiffImport]]
| 34 || [6.0.0+] [[#OpenSaveDataExporterByContext|OpenSaveDataExporterByContext]]
|-
|-
| 66 || [6.0.0+] [[#OpenSaveDataImporterForDuplicateDiffImport]]
| 63 || [17.0.0+] [[#OpenSaveDataImporter_4|OpenSaveDataImporter]]
|-
|-
| 67 || [6.0.0-16.1.0] [[#OpenSaveDataImporter]]
| 64 || [6.0.0-17.0.1] [[#OpenSaveDataImporterDeprecated|OpenSaveDataImporterDeprecated]] ([5.0.0-5.1.0] OpenSaveDataImporter)
|-
|-
| 68 || [6.0.0+] [[#OpenSaveDataImporterByContext]]
| 65 || [5.0.0-17.0.1] [[#OpenSaveDataImporterForDiffImport|OpenSaveDataImporterForDiffImport]]
|-
|-
| 69 || [6.0.0+] [[#CancelSuspendingImport]]
| 66 || [6.0.0-17.0.1] [[#OpenSaveDataImporterForDuplicateDiffImport|OpenSaveDataImporterForDuplicateDiffImport]]
|-
|-
| 70 || [10.0.0+] DecryptAndVerifyInitialData
| 67 || [6.0.0-16.1.0] [[#OpenSaveDataImporter_5|OpenSaveDataImporter]]
|-
|-
| 80 || [11.0.0+] DecryptoAndVerifyPortContext
| 68 || [6.0.0+] [[#OpenSaveDataImporterByContext|OpenSaveDataImporterByContext]]
|-
| 69 || [6.0.0+] [[#CancelSuspendingImport|CancelSuspendingImport]]
|-
| 70 || [10.0.0+] CancelSuspendingImportByAttribute
|-
| 80 || [11.0.0+] SwapSecondary
|}
|}


== GetChallenge ==
== GetChallenge ==
No input/output, takes a type-0x6 output buffer containing the '''Challenge'''.
Takes a type-0x6 output buffer containing the '''Challenge'''. No output.


== SetKeySeedPackage ==
== SetKeySeedPackage ==
No input/output, takes a type-0x5 input buffer containing the '''KeySeedPackage'''.
Takes a type-0x5 input buffer containing the '''KeySeedPackage'''. No output.
 
== SetLocalKeySeedPackage ==
Takes a type-0x5 input buffer containing a [[#LocalKeySeedPackage|LocalKeySeedPackage]]. No output.
 
This can only be used after [[#SetKeySeedPackage]], in certain conditions.


== OpenSaveDataExporter ==
== OpenSaveDataExporter ==
Line 1,515: Line 1,684:


== OpenSaveDataExporterByContext ==
== OpenSaveDataExporterByContext ==
No input/output, takes a type-0x5 input buffer, returns an [[#ISaveDataDivisionExporter]].
Takes a type-0x5 input buffer. Returns an [[#ISaveDataDivisionExporter]].
 
== OpenSaveDataImporter ==
Takes an input u8 [[#SaveDataSpaceId]], a type-0x19 input buffer containing a [[#SaveDataCreationInfo2]] and a type-0x5 input buffer containing an [[#InitialDataVersion2]]. Returns an [[#ISaveDataDivisionImporter]].


== OpenSaveDataImporterDeprecated ==
== OpenSaveDataImporterDeprecated ==
Takes an input u8 [[#SaveDataSpaceId]], a 0x10-byte userID, and a type-0x5 input buffer [[#InitialDataVersion2]]. Returns an [[#ISaveDataDivisionImporter]].
Takes an input u8 [[#SaveDataSpaceId]], a 0x10-byte userID, and a type-0x5 input buffer containing an [[#InitialDataVersion2]]. Returns an [[#ISaveDataDivisionImporter]].


== OpenSaveDataImporterForDiffImport ==
== OpenSaveDataImporterForDiffImport ==
Takes an input u8 [[#SaveDataSpaceId]], an u64, and a type-0x5 input buffer [[#InitialDataVersion2]], returns an [[#ISaveDataDivisionImporter]].
Takes an input u8 [[#SaveDataSpaceId]], an u64, and a type-0x5 input buffer [[#InitialDataVersion2]]. Returns an [[#ISaveDataDivisionImporter]].


== OpenSaveDataImporterForDuplicateDiffImport ==
== OpenSaveDataImporterForDuplicateDiffImport ==
Takes an input u8 and an u64, and a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].
Takes an input u8 and an u64, and a type-0x5 input buffer. Returns an [[#ISaveDataDivisionImporter]].


== OpenSaveDataImporter ==
== OpenSaveDataImporter ==
Takes an input u8, an u8(bool), a 0x10-byte struct, and a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].
Takes an input u8, an u8(bool), a 0x10-byte struct, and a type-0x5 input buffer. Returns an [[#ISaveDataDivisionImporter]].


== OpenSaveDataImporterByContext ==
== OpenSaveDataImporterByContext ==
No input/output, takes a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].
No input/output, takes a type-0x5 input buffer. Returns an [[#ISaveDataDivisionImporter]].


== CancelSuspendingImport ==
== CancelSuspendingImport ==
Takes an input u64 and a 0x10-byte struct, no output.
Takes an input u64 and a 0x10-byte struct. No output.


= ISaveDataDivisionExporter =
= ISaveDataDivisionExporter =
Line 1,544: Line 1,716:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#SetDivisionCount]]
| 0 || [[#SetDivisionCount|SetDivisionCount]]
|-
|-
| 1 || [6.0.0+] [[#GetSaveDataInfo]]
| 1 || [6.0.0+] [[#ReadSaveDataExtraData|ReadSaveDataExtraData]]
|-
|-
| 16 || [[#OpenSaveDataDiffChunkIterator]]
| 16 || [[#OpenSaveDataDiffChunkIterator|OpenSaveDataDiffChunkIterator]]
|-
|-
| 48 || [[#OpenSaveDataChunkExporter]]
| 48 || [[#OpenSaveDataChunkExporter|OpenSaveDataChunkExporter]]
|-
|-
| 64 || [6.0.0-8.1.0] [[#FinalizeFullExport]]
| 64 || [6.0.0-8.1.0] [[#FinalizeFullExport|FinalizeFullExport]]
|-
|-
| 65 || [6.0.0-8.1.0] [[#FinalizeDiffExport]]
| 65 || [6.0.0-8.1.0] [[#FinalizeDiffExport|FinalizeDiffExport]]
|-
|-
| 66 || [6.0.0+] [[#CancelExport]]
| 66 || [6.0.0+] [[#CancelExport|CancelExport]]
|-
|-
| 67 || [6.0.0+] [[#SuspendExport]]
| 67 || [6.0.0+] [[#SuspendExport|SuspendExport]]
|-
|-
| 70 || [6.0.0+] [[#GetKeySeed]]
| 70 || [6.0.0-17.0.1] [[#GetKeySeed|GetKeySeed]]
|-
|-
| 71 || [6.0.0+] [[#GetInitialDataMac]]
| 71 || [6.0.0+] [[#GetInitialDataMac|GetInitialDataMac]]
|-
|-
| 72 || [6.0.0+] [[#FinalizeExport]]
| 72 || [6.0.0+] [[#FinalizeExport|FinalizeExport]]
|-
|-
| 73 || [9.0.0+] [[#GetInitialDataMacKeyGeneration]]
| 73 || [9.0.0+] [[#GetInitialDataMacKeyGeneration|GetInitialDataMacKeyGeneration]]
|-
|-
| 80 || [6.0.0+] [[#GetImportInitialDataAad]]
| 74 || [18.0.0+] [[#GetKeySeed|GetKeySeed]]
|-
|-
| 81 || [6.0.0+] [[#SetExportInitialDataAad]]
| 75 || [20.0.0+] GetLocalKeySeedPackage
|-
|-
| 96 || [6.0.0+] [[#GetReportInfo]]
| 80 || [6.0.0+] [[#GetImportInitialDataAad|GetImportInitialDataAad]]
|-
| 81 || [6.0.0+] [[#SetExportInitialDataAad|SetExportInitialDataAad]]
|-
| 96 || [6.0.0+] [[#GetReportInfo|GetReportInfo]]
|}
|}


== SetDivisionCount ==
== SetDivisionCount ==
Takes an input u32, no output.
Takes an input u32. No output.


== OpenSaveDataChunkExporter ==
== OpenSaveDataChunkExporter ==
Takes an input u32, returns an [[#ISaveDataChunkExporter]].
Takes an input u32. Returns an [[#ISaveDataChunkExporter]].


== FinalizeFullExport ==
== FinalizeFullExport ==
No input, returns two 0x10-byte output structs.
No input. Returns two 0x10-byte output structs.


== FinalizeDiffExport ==
== FinalizeDiffExport ==
No input, returns an output 0x10-byte struct.
No input. Returns an output 0x10-byte struct.


== CancelExport ==
== CancelExport ==
Line 1,591: Line 1,767:


== SuspendExport ==
== SuspendExport ==
No input/output, takes a type-0x6 output buffer.
Takes a type-0x6 output buffer. No output.


== GetKeySeed ==
== GetKeySeed ==
No input, returns an output 0x10-byte struct.
No input. Returns an output 0x10-byte struct.


== GetInitialDataMac ==
== GetInitialDataMac ==
No input, returns an output 0x10-byte struct.
No input. Returns an output 0x10-byte struct.


== FinalizeExport ==
== FinalizeExport ==
Line 1,603: Line 1,779:


== SetExportInitialDataAad ==
== SetExportInitialDataAad ==
Takes an input 0x20-byte struct, no output.
Takes an input 0x20-byte struct. No output.


= ISaveDataDivisionImporter =
= ISaveDataDivisionImporter =
Line 1,614: Line 1,790:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [6.0.0+] [[#GetSaveDataInfo]]
| 0 || [6.0.0+] [[#ReadSaveDataExtraData_2|ReadSaveDataExtraData]]
|-
|-
| 16 || [[#OpenSaveDataDiffChunkIterator]]
| 16 || [[#OpenSaveDataDiffChunkIterator_2|OpenSaveDataDiffChunkIterator]]
|-
|-
| 32 || [[#InitializeImport]]
| 32 || [[#InitializeImport|InitializeImport]]
|-
|-
| 33 || [[#FinalizeImport]]
| 33 || [[#FinalizeImport|FinalizeImport]]
|-
|-
| 34 || [6.0.0+] [[#CancelImport]]
| 34 || [6.0.0+] [[#CancelImport|CancelImport]]
|-
|-
| 35 || [6.0.0+] [[#GetImportContext]]
| 35 || [6.0.0+] [[#GetImportContext|GetImportContext]]
|-
|-
| 36 || [6.0.0+] [[#SuspendImport]]
| 36 || [6.0.0+] [[#SuspendImport|SuspendImport]]
|-
|-
| 37 || [11.0.0+] FinalizeImportWithoutSwap
| 37 || [11.0.0+] FinalizeImportWithoutSwap
|-
|-
| 48 || [[#OpenSaveDataChunkImporter]]
| 48 || [[#OpenSaveDataChunkImporter|OpenSaveDataChunkImporter]]
|-
|-
| 64 || [6.0.0+] [[#GetImportInitialDataAad]]
| 64 || [6.0.0+] [[#GetImportInitialDataAad|GetImportInitialDataAad]]
|-
|-
| 80 || [6.0.0+] [[#GetReportInfo]]
| 80 || [6.0.0+] [[#GetReportInfo_2|GetReportInfo]]
|}
|}


== GetSaveDataInfo ==
== ReadSaveDataExtraData ==
No input/output, takes a type-0x6 output buffer.
Takes a type-0x6 output buffer. No output.


== OpenSaveDataDiffChunkIterator ==
== OpenSaveDataDiffChunkIterator ==
No input, returns an [[#ISaveDataChunkIterator]].
No input. Returns an [[#ISaveDataChunkIterator]].


== InitializeImport ==
== InitializeImport ==
No input, returns an output u64.
No input. Returns an output u64.


== FinalizeImport ==
== FinalizeImport ==
Line 1,653: Line 1,829:


== GetImportContext ==
== GetImportContext ==
No input/output, takes a type-0x6 output buffer.
Takes a type-0x6 output buffer. No output.


== SuspendImport ==
== SuspendImport ==
Line 1,659: Line 1,835:


== OpenSaveDataChunkImporter ==
== OpenSaveDataChunkImporter ==
Takes an input u32, returns an [[#ISaveDataChunkImporter]].
Takes an input u32. Returns an [[#ISaveDataChunkImporter]].


== GetImportInitialDataAad ==  
== GetImportInitialDataAad ==  
No input, returns an output 0x20-byte struct.
No input. Returns an output 0x20-byte struct.


== GetReportInfo ==
== GetReportInfo ==
No input, returns an output 0x20-byte struct.
No input. Returns an output 0x20-byte struct.


= ISaveDataChunkIterator =
= ISaveDataChunkIterator =
Line 1,676: Line 1,852:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#Next]]
| 0 || [[#Next|Next]]
|-
|-
| 1 || [[#IsEnd]]  
| 1 || [[#IsEnd|IsEnd]]  
|-
|-
| 16 || [[#GetId]]  
| 16 || [[#GetId|GetId]]  
|}
|}


Line 1,687: Line 1,863:


== IsEnd ==
== IsEnd ==
No input, returns an output u8.
No input. Returns an output u8.


== GetId ==
== GetId ==
No input, returns an output u32.
No input. Returns an output u32.


= ISaveDataChunkExporter =
= ISaveDataChunkExporter =
Line 1,701: Line 1,877:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#Pull]]
| 0 || [[#Pull_2|Pull]]
|-
|-
| 16 || [6.0.0+] [[#GetRestRawDataSize]]
| 16 || [6.0.0+] [[#GetRestRawDataSize|GetRestRawDataSize]]
|}
|}


== Pull ==
== Pull ==
Takes an input u64 and a type-0x6 output buffer, returns an output u64.
Takes an input u64 and a type-0x6 output buffer. Returns an output u64.


== GetRestRawDataSize ==
== GetRestRawDataSize ==
No input, returns an output u64.
No input. Returns an output u64.


= ISaveDataChunkImporter =
= ISaveDataChunkImporter =
Line 1,721: Line 1,897:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#Push]]
| 0 || [[#Push_2|Push]]
|}
|}


== Push ==
== Push ==
Takes an input u64 and a type-0x5 input buffer, no output.
Takes an input u64 and a type-0x5 input buffer. No output.


= ISaveDataTransferProhibiter =
= ISaveDataTransferProhibiter =
Line 1,734: Line 1,910:
This doesn't seem to handle any commands (?).
This doesn't seem to handle any commands (?).


= IMultiCommitManager =
= IMemoryStressor =
This is "nn::fssrv::sf::IMultiCommitManager".
This is "nn::fssrv::sf::IMemoryStressor".


This was added with [6.0.0+].
This was added with [18.0.0+].


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 1,743: Line 1,919:
! Cmd || Name
! Cmd || Name
|-
|-
| 1 || [[#Add]]
| 1 || [[#SetPooledBufferFreeSize]]
|-
|}
| 2 || [[#Commit]]
 
== SetPooledBufferFreeSize ==
Takes an input u32. No output.
 
= IMultiCommitManager =
This is "nn::fssrv::sf::IMultiCommitManager".
 
This was added with [6.0.0+].
 
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 1 || [[#Add]]
|-
| 2 || [[#Commit]]
|}
|}


Line 1,775: Line 1,966:


= IStorageDeviceManager =
= IStorageDeviceManager =
This is "nn::fssrv::storage::sf::IStorageDeviceManager".
[S2] This is "nn::fssrv::storage::sf::IStorageDeviceManager".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 1,781: Line 1,972:
! Cmd || Name
! Cmd || Name
|-
|-
| N/A || IsInserted
| 0 || IsInserted
|-
| 1 || IsHandleValid
|-
|-
| N/A || IsHandleValid
| 2 || [[#OpenDetectionEvent]]
|-
|-
| N/A || OpenDetectionEvent
| 3 || Returns an [[#IEventNotifier]].
|-
|-
| N/A || OpenOperator
| 10 || [[#OpenOperator]]
|-
|-
| N/A || OpenDevice
| 20 || [[#OpenDevice]]
|-
|-
| N/A || OpenStorage
| 21 || [[#OpenStorage]]
|-
|-
| N/A || Invalidate
| 34 || Invalidate
|}
|}
== OpenDetectionEvent ==
Returns an [[#IEventNotifier]].
== OpenOperator ==
Returns an [[#IStorageDeviceOperator]].
== OpenDevice ==
Returns an [[#IStorageDevice]].
== OpenStorage ==
Returns an [[#IStorage]].


= IStorageDeviceOperator =
= IStorageDeviceOperator =
This is "nn::fssrv::storage::sf::IStorageDeviceOperator".
[S2] This is "nn::fssrv::storage::sf::IStorageDeviceOperator".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 1,803: Line 2,007:
! Cmd || Name
! Cmd || Name
|-
|-
| N/A || Operate
| 0 || Operate
|-
|-
| N/A || OperateIn
| 1 || OperateIn
|-
|-
| N/A || OperateOut
| 10 || OperateOut
|-
|-
| N/A || OperateOut2
| 11 || OperateOut2
|-
|-
| N/A || OperateInOut
| 20 || OperateInOut
|-
|-
| N/A || OperateIn2Out
| 21 || OperateIn2Out
|}
|}


= IStorageDevice =
= IStorageDevice =
This is "nn::fssrv::storage::sf::IStorageDevice".
[S2] This is "nn::fssrv::storage::sf::IStorageDevice".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 1,823: Line 2,027:
! Cmd || Name
! Cmd || Name
|-
|-
| N/A || GetHandle
| 0 || GetHandle
|-
|-
| N/A || IsHandleValid
| 1 || IsHandleValid
|-
|-
| N/A || OpenOperator
| 10 || OpenOperator
|-
|-
| N/A || Read
| 20 || Read
|-
|-
| N/A || Write
| 21 || Write
|-
|-
| N/A || Flush
| 22 || Flush
|-
|-
| N/A || SetSize
| 23 || SetSize
|-
|-
| N/A || GetSize
| 24 || GetSize
|-
|-
| N/A || OperateRange
| 25 || OperateRange
|}
|}


Line 1,867: Line 2,071:
| 8 || [4.0.0+] RegisteredUpdate
| 8 || [4.0.0+] RegisteredUpdate
|}
|}
sdknso converts the input [[#ContentType|ContentType]] to a FileSystemProxyType, for use with the cmd input.


= ContentType =
= ContentType =
Line 1,894: Line 2,100:
|-
|-
| 0 || None
| 0 || None
|-
| 1 || [S2]
|-
|-
| 15 || All
| 15 || All
Line 1,913: Line 2,121:
| 3 || [16.0.0+] System0
| 3 || [16.0.0+] System0
|}
|}
= UserId =
This is "nn::fs::UserId". This is a 0x10-byte struct.
= HashSalt =
This is "nn::fs::HashSalt". This is a 0x20-byte struct.
= SaveDataId =
This is "nn::fs::SaveDataId". This is an u64.
= StaticSaveDataId =
This is "nn::fs::StaticSaveDataId". This is an u64.
= SystemSaveDataId =
This is "nn::fs::SystemSaveDataId". This is an u64.
= SystemBcatSaveDataId =
This is "nn::fs::SystemBcatSaveDataId". This is an u64.
= SaveDataReferenceId =
This is "nn::fs::SaveDataReferenceId". This is an u64.


= SaveDataSpaceId =
= SaveDataSpaceId =
Line 1,934: Line 2,163:
|-
|-
| 101 || [3.0.0+] SafeMode
| 101 || [3.0.0+] SafeMode
|-
| 102 || [?+] ProperUser
|}
|}


Line 2,012: Line 2,243:
|}
|}


= ImageDirectoryId =
= SaveDataMetaInfo =
This is "nn::fs::ImageDirectoryId".
This is "nn::fs::SaveDataMetaInfo".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Value || Name
! Offset
! Size
! Description
|-
| 0x0
| 0x4
| Size
|-
| 0x4
| 0x1
| [[#SaveDataMetaType|Type]]
|-
| 0x5
| 0xB
| Reserved
|}
 
= ImageDirectoryId =
This is "nn::fs::ImageDirectoryId".
 
{| class="wikitable" border="1"
|-
! Value || Name
|-
|-
| 0 || Nand
| 0 || Nand
Line 2,157: Line 2,410:
| 33 || SystemProperPartition
| 33 || SystemProperPartition
|-
|-
| 34 || SignedSystemPartitionOnSafeMode
| 34 || [-?] SignedSystemPartitionOnSafeMode
|-
|-
| 35 || [16.0.0+] DeviceTreeBlob
| 35 || [16.0.0+] DeviceTreeBlob
|-
|-
| 36 || [16.0.0+] System0
| 36 || [16.0.0+] System0
|-
| 37 || System2
|-
| 38 || [?+] System3
|-
| 39 || [21.0.0+] UserProperPartition
|}
|}
System2 is not supported by FS, perhaps removed at some point?


= SdCardSpeedMode =
= SdCardSpeedMode =
Line 2,224: Line 2,485:
|}
|}


= MemoryReportInfo =
= HostControllerStatus =
This is "nn::fs::MemoryReportInfo".
This is "nn::sdcard::HostControllerStatus".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 2,234: Line 2,495:
|-
|-
| 0x0
| 0x0
| 0x8
| 0xC
| PooledBufferFreeSizePeak
|  
|}
 
= SdCardActivationMode =
This is "nn::fs::SdCardActivationMode".
 
{| class="wikitable" border="1"
|-
|-
| 0x8
! Value || Name
| 0x8
| PooledBufferRetriedCount
|-
|-
| 0x10
| 0 ||
|}
 
= MemoryReportInfo =
This is "nn::fs::MemoryReportInfo".
 
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x8
| PooledBufferFreeSizePeak
|-
| 0x8
| 0x8
| PooledBufferRetriedCount
|-
| 0x10
| 0x8
| 0x8
| PooledBufferReduceAllocationCount
| PooledBufferReduceAllocationCount
Line 2,478: Line 2,763:
| 16 || [9.0.0+] DifferentRegionCupToGlobalDeviceFlag
| 16 || [9.0.0+] DifferentRegionCupToGlobalDeviceFlag
|}
|}
= GameCardAttribute2 =
This is "nn::fs::GameCardAttribute2".


= GameCardSize =
= GameCardSize =
Line 2,545: Line 2,833:
|}
|}


= CardId1 =
= GameCardIdSet =
This is "nn::gc::detail::CardId1".
This is "nn::gc::GameCardIdSet".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 2,555: Line 2,843:
|-
|-
| 0x0
| 0x0
| 0x1
| 0x4
| MakerCode
| [[#CardId1|Id1]]
|-
|-
| 0x1
| 0x4
| 0x1
| 0x4
| MemoryCapacity
| [[#CardId2|Id2]]
|-
|-
| 0x2
| 0x8
| 0x4
| [[#CardId3|Id3]]
|}
 
= CardId1 =
This is "nn::gc::detail::CardId1".
 
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x1
| [[#MakerCodeForCardId1|MakerCode]]
|-
| 0x1
| 0x1
| [[#MemoryCapacity|MemoryCapacity]]
|-
| 0x2
| 0x1
| 0x1
| Reserved
| Reserved
Line 2,568: Line 2,878:
| 0x3
| 0x3
| 0x1
| 0x1
| MemoryType
| [[#MemoryType|MemoryType]]
|}
|}


Line 2,582: Line 2,892:
| 0x0
| 0x0
| 0x1
| 0x1
| CardSecurityNumber
| [[#CardSecurityNumber|CardSecurityNumber]]
|-
|-
| 0x1
| 0x1
| 0x1
| 0x1
| CardType
| [[#CardType|CardType]]
|-
|-
| 0x2
| 0x2
Line 2,607: Line 2,917:
|}
|}


= GameCardIdSet =
= MakerCodeForCardId1 =
This is "nn::gc::GameCardIdSet".
This is "nn::gc::detail::MakerCodeForCardId1".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset
! Value || Name
! Size
! Description
|-
|-
| 0x0
| 0xC2 || MegaChips
| 0x4
| [[#CardId1|Id1]]
|-
|-
| 0x4
| 0xAE || Lapis
| 0x4
| [[#CardId2|Id2]]
|-
|-
| 0x8
| 0x36 ||  
| 0x4
| [[#CardId3|Id3]]
|}
|}


= RmaInformation =
= MemoryCapacity =
This is "nn::gc::RmaInformation". This is a 0x200-byte struct.
This is "nn::gc::detail::MemoryCapacity".
 
 
= SimulatingDeviceType =
This is "nn::fs::SimulatingDeviceType".
 
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Value || Name
! Value || Name
|-
|-
| 0 || eMMC
| 0xFA || 1GB
|-
| 0xF8 || 2GB
|-
| 0xF0 || 4GB
|-
| 0xE0 || 8GB
|-
|-
| 1 || SdCard
| 0xE1 || 16GB
|-
|-
| 2 || GameCard
| 0xE2 || 32GB
|}
|}


= SimulatingDeviceDetectionMode =
= MemoryType =
This is "nn::fs::SimulatingDeviceDetectionMode".
This is "nn::gc::detail::MemoryType".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 2,653: Line 2,958:
! Value || Name
! Value || Name
|-
|-
| 0 || NoSimulation
| 0x1 || T1RomFast
|-
| 0x2 || T2RomFast
|-
| 0x9 || T1NandFast
|-
| 0xA || T2NandFast
|-
| 0x21 || T1RomLate
|-
| 0x22 || T2RomLate
|-
|-
| 1 || DeviceAttached
| 0x29 || T1NandLate
|-
|-
| 2 || DeviceRemoved
| 0x2A || T2NandLate
|}
|}


= SimulatingDeviceAccessFailureEventType =
= CardSecurityNumber =
This is "nn::fs::SimulatingDeviceAccessFailureEventType".
This is "nn::gc::detail::CardSecurityNumber".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 2,667: Line 2,982:
! Value || Name
! Value || Name
|-
|-
| 0 || None
| 0 || 0
|-
| 1 || 1
|-
|-
| 1 || AccessTimeoutFailure
| 2 || 2
|-
|-
| 2 || AccessFailure
| 3 || 3
|-
|-
| 3 || DataCorruption
| 4 || 4
|}
|}


= SimulatingDeviceTargetOperation =
= CardType =
This is "nn::fs::SimulatingDeviceTargetOperation".
This is "nn::gc::detail::CardType".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 2,683: Line 3,000:
! Value || Name
! Value || Name
|-
|-
| 1 || Read
| 0 || Rom
|-
| 1 || WritableDevT1
|-
| 2 || WritableProdT1
|-
|-
| 2 || Write
| 3 || WritableDevT2
|-
| 4 || WritableProdT2
|}
|}


= SpeedEmulationMode =
= RmaInformation =
This is "nn::fs::SpeedEmulationMode".
This is "nn::gc::RmaInformation". This is a 0x200-byte struct.
 
= GameCardCardHeader =
This is a 0x600-byte struct.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Value || Name
! Offset
! Size
! Description
|-
|-
| 0 || None
| 0x0
| 0x100
| [[XCI#CardHeader|Signature]]
|-
|-
| 1 || Faster
| 0x100
| 0x100
| [[Lotus3#GetCardHeader|Header]]
|-
|-
| 2 || Slower
| 0x200
|-
| 0x400
| 3 || Random
| [[XCI#NewCardHeaderCertArea|NewCardHeaderCertArea]]
|}
|}


= FspPath =
= GameCardAsicProductionFirmware =
This is "nn::fssrv::sf::FspPath". This is a 0x301-byte string.
This is the [[Lotus3#AsicFirmware|firmware]] for reading production Gamecards.
 
Embedded in "nn::gc::detail::EmbeddedDataHolder::g_FwReadBuffer" when in production mode.
 
[4.0.0+] This firmware was updated to provide support for new Gamecards.
 
[9.0.0+] This firmware was updated.
 
[11.0.0+] This firmware was updated.
 
[12.0.0+] This firmware was updated.
 
[14.0.0+] This firmware was updated.
 
= GameCardAsicDevelopmentFirmware =
This is the [[Lotus3#AsicFirmware|firmware]] for reading development Gamecards.
 
Embedded in "nn::gc::detail::EmbeddedDataHolder::g_FwReadBuffer" when in development mode.
 
[9.0.0+] This firmware was updated.
 
[11.0.0+] This firmware was updated.
 
[14.0.0+] This firmware was updated.
 
= GameCardAsicWriterFirmware =
This is the [[Lotus3#AsicFirmware|firmware]] for writing development Gamecards.
 
Embedded in "nn::gc::detail::EmbeddedDataHolder::g_FwWriterBuffer".
 
= SimulatingDeviceType =
This is "nn::fs::SimulatingDeviceType".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Path || Notes
! Value || Name
|-
|-
| @SystemContent ||
| 0 || eMMC
|-
| @UserContent ||
|-
|-
| @SdCardContent ||
| 1 || SdCard
|-
|-
| @CalibFile ||
| 2 || GameCard
|}
 
= SimulatingDeviceDetectionMode =
This is "nn::fs::SimulatingDeviceDetectionMode".
 
{| class="wikitable" border="1"
|-
|-
| @Safe ||
! Value || Name
|-
|-
| @User ||
| 0 || NoSimulation
|-
|-
| @System ||
| 1 || DeviceAttached
|-
|-
| @Sdcard ||
| 2 || DeviceRemoved
|}
 
= SimulatingDeviceAccessFailureEventType =
This is "nn::fs::SimulatingDeviceAccessFailureEventType".
 
{| class="wikitable" border="1"
|-
|-
| @Host ||
! Value || Name
|-
|-
| @GcApp || Gamecard App partition (Partition 2)
| 0 || None
|-
|-
| @GcXYYYYYYYY || Gamecard Contents. X is the partition type (U - Update, N - Normal, S - Secure). Y is the gamecard handle as a 32-bit hex value
| 1 || AccessTimeoutFailure
|-
|-
| @upp || Gamecard update partition (Partition 0)
| 2 || AccessFailure
|-
|-
| [4.0.0+] @RegUpdate || Registered update partition
| 3 || DataCorruption
|}
|}


= SaveDataAttribute =
= SimulatingDeviceTargetOperation =
This is "nn::fs::SaveDataAttribute".
This is "nn::fs::SimulatingDeviceTargetOperation".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset
! Value || Name
! Size
! Description
|-
|-
| 0x0
| 1 || Read
| 0x8
| [[NCM_services#ApplicationId|ApplicationId]] (0 for SystemSaveData)</br>SaveData: 0 can be used for accessing the savedata associated with the current FS session [[NCM_services#ApplicationId|ApplicationId]], otherwise when set this is the [[NCM_services#ApplicationId|ApplicationId]] associated with the savedata to access.
|-
|-
| 0x8
| 2 || Write
| 0x10
|}
| UserId</br>For user-specific savedata(saveuser) when set, otherwise when zero this indicates the common savedata(savecommon). This is loaded from [[Account_services]].
 
= SpeedEmulationMode =
This is "nn::fs::SpeedEmulationMode".
 
{| class="wikitable" border="1"
|-
|-
| 0x18
! Value || Name
| 0x8
| [[Flash_Filesystem|SystemSaveDataId]] (0 for SaveData)
|-
|-
| 0x20
| 0 || None
| 0x1
| [[#SaveDataType]]
|-
|-
| 0x21
| 1 || Faster
| 0x1
| [[#SaveDataRank]]
|-
|-
| 0x22
| 2 || Slower
| 0x2
| SaveDataIndex
|-
|-
| 0x24
| 3 || Random
| 0x4
| Padding
|-
| 0x28
| 0x8
| 0 for SystemSaveData/SaveData.
|-
| 0x30
| 0x8
| 0 for SystemSaveData/SaveData.
|-
| 0x38
| 0x8
| 0 for SystemSaveData/SaveData.
|}
|}


Total size is 0x40-bytes.
= FspPath =
 
This is "nn::fssrv::sf::FspPath". This is a 0x301-byte string.
For DeviceSaveData, this struct is all-zero except for the [[#SaveDataType]] field (and optionally the ApplicationId if specified).
 
= SaveDataCreationInfo =
This is "nn::fs::SaveDataCreationInfo".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset
! Path || Notes
! Size
! Description
|-
|-
| 0x0
| @SystemContent ||
| 0x8
|-
| SaveDataSize
| @UserContent ||
|-
|-
| 0x8
| @SdCardContent ||
| 0x8
| JournalSize
|-
|-
| 0x10
| @CalibFile ||
| 0x8
|-
| AvailableSize</br>0x4000 for SystemSaveData/SaveData/DeviceSaveData/BcatSaveData.
| @Safe ||
|-
| @User ||
|-
| @System ||
|-
| @Sdcard ||
|-
|-
| 0x18
| @Host ||
| 0x8
| OwnerId</br>Official user-processes only uses 0 here for SystemSaveData/SaveData. For the dedicated save-creation code with SaveData/DeviceSaveData, this value comes from an input param with official user-processes. For BcatSaveData, this is the hard-coded [[NCM_services#ProgramId|ProgramId]] of the bcat-sysmodule.
|-
|-
| 0x20
| @GcApp || Gamecard App partition (Partition 2)
| 0x4
| [[#SaveDataFlags]]</br>Written using an input param for official user-processes. Hard-coded 0 for BcatSaveData.
|-
|-
| 0x24
| @GcXYYYYYYYY || Gamecard Contents. X is the partition type (U - Update, N - Normal, S - Secure). Y is the gamecard handle as a 32-bit hex value
| 0x1
| [[#SaveDataSpaceId]]</br>Official user-processes only uses 0 here for SystemSaveData, 1 for SaveData/DeviceSaveData/BcatSaveData.
|-
|-
| 0x25
| @upp || Gamecard update partition (Partition 0)
| 0x1
| Unknown. 0 for SystemSaveData/SaveData.
|-
|-
| 0x26
| [4.0.0+] @RegUpdate || Registered update partition
| 0x1A
| Not initialized for SystemSaveData/SaveData.
|}
|}


Total size is 0x40-bytes.
= SaveDataAttribute =
This is "nn::fs::SaveDataAttribute".


= DeviceSaveData =
{| class="wikitable" border="1"
This is accessed using the same commands for SaveData with the same input u8, the only difference compared to SaveData is the [[#SaveDataAttribute]].
|-
 
! Offset
= BcatSaveData =
! Size
This is accessed using the same commands for SaveData with the same input u8. The [[#SaveDataAttribute]] is the same as DeviceSaveData (besides the SaveDataType), except that the [[NCM_services#ApplicationId|ApplicationId]] field is always set to <input ApplicationId> (unlike DeviceSaveData where it's optional). See above regarding [[#SaveDataCreationInfo]].
! Description
 
|-
The 0x10-byte struct passed to [[#CreateSaveDataFileSystem]] has the first 0x5-bytes set to all-zero.
| 0x0
| 0x8
| [[#SaveDataReferenceId|ReferenceId]] (0 for SystemSaveData; SaveData: 0 can be used for accessing the savedata associated with the current FS session [[NCM_services#ApplicationId|ApplicationId]], otherwise when set this is the [[NCM_services#ApplicationId|ApplicationId]] associated with the savedata to access)
|-
| 0x8
| 0x10
| [[#UserId|UserId]] (for user-specific savedata(saveuser) when set, otherwise when zero this indicates the common savedata(savecommon); this is loaded from [[Account_services]])
|-
| 0x18
| 0x8
| [[#StaticSaveDataId|StaticSaveDataId]] (0 for SaveData)
|-
| 0x20
| 0x1
| [[#SaveDataType|Type]]
|-
| 0x21
| 0x1
| [[#SaveDataRank|Rank]]
|-
| 0x22
| 0x2
| Index
|-
| 0x24
| 0x1C
| Reserved
|}


MountSystemBcatSaveData uses [[#OpenSaveDataFileSystemBySystemSaveDataId]] with [[#SaveDataSpaceId]] System. The [[#SaveDataAttribute]] is all-zero, except for the SaveDataType, and SystemSaveDataId is set to the input param.
For DeviceSaveData, this struct is all-zero except for the [[#SaveDataType]] field (and optionally the ApplicationId if specified).


= SaveDataInfo =
= SaveDataCreationInfo =
This is "nn::fs::SaveDataInfo".
This is "nn::fs::SaveDataCreationInfo".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 2,857: Line 3,224:
| 0x0
| 0x0
| 0x8
| 0x8
| SaveDataId
| Size
|-
|-
| 0x8
| 0x8
| 0x1
| 0x8
| [[#SaveDataSpaceId]]
| JournalSize
|-
|-
| 0x9
| 0x1
| [[#SaveDataType]]
|-
| 0xA
| 0x6
| Padding?
|-
| 0x10
| 0x10
| 0x10
| UserId
|-
| 0x20
| 0x8
| 0x8
| SystemSaveDataId (0 for regular SaveData)
| BlockSize (0x4000 for SystemSaveData/SaveData/DeviceSaveData/BcatSaveData)
|-
|-
| 0x28
| 0x18
| 0x8
| 0x8
| [[NCM_services#ApplicationId|ApplicationId]] (for regular SaveData)
| OwnerId (official user-processes only uses 0 here for SystemSaveData/SaveData; for the dedicated save-creation code with SaveData/DeviceSaveData, this value comes from an input param with official user-processes; for BcatSaveData, this is the hard-coded [[NCM_services#ProgramId|ProgramId]] of the bcat-sysmodule)
|-
|-
| 0x30
| 0x20
| 0x8
| 0x4
| Raw saveimage size
| [[#SaveDataFlags|Flags]] (written using an input param for official user-processes; hard-coded 0 for BcatSaveData)
|-
|-
| 0x38
| 0x24
| 0x2
| 0x1
| SaveDataIndex
| [[#SaveDataSpaceId|SpaceId]] (Official user-processes only uses 0 here for SystemSaveData, 1 for SaveData/DeviceSaveData/BcatSaveData)
|-
|-
| 0x3A
| 0x25
| 0x1
| 0x1
| [[#SaveDataRank]]
| IsPseudoSaveFs (0 for SystemSaveData/SaveData)
|-
|-
| 0x3B
| 0x26
| 0x25
| 0x1A
| Unknown. Usually zeros?
| Reserved
|}
|}


This is a 0x60-byte struct.
= SaveDataCreationInfo2 =
 
This is "nn::fs::SaveDataCreationInfo2".
= SaveDataFileSystemExtraData =
 
This is a 0x200-byte struct. Appears to match [[Savegames#Extra_data]].
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x4
| Version
|-
| 0x4
| 0x4
| Reserved
|-
| 0x8
| 0x40
| [[#SaveDataAttribute|Attribute]]
|-
| 0x48
| 0x8
| Size
|-
| 0x50
| 0x8
| JournalSize
|-
| 0x58
| 0x8
| BlockSize
|-
| 0x60
| 0x8
| OwnerId
|-
| 0x68
| 0x4
| Flags
|-
| 0x6C
| 0x1
| [[#SaveDataSpaceId|SpaceId]]
|-
| 0x6D
| 0x1
| [[#SaveDataFormatType|FormatType]]
|-
| 0x6E
| 0x2
| Reserved
|-
| 0x70
| 0x1
| IsHashSaltSpecified
|-
| 0x71
| 0x3
| Reserved
|-
| 0x74
| 0x20
| [[#HashSalt|HashSalt]]
|-
| 0x94
| 0x1
| [[#SaveDataMetaType|MetaType]]
|-
| 0x95
| 0x3
| Reserved
|-
| 0x98
| 0x4
| MetaSize
|-
| 0x9C
| 0x160
| Reserved
|}
 
= SaveDataInfo =
This is "nn::fs::SaveDataInfo".
 
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x8
| SaveDataId
|-
| 0x8
| 0x1
| [[#SaveDataSpaceId|SaveDataSpaceId]]
|-
| 0x9
| 0x1
| [[#SaveDataType|SaveDataType]]
|-
| 0xA
| 0x6
| Reserved
|-
| 0x10
| 0x10
| SaveDataUserId
|-
| 0x20
| 0x8
| SystemSaveDataId (0 for regular SaveData)
|-
| 0x28
| 0x8
| [[NCM_services#ApplicationId|ApplicationId]] (for regular SaveData)
|-
| 0x30
| 0x8
| SaveDataSize
|-
| 0x38
| 0x2
| Index
|-
| 0x3A
| 0x1
| [[#SaveDataRank|Rank]]
|-
| 0x3B
| 0x1
| State
|-
| 0x3C
| 0x24
| Reserved
|}
 
= SaveDataExtraData =
This is "nn::fs::SaveDataExtraData".
 
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x40
| [[#SaveDataAttribute|Attribute]]
|-
| 0x40
| 0x8
| OwnerId
|-
| 0x48
| 0x8
| TimeStamp
|-
| 0x50
| 0x4
| Flags
|-
| 0x54
| 0x4
| Reserved
|-
| 0x58
| 0x8
| AvailableSize
|-
| 0x60
| 0x8
| JournalSize
|-
| 0x68
| 0x8
| CommitId
|-
| 0x70
| 0x190
| Reserved
|}
 
= SaveDataFilter =
This is "nn::fs::SaveDataFilter".
 
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x1
| FilterApplicationId
|-
| 0x1
| 0x1
| FilterSaveDataType
|-
| 0x2
| 0x1
| FilterSaveDataUserId
|-
| 0x3
| 0x1
| FilterStaticSaveDataId
|-
| 0x4
| 0x1
| FilterIndex
|-
| 0x5
| 0x1
| Option
|-
| 0x6
| 0x2
| Reserved
|-
| 0x8
| 0x40
| [[#SaveDataAttribute|Attribute]]
|}


= InitialDataVersion2 =
= InitialDataVersion2 =
This is a 0x8210-byte struct used by [[#ISaveDataTransferManagerWithDivision]].
This is a 0x2000-byte struct used by [[#ISaveDataTransferManagerWithDivision]].
 
= LocalKeySeedPackage =
This is "nn::fs::LocalKeySeedPackage".
 
This is a 0x200-byte ([S2] 0x280-byte) struct.
 
= FsAccessControlRestrictionMode =
This is "nn::fs::FsAccessControlRestrictionMode".
 
{| class="wikitable" border="1"
|-
! Value || Name
|-
| 0 ||
|}
 
= Notes =
== DeviceSaveData ==
This is accessed using the same commands for SaveData with the same input u8, the only difference compared to SaveData is the [[#SaveDataAttribute]].
 
== BcatSaveData ==
This is accessed using the same commands for SaveData with the same input u8. The [[#SaveDataAttribute]] is the same as DeviceSaveData (besides the SaveDataType), except that the [[NCM_services#ApplicationId|ApplicationId]] field is always set to <input ApplicationId> (unlike DeviceSaveData where it's optional). See above regarding [[#SaveDataCreationInfo]].
 
The 0x10-byte struct passed to [[#CreateSaveDataFileSystem]] has the first 0x5-bytes set to all-zero.
 
MountSystemBcatSaveData uses [[#OpenSaveDataFileSystemBySystemSaveDataId]] with [[#SaveDataSpaceId]] System. The [[#SaveDataAttribute]] is all-zero, except for the SaveDataType, and SystemSaveDataId is set to the input param.


[[Category:Services]]
[[Category:Services]]