Shared Database services: Difference between revisions

No edit summary
 
(35 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= pl:u, pl:s =
= pl:s =
These are "nn::pl::detail::IPlatformServiceManagerForSystem".
This is "nn::pl::detail::IPlatformServiceManagerForSystem". With [16.0.0+] "pl:u" was moved from here to [[Glue_services|glue]].
 
"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 6: Line 10:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#RequestLoad]]
| 0 || [1.0.0-15.0.1] [[#RequestLoad]]
|-
|-
| 1 || [[#GetLoadState]]
| 1 || [1.0.0-15.0.1] [[#GetLoadState]]
|-
|-
| 2 || [[#GetSize]]
| 2 || [1.0.0-15.0.1] [[#GetSize]]
|-
|-
| 3 || [[#GetSharedMemoryAddressOffset]]
| 3 || [1.0.0-15.0.1] [[#GetSharedMemoryAddressOffset]]
|-
|-
| 4 || [[#GetSharedMemoryNativeHandle]]
| 4 || [1.0.0-15.0.1] [[#GetSharedMemoryNativeHandle]]
|-
|-
| 5 || [[#GetSharedFontInOrderOfPriority]]
| 5 || [1.0.0-15.0.1] [[#GetSharedFontInOrderOfPriority]]
|-
|-
| 6 || [4.0.0+] 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
| 101 || [8.0.0+] [[#RequestApplicationFunctionAuthorizationByProcessId|RequestApplicationFunctionAuthorizationByProcessId]]
|-
|-
| 102 || [10.0.0+] RequestApplicationFunctionAuthorizationByApplicationId
| 102 || [10.0.0+] [[#RequestApplicationFunctionAuthorizationByApplicationId|RequestApplicationFunctionAuthorizationByApplicationId]]
|-
|-
| 103 || [11.0.0+] RefreshApplicationFunctionBlackListDebugRecord
| 103 || [11.0.0+] [[#RefreshApplicationFunctionBlackListDebugRecord|RefreshApplicationFunctionBlackListDebugRecord]]
|-
|-
| 104 || [11.0.0+] RequestApplicationFunctionAuthorizationByProgramId
| 104 || [11.0.0+] [[#RequestApplicationFunctionAuthorizationByProgramId|RequestApplicationFunctionAuthorizationByProgramId]]
|-
|-
| 105 || [11.0.0+] GetFunctionBlackListSystemVersionToAuthorize
| 105 || [11.0.0+] [[#GetFunctionBlackListSystemVersionToAuthorize|GetFunctionBlackListSystemVersionToAuthorize]]
|-
|-
| 106 || [11.0.0+] GetFunctionBlackListVersion
| 106 || [11.0.0+] [[#GetFunctionBlackListVersion|GetFunctionBlackListVersion]]
|-
|-
| 1000 || [9.0.0+] LoadNgWordDataForPlatformRegionChina
| 107 || [17.0.0+] [[#RequestApplicationFunctionAuthorizationByApplicationIdAndProgramId|RequestApplicationFunctionAuthorizationByApplicationIdAndProgramId]]
|-
|-
| 1001 || [9.0.0+] GetNgWordDataSizeForPlatformRegionChina
| 108 || [20.0.0+] [[#GetRequiredApplicationVersion|GetRequiredApplicationVersion]]
|-
| 1000 || [9.0.0-20.5.0] LoadNgWordDataForPlatformRegionChina
|-
| 1001 || [9.0.0-20.5.0] GetNgWordDataSizeForPlatformRegionChina
|}
|}


Line 66: Line 74:
User-processes map this SharedMemory with size=0x1100000 and permissions=R--.
User-processes map this SharedMemory with size=0x1100000 and permissions=R--.


Font data is TTF, located at the offset returned by [[#GetSharedFontAddress]].
Font data is TTF, located at the offset returned by [[#GetSharedMemoryAddressOffset]].


== GetSharedFontInOrderOfPriority ==
== GetSharedFontInOrderOfPriority ==
Line 94: 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 =
This is "nn::mii::detail::IStaticService".
This is "nn::mii::detail::IStaticService".
These were moved from [[NS_services|ns]] with [3.0.0+].
These are only available when the output from [[Process_Manager_services|pm:bm]] GetBootMode is not Maintenance.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 165: Line 206:
|-
|-
| 26 || [10.2.0+] Append
| 26 || [10.2.0+] Append
|-
| 27 || [19.0.0-19.0.1] ImportMigrationData
|}
|}


Line 171: Line 214:


This was added with [5.0.0+].
This was added with [5.0.0+].
This is only available when the output from [[Process_Manager_services|pm:bm]] GetBootMode is not Maintenance.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 193: 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 207: Line 258:
= pdm:ntfy =
= pdm:ntfy =
This is "nn::pdm::detail::INotifyService".
This is "nn::pdm::detail::INotifyService".
This was moved from [[NS_services|ns]] with [3.0.0+].
This is only available when the output from [[Process_Manager_services|pm:bm]] GetBootMode is not Maintenance.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 220: Line 275:
| 4 || [[#NotifyClearAllEvent]]
| 4 || [[#NotifyClearAllEvent]]
|-
|-
| 5 || [[#NotifyEventForDebug]]
| 5 || [2.0.0+] [[#NotifyEventForDebug]]
|-
|-
| 6 || [4.0.0+] SuspendUserAccountEventService
| 6 || [4.0.0+] SuspendUserAccountEventService
Line 229: Line 284:
|-
|-
| 9 || [8.0.0+]
| 9 || [8.0.0+]
|-
| 20 || [20.0.0+]
|-
| 100 || [20.0.0+]
|-
| 101 || [20.0.0+]
|}
|}


== NotifyAppletEvent ==
== NotifyAppletEvent ==
Takes an input u8 [[#AppletEventType]], an u8 [[Applet_Manager_services#AppletId|AppletId]], an u8 [[Filesystem_services#StorageId|StorageId]], an u8 [[#PlayLogPolicy]], an u32 '''event_x8''', and an u64 '''titleID'''. Returns no output.
Takes an input u8 [[#AppletEventType]], an u8 [[Applet_Manager_services#AppletId|AppletId]], an u8 [[Filesystem_services#StorageId|StorageId]], an u8 [[#PlayLogPolicy]], an u32 '''event_x8''', and an u64 '''ProgramId'''. Returns no output.


When [[#PlayLogPolicy]] is 2 ("None") this will immediately return 0.
When [[#PlayLogPolicy]] is 2 ("None") this will immediately return 0.
Line 240: Line 301:
* u8 +0xF = [[#AppletEventType]].
* u8 +0xF = [[#AppletEventType]].
* Sets the 3 timestamps.
* Sets the 3 timestamps.
* Converts '''titleID''' and writes it to +0x0.
* Converts '''ProgramId''' and writes it to +0x0.
* u32 +0x8 = '''event_x8'''.
* u32 +0x8 = '''event_x8'''.
* u8 +0xC = [[Applet_Manager_services#AppletId|AppletId]], u8 +0xD = [[Filesystem_services#StorageId|StorageId]], and u8 +0xE = [[#PlayLogPolicy]].
* u8 +0xC = [[Applet_Manager_services#AppletId|AppletId]], u8 +0xD = [[Filesystem_services#StorageId|StorageId]], and u8 +0xE = [[#PlayLogPolicy]].
Line 269: Line 330:


== Cmd8 ==
== Cmd8 ==
Takes an input u8 [[#AppletEventType]], an u8 [[Applet_Manager_services#LibraryAppletMode|LibraryAppletMode]], an u8 [[Applet_Manager_services#AppletId|AppletId]], an u8 [[Filesystem_services#StorageId|StorageId]], an u8 [[#PlayLogPolicy]], and an u64 '''titleID'''. Returns no output.
Takes an input u8 [[#AppletEventType]], an u8 [[Applet_Manager_services#LibraryAppletMode|LibraryAppletMode]], an u8 [[Applet_Manager_services#AppletId|AppletId]], an u8 [[Filesystem_services#StorageId|StorageId]], an u8 [[#PlayLogPolicy]], and an u64 '''ProgramId'''. Returns no output.


This is similar to [[#NotifyAppletEvent]].
This is similar to [[#NotifyAppletEvent]].
Line 279: Line 340:
* u8 +0xF = [[#AppletEventType]].
* u8 +0xF = [[#AppletEventType]].
* Sets the 3 timestamps.
* Sets the 3 timestamps.
* Converts '''titleID''' and writes it to +0x0.
* Converts '''ProgramId''' and writes it to +0x0.
* u8 +0x9 = [[Applet_Manager_services#LibraryAppletMode|LibraryAppletMode]].
* u8 +0x9 = [[Applet_Manager_services#LibraryAppletMode|LibraryAppletMode]].
* u8 +0x8 = 1.
* u8 +0x8 = 1.
Line 303: Line 364:
= pdm:qry =
= pdm:qry =
This is "nn::pdm::detail::IQueryService".
This is "nn::pdm::detail::IQueryService".
This was moved from [[NS_services|ns]] with [3.0.0+].
This is only available when the output from [[Process_Manager_services|pm:bm]] GetBootMode is not Maintenance.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 328: Line 393:
| 9 || [[#GetAvailablePlayEventRange]]
| 9 || [[#GetAvailablePlayEventRange]]
|-
|-
| 10 || [[#QueryAccountEvent]]
| 10 || [3.0.0+] [[#QueryAccountEvent]]
|-
|-
| 11 || [4.0.0+] [[#QueryAccountPlayEvent]]
| 11 || [4.0.0+] [[#QueryAccountPlayEvent]]
Line 347: 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 408: Line 481:
Takes ([10.0.0+] an input u8 bool), an input u128 '''Uid''', a type-0x6 output buffer containing an array of u64 '''ApplicationId''', and returns an output s32 for actual total output entries.
Takes ([10.0.0+] an input u8 bool), an input u128 '''Uid''', a type-0x6 output buffer containing an array of u64 '''ApplicationId''', and returns an output s32 for actual total output entries.


Returns a list of titles played by the specified user.
Returns a list of applications played by the specified user.


== GetRecentlyPlayedApplicationUpdateEvent ==
== GetRecentlyPlayedApplicationUpdateEvent ==
Line 520: 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 556: Line 653:
This is "nn::pdm::AppletEvent" ([1.0.0-7.0.1] "nn::pdm::ApplicationEvent").
This is "nn::pdm::AppletEvent" ([1.0.0-7.0.1] "nn::pdm::ApplicationEvent").


This is a 0x18-byte struct.
This is a 0x28-byte ([1.0.0-15.0.1] 0x18-byte) struct.  
 
Pre-16.0.0:


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 564: Line 663:
! Description
! Description
|-
|-
| 0x0 || 0x8 || titleID
| 0x0 || 0x8 || ProgramId
|-
|-
| 0x8 || 0x4 || entryindex
| 0x8 || 0x4 || entryindex
Line 578: Line 677:


Timestamp format, converted from PosixTime: total minutes since epoch UTC 1999/12/31 00:00.
Timestamp format, converted from PosixTime: total minutes since epoch UTC 1999/12/31 00:00.
[16.0.0+]:
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0 || 0x8 || ProgramId
|-
| 0x8 || 0x4 || entryindex
|-
| 0xC || 0x4 || Padding
|-
| 0x10 || 0x8 || timestamp0 in PosixTime
|-
| 0x18 || 0x8 || timestamp1 in PosixTime
|-
| 0x20 || 0x1 || [[#PlayEvent]] +0xF
|-
| 0x21 || 0x7 || Padding
|}


= PlayStatistics =
= PlayStatistics =
This is "nn::pdm::PlayStatistics".
This is "nn::pdm::PlayStatistics".


This is a 0x28-byte struct.
This is a 0x48-byte ([1.0.0-15.0.1] 0x28-byte) struct.
 
Pre-16.0.0:


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 590: Line 714:
! Description
! Description
|-
|-
| 0x0 || 0x8 || titleID
| 0x0 || 0x8 || ProgramId
|-
|-
| 0x8 || 0x4 || First entryindex
| 0x8 || 0x4 || First entryindex
Line 606: Line 730:
| 0x20 || 0x4 || Total play-time in minutes.
| 0x20 || 0x4 || Total play-time in minutes.
|-
|-
| 0x24 || 0x4 || Total times the application title was launched.
| 0x24 || 0x4 || Total times the program was launched.
|}
 
[16.0.0+]:
 
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0 || 0x8 || ProgramId
|-
| 0x8 || 0x4 || First entryindex
|-
| 0xC || 0x4 || Padding
|-
| 0x10 || 0x8 || First timestamp0. Same as the first [[#AppletEvent]] timestamp except in PosixTime.
|-
| 0x18 || 0x8 || First timestamp1. Same as the second [[#AppletEvent]] timestamp except in PosixTime.
|-
| 0x20 || 0x4 || Last entryindex
|-
| 0x24 || 0x4 || Padding
|-
| 0x28 || 0x8 || Last timestamp0. Same as the first [[#AppletEvent]] timestamp except in PosixTime.
|-
| 0x30 || 0x8 || Last timestamp1. Same as the second [[#AppletEvent]] timestamp except in PosixTime.
|-
| 0x38 || 0x8 || Total play-time in nanoseconds.
|-
| 0x40 || 0x4 || Total times the program was launched.
|-
| 0x44 || 0x4 || Padding
|}
|}


Line 612: Line 769:
This is "nn::pdm::LastPlayTime".
This is "nn::pdm::LastPlayTime".


This is a 0x18-byte struct and contains data from the last time the title was played.
This is a 0x18-byte struct and contains data from the last time the program was played.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 620: Line 777:
! Description
! Description
|-
|-
| 0x0 || 0x8 || titleID
| 0x0 || 0x8 || ApplicationId
|-
|-
| 0x8 || 0x4 || Same as the first [[#AppletEvent]] timestamp.
| 0x8 || 0x4 || Same as the first [[#AppletEvent]] timestamp.
Line 626: Line 783:
| 0xC || 0x4 || Same as the second [[#AppletEvent]] timestamp.
| 0xC || 0x4 || Same as the second [[#AppletEvent]] timestamp.
|-
|-
| 0x10 || 0x4 || Total minutes since the title was last played.
| 0x10 || 0x4 || Total minutes since the program was last played.
|-
|-
| 0x14 || 0x1 || Flag indicating whether the above field is set.
| 0x14 || 0x1 || Flag indicating whether the above field is set.
Line 718: Line 875:
* [[#QueryAppletEvent]], [[#QueryLastPlayTime]], and [[#QueryApplicationPlayStatisticsForSystem]]: PlayEvent +0x1C must be 0, and [[#PlayLogPolicy]] must be 0. [10.0.0+] These will also allow [[#PlayLogPolicy]] value 3, if the input flag is set.
* [[#QueryAppletEvent]], [[#QueryLastPlayTime]], and [[#QueryApplicationPlayStatisticsForSystem]]: PlayEvent +0x1C must be 0, and [[#PlayLogPolicy]] must be 0. [10.0.0+] These will also allow [[#PlayLogPolicy]] value 3, if the input flag is set.
** With [[#QueryLastPlayTime]]/[[#QueryApplicationPlayStatisticsForSystem]] the [[Applet_Manager_services#AppletId|AppletId]] must be 1. [10.0.0+] These now also allow [[Applet_Manager_services#AppletId|AppletId]] 0x1F/0x20.
** With [[#QueryLastPlayTime]]/[[#QueryApplicationPlayStatisticsForSystem]] the [[Applet_Manager_services#AppletId|AppletId]] must be 1. [10.0.0+] These now also allow [[Applet_Manager_services#AppletId|AppletId]] 0x1F/0x20.
* [[#QueryPlayStatisticsByApplicationId]]: PlayEvent +0x1C must be 0, +0xC must be 1 ([10.0.0+] or 0x1F/0x20), and the titleID must match. [10.0.0+] [[#PlayLogPolicy]] must be 0. Value 3 is allowed if the input flag is set.
* [[#QueryPlayStatisticsByApplicationId]]: PlayEvent +0x1C must be 0, +0xC must be 1 ([10.0.0+] or 0x1F/0x20), and the ProgramId must match. [10.0.0+] [[#PlayLogPolicy]] must be 0. Value 3 is allowed if the input flag is set.
* [[#QueryAccountEvent]]: PlayEvent +0x1C must be 1 and PlayEvent +0x18 must be <=1.
* [[#QueryAccountEvent]]: PlayEvent +0x1C must be 1 and PlayEvent +0x18 must be <=1.
* [[#QueryApplicationPlayStatisticsForSystem]]: In addition to the above, this also handles [[#PlayEventType]] PowerStateChange, where PlayEvent +0x0 is value 0 or 1.
* [[#QueryApplicationPlayStatisticsForSystem]]: In addition to the above, this also handles [[#PlayEventType]] PowerStateChange, where PlayEvent +0x0 is value 0 or 1.


The structure of the first 0x1C-bytes are determined by [[#PlayEventType]]. For titleIDs/userIDs, the low/high u32 in each u64 is swapped.
The structure of the first 0x1C-bytes are determined by [[#PlayEventType]]. For ProgramIds/userIDs, the low/high u32 in each u64 is swapped.


Applet:
Applet:
Line 731: Line 888:
! Description
! Description
|-
|-
| 0x0 || 0x8 || titleID
| 0x0 || 0x8 || ProgramId
|-
|-
| 0x8 || 0x4 || Title version, set by pdm:ntfy [[#NotifyAppletEvent]] and [[#Cmd9]].
| 0x8 || 0x4 || Title version, set by pdm:ntfy [[#NotifyAppletEvent]] and [[#Cmd9]].
Line 759: Line 916:
| 0x0 || 0x10 || userID
| 0x0 || 0x10 || userID
|-
|-
| 0x10 || 0x8 || titleID, when u8 +0x18 = 2.
| 0x10 || 0x8 || ProgramId, when u8 +0x18 = 2.
|-
|-
| 0x18 || 0x1 || Type. 0-1 to be listed by [[#QueryAccountEvent]], or 2 to include the above titleID.
| 0x18 || 0x1 || Type. 0-1 to be listed by [[#QueryAccountEvent]], or 2 to include the above ProgramId.
|-
|-
| 0x19 || 0x3 || Padding
| 0x19 || 0x3 || Padding
Line 771: Line 928:
This is "nn::pdm::AccountEvent".
This is "nn::pdm::AccountEvent".


This is a 0x38-byte struct.
This is a 0x38-byte ([10.0.0-15.0.1] 0x40-byte [3.0.0-9.2.0] 0x38-byte) struct.  
 
This was added with [3.0.0+].
 
[3.0.0-9.2.0]:


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 790: Line 951:
|-
|-
| 0x28 || 0x8 || [[#PlayEvent]] +0x30
| 0x28 || 0x8 || [[#PlayEvent]] +0x30
|-
| 0x30 || 0x1 || [[#PlayEvent]] +0x18
|-
| 0x31 || 0x7 || Padding
|}
[10.0.0-15.0.1]:
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0 || 0x10 || userID
|-
| 0x10 || 0x8 || ProgramId
|-
| 0x18 || 0x4 || entryindex
|-
| 0x1C || 0x4 || Padding
|-
| 0x20 || 0x8 || [[#PlayEvent]] +0x20
|-
| 0x28 || 0x8 || [[#PlayEvent]] +0x28
|-
| 0x30 || 0x8 || [[#PlayEvent]] +0x30
|-
| 0x38 || 0x1 || [[#PlayEvent]] +0x18
|-
| 0x39 || 0x7 || Padding
|}
[16.0.0+]:
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0 || 0x10 || userID
|-
| 0x10 || 0x8 || ProgramId
|-
| 0x18 || 0x4 || entryindex
|-
| 0x1C || 0x4 || Padding
|-
| 0x20 || 0x8 || [[#PlayEvent]] +0x20
|-
| 0x28 || 0x8 || [[#PlayEvent]] +0x28
|-
|-
| 0x30 || 0x1 || [[#PlayEvent]] +0x18
| 0x30 || 0x1 || [[#PlayEvent]] +0x18
Line 809: Line 1,022:
| 0x0 || 0x4 || ?
| 0x0 || 0x4 || ?
|-
|-
| 0x4 || 0x8 || titleID, with the u32 low/high words swapped.
| 0x4 || 0x8 || ProgramId, with the u32 low/high words swapped.
|-
|-
| 0xC || 0xC || ?
| 0xC || 0xC || ?
Line 829: Line 1,042:
! Description
! Description
|-
|-
| 0x0 || 0x8 || titleID
| 0x0 || 0x8 || ApplicationId
|-
|-
| 0x8 || 0x8 || Total play-time in nanoseconds.
| 0x8 || 0x8 || Total play-time in nanoseconds.
|-
|-
| 0x10 || 0x8 || Total times the application title was launched.
| 0x10 || 0x8 || Total times the program was launched.
|}
|}
= Notes =
Various services are only available depending on the output of [[Process_Manager_services|pm:bm]] GetBootMode, see above.
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 "blacklist.json" "version" field is probably updated each time the json is updated? As of 20.5.0 (with any rebootless updates) this is value 9.
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.
The json had the following changes with [20.1.5-20.5.0] (with any rebootless updates), besides the above version update:
* ApplicationId 010049900F546000 ([[Super Mario 3D All-Stars]]) now requires Application version 262144.
* New records were added:
** ApplicationIds 01005270232F2000 (OCTOPATH TRAVELER 0) and 01001300232F4000 (OCTOPATH TRAVELER 0 (for KOR/CHN)): function_id "Launch" with type "SystemUpdateRequired", with system-version [20.3.0].
** The following are function_id "Launch" with type ApplicationUpdateRequired:
*** 010099C022B96000 version = 0 (Super Mario Galaxy™)
*** 0100FD8022DAA000 version = 0 (Super Mario Galaxy™ 2)
*** 0100F4C009322000 version = 196608 (Pikmin™ 3 Deluxe)
*** 010015100B514000 version = 65536 (Super Mario Bros.™ Wonder)
*** 01001CB0106F8000 version = 131072 (Pikmin™ 3 Deluxe Demo)


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