Filesystem services: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1,380: | Line 1,380: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || IsSdCardInserted | | 0 || [[#IsSdCardInserted]] | ||
|- | |- | ||
| 1 || GetSdCardSpeedMode | | 1 || [[#GetSdCardSpeedMode]] | ||
|- | |- | ||
| 2 || [2.0.0+] GetSdCardCid | | 2 || [2.0.0+] [[#GetSdCardCid]] | ||
|- | |- | ||
| 3 || [2.0.0+] GetSdCardUserAreaSize | | 3 || [2.0.0+] [[#GetSdCardUserAreaSize]] | ||
|- | |- | ||
| 4 || [2.0.0+] GetSdCardProtectedAreaSize | | 4 || [2.0.0+] [[#GetSdCardProtectedAreaSize]] | ||
|- | |- | ||
| 5 || [2.0.0+] GetAndClearSdCardErrorInfo | | 5 || [2.0.0+] [[#GetAndClearSdCardErrorInfo]] | ||
|- | |- | ||
| 100 || GetMmcCid | | 100 || [[#GetMmcCid]] | ||
|- | |- | ||
| 101 || GetMmcSpeedMode | | 101 || [[#GetMmcSpeedMode]] | ||
|- | |- | ||
| 110 || EraseMmc | | 110 || [[#EraseMmc]] | ||
|- | |- | ||
| 111 || GetMmcPartitionSize | | 111 || [[#GetMmcPartitionSize]] | ||
|- | |- | ||
| 112 || [2.0.0+] GetMmcPatrolCount | | 112 || [2.0.0+] [[#GetMmcPatrolCount]] | ||
|- | |- | ||
| 113 || [2.0.0+] GetAndClearMmcErrorInfo | | 113 || [2.0.0+] [[#GetAndClearMmcErrorInfo]] | ||
|- | |- | ||
| 114 || [2.0.0+] GetMmcExtendedCsd | | 114 || [2.0.0+] [[#GetMmcExtendedCsd]] | ||
|- | |- | ||
| 115 || [4.0.0+] SuspendMmcPatrol | | 115 || [4.0.0+] [[#SuspendMmcPatrol]] | ||
|- | |- | ||
| 116 || [4.0.0+] ResumeMmcPatrol | | 116 || [4.0.0+] [[#ResumeMmcPatrol]] | ||
|- | |- | ||
| 200 || [[#IsGameCardInserted]] | | 200 || [[#IsGameCardInserted]] | ||
|- | |- | ||
| 201 || EraseGameCard | | 201 || [[#EraseGameCard]] | ||
|- | |- | ||
| 202 || [[#GetGameCardHandle]] | | 202 || [[#GetGameCardHandle]] | ||
| Line 1,418: | Line 1,418: | ||
| 203 || [[#GetGameCardUpdatePartitionInfo]] | | 203 || [[#GetGameCardUpdatePartitionInfo]] | ||
|- | |- | ||
| 204 || FinalizeGameCardDriver | | 204 || [[#FinalizeGameCardDriver]] | ||
|- | |- | ||
| 205 || GetGameCardAttribute | | 205 || [[#GetGameCardAttribute]] | ||
|- | |- | ||
| 206 || [[#GetGameCardDeviceCertificate]] | | 206 || [[#GetGameCardDeviceCertificate]] | ||
|- | |- | ||
| 207 || GetGameCardAsicInfo | | 207 || [[#GetGameCardAsicInfo]] | ||
|- | |- | ||
| 208 || GetGameCardIdSet | | 208 || [[#GetGameCardIdSet]] | ||
|- | |- | ||
| 209 || WriteToGameCardDirectly | | 209 || [[#WriteToGameCardDirectly]] | ||
|- | |- | ||
| 210 || SetVerifyWriteEnalbleFlag | | 210 || [[#SetVerifyWriteEnalbleFlag]] | ||
|- | |- | ||
| 211 || GetGameCardImageHash | | 211 || [[#GetGameCardImageHash]] | ||
|- | |- | ||
| 212 || [2.0.0+] GetGameCardDeviceIdForProdCard | | 212 || [2.0.0+] [[#GetGameCardDeviceIdForProdCard]] | ||
|- | |- | ||
| 213 || [2.0.0+] EraseAndWriteParamDirectly | | 213 || [2.0.0+] [[#EraseAndWriteParamDirectly]] | ||
|- | |- | ||
| 214 || [2.0.0+] ReadParamDirectly | | 214 || [2.0.0+] [[#ReadParamDirectly]] | ||
|- | |- | ||
| 215 || [2.0.0+] ForceEraseGameCard | | 215 || [2.0.0+] [[#ForceEraseGameCard]] | ||
|- | |- | ||
| 216 || [2.0.0+] GetGameCardErrorInfo | | 216 || [2.0.0+] [[#GetGameCardErrorInfo]] | ||
|- | |- | ||
| 217 || [2.1.0+] GetGameCardErrorReportInfo | | 217 || [2.1.0+] [[#GetGameCardErrorReportInfo]] | ||
|- | |- | ||
| 218 || [3.0.0+] GetGameCardDeviceId | | 218 || [3.0.0+] [[#GetGameCardDeviceId]] | ||
|- | |- | ||
| 219 || [8.0.0+] [[#ChallengeCardExistence]] | | 219 || [8.0.0+] [[#ChallengeCardExistence]] | ||
| Line 1,452: | Line 1,452: | ||
| 220 || [9.0.0+] [[#GetGameCardCompatibilityType]] | | 220 || [9.0.0+] [[#GetGameCardCompatibilityType]] | ||
|- | |- | ||
| 300 || SetSpeedEmulationMode | | 300 || [[#SetSpeedEmulationMode]] | ||
|- | |- | ||
| 301 || GetSpeedEmulationMode | | 301 || [[#GetSpeedEmulationMode]] | ||
|- | |- | ||
| 400 || [5.0.0+] SuspendSdmmcControl | | 400 || [5.0.0+] [[#SuspendSdmmcControl]] | ||
|- | |- | ||
| 401 || [5.0.0+] ResumeSdmmcControl | | 401 || [5.0.0+] [[#ResumeSdmmcControl]] | ||
|- | |- | ||
| 402 || [6.0.0+] [[#GetSdmmcConnectionStatus]] | | 402 || [6.0.0+] [[#GetSdmmcConnectionStatus]] | ||
| Line 1,466: | Line 1,466: | ||
| 501 || [6.0.0+] [[#ClearDeviceSimulationEvent]] | | 501 || [6.0.0+] [[#ClearDeviceSimulationEvent]] | ||
|} | |} | ||
== IsSdCardInserted == | |||
No input. Returns an output bool. | |||
== GetSdCardSpeedMode == | |||
No input. Returns an output [[#SdCardSpeedMode]]. | |||
== GetSdCardCid == | |||
Takes a type-0x6 output buffer and an input s64 '''BufferSize'''. No output. | |||
== GetSdCardUserAreaSize == | |||
No input. Returns an output s64 '''SdCardUserAreaSize'''. | |||
== GetSdCardProtectedAreaSize == | |||
No input. Returns an output s64 '''SdCardProtectedAreaSize'''. | |||
== GetAndClearSdCardErrorInfo == | |||
Takes a type-0x6 output buffer '''LogBuffer''' and an input s64 '''LogBufferSize'''. Returns an output [[#StorageErrorInfo]] and an output s64 '''LogSize'''. | |||
== GetMmcCid == | |||
Takes a type-0x6 output buffer and an input s64 '''BufferSize'''. No output. | |||
== GetMmcSpeedMode == | |||
No input. Returns an output [[#MmcSpeedMode]]. | |||
== EraseMmc == | |||
Takes an input [[#MmcPartition]]. No output. | |||
== GetMmcPartitionSize == | |||
Takes an input [[#MmcPartition]]. Returns an output s64 '''MmcPartitionSize'''. | |||
== GetMmcPatrolCount == | |||
No input. Returns an output u32 '''MmcPatrolCount'''. | |||
== GetAndClearMmcErrorInfo == | |||
Takes a type-0x6 output buffer '''LogBuffer''' and an input s64 '''LogBufferSize'''. Returns an output [[#StorageErrorInfo]] and an output s64 '''LogSize'''. | |||
== GetMmcExtendedCsd == | |||
Takes a type-0x6 output buffer and an input s64 '''BufferSize'''. No output. | |||
== SuspendMmcPatrol == | |||
No input/output. | |||
== ResumeMmcPatrol == | |||
No input/output. | |||
== IsGameCardInserted == | == IsGameCardInserted == | ||
No input | No input. Returns an output bool. | ||
== EraseGameCard == | |||
Takes an input [[#GameCardSize]] and an input u64 '''NormalAreaSize'''. No output. | |||
== GetGameCardHandle == | == GetGameCardHandle == | ||
No input | No input. Returns an output [[#GameCardHandle]]. | ||
== GetGameCardUpdatePartitionInfo == | == GetGameCardUpdatePartitionInfo == | ||
Returns | Takes an input [[#GameCardHandle]]. Returns an output [[#GameCardUpdatePartitionInfo]]. | ||
== FinalizeGameCardDriver == | |||
No input/output. | |||
[[ | == GetGameCardAttribute == | ||
Takes an input [[#GameCardHandle]]. Returns an output [[#GameCardAttribute]]. | |||
== GetGameCardDeviceCertificate == | == GetGameCardDeviceCertificate == | ||
Takes a type-0x6 output buffer, an | Takes a type-0x6 output buffer, an input s64 '''BufferSize''' and an input [[#GameCardHandle]]. No output. | ||
== GetGameCardAsicInfo == | |||
Takes a type-0x5 input buffer '''FwBuffer''', a type-0x6 output buffer containing [[#RmaInformation]] and two input s64s '''FwBufferSize''' and '''RmaInformationSize'''. No output. | |||
== GetGameCardIdSet == | |||
Takes a type-0x6 output buffer containing a [[#GameCardIdSet]] and an input s64 '''BufferSize'''. No output. | |||
== WriteToGameCardDirectly == | |||
Takes a type-0x6 output buffer and two input s64s '''Offset''' and '''BufferSize'''. No output. | |||
== SetVerifyWriteEnalbleFlag == | |||
Takes an input bool. No output. | |||
== GetGameCardImageHash == | |||
Takes a type-0x6 output buffer, an input s64 '''BufferSize''' and an input [[#GameCardHandle]]. No output. | |||
== GetGameCardDeviceIdForProdCard == | |||
Takes a type-0x5 input buffer '''CardHeaderForDev''', a type-0x6 output buffer and two input s64s '''CardHeaderForDevSize''' and '''BufferSize'''. No output. | |||
== EraseAndWriteParamDirectly == | |||
Takes a type-0x5 input buffer and an input s64 '''BufferSize'''. No output. | |||
== ReadParamDirectly == | |||
Takes a type-0x6 output buffer and an input s64 '''BufferSize'''. No output. | |||
== ForceEraseGameCard == | |||
No input/output. | |||
== GetGameCardErrorInfo == | |||
No input. Returns an output [[#GameCardErrorInfo]]. | |||
== GetGameCardErrorReportInfo == | |||
No input. Returns an output [[#GameCardErrorReportInfo]]. | |||
== GetGameCardDeviceId == | |||
Takes a type-0x6 output buffer and an input s64 '''BufferSize'''. No output. | |||
== ChallengeCardExistence == | == ChallengeCardExistence == | ||
Takes a type-0x6 output buffer, two type-0x5 input buffers and an | Takes a type-0x6 output buffer, two type-0x5 input buffers and an input [[#GameCardHandle]]. No output. | ||
[9.0.0+] The [[Account_services|account]] system module uses this as part of a new challenge-response mechanism for [[Network#aauth|application authentication]]. | [9.0.0+] The [[Account_services|account]] system module uses this as part of a new challenge-response mechanism for [[Network#aauth|application authentication]]. | ||
== GetGameCardCompatibilityType == | == GetGameCardCompatibilityType == | ||
Takes an | Takes an input [[#GameCardHandle]]. Returns an output [[#GameCardCompatibilityType]]. | ||
== SetSpeedEmulationMode == | |||
Takes an input [[#SpeedEmulationMode]]. No output. | |||
== GetSpeedEmulationMode == | |||
No input. Returns an output [[#SpeedEmulationMode]]. | |||
== SuspendSdmmcControl == | |||
No input/output. | |||
== ResumeSdmmcControl == | |||
No input/output. | |||
== GetSdmmcConnectionStatus == | == GetSdmmcConnectionStatus == | ||
Takes a total of 4-bytes of input | Takes a total of 4-bytes of input. Returns a total of 8-bytes of output. | ||
== SetDeviceSimulationEvent == | == SetDeviceSimulationEvent == | ||
Takes a total of 0x14-bytes of input | Takes a total of 0x14-bytes of input. No output. | ||
== ClearDeviceSimulationEvent == | == ClearDeviceSimulationEvent == | ||
Takes a total of 4-bytes of input | Takes a total of 4-bytes of input. No output. | ||
= IEventNotifier = | = IEventNotifier = | ||
| Line 2,308: | Line 2,405: | ||
|- | |- | ||
| 34 || SignedSystemPartitionOnSafeMode | | 34 || SignedSystemPartitionOnSafeMode | ||
|} | |||
= SdCardSpeedMode = | |||
This is "nn::fs::SdCardSpeedMode". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Value || Name | |||
|- | |||
| 0 || Identification | |||
|- | |||
| 1 || DefaultSpeed | |||
|- | |||
| 2 || HighSpeed | |||
|- | |||
| 3 || Sdr12 | |||
|- | |||
| 4 || Sdr25 | |||
|- | |||
| 5 || Sdr50 | |||
|- | |||
| 6 || Sdr104 | |||
|- | |||
| 7 || Ddr50 | |||
|- | |||
| 8 || Unknown | |||
|} | |} | ||
| Line 2,343: | Line 2,466: | ||
| 2 || BootPartition2 | | 2 || BootPartition2 | ||
|} | |} | ||
= StorageErrorInfo = | |||
This is "nn::fs::StorageErrorInfo". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x4 | |||
| NumActivationFailures | |||
|- | |||
| 0x4 | |||
| 0x4 | |||
| NumActivationErrorCorrections | |||
|- | |||
| 0x8 | |||
| 0x4 | |||
| NumReadWriteFailures | |||
|- | |||
| 0xC | |||
| 0x4 | |||
| NumReadWriteErrorCorrections | |||
|} | |||
= GameCardErrorInfo = | |||
This is "nn::fs::GameCardErrorInfo". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x4 | |||
| GameCardCrcErrorNum | |||
|- | |||
| 0x4 | |||
| 0x4 | |||
| AsicCrcErrorNum | |||
|- | |||
| 0x8 | |||
| 0x4 | |||
| RefreshNum | |||
|- | |||
| 0xC | |||
| 0x4 | |||
| RetryLimitOutNum | |||
|} | |||
= GameCardErrorReportInfo = | |||
This is "nn::fs::GameCardErrorReportInfo". This is a 0x40-byte struct. | |||
= GameCardHandle = | |||
This is "nn::fs::GameCardHandle". This is an u32. | |||
= GameCardPartition = | = GameCardPartition = | ||
| Line 2,423: | Line 2,604: | ||
| 50 || ClockRate50MHz | | 50 || ClockRate50MHz | ||
|} | |} | ||
= GameCardCompatibilityType = | |||
This is "nn::fs::GameCardCompatibilityType". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Value || Name | |||
|- | |||
| 0 || Global | |||
|- | |||
| 1 || China | |||
|} | |||
= GameCardUpdatePartitionInfo = | |||
This is "nn::fs::GameCardUpdatePartitionInfo". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x4 | |||
| Version | |||
|- | |||
| 0x4 | |||
| 0x4 | |||
| Reserved | |||
|- | |||
| 0x8 | |||
| 0x8 | |||
| Id | |||
|} | |||
= CardId1 = | |||
This is "nn::gc::detail::CardId1". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x1 | |||
| MakerCode | |||
|- | |||
| 0x1 | |||
| 0x1 | |||
| MemoryCapacity | |||
|- | |||
| 0x2 | |||
| 0x1 | |||
| Reserved | |||
|- | |||
| 0x3 | |||
| 0x1 | |||
| MemoryType | |||
|} | |||
= CardId2 = | |||
This is "nn::gc::detail::CardId2". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x1 | |||
| CardSecurityNumber | |||
|- | |||
| 0x1 | |||
| 0x1 | |||
| CardType | |||
|- | |||
| 0x2 | |||
| 0x2 | |||
| Reserved | |||
|} | |||
= CardId3 = | |||
This is "nn::gc::detail::CardId3". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x4 | |||
| Reserved | |||
|} | |||
= GameCardIdSet = | |||
This is "nn::gc::GameCardIdSet". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x4 | |||
| [[#CardId1|Id1]] | |||
|- | |||
| 0x4 | |||
| 0x4 | |||
| [[#CardId2|Id2]] | |||
|- | |||
| 0x8 | |||
| 0x4 | |||
| [[#CardId3|Id3]] | |||
|} | |||
= RmaInformation = | |||
This is "nn::gc::RmaInformation". This is a 0x200-byte struct. | |||
= SimulatingDeviceType = | = SimulatingDeviceType = | ||