Difference between revisions of "Process Services"

From 3dbrew
Jump to navigation Jump to search
m (Add anchors)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Services]]
+
{{Anchor|PS}}{{Anchor|ps:ps}}
 +
= PS service "ps:ps" =
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
!  Command Header
 
!  Command Header
 +
!  Available since system version
 
!  Description
 
!  Description
 
|-
 
|-
 
| 0x00010244
 
| 0x00010244
| SignRsaSha256
+
| [[1.0.0-0]]
 +
| [[PS:SignRsaSha256|SignRsaSha256]]
 
|-
 
|-
 
| 0x00020244
 
| 0x00020244
| VerifyRsaSha256
+
| [[1.0.0-0]]
 +
| [[PS:VerifyRsaSha256|VerifyRsaSha256]]
 
|-
 
|-
 
| Not implemented
 
| Not implemented
| SetAesKey
+
|
 +
| SetAesKey (just returns error 0xD8C107F4)
 
|-
 
|-
 
| 0x00040204
 
| 0x00040204
| EncryptDecryptAes
+
| [[1.0.0-0]]
 +
| [[PS:EncryptDecryptAes|EncryptDecryptAes]]
 
|-
 
|-
 
| 0x00050284
 
| 0x00050284
| EncryptSignDecryptVerifyAesCcm
+
| [[1.0.0-0]]
 +
| [[PS:EncryptSignDecryptVerifyAesCcm|EncryptSignDecryptVerifyAesCcm]]
 
|-
 
|-
| 0x0006....
+
| 0x00060040
| GetRomId
+
| [[1.0.0-0]]
 +
| GetRomId (u32 processID)
 
|-
 
|-
| 0x0007....
+
| 0x00070040
| GetRomId2
+
| [[1.0.0-0]]
 +
| GetRomId2 (u32 processID)
 
|-
 
|-
| 0x0008....
+
| 0x00080040
| GetRomMakerCode
+
| [[1.0.0-0]]
 +
| GetRomMakerCode (u32 processID)
 
|-
 
|-
| 0x0009....
+
| 0x00090000
| GetCTRCardAutoStartupBit
+
| [[1.0.0-0]]
 +
| [[PS:GetCTRCardAutoStartupBit|GetCTRCardAutoStartupBit]]
 
|-
 
|-
| 0x000A....
+
| 0x000A0000
 +
| [[1.0.0-0]]
 
| GetLocalFriendCodeSeed
 
| GetLocalFriendCodeSeed
 
|-
 
|-
| 0x000B....
+
| 0x000B0000
 +
| [[1.0.0-0]]
 
| GetDeviceId
 
| GetDeviceId
 
|-
 
|-
 
| 0x000C0000
 
| 0x000C0000
| GatherEntropy
+
| [[1.0.0-0]]
 +
| [[PS:SeedRNG|SeedRNG]]
 
|-
 
|-
 
| 0x000D0042
 
| 0x000D0042
 +
| [[1.0.0-0]]
 
| GenerateRandomBytes
 
| GenerateRandomBytes
 +
|-
 +
| 0x000E0082
 +
| New3DS = [[8.1.0-0_New3DS]], Old3DS = [[9.0.0-20]]
 +
| Interface for [[Process_Services_PXI]] New3DS command 0x04010084.
 +
|-
 +
| 0x000F0082
 +
| New3DS = [[8.1.0-0_New3DS]], Old3DS = [[9.0.0-20]]
 +
| Interface for [[Process_Services_PXI]] New3DS command 0x04020082.
 +
|-
 +
| 0x00100042
 +
| New3DS = [[8.1.0-0_New3DS]], Old3DS = [[9.0.0-20]]
 +
| Interface for [[Process_Services_PXI]] New3DS command 0x04030044.
 +
|-
 +
| 0x00110042
 +
| New3DS = [[8.1.0-0_New3DS]], Old3DS = [[9.0.0-20]]
 +
| Interface for [[Process_Services_PXI]] New3DS command 0x04040044.
 
|}
 
|}
 +
 +
These commands are an interface for [[Process_Services_PXI]].
 +
 +
For GetRomId, GetRomId2, and GetRomMakerCode, PS-module uses [[FS:GetProgramLaunchInfo]] with the processID which was sent to PS-module via the command input. If GetProgramLaunchInfo fails, PS-module returns error 0xC90107FA. When the mediatype is value2 for gamecard, the PSPXI command is used, otherwise PS-module just clears the output data for the command response.
 +
 +
PS module does not use any CheckNew3DS commands: commands 0x000E0082..0x00110042 are handled by PS module regardless of whether this is running on Old3DS/New3DS. Using these commands on Old3DS will result in Process9 returning an invalid command header error. [[NFC_Services|NFC]] module uses all of these new commands for New3DS.
 +
 +
[[Category:Services]]

Latest revision as of 09:43, 18 September 2024

PS service "ps:ps"[edit]

Command Header Available since system version Description
0x00010244 1.0.0-0 SignRsaSha256
0x00020244 1.0.0-0 VerifyRsaSha256
Not implemented SetAesKey (just returns error 0xD8C107F4)
0x00040204 1.0.0-0 EncryptDecryptAes
0x00050284 1.0.0-0 EncryptSignDecryptVerifyAesCcm
0x00060040 1.0.0-0 GetRomId (u32 processID)
0x00070040 1.0.0-0 GetRomId2 (u32 processID)
0x00080040 1.0.0-0 GetRomMakerCode (u32 processID)
0x00090000 1.0.0-0 GetCTRCardAutoStartupBit
0x000A0000 1.0.0-0 GetLocalFriendCodeSeed
0x000B0000 1.0.0-0 GetDeviceId
0x000C0000 1.0.0-0 SeedRNG
0x000D0042 1.0.0-0 GenerateRandomBytes
0x000E0082 New3DS = 8.1.0-0_New3DS, Old3DS = 9.0.0-20 Interface for Process_Services_PXI New3DS command 0x04010084.
0x000F0082 New3DS = 8.1.0-0_New3DS, Old3DS = 9.0.0-20 Interface for Process_Services_PXI New3DS command 0x04020082.
0x00100042 New3DS = 8.1.0-0_New3DS, Old3DS = 9.0.0-20 Interface for Process_Services_PXI New3DS command 0x04030044.
0x00110042 New3DS = 8.1.0-0_New3DS, Old3DS = 9.0.0-20 Interface for Process_Services_PXI New3DS command 0x04040044.

These commands are an interface for Process_Services_PXI.

For GetRomId, GetRomId2, and GetRomMakerCode, PS-module uses FS:GetProgramLaunchInfo with the processID which was sent to PS-module via the command input. If GetProgramLaunchInfo fails, PS-module returns error 0xC90107FA. When the mediatype is value2 for gamecard, the PSPXI command is used, otherwise PS-module just clears the output data for the command response.

PS module does not use any CheckNew3DS commands: commands 0x000E0082..0x00110042 are handled by PS module regardless of whether this is running on Old3DS/New3DS. Using these commands on Old3DS will result in Process9 returning an invalid command header error. NFC module uses all of these new commands for New3DS.