Shared Database services: Difference between revisions
(16 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
"pl:s" has max_sessions 2 (5 with [16.0.0+]). | "pl:s" has max_sessions 2 (5 with [16.0.0+]). | ||
The Function cmds (including GetRequiredApplicationVersion) uses data parsed from [[#FunctionBlackList|FunctionBlackList]]. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 22: | Line 24: | ||
| 6 || [4.0.0-15.0.1] GetSharedFontInOrderOfPriorityForSystem | | 6 || [4.0.0-15.0.1] GetSharedFontInOrderOfPriorityForSystem | ||
|- | |- | ||
| 100 || [8.0.0+] RequestApplicationFunctionAuthorization | | 100 || [8.0.0+] [[#RequestApplicationFunctionAuthorization|RequestApplicationFunctionAuthorization]] | ||
|- | |||
| 101 || [8.0.0+] [[#RequestApplicationFunctionAuthorizationByProcessId|RequestApplicationFunctionAuthorizationByProcessId]] | |||
|- | |||
| 102 || [10.0.0+] [[#RequestApplicationFunctionAuthorizationByApplicationId|RequestApplicationFunctionAuthorizationByApplicationId]] | |||
|- | |- | ||
| | | 103 || [11.0.0+] [[#RefreshApplicationFunctionBlackListDebugRecord|RefreshApplicationFunctionBlackListDebugRecord]] | ||
|- | |- | ||
| | | 104 || [11.0.0+] [[#RequestApplicationFunctionAuthorizationByProgramId|RequestApplicationFunctionAuthorizationByProgramId]] | ||
|- | |- | ||
| | | 105 || [11.0.0+] [[#GetFunctionBlackListSystemVersionToAuthorize|GetFunctionBlackListSystemVersionToAuthorize]] | ||
|- | |- | ||
| | | 106 || [11.0.0+] [[#GetFunctionBlackListVersion|GetFunctionBlackListVersion]] | ||
|- | |- | ||
| | | 107 || [17.0.0+] [[#RequestApplicationFunctionAuthorizationByApplicationIdAndProgramId|RequestApplicationFunctionAuthorizationByApplicationIdAndProgramId]] | ||
|- | |- | ||
| | | 108 || [20.0.0+] [[#GetRequiredApplicationVersion|GetRequiredApplicationVersion]] | ||
|- | |- | ||
| 1000 || [9.0.0+] LoadNgWordDataForPlatformRegionChina | | 1000 || [9.0.0+] LoadNgWordDataForPlatformRegionChina | ||
Line 96: | Line 102: | ||
* Nintendo Extended: Contains Nintendo-specific characters, including HID buttons, HID controller styles, applet icons, Wii(U) icons, etc. | * Nintendo Extended: Contains Nintendo-specific characters, including HID buttons, HID controller styles, applet icons, Wii(U) icons, etc. | ||
== RequestApplicationFunctionAuthorization == | |||
Takes a PID, an u8 [[#ApplicationFunctionAuthorizationId|ApplicationFunctionAuthorizationId]], an u64 pid_reserved, no output. | |||
== RequestApplicationFunctionAuthorizationByProcessId == | |||
Takes an u8 [[#ApplicationFunctionAuthorizationId|ApplicationFunctionAuthorizationId]], an u64 "nn::os::ProcessId", no output. | |||
Uses the same cmd impl func as [[#RequestApplicationFunctionAuthorization|RequestApplicationFunctionAuthorization]]. | |||
== RequestApplicationFunctionAuthorizationByApplicationId == | |||
Takes an u8 [[#ApplicationFunctionAuthorizationId|ApplicationFunctionAuthorizationId]], an u32, an [[NCM_services#ApplicationId|ApplicationId]], no output. | |||
== RefreshApplicationFunctionBlackListDebugRecord == | |||
No input/output. | |||
== RequestApplicationFunctionAuthorizationByProgramId == | |||
Takes an u8 [[#ApplicationFunctionAuthorizationId|ApplicationFunctionAuthorizationId]], an [[NCM_services#ProgramId|ProgramId]], no output. | |||
== GetFunctionBlackListSystemVersionToAuthorize == | |||
Takes an u8 [[#ApplicationFunctionAuthorizationId|ApplicationFunctionAuthorizationId]], an [[NCM_services#ApplicationId|ApplicationId]], returns an [[#FunctionBlackListSystemVersion|FunctionBlackListSystemVersion]]. | |||
== GetFunctionBlackListVersion == | |||
No input, returns an output u32. | |||
== RequestApplicationFunctionAuthorizationByApplicationIdAndProgramId == | |||
Takes an u8 [[#ApplicationFunctionAuthorizationId|ApplicationFunctionAuthorizationId]], an u32, an [[NCM_services#ApplicationId|ApplicationId]], an [[NCM_services#ProgramId|ProgramId]], no output. | |||
== GetRequiredApplicationVersion == | |||
Takes an u8 [[#ApplicationFunctionAuthorizationId|ApplicationFunctionAuthorizationId]], an [[NCM_services#ApplicationId|ApplicationId]], returns an u32. | |||
= mii:u, mii:e = | = mii:u, mii:e = | ||
Line 171: | Line 206: | ||
|- | |- | ||
| 26 || [10.2.0+] Append | | 26 || [10.2.0+] Append | ||
|- | |||
| 27 || [19.0.0-19.0.1] ImportMigrationData | |||
|} | |} | ||
Line 201: | Line 238: | ||
|- | |- | ||
| 17 || DeleteImages | | 17 || DeleteImages | ||
|- | |||
| 18 || [19.0.0+] AddImageForMigration | |||
|- | |||
| 19 || [20.0.0+] ClearHeaderForMigration | |||
|- | |||
| 20 || [20.0.0+] SaveHeaderForMigration | |||
|- | |- | ||
| 100 || DeleteFile | | 100 || DeleteFile | ||
Line 241: | Line 284: | ||
|- | |- | ||
| 9 || [8.0.0+] | | 9 || [8.0.0+] | ||
|- | |||
| 20 || [20.0.0+] | |||
|- | |||
| 100 || [20.0.0+] | |||
|- | |||
| 101 || [20.0.0+] | |||
|} | |} | ||
Line 363: | Line 412: | ||
|- | |- | ||
| 19 || [10.0.0+] [[#QueryApplicationPlayStatisticsByUserAccountIdForSystem]] | | 19 || [10.0.0+] [[#QueryApplicationPlayStatisticsByUserAccountIdForSystem]] | ||
|- | |||
| 100 || [20.0.0+] | |||
|- | |||
| 110 || [20.0.0+] | |||
|- | |||
| 118 || [20.0.0+] | |||
|- | |||
| 119 || [20.0.0+] | |||
|} | |} | ||
Line 536: | Line 593: | ||
=== Flush === | === Flush === | ||
No input, no output. Flushed the commited data to its safe. | No input, no output. Flushed the commited data to its safe. | ||
= ApplicationFunctionAuthorizationId = | |||
This is "nn::pl::ApplicationFunctionAuthorizationId". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Value | |||
! Description | |||
|- | |||
| 0 || Invalid | |||
|- | |||
| 1 || LocalNetworkMode | |||
|- | |||
| 2 || SecureLdnLocalCommunication | |||
|- | |||
| 3 || SecureLp2pLocalCommunication | |||
|- | |||
| 4 || InsecureLp2pLocalCommunication | |||
|- | |||
| 5 || Launch | |||
|} | |||
= FunctionBlackListSystemVersion = | |||
This is "nn::pl::FunctionBlackListSystemVersion". This is a 0x4-byte struct. | |||
= VersionListEntry = | = VersionListEntry = | ||
Line 900: | Line 981: | ||
| 0x38 || 0x1 || [[#PlayEvent]] +0x18 | | 0x38 || 0x1 || [[#PlayEvent]] +0x18 | ||
|- | |- | ||
| | | 0x39 || 0x7 || Padding | ||
|} | |} | ||
Line 972: | Line 1,053: | ||
The func which initializes pl:* services calls a func, which then uses [[Process_Manager_services|pm:bm]] GetBootMode. This checks for BootMode Normal - the functionality here has no affect on whether pl:* services are available however. | The func which initializes pl:* services calls a func, which then uses [[Process_Manager_services|pm:bm]] GetBootMode. This checks for BootMode Normal - the functionality here has no affect on whether pl:* services are available however. | ||
= FunctionBlackList = | |||
The FunctionBlackList SystemData contains "blacklist.json", which has the following structure (used by [[#pl:s|pl:s]]): | |||
* "compatibility_version": <number> (must be within 32bits) | |||
* "version": <number> (must be within 32bits) | |||
* "records": Array, each object entry can then contain: | |||
** "program_id" or "application_id": "0x<hex id>" (lowercase) | |||
** "function_id": "<function>", where <function> is the same as [[#ApplicationFunctionAuthorizationId|ApplicationFunctionAuthorizationId]] ("LocalNetworkMode", etc). | |||
** "function_id_raw": <number>, directly sets the [[#ApplicationFunctionAuthorizationId|ApplicationFunctionAuthorizationId]] value. | |||
** "type": "ApplicationUpdateRequired", "Prohibited", or "SystemUpdateRequired" | |||
** "type_raw": <number>, directly sets the value for the above "type". | |||
** "application": This object can contain: | |||
*** "version": <number> (must be within 32bits) | |||
** "system": This object can contain: | |||
*** "major": <number> (must be <=0xFF) | |||
*** "minor": <number> (must be <=0xFF) | |||
*** "micro": <number> (must be <=0xFF) | |||
The "blacklist.json" "compatibility_version" field is value 1, "version" is value 1, and the "records" array is empty. | |||
[S2] [20.1.0+] The "blacklist.json" "version" field is now value 4, and the "records" array is now filled in with entries for Applications ([19.0.0] same as NX). All records currently only have "function_id" = "Launch". There's currently no records with fields "program_id", or "*_raw". The "application" object in not present in records with "type" = "Prohibited". There's currently no records with "type" = "SystemUpdateRequired", and the "system" object is not present. | |||
The "application" "version" is the Patch [[CNMT|Version]]. | |||
There's records for both S1 and S2 Applications. The S2 Applications all have "function_id" = "Launch", "type" = "ApplicationUpdateRequired", "application" "version" = 0 (likewise with some S1 Applications). | |||
Note that in some cases there's records with ApplicationIds where the S2 Application is not (yet?) available on eShop. | |||
[[Category:Services]] | [[Category:Services]] |