Line 15: |
Line 15: |
| |- | | |- |
| | 61 | | | 61 |
− | | [[#GetOperationStatus]] | + | | [[#FinishOperation]] |
| |- | | |- |
| | 62 | | | 62 |
− | | [[#PutToSleep]] | + | | [[#Sleep]] |
| |- | | |- |
| | 63 | | | 63 |
− | | [[#ResetKeyData]] | + | | [[#UpdateKey]] |
| |} | | |} |
| | | |
Line 47: |
Line 47: |
| |} | | |} |
| | | |
− | == GetOperationStatus == | + | == FinishOperation == |
| Returns the status of a completed operation. | | Returns the status of a completed operation. |
| | | |
− | == PutToSleep == | + | == Sleep == |
| Puts the Gamecard ASIC in sleep mode. | | Puts the Gamecard ASIC in sleep mode. |
| | | |
− | == ResetKeyData == | + | == UpdateKey == |
| Tells the Gamecard ASIC to generate new random key data. | | Tells the Gamecard ASIC to generate new random key data. |
| | | |
Line 122: |
Line 122: |
| | 0x13 | | | 0x13 |
| | [[#GetRmaInformation]] | | | [[#GetRmaInformation]] |
| + | |- |
| + | | 0x14 |
| + | | [9.0.0+] [[#ChallengeCardExistence]] |
| |} | | |} |
| | | |
Line 185: |
Line 188: |
| | | |
| == ReadAsicRegister == | | == ReadAsicRegister == |
− | Signals the Gamecard ASIC to send a 0x30 byte sized buffer containing the values of all ASIC registers. | + | Signals the Gamecard ASIC to send a 0x30 byte sized buffer containing the values of all ASIC registers as follows. |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x4 |
| + | | Status |
| + | |- |
| + | | 0x4 |
| + | | 0x4 |
| + | | Access Control |
| + | |- |
| + | | 0x8 |
| + | | 0x4 |
| + | | |
| + | |- |
| + | | 0xC |
| + | | 0x4 |
| + | | |
| + | |- |
| + | | 0x10 |
| + | | 0x4 |
| + | | |
| + | |- |
| + | | 0x14 |
| + | | 0x4 |
| + | | |
| + | |- |
| + | | 0x18 |
| + | | 0x4 |
| + | | |
| + | |- |
| + | | 0x1C |
| + | | 0x4 |
| + | | |
| + | |- |
| + | | 0x20 |
| + | | 0x4 |
| + | | |
| + | |- |
| + | | 0x24 |
| + | | 0x4 |
| + | | |
| + | |- |
| + | | 0x28 |
| + | | 0x4 |
| + | | |
| + | |- |
| + | | 0x2C |
| + | | 0x4 |
| + | | |
| + | |} |
| | | |
| == ChangeDebugMode == | | == ChangeDebugMode == |
Line 201: |
Line 259: |
| | 0x0 | | | 0x0 |
| | 0x4 | | | 0x4 |
− | | CUP Version | + | | [[Gamecard_Format#Gamecard_Info|CUP Version]] |
| |- | | |- |
| | 0x4 | | | 0x4 |
| | 0x4 | | | 0x4 |
− | | Gamecard ID1 | + | | [[#ReadId1Normal.2C_ReadId1Secure.2C_ReadId1Writer|Gamecard ID1]] |
| |- | | |- |
| | 0x8 | | | 0x8 |
| | 0x100 | | | 0x100 |
− | | [[Gamecard_Format#Gamecard_Header|Gamecard header]] (without the signature) | + | | [[Gamecard_Format#Gamecard_Header|Gamecard Header]] (without the signature) |
| |} | | |} |
| | | |
| == GetCardKeyArea == | | == GetCardKeyArea == |
− | Signals the Gamecard ASIC to send a 0x800 byte sized buffer containing the current Gamecard's key area sectors. | + | Signals the Gamecard ASIC to send a 0x800 byte sized buffer containing the current Gamecard's key area sectors as follows. |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Sector |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0 |
| + | | 0x200 |
| + | | Gamecard specific data |
| + | |- |
| + | | 1 |
| + | | 0x200 |
| + | | [[Gamecard_Format#Gamecard_Certificate|Gamecard Certificate]] |
| + | |- |
| + | | 2 |
| + | | 0x200 |
| + | | Empty sector (all 0xFF) |
| + | |- |
| + | | 3 |
| + | | 0x200 |
| + | | [[Gamecard_Format#Initial_Data|Gamecard Initial Data]] |
| + | |} |
| | | |
| == SendCardCommand == | | == SendCardCommand == |
Line 229: |
Line 310: |
| |- | | |- |
| | 0x1 | | | 0x1 |
− | | 0x7 | + | | 0x1 |
− | | Unknown | + | | Page size |
| + | |- |
| + | | 0x2 |
| + | | 0x1 |
| + | | Direction (0 = read, 1 = write) |
| + | |- |
| + | | 0x3 |
| + | | 0x1 |
| + | | Padding |
| + | |- |
| + | | 0x4 |
| + | | 0x4 |
| + | | Page count |
| |- | | |- |
| | 0x8 | | | 0x8 |
Line 272: |
Line 365: |
| == GetRmaInformation == | | == GetRmaInformation == |
| Signals the Gamecard ASIC to send a 0x200 byte sized buffer containing information on the Gamecard ASIC. This is called by [[Filesystem_services#IDeviceOperator|GetGameCardAsicInfo]]. | | Signals the Gamecard ASIC to send a 0x200 byte sized buffer containing information on the Gamecard ASIC. This is called by [[Filesystem_services#IDeviceOperator|GetGameCardAsicInfo]]. |
| + | |
| + | == ChallengeCardExistence == |
| + | Signals the Gamecard ASIC to exchange random values with the current Gamecard. The Gamecard response values are returned in a 0x58 sized buffer while the host values are passed in the actual [[#OperationBuffer]] as follows. |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x1 |
| + | | Gamecard ASIC operation command (0x14) |
| + | |- |
| + | | 0x1 |
| + | | 0x1F |
| + | | Random value from host |
| + | |- |
| + | | 0x20 |
| + | | 0x20 |
| + | | Command verification value |
| + | |} |
| | | |
| = Gamecard commands = | | = Gamecard commands = |
Line 314: |
Line 429: |
| |- | | |- |
| | 0x2E | | | 0x2E |
− | | [[#UnlockForceErase]] | + | | [2.0.0+] [[#UnlockForceErase]] |
| |- | | |- |
| | 0x30 | | | 0x30 |
Line 320: |
Line 435: |
| |- | | |- |
| | 0x39 | | | 0x39 |
− | | [[#Refresh]] | + | | [[#SetKey]] |
| |- | | |- |
| | 0x56 | | | 0x56 |
Line 338: |
Line 453: |
| |- | | |- |
| | 0xB8 | | | 0xB8 |
− | | [[#GetStatus]] | + | | [[#Refresh]] |
| |- | | |- |
| | 0xC4 | | | 0xC4 |
Line 344: |
Line 459: |
| |- | | |- |
| | 0xE0 | | | 0xE0 |
− | | | + | | ReadInitialData |
| |- | | |- |
| | 0xE2 | | | 0xE2 |
− | | | + | | ChangeInitialData |
− | |-
| |
− | | 0xEC
| |
− | |
| |
| |} | | |} |
| | | |
Line 845: |
Line 957: |
| |} | | |} |
| | | |
− | == Refresh == | + | == SetKey == |
− | Resets the Gamecard's internal error status. This command is only available in [[#Gamecard modes|Secure]] mode.
| + | Sets the Gamecard's internal key data. This command is only available in [[#Gamecard modes|Secure]] mode. |
| | | |
| The [[#OperationBuffer]] is as follows. | | The [[#OperationBuffer]] is as follows. |
Line 901: |
Line 1,013: |
| |} | | |} |
| | | |
− | == GetStatus == | + | == Refresh == |
− | Retrieves the Gamecard's internal error status. This command is only available in [[#Gamecard modes|Secure]] mode.
| + | Resets the Gamecard's internal status. This command is only available in [[#Gamecard modes|Secure]] mode. |
| | | |
| The [[#OperationBuffer]] is as follows. | | The [[#OperationBuffer]] is as follows. |
Line 1,063: |
Line 1,175: |
| | 0x108 | | | 0x108 |
| | 0x4 | | | 0x4 |
− | | | + | | Empty |
| |- | | |- |
| | 0x10C | | | 0x10C |
| | 0x4 | | | 0x4 |
− | | | + | | Empty |
| |- | | |- |
| | 0x110 | | | 0x110 |
| | 0x4 | | | 0x4 |
− | | Version (0, 1 or 3) | + | | Version (0, 0x1, [4.0.0+] 0x3, [9.0.0+] 0x7, [11.0.0+] 0xF) |
| |- | | |- |
| | 0x114 | | | 0x114 |
Line 1,083: |
Line 1,195: |
| | 0x11C | | | 0x11C |
| | 0x4 | | | 0x4 |
− | | | + | | Empty |
| |- | | |- |
| | 0x120 | | | 0x120 |