Line 35: |
Line 35: |
| |- | | |- |
| | 106 || [11.0.0+] GetFunctionBlackListVersion | | | 106 || [11.0.0+] GetFunctionBlackListVersion |
| + | |- |
| + | | 107 || [17.0.0+] RequestApplicationFunctionAuthorizationByApplicationIdAndProgramId |
| |- | | |- |
| | 1000 || [9.0.0+] LoadNgWordDataForPlatformRegionChina | | | 1000 || [9.0.0+] LoadNgWordDataForPlatformRegionChina |
Line 99: |
Line 101: |
| = 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. | | These are only available when the output from [[Process_Manager_services|pm:bm]] GetBootMode is not Maintenance. |
Line 213: |
Line 217: |
| = 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. | | This is only available when the output from [[Process_Manager_services|pm:bm]] GetBootMode is not Maintenance. |
Line 228: |
Line 234: |
| | 4 || [[#NotifyClearAllEvent]] | | | 4 || [[#NotifyClearAllEvent]] |
| |- | | |- |
− | | 5 || [[#NotifyEventForDebug]] | + | | 5 || [2.0.0+] [[#NotifyEventForDebug]] |
| |- | | |- |
| | 6 || [4.0.0+] SuspendUserAccountEventService | | | 6 || [4.0.0+] SuspendUserAccountEventService |
Line 240: |
Line 246: |
| | | |
| == 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 248: |
Line 254: |
| * 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 277: |
Line 283: |
| | | |
| == 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 287: |
Line 293: |
| * 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 311: |
Line 317: |
| = 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. | | This is only available when the output from [[Process_Manager_services|pm:bm]] GetBootMode is not Maintenance. |
Line 338: |
Line 346: |
| | 9 || [[#GetAvailablePlayEventRange]] | | | 9 || [[#GetAvailablePlayEventRange]] |
| |- | | |- |
− | | 10 || [[#QueryAccountEvent]] | + | | 10 || [3.0.0+] [[#QueryAccountEvent]] |
| |- | | |- |
| | 11 || [4.0.0+] [[#QueryAccountPlayEvent]] | | | 11 || [4.0.0+] [[#QueryAccountPlayEvent]] |
Line 418: |
Line 426: |
| 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 566: |
Line 574: |
| 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 574: |
Line 584: |
| ! Description | | ! Description |
| |- | | |- |
− | | 0x0 || 0x8 || titleID | + | | 0x0 || 0x8 || ProgramId |
| |- | | |- |
| | 0x8 || 0x4 || entryindex | | | 0x8 || 0x4 || entryindex |
Line 588: |
Line 598: |
| | | |
| 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 600: |
Line 635: |
| ! Description | | ! Description |
| |- | | |- |
− | | 0x0 || 0x8 || titleID | + | | 0x0 || 0x8 || ProgramId |
| |- | | |- |
| | 0x8 || 0x4 || First entryindex | | | 0x8 || 0x4 || First entryindex |
Line 616: |
Line 651: |
| | 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 622: |
Line 690: |
| 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 630: |
Line 698: |
| ! 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 636: |
Line 704: |
| | 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 728: |
Line 796: |
| * [[#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 741: |
Line 809: |
| ! 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 769: |
Line 837: |
| | 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 781: |
Line 849: |
| 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 800: |
Line 872: |
| |- | | |- |
| | 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 819: |
Line 943: |
| | 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 839: |
Line 963: |
| ! 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. |
| |} | | |} |
| | | |