Line 305: |
Line 305: |
| | 0x0 | | | 0x0 |
| | 0x8 | | | 0x8 |
− | | Title ID | + | | [[NCM_services#ProgramId|ProgramId]] |
| |- | | |- |
| | 0x8 | | | 0x8 |
Line 329: |
Line 329: |
| | | |
| == LaunchApplication == | | == LaunchApplication == |
− | Takes an input u64 titleID, returns an output u64 PID. | + | Takes an input u64 [[NCM_services#ProgramId|ProgramId]], returns an output u64 PID. |
| | | |
| Launches an application title which is registered with NS. | | Launches an application title which is registered with NS. |
| | | |
| == GetApplicationContentPath == | | == GetApplicationContentPath == |
− | Takes a 0x16-type output buffer, an u8 [[NCM_services#Title_Types|title type]], and an u64 titleID. | + | Takes a 0x16-type output buffer, an u8 [[NCM_services#ContentMetaType|ContentMetaType]], and an u64 [[NCM_services#ProgramId|ProgramId]]. |
| | | |
− | The input titleID is used with the application-title table like various other cmds, anything not in that table can't be used with this. | + | The input [[NCM_services#ProgramId|ProgramId]] is used with the application-title table like various other cmds, anything not in that table can't be used with this. |
| | | |
− | Returns a string path for the specified type of patch content with this titleID, otherwise returns regular-application paths when update-title not installed. Returns an error when the specified type of content doesn't exist for this title. Starts with "@{SdCardContent,UserContent}://" and ends in ".nca". | + | Returns a string path for the specified type of patch content with this [[NCM_services#ProgramId|ProgramId]], otherwise returns regular-application paths when update-title not installed. Returns an error when the specified type of content doesn't exist for this title. Starts with "@{SdCardContent,UserContent}://" and ends in ".nca". |
| | | |
| For gamecard content, the output path is: "@GcSXXXXXXXX:/<NcaId>.nca". NCA-type0 with gamecard returns 0 with an empty output string. | | For gamecard content, the output path is: "@GcSXXXXXXXX:/<NcaId>.nca". NCA-type0 with gamecard returns 0 with an empty output string. |
Line 365: |
Line 365: |
| | | |
| == GetApplicationControlData == | | == GetApplicationControlData == |
− | Takes an input u8 [[#ApplicationControlSource]], an u64 titleID, and a type-0x6 output buffer. Returns an output u32 for actual_size. Official user-processes use buffer size 0x24000. [[qlaunch]] only uses flag value 0x1 (Storage if not in cache). | + | Takes an input u8 [[#ApplicationControlSource]], an u64 [[NCM_services#ProgramId|ProgramId]], and a type-0x6 output buffer. Returns an output u32 for actual_size. Official user-processes use buffer size 0x24000. [[qlaunch]] only uses flag value 0x1 (Storage if not in cache). |
| | | |
| Loads cached [[control.nacp]] to buf+0 and the cached icon to buf+0x4000. Returns an error if the buffer is too small. | | Loads cached [[control.nacp]] to buf+0 and the cached icon to buf+0x4000. Returns an error if the buffer is too small. |
Line 387: |
Line 387: |
| | | |
| == ListApplicationContentMetaStatus == | | == ListApplicationContentMetaStatus == |
− | Takes a type-0x6 output buffer containing an array of the below entries, an input s32 index and u64 titleID, returns an output s32 out_entrycount. | + | Takes a type-0x6 output buffer containing an array of the below entries, an input s32 index and u64 [[NCM_services#ProgramId|ProgramId]], returns an output s32 out_entrycount. |
| | | |
− | Returns 0x10-byte entries using the specified titleID starting at the specified index. Can only return game titles. The second entry if any is the update-title usually. When the input entryindex is >= totalentries, this will return 0 with out_entrycount=0. | + | Returns 0x10-byte entries using the specified [[NCM_services#ProgramId|ProgramId]] starting at the specified index. Can only return game titles. The second entry if any is the update-title usually. When the input entryindex is >= totalentries, this will return 0 with out_entrycount=0. |
| | | |
| Entry structure: | | Entry structure: |
Line 400: |
Line 400: |
| | 0x0 | | | 0x0 |
| | 0x1 | | | 0x1 |
− | | u8 "type". [[Content_Manager_services|Title type]] (String is from web-applet) | + | | [[NCM_services#ContentMetaType|ContentMetaType]] ("type") |
| |- | | |- |
| | 0x1 | | | 0x1 |
| | 0x1 | | | 0x1 |
− | | u8 "installedStorage" / [[NCM_services#StorageId|StorageId]] (String is from web-applet) | + | | [[NCM_services#StorageId|StorageId]] ("installedStorage") |
| |- | | |- |
| | 0x2 | | | 0x2 |
Line 416: |
Line 416: |
| | 0x4 | | | 0x4 |
| | 0x4 | | | 0x4 |
− | | u32 Title-version | + | | Version |
| |- | | |- |
| | 0x8 | | | 0x8 |
| | 0x8 | | | 0x8 |
− | | u64 titleID | + | | [[NCM_services#ProgramId|ProgramId]] |
| |} | | |} |
| | | |
Line 944: |
Line 944: |
| | | |
| ==== RequestApplicationUpdateInfo ==== | | ==== RequestApplicationUpdateInfo ==== |
− | Takes an input u64 titleID (<code>nn::ncm::ApplicationId</code>), returns an output Event handle and an [[#IAsyncValue]]. | + | Takes an input u64 [[NCM_services#ProgramId|ApplicationId]], returns an output Event handle and an [[#IAsyncValue]]. |
| | | |
| The data that can be read from the [[#IAsyncValue]] is [[#ApplicationUpdateInfo]]. | | The data that can be read from the [[#IAsyncValue]] is [[#ApplicationUpdateInfo]]. |
Line 953: |
Line 953: |
| This is used by AM cmd [[Applet_Manager_services#LaunchDevMenu|LaunchDevMenu]]. | | This is used by AM cmd [[Applet_Manager_services#LaunchDevMenu|LaunchDevMenu]]. |
| | | |
− | This loads titleIDs from [[System_Settings|system-settings]] <code>ns.applet!devmenu_id</code> and <code>ns.applet!devoverlaydisp_id</code>, which only exists on devunits. An error is thrown if loading these fail. | + | This loads ProgramIds from [[System_Settings|system-settings]] <code>ns.applet!devmenu_id</code> and <code>ns.applet!devoverlaydisp_id</code>, which only exists on devunits. An error is thrown if loading these fail. |
| | | |
− | [[NCM_services|NCM]] OpenContentMetaDatabase is used with StorageId = NandSystem, then IContentMetaDatabase GetLatestContentMetaKey is used with both of the above titleIDs to verify that the cmd is successful. | + | [[NCM_services|NCM]] OpenContentMetaDatabase is used with StorageId = NandSystem, then IContentMetaDatabase GetLatestContentMetaKey is used with both of the above ProgramIds to verify that the cmd is successful. |
| | | |
| Then if the above succeeds, the above titles are launched with the above StorageId via [[Process_Manager_services|pmshell]] LaunchProgram, with a 0.5s sleep-thread afterwards on success. | | Then if the above succeeds, the above titles are launched with the above StorageId via [[Process_Manager_services|pmshell]] LaunchProgram, with a 0.5s sleep-thread afterwards on success. |
Line 982: |
Line 982: |
| | | |
| ==== RequestNoDownloadRightsErrorResolution ==== | | ==== RequestNoDownloadRightsErrorResolution ==== |
− | Takes an input u64 titleID (<code>nn::ncm::ApplicationId</code>), returns an output Event handle and an [[#IAsyncValue]]. | + | Takes an input u64 [[NCM_services#ProgramId|ApplicationId]], returns an output Event handle and an [[#IAsyncValue]]. |
| | | |
| The data that can be read from the [[#IAsyncValue]] is [[#NoDownloadRightsErrorResolution]]. | | The data that can be read from the [[#IAsyncValue]] is [[#NoDownloadRightsErrorResolution]]. |
| | | |
| ==== RequestResolveNoDownloadRightsError ==== | | ==== RequestResolveNoDownloadRightsError ==== |
− | Takes an input u64 titleID (<code>nn::ncm::ApplicationId</code>), returns an output Event handle and an [[#IAsyncValue]]. | + | Takes an input u64 [[NCM_services#ProgramId|ApplicationId]], returns an output Event handle and an [[#IAsyncValue]]. |
| | | |
| The data that can be read from the [[#IAsyncValue]] is [[#NoDownloadRightsErrorResolution]]. | | The data that can be read from the [[#IAsyncValue]] is [[#NoDownloadRightsErrorResolution]]. |
Line 1,363: |
Line 1,363: |
| | | |
| == UpdateSafeSystemVersionForDebug == | | == UpdateSafeSystemVersionForDebug == |
− | Takes an input u64 '''titleID''' and an u32 '''version'''. | + | Takes an input u64 [[NCM_services#ProgramId|ProgramId]] and an u32 '''version'''. |
| | | |
− | This command is not available for retail units. On a debug unit, if the [[System_Settings|system setting]] <code>vulnerability!enable_debug</code> is set, this mounts the system savegame [[Flash_Filesystem#System_Savegames|0x8000000000000049]] as "ns_ssversion:/", opens the file "ns_ssversion:/entry" and writes the supplied '''titleID''' and '''version''' in it. | + | This command is not available for retail units. On a debug unit, if the [[System_Settings|system setting]] <code>vulnerability!enable_debug</code> is set, this mounts the system savegame [[Flash_Filesystem#System_Savegames|0x8000000000000049]] as "ns_ssversion:/", opens the file "ns_ssversion:/entry" and writes the supplied [[NCM_services#ProgramId|ProgramId]] and '''version''' in it. |
| | | |
− | Finally, it calls [[NCM_services#ncm|OpenContentMetaDatabase]] with [[NCM_services#StorageId|StorageId]] 3, then calls [[NCM_services#IContentMetaDatabase|GetLatestContentMetaKey]] with the supplied '''titleID''' and compares the version field from the returned [[CNMT#Content_Meta_Records|Content Meta Record]] with the supplied '''version'''. | + | Finally, it calls [[NCM_services#ncm|OpenContentMetaDatabase]] with [[NCM_services#StorageId|StorageId]] 3, then calls [[NCM_services#IContentMetaDatabase|GetLatestContentMetaKey]] with the supplied [[NCM_services#ProgramId|ProgramId]] and compares the version field from the returned [[CNMT#Content_Meta_Records|Content Meta Record]] with the supplied '''version'''. |
| | | |
| If the supplied '''version''' is higher than the one in NCM's database, the value returned by [[NS_Services#NeedsUpdateVulnerability|NeedsUpdateVulnerability]] is set to "true". | | If the supplied '''version''' is higher than the one in NCM's database, the value returned by [[NS_Services#NeedsUpdateVulnerability|NeedsUpdateVulnerability]] is set to "true". |
| | | |
| == GetSafeSystemVersion == | | == GetSafeSystemVersion == |
− | No input, returns an output [[NCM_services#ContentMetaKey|ContentMetaKey]] with the cached contents of "ns_ssversion:/entry" (u64 '''titleID''', u32 '''version''' and u32 '''policy''' from <code>vulnerability!needs_update_vulnerability_policy</code>). | + | No input, returns an output [[NCM_services#ContentMetaKey|ContentMetaKey]] with the cached contents of "ns_ssversion:/entry" (u64 [[NCM_services#ProgramId|ProgramId]], u32 '''version''' and u32 '''policy''' from <code>vulnerability!needs_update_vulnerability_policy</code>). |
| | | |
| = ns:su = | | = ns:su = |
Line 1,799: |
Line 1,799: |
| | | |
| == LaunchApplicationForDevelop == | | == LaunchApplicationForDevelop == |
− | Takes an input u32 [[Process_Manager_services#LaunchFlags|LaunchFlags]] and u64 titleID, returns an output u64 PID. | + | Takes an input u32 [[Process_Manager_services#LaunchFlags|LaunchFlags]] and u64 [[NCM_services#ProgramId|ProgramId]], returns an output u64 PID. |
| | | |
| Same as LaunchApplicationWithStorageId except the last two params passed to the internal vtable funcptr call are value 0x6, instead of from the command input. | | Same as LaunchApplicationWithStorageId except the last two params passed to the internal vtable funcptr call are value 0x6, instead of from the command input. |
| | | |
| == LaunchApplicationWithStorageIdForDevelop == | | == LaunchApplicationWithStorageIdForDevelop == |
− | Takes 2 input u8s, an u32 [[Process_Manager_services#LaunchFlags|LaunchFlags]], and an u64 titleID. Returns an output u64 PID. | + | Takes 2 input u8s, an u32 [[Process_Manager_services#LaunchFlags|LaunchFlags]], and an u64 [[NCM_services#ProgramId|ProgramId]]. Returns an output u64 PID. |
| | | |
| Launches an application title which is registered with NS. | | Launches an application title which is registered with NS. |
Line 1,812: |
Line 1,812: |
| | | |
| == IsPreomiaForDevelop == | | == IsPreomiaForDevelop == |
− | Takes an u64 titleID. Returns a bool. | + | Takes an u64 [[NCM_services#ProgramId|ProgramId]]. Returns a bool. |
| | | |
| = VersionListData = | | = VersionListData = |