NS services: Difference between revisions
| No edit summary | No edit summary | ||
| Line 10: | Line 10: | ||
| | 1 || | | 1 || | ||
| |- | |- | ||
| | 2 || | | 2 || GetTitleHtmlNcaPath | ||
| |- | |- | ||
| | 3 || | | 3 || SubmitArpData | ||
| |- | |- | ||
| | 4 || | | 4 || | ||
| Line 46: | Line 46: | ||
| | 27 || | | 27 || | ||
| |- | |- | ||
| | 30 || | | 30 || GetIAsyncValue | ||
| |- | |- | ||
| | 31 || | | 31 || GetIAsyncResult | ||
| |- | |- | ||
| | 33 || | | 33 || | ||
| Line 102: | Line 102: | ||
| | 61 || | | 61 || | ||
| |- | |- | ||
| | 62 || | | 62 || GetIGameCardStopper | ||
| |- | |- | ||
| | 63 || | | 63 || | ||
| Line 108: | Line 108: | ||
| | 64 || | | 64 || | ||
| |- | |- | ||
| | 65 || | | 65 || GetIRequestServerStopper | ||
| |- | |- | ||
| | 100 ||  | | 100 || DeleteUserContent0 | ||
| |- | |- | ||
| | 101 ||  | | 101 || DeleteUserContent1 | ||
| |- | |- | ||
| | 102 || | | 102 || DeleteUserContent2 | ||
| |- | |- | ||
| | 200 || | | 200 || | ||
| Line 302: | Line 302: | ||
| = ns:su = | = ns:su = | ||
| {| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
| |- | |- | ||
| ! Cmd || Name | ! Cmd || Name | ||
| |- | |- | ||
| | 0 ||  | | 0 || | ||
| |- | |- | ||
| | 1 ||  | | 1 || GetISystemUpdateControl | ||
| |- | |- | ||
| | 2 || | | 2 || | ||
| Line 322: | Line 320: | ||
| | 6 || | | 6 || | ||
| |- | |- | ||
| | 7 || | | 9 || GetNsSuWaitEvent | ||
| |- | |||
| | 10 || | |||
| |- | |||
| |} | |||
| = ns:dev = | |||
| {| class="wikitable" border="1" | |||
| |- | |||
| ! Cmd || Name | |||
| |- | |||
| | 0 || [[#LaunchTitle]] | |||
| |- | |||
| | 1 || [[#TerminateTitleByPid]] | |||
| |- | |||
| | 2 || [[#TerminateTitleByTitleId]] | |||
| |- | |||
| | 3 || [[#GetNsDevWaitEvent]] | |||
| |- | |||
| | 4 || [[#GetNsDevEventType]] | |||
| |- | |||
| | 5 || [[#TerminateCrashingTitle]] | |||
| |- | |||
| | 6 || [[#InstallTitle]] | |||
| |- | |||
| | 7 || SetEventState6 | |||
| |- | |- | ||
| | 8 || | | 8 || SetEventState | ||
| |- | |- | ||
| |} | |} | ||
| == LaunchTitle == | |||
| Wrapper for "pm:shell" [[Process_Manager_services#LaunchProcess|LaunchProcess]]. | |||
| == TerminateTitleByPid == | |||
| Wrapper for "pm:shell" [[Process_Manager_services#TerminateTitleByPid|TerminateTitleByPid]]. | |||
| == TerminateTitleByTitleId == | |||
| Wrapper for "pm:shell" [[Process_Manager_services#TerminateTitleByTitleId|TerminateTitleByTitleId]]. | |||
| == GetNsDevWaitEvent == | |||
| Wrapper for "pm:shell" [[Process_Manager_services#GetProcessEventWaiter|GetProcessEventWaiter]]. | |||
| == GetNsDevEventType == | |||
| Wrapper for "pm:shell" [[Process_Manager_services#GetProcessEventType|GetProcessEventType]]. | |||
| == TerminateCrashingTitle == | |||
| Calls "pm:shell" [[Process_Manager_services#GetCrashingProcessPid|GetCrashingProcessPid]] and sends PID to [[Process_Manager_services#TerminateTitleByPid|TerminateTitleByPid]]. | |||
| == InstallTitle == | |||
| Calls [[NCM_services#IPathResolverForStorage|IPathResolverForStorage]] Set...NcaPath functions. | |||
| [[Category:Services]] | [[Category:Services]] | ||
Revision as of 20:13, 17 August 2017
This is the Switch equivalent of this.
ns:am
| Cmd | Name | 
|---|---|
| 0 | #GetTitlesInfo | 
| 1 | |
| 2 | GetTitleHtmlNcaPath | 
| 3 | SubmitArpData | 
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 11 | |
| 13 | |
| 16 | |
| 17 | |
| 19 | |
| 21 | #GetTitlePatchContentNcaPath | 
| 22 | |
| 23 | |
| 25 | |
| 27 | |
| 30 | GetIAsyncValue | 
| 31 | GetIAsyncResult | 
| 33 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | #GetFreeSpace | 
| 48 | #GetTotalSpace | 
| 49 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | #GetLanguageIdFromString | 
| 61 | |
| 62 | GetIGameCardStopper | 
| 63 | |
| 64 | |
| 65 | GetIRequestServerStopper | 
| 100 | DeleteUserContent0 | 
| 101 | DeleteUserContent1 | 
| 102 | DeleteUserContent2 | 
| 200 | |
| 201 | |
| 210 | |
| 220 | |
| 300 | |
| 301 | |
| 302 | |
| 303 | |
| 304 | |
| 305 | |
| 306 | |
| 307 | |
| 401 | |
| 402 | |
| 403 | |
| 404 | |
| 405 | |
| 502 | |
| 503 | |
| 504 | |
| 600 | |
| 601 | #GetTitleInfo1 | 
| 602 | |
| 603 | |
| 604 | |
| 605 | Used same way as #GetTitleInfo1. | 
| 700 | |
| 701 | |
| 702 | |
| 703 | |
| 704 | |
| 705 | |
| 800 | |
| 801 | |
| 900 | |
| 901 | |
| 902 | |
| 903 | |
| 904 | |
| 905 | |
| 906 | |
| 907 | |
| 908 | |
| 1000 | |
| 1001 | |
| 1200 | |
| 1300 | |
| 1301 | |
| 1302 | |
| 1400 | |
| 1500 | |
| 1501 | |
| 1502 | |
| 1503 | |
| 1600 | |
| 1700 | |
| 1800 | |
| 1801 | |
| 1802 | 
GetTitlePatchContentNcaPath
Takes a 0x16-type output buffer, an u8 type, and an u64 titleID.
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.
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".
For gamecard content, the output path is: "@GcSXXXXXXXX:/<NcaId>.nca". NCA-type0 with gamecard returns 0 with an empty output string.
The output string is then used by the user-process with FS to mount the content.
GetFreeSpace
Takes an input media-id that must be 5.
Returns the u64 from Content_Manager_services#IContentStorage cmd22.
GetTotalSpace
Takes an input media-id that must be 5.
Returns the u64 from Content_Manager_services#IContentStorage cmd23.
GetLanguageIdFromString
Takes an input u8 pointer for the resulting Id to be written to and a string represented as a u64 (i.e 0x53552D6E65 for 'en-US').
Returns 0 if an ID was successfully found, otherwise returns 0x25810.
GetTitlesInfo
Takes a type-6 output buffer and an u64.
Returns an array of title-info entries using the specified offset and size. No input titleID is passed to this.
GetTitleInfo1
Returns 0x10-byte entries using the specified titleID starting at the specified u32 entryindex. 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:
| Offset | Size | Description | 
|---|---|---|
| 0x0 | 0x1 | u8 "type". Title type (String is from web-applet) | 
| 0x1 | 0x1 | u8 "installedStorage" / StorageId (String is from web-applet) | 
| 0x2 | 0x1 | Unknown. Non-zero with output from cmd 605, differs for app/update titles. | 
| 0x3 | 0x1 | Padding | 
| 0x4 | 0x4 | u32 Title-version | 
| 0x8 | 0x8 | u64 titleID | 
ns:su
| Cmd | Name | 
|---|---|
| 0 | |
| 1 | GetISystemUpdateControl | 
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 9 | GetNsSuWaitEvent | 
| 10 | 
ns:dev
| Cmd | Name | 
|---|---|
| 0 | #LaunchTitle | 
| 1 | #TerminateTitleByPid | 
| 2 | #TerminateTitleByTitleId | 
| 3 | #GetNsDevWaitEvent | 
| 4 | #GetNsDevEventType | 
| 5 | #TerminateCrashingTitle | 
| 6 | #InstallTitle | 
| 7 | SetEventState6 | 
| 8 | SetEventState | 
LaunchTitle
Wrapper for "pm:shell" LaunchProcess.
TerminateTitleByPid
Wrapper for "pm:shell" TerminateTitleByPid.
TerminateTitleByTitleId
Wrapper for "pm:shell" TerminateTitleByTitleId.
GetNsDevWaitEvent
Wrapper for "pm:shell" GetProcessEventWaiter.
GetNsDevEventType
Wrapper for "pm:shell" GetProcessEventType.
TerminateCrashingTitle
Calls "pm:shell" GetCrashingProcessPid and sends PID to TerminateTitleByPid.
InstallTitle
Calls IPathResolverForStorage Set...NcaPath functions.