Changes

Jump to navigation Jump to search
1,963 bytes added ,  16:23, 10 September 2019
no edit summary
Line 1: Line 1: −
= pl:u =
+
= pl:u, pl:s =
This is "nn::pl::detail::IPlatformServiceManager".
+
These are "nn::pl::detail::IPlatformServiceManager".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 23: Line 23:  
|-
 
|-
 
| 101 || [8.0.0+] RequestApplicationFunctionAuthorizationForSystem
 
| 101 || [8.0.0+] RequestApplicationFunctionAuthorizationForSystem
 +
|-
 +
| 1000 || [9.0.0+] LoadNgWordDataForPlatformRegionChina
 +
|-
 +
| 1001 || [9.0.0+] GetNgWordDataSizeForPlatformRegionChina
 
|}
 
|}
   Line 216: Line 220:     
== NotifyAppletEvent ==
 
== NotifyAppletEvent ==
Takes an input u8 '''event_xF''', an u8 '''event_xC''', an u8 '''event_xD''', an u8 '''event_xE''', 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 '''titleID'''. Returns no output.
   −
When '''event_xE''' is 2 this will immediately return 0.
+
When [[#PlayLogPolicy]] is 2 ("None") this will immediately return 0.
    
Logs a new [[#PlayEvent]] with the following data:
 
Logs a new [[#PlayEvent]] with the following data:
 
* Clears the 0x10-bytes at +0x10.
 
* Clears the 0x10-bytes at +0x10.
* u8 +0xF = '''event_xF'''.
+
* u8 +0xF = [[#AppletEventType]].
 
* Sets the 3 timestamps.
 
* Sets the 3 timestamps.
 
* Converts '''titleID''' and writes it to +0x0.
 
* Converts '''titleID''' and writes it to +0x0.
 
* u32 +0x8 = '''event_x8'''.
 
* u32 +0x8 = '''event_x8'''.
* u8 +0xC = '''event_xC''', u8 +0xD = '''event_xD''', and u8 +0xE = '''event_xE'''.
+
* u8 +0xC = [[Applet_Manager_services#AppletId|AppletId]], u8 +0xD = [[Filesystem_services#StorageId|StorageId]], and u8 +0xE = [[#PlayLogPolicy]].
    
After the initial logging, additional code runs with some of the above input params.
 
After the initial logging, additional code runs with some of the above input params.
Line 253: Line 257:     
== Cmd8 ==
 
== Cmd8 ==
Takes an input u8 '''event_xF''', an u8 '''event_x9''', an u8 '''event_xC''', an u8 '''event_xD''', an u8 '''event_xE''', 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 '''titleID'''. Returns no output.
    
This is similar to [[#NotifyAppletEvent]].
 
This is similar to [[#NotifyAppletEvent]].
   −
When '''event_xE''' is 2 this will immediately return 0.
+
When [[#PlayLogPolicy]] is 2 ("None") this will immediately return 0.
    
Logs a new [[#PlayEvent]] with the following data:
 
Logs a new [[#PlayEvent]] with the following data:
 
* Clears the 0x20-bytes at +0x0.
 
* Clears the 0x20-bytes at +0x0.
* u8 +0xF = '''event_xF'''.
+
* u8 +0xF = [[#AppletEventType]].
 
* Sets the 3 timestamps.
 
* Sets the 3 timestamps.
 
* Converts '''titleID''' and writes it to +0x0.
 
* Converts '''titleID''' and writes it to +0x0.
* u8 +0x9 = '''event_x9'''.
+
* u8 +0x9 = [[Applet_Manager_services#LibraryAppletMode|LibraryAppletMode]].
 
* u8 +0x8 = 1.
 
* u8 +0x8 = 1.
* u8 +0xC = '''event_xC''', u8 +0xD = '''event_xD''', and u8 +0xE = '''event_xE'''.
+
* u8 +0xC = [[Applet_Manager_services#AppletId|AppletId]], u8 +0xD = [[Filesystem_services#StorageId|StorageId]], and u8 +0xE = [[#PlayLogPolicy]].
    
After the initial logging, additional code runs with some of the above input params. This is handled the same as [[#NotifyAppletEvent]], except that the value passed for '''event_x8''' is value 0 here.
 
After the initial logging, additional code runs with some of the above input params. This is handled the same as [[#NotifyAppletEvent]], except that the value passed for '''event_x8''' is value 0 here.
    
== Cmd9 ==
 
== Cmd9 ==
Takes an input u8 '''event_xF''', an u8 '''event_xC''', an u8 '''event_xD''', an 0x20-byte struct, an u8 bool flag, an u8 '''event_xE''', 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 0x20-byte struct, an u8 bool flag, an u8 [[#PlayLogPolicy]], an u32 '''event_x8''', and an u64 '''titleID'''. Returns no output.
    
This is identical to [[#NotifyAppletEvent]] except for the additional struct/flag params.
 
This is identical to [[#NotifyAppletEvent]] except for the additional struct/flag params.
  −
When '''event_xE''' is 2 this will immediately return 0.
  −
  −
Logs a new [[#PlayEvent]] with the following data:
  −
* Clears the 0x10-bytes at +0x10.
  −
* u8 +0xF = '''event_xF'''
  −
* Sets the 3 timestamps.
  −
* Converts '''titleID''' and writes it to +0x0.
  −
* u32 +0x8 = '''event_x8'''
  −
* u8 +0xC = '''event_xC''', u8 +0xD = '''event_xD''', and u8 +0xE = '''event_xE'''.
      
After the initial logging, additional code runs with some of the above input params. This is handled the same as [[#NotifyAppletEvent]], except that when the u8 bool flag is set the input struct is used with this.
 
After the initial logging, additional code runs with some of the above input params. This is handled the same as [[#NotifyAppletEvent]], except that when the u8 bool flag is set the input struct is used with this.
Line 322: Line 316:  
| 13 || [5.0.0+] [[#QueryApplicationPlayStatisticsForSystem]]
 
| 13 || [5.0.0+] [[#QueryApplicationPlayStatisticsForSystem]]
 
|-
 
|-
| 14 || [6.0.0+]
+
| 14 || [6.0.0+] [[#QueryRecentlyPlayedApplication]]
 
|-
 
|-
| 15 || [6.0.0+]
+
| 15 || [6.0.0+] [[#GetRecentlyPlayedApplicationUpdateEvent]]
 
|-
 
|-
| 16 || [6.0.0+]
+
| 16 || [6.0.0+] [[#QueryApplicationPlayStatisticsByUserAccountIdForSystem]]
 
|}
 
|}
   Line 361: Line 355:  
The number of entries in each array is the same.
 
The number of entries in each array is the same.
   −
== Cmd14 ==
+
== QueryRecentlyPlayedApplication ==
 
Takes an input u128 userID, a type-0x6 output buffer containing an array of u64 titleIDs, and returns an output u32 for actual total output entries.
 
Takes an input u128 userID, a type-0x6 output buffer containing an array of u64 titleIDs, and returns an output u32 for actual total output entries.
    
Returns a list of titles played by the specified user.
 
Returns a list of titles played by the specified user.
   −
== Cmd15 ==
+
== GetRecentlyPlayedApplicationUpdateEvent ==
 
No input, returns an output Event handle with autoclear=false.
 
No input, returns an output Event handle with autoclear=false.
    
This is signaled when logging a new [[#PlayEvent]] which would be available via [[#QueryAccountEvent]], where [[#PlayEvent]] +0x18 is 0.
 
This is signaled when logging a new [[#PlayEvent]] which would be available via [[#QueryAccountEvent]], where [[#PlayEvent]] +0x18 is 0.
   −
== Cmd16 ==
+
== QueryApplicationPlayStatisticsByUserAccountIdForSystem ==
 
Takes a u128 userID, a type-0x6 output buffer containing an array of [[#ApplicationPlayStatistics]] and a type-0x5 input buffer containing an array of u64 titleIDs. Returns an output s32 for actual total output entries.
 
Takes a u128 userID, a type-0x6 output buffer containing an array of [[#ApplicationPlayStatistics]] and a type-0x5 input buffer containing an array of u64 titleIDs. Returns an output s32 for actual total output entries.
   Line 500: Line 494:  
! Description
 
! Description
 
|-
 
|-
| 0
+
| 0 || Applet
| Applet
+
|-
 +
| 1 || Account
 
|-
 
|-
| 1
+
| 2 || PowerStateChange
| Account
   
|-
 
|-
| 2
+
| 3 || OperationModeChange
| PowerStateChange
   
|-
 
|-
| 3
+
| 4 || Initialize. Used for the very first [[#PlayEvent]] entry in the log.
| OperationModeChange
   
|}
 
|}
    
This is an enum for [[#PlayEvent]] +0x1C, which indicates the type of [[#PlayEvent]].
 
This is an enum for [[#PlayEvent]] +0x1C, which indicates the type of [[#PlayEvent]].
 +
 +
= AppletEventType =
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Description
 +
|-
 +
| 0 || "launch"
 +
|-
 +
| 1 || "exit"
 +
|-
 +
| 2 || "in_focus"
 +
|-
 +
| 3 || "out_of_focus"
 +
|-
 +
| 4 || "out_of_focus"
 +
|-
 +
| 5 || "exit"
 +
|-
 +
| 6 || "exit"
 +
|}
 +
 +
This is an enum for [[#PlayEvent]] +0xF with [[#PlayEventType]] = Applet, this indicates the type of the Applet event.
 +
 +
= PlayLogPolicy =
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Meaning
 +
! Description
 +
|-
 +
| 0 || All || All pdm:qry cmds which require [[#PlayEventType]] = Applet and AppletId = Application will only return the entry when PlayLogPolicy matches this value.
 +
|-
 +
| 1 || LogOnly || The above commands will filter out the entry with this.
 +
|-
 +
| 2 || None || pdm:ntfy [[#NotifyAppletEvent]], [[#Cmd8]], and [[#Cmd9]] will immediately return 0 when the input param matches this value.
 +
|}
 +
 +
This is an enum for [[#PlayEvent]] +0xE with [[#PlayEventType]] = Applet. This is set via the above commands, which uses this as an input param.
    
= PlayEvent =
 
= PlayEvent =
Line 538: Line 569:     
Filtering:
 
Filtering:
* [[#QueryApplicationEvent]] and [[#QueryLastPlayTime]]: PlayEvent +0x1C must be 0, +0xC must be 1, and +0xE must be 0.
+
* [[#QueryApplicationEvent]], [[#QueryLastPlayTime]], and [[#QueryApplicationPlayStatisticsForSystem]]: PlayEvent +0x1C must be 0, +0xC must be 1, and +0xE must be 0.
 
* [[#QueryPlayStatisticsByApplicationId]]: PlayEvent +0x1C must be 0, +0xC must be 1, and the titleID must match.
 
* [[#QueryPlayStatisticsByApplicationId]]: PlayEvent +0x1C must be 0, +0xC must be 1, and the titleID must match.
 
* [[#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.
    
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 titleIDs/userIDs, the low/high u32 in each u64 is swapped.
Line 554: Line 586:  
| 0x0 || 0x8 || titleID
 
| 0x0 || 0x8 || titleID
 
|-
 
|-
| 0x8 || 0x4 || When set to u8 0x1 by pdm:ntfy [[#Cmd8]], this indicates that +0x9 is set.
+
| 0x8 || 0x4 || Title version, set by pdm:ntfy [[#NotifyAppletEvent]] and [[#Cmd9]].
 +
|-
 +
| 0x8 || 0x1 || When set to u8 0x1 by pdm:ntfy [[#Cmd8]], this indicates that +0x9 is set. Only used for non-applications.
 
|-
 
|-
| 0x9 || 0x1 || See above.
+
| 0x9 || 0x1 || See above. [[Applet_Manager_services#LibraryAppletMode|LibraryAppletMode]]
 
|-
 
|-
 
| 0xC || 0x1 || [[Applet_Manager_services#AppletId|AppletId]]
 
| 0xC || 0x1 || [[Applet_Manager_services#AppletId|AppletId]]
Line 562: Line 596:  
| 0xD || 0x1 || [[Filesystem_services#StorageId|StorageId]]
 
| 0xD || 0x1 || [[Filesystem_services#StorageId|StorageId]]
 
|-
 
|-
| 0xE || 0x1 || ?
+
| 0xE || 0x1 || [[#PlayLogPolicy]]
 
|-
 
|-
| 0xF || 0x1 || [[#AppletEvent]]
+
| 0xF || 0x1 || [[#AppletEventType]]
 
|-
 
|-
 
| 0x10 || 0xC || Unused
 
| 0x10 || 0xC || Unused

Navigation menu