Applet Manager services: Difference between revisions

No edit summary
 
(28 intermediate revisions by 3 users not shown)
Line 280: Line 280:
|-
|-
| 30 || [12.0.0+] [[#OpenCradleFirmwareUpdater]]
| 30 || [12.0.0+] [[#OpenCradleFirmwareUpdater]]
|-
| 100 || [S2]
|}
|}


Line 338: Line 340:
==== OpenCradleFirmwareUpdater ====
==== OpenCradleFirmwareUpdater ====
No input, returns an [[#ICradleFirmwareUpdater]].
No input, returns an [[#ICradleFirmwareUpdater]].
==== Cmd100 ====
No input, returns an output handle.


=== ICradleFirmwareUpdater ===
=== ICradleFirmwareUpdater ===
Line 636: Line 641:
|-
|-
| 100 || [15.0.0+] SetApplicationCoreUsageMode
| 100 || [15.0.0+] SetApplicationCoreUsageMode
|-
| 110 || [S2]
|-
| 111 || [S2]
|-
| 112 || [S2]
|-
| 113 || [S2]
|-
| 114 || [S2]
|-
| 115 || [S2]
|-
| 116 || [S2]
|-
| 117 || [S2]
|-
| 118 || [S2]
|-
| 119 || [S2]
|-
| 120 || [S2]
|-
| 121 || [S2]
|-
| 122 || [S2]
|-
| 123 || [S2]
|-
| 124 || [S2]
|-
| 130 || [S2]
|-
| 131 || [S2] [20.0.0+]
|-
| 135 || [S2] [20.0.0+]
|-
| 140 || [S2]
|-
| 150 || [S2]
|-
|-
| 160 || [18.0.0+] [[#GetNotificationReceiverService|GetNotificationReceiverService]]
| 160 || [18.0.0+] [[#GetNotificationReceiverService|GetNotificationReceiverService]]
|-
|-
| 161 || [18.0.0+] [[#GetNotificationSenderService|GetNotificationSenderService]]
| 161 || [18.0.0+] [[#GetNotificationSenderService|GetNotificationSenderService]]
|-
| 170 || [S2]
|-
| 171 || [S2]
|-
| 200 || [S2]
|-
| 210 || [S2]
|-
| 211 || [S2]
|-
| 220 || [S2]
|-
| 221 || [S2]
|-
| 230 || [S2]
|-
| 231 || [S2]
|-
| 250 || [S2]
|-
| 251 || [S2]
|-
| 252 || [S2]
|-
| 253 || [S2]
|-
| 260 || [S2]
|-
| 271 || [S2] [20.0.0+]
|-
| 280 || [S2] [20.0.0+]
|-
| 290 || [S2] [20.0.0+] RequestChatProhibition
|-
| 291 || [S2] [20.0.0+] RequestChatExpirationCheckSkip
|-
|-
| 300 || [17.0.0+] GetCurrentApplicationId
| 300 || [17.0.0+] GetCurrentApplicationId
Line 666: Line 747:
|-
|-
| 370 || [22.0.0+] GetGpuErrorEventForApplet
| 370 || [22.0.0+] GetGpuErrorEventForApplet
|-
| 2000 || [S2]
|-
| 2010 || [S2]
|-
| 3000 || [S2] [20.0.0+]
|-
| 3010 || [S2] [20.0.0+]
|}
|}


Line 741: Line 830:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 ||  
| 0 || AddSource
|-
|-
| 1 ||  
| 1 || RemoveSource
|-
|-
| 2 ||  
| 2 || GetEvent
|-
|-
| 3 ||  
| 3 || Receive
|-
|-
| 4 ||  
| 4 || ReceiveWithTick
|}
|}
===== GetEvent =====
Unofficial name.
No input, returns an Event handle.
===== ReceiveWithTick =====
Unofficial name.


=== ISenderService ===
=== ISenderService ===
Line 776: Line 873:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 ||  
| 0 || Send
|-
|-
| 1 ||  
| 1 || GetUnreceivedMessageCount
|}
|}


Line 1,097: Line 1,194:
|-
|-
| 60 || [19.0.0+]  
| 60 || [19.0.0+]  
|-
| 61 || [S2]
|-
|-
| 70 || [21.0.0+]  
| 70 || [21.0.0+]  
Line 1,107: Line 1,206:
|-
|-
| 101 || [5.0.0+] [[#BeginToObserveHidInputForDevelop]]
| 101 || [5.0.0+] [[#BeginToObserveHidInputForDevelop]]
|-
| 110 || [S2]
|-
| 1000 || [S2]
|}
|}


Line 1,258: Line 1,361:
| 202 ||  
| 202 ||  
|-
|-
| 210 ||  
| 210 || [20.0.0+]
|-
|-
| 220 ||  
| 220 || [20.0.0+]
|}
|}


Line 1,278: Line 1,381:
! Cmd || Name
! Cmd || Name
|-
|-
|}
| 0 ||  
 
==== IFocusableLayer ====
This is "nn::am::service::IFocusableLayer".
 
This is exclusive to Switch 2.
 
{| class="wikitable" border="1"
|-
|-
! Cmd || Name
| 1 ||  
|-
|-
|}
| 2 ||  
 
== IApplicationProxy ==
This is "nn::am::service::IApplicationProxy".
 
{| class="wikitable" border="1"
|-
|-
! Cmd || Name || Notes
| 3 ||  
|-
|-
| 0 || GetCommonStateGetter || Returns an [[#ICommonStateGetter]].
| 4 ||  
|-
|-
| 1 || GetSelfController || Returns an [[#ISelfController]].
| 5 ||  
|-
| 10 ||
|-
| 20 ||
|-
| 21 ||
|-
| 31 ||  
|-
|-
| 2 || GetWindowController || Returns an [[#IWindowController]].
| 32 ||  
|-
|-
| 3 || GetAudioController || Returns an [[#IAudioController]].
| 33 ||  
|-
|-
| 4 || GetDisplayController || Returns an [[#IDisplayController]].
| 34 ||  
|-
|-
| 10 || GetProcessWindingController || Returns an [[#IProcessWindingController]].
| 35 ||  
|-
|-
| 11 || GetLibraryAppletCreator || Returns an [[#ILibraryAppletCreator]].
| 40 ||  
|-
|-
| 20 || GetApplicationFunctions || Returns an [[#IApplicationFunctions]].
| 41 ||  
|-
|-
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]].
| 42 ||  
|}
|}


=== IApplicationFunctions ===
===== Cmd0 =====
This is "nn::am::service::IApplicationFunctions".
No input, returns an [[#IStorage|IStorage]].
 
===== Cmd1 =====
Takes an unknown input interface, no output.
 
===== Cmd2 =====
No input, returns an [[#IStorage|IStorage]].
 
===== Cmd3 =====
Takes an unknown input interface, no output.
 
===== Cmd10 =====
No input, returns an [[#IStorage|IStorage]].
 
===== Cmd20 =====
Takes an unknown input interface, no output.
 
===== Cmd21 =====
Takes an unknown input interface, no output.
 
==== IFocusableLayer ====
This is "nn::am::service::IFocusableLayer".
 
This is exclusive to Switch 2.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 1,324: Line 1,446:
! Cmd || Name
! Cmd || Name
|-
|-
| 1 || [[#PopLaunchParameter]]
| 0 ||  
|-
|-
| 10 || [[#CreateApplicationAndPushAndRequestToStart]]
| 1 ||  
|-
|-
| 11 || [3.0.0+] [[#CreateApplicationAndPushAndRequestToStartForQuest]]
| 2 ||  
|-
|-
| 12 || [4.0.0+] [[#CreateApplicationAndRequestToStart]]
| 3 ||  
|-
|-
| 13 || [4.0.0+] [[#CreateApplicationAndRequestToStartForQuest]]
| 4 ||  
|-
|-
| 14 || [7.0.0+] [[#CreateApplicationWithAttributeAndPushAndRequestToStartForQuest]]
| 10 ||  
|-
|-
| 15 || [7.0.0+] [[#CreateApplicationWithAttributeAndRequestToStartForQuest]]
| 11 ||  
|-
|-
| 20 || [[#EnsureSaveData]]
| 20 ||  
|-
|-
| 21 || [[#GetDesiredLanguage]]
| 21 ||  
|-
|-
| 22 || [[#SetTerminateResult]]
| 32 ||  
|-
|-
| 23 || [[#GetDisplayVersion]]
| 33 ||  
|-
|-
| 24 || [2.0.0+] [[#GetLaunchStorageInfoForDebug]]
| 40 ||  
|-
|-
| 25 || [3.0.0+] ExtendSaveData
| 41 ||  
|-
|-
| 26 || [3.0.0+] GetSaveDataSize
| 42 ||  
|-
|-
| 27 || [5.0.0+] CreateCacheStorage
| 50 || [20.0.0+]
|-
|-
| 28 || [11.0.0+] [[#GetSaveDataSizeMax]]
| 51 || [20.0.0+]
|-
|-
| 29 || [11.0.0+] [[#GetCacheStorageMax]]
| 60 || [20.0.0+]
|-
|-
| 30 || [[#BeginBlockingHomeButtonShortAndLongPressed]]
| 70 || [20.0.0+]
|-
|-
| 31 || [[#EndBlockingHomeButtonShortAndLongPressed]]
| 71 || [20.0.0+]
|}
 
== IApplicationProxy ==
This is "nn::am::service::IApplicationProxy".
 
{| class="wikitable" border="1"
|-
|-
| 32 || [[#BeginBlockingHomeButton]]
! Cmd || Name || Notes
|-
|-
| 33 || [[#EndBlockingHomeButton]]
| 0 || GetCommonStateGetter || Returns an [[#ICommonStateGetter]].
|-
|-
| 34 || [10.0.0-15.0.1] [[#SelectApplicationLicense]]
| 1 || GetSelfController || Returns an [[#ISelfController]].
|-
|-
| 35 || [11.0.0+] [[#GetDeviceSaveDataSizeMax]]
| 2 || GetWindowController || Returns an [[#IWindowController]].
|-
|-
| 36 || [14.0.0+] GetLimitedApplicationLicense
| 3 || GetAudioController || Returns an [[#IAudioController]].
|-
|-
| 37 || [14.0.0+] GetLimitedApplicationLicenseUpgradableEvent
| 4 || GetDisplayController || Returns an [[#IDisplayController]].
|-
|-
| 40 || [[#NotifyRunning]]
| 10 || GetProcessWindingController || Returns an [[#IProcessWindingController]].
|-
|-
| 50 || [2.0.0+] [[#GetPseudoDeviceId]]
| 11 || GetLibraryAppletCreator || Returns an [[#ILibraryAppletCreator]].
|-
|-
| 60 || [2.0.0+] [[#SetMediaPlaybackStateForApplication]]
| 20 || GetApplicationFunctions || Returns an [[#IApplicationFunctions]].
|-
|-
| 65 || [3.0.0+] [[#IsGamePlayRecordingSupported]]
| 40 || [S2] || Returns an [[#IPerformanceFunctions|IPerformanceFunctions]].
|-
|-
| 66 || [3.0.0+] [[#InitializeGamePlayRecording]]
| 60 || [S2] || Returns an [[#IGraphicsScalingParametersFunctions|IGraphicsScalingParametersFunctions]].
|-
|-
| 67 || [3.0.0+] [[#SetGamePlayRecordingState]]
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]].
|}
 
=== IApplicationFunctions ===
This is "nn::am::service::IApplicationFunctions".
 
{| class="wikitable" border="1"
|-
|-
| 68 || [4.0.0+] [[#RequestFlushGamePlayingMovieForDebug]]
! Cmd || Name
|-
|-
| 70 || [3.0.0+] [[#RequestToShutdown]]
| 1 || [[#PopLaunchParameter]]
|-
|-
| 71 || [3.0.0+] [[#RequestToReboot]]
| 10 || [[#CreateApplicationAndPushAndRequestToStart]]
|-
|-
| 72 || [10.0.0+] [[#RequestToSleep]]
| 11 || [3.0.0+] [[#CreateApplicationAndPushAndRequestToStartForQuest]]
|-
|-
| 80 || [4.0.0+] [[#ExitAndRequestToShowThanksMessage]]
| 12 || [4.0.0+] [[#CreateApplicationAndRequestToStart]]
|-
|-
| 90 || [4.0.0+] [[#EnableApplicationCrashReport]]
| 13 || [4.0.0+] [[#CreateApplicationAndRequestToStartForQuest]]
|-
|-
| 100 || [5.0.0+] [[#InitializeApplicationCopyrightFrameBuffer]]  
| 14 || [7.0.0+] [[#CreateApplicationWithAttributeAndPushAndRequestToStartForQuest]]
|-
|-
| 101 || [5.0.0+] [[#SetApplicationCopyrightImage]]
| 15 || [7.0.0+] [[#CreateApplicationWithAttributeAndRequestToStartForQuest]]
|-
|-
| 102 || [5.0.0+] [[#SetApplicationCopyrightVisibility]]
| 20 || [[#EnsureSaveData]]
|-
|-
| 110 || [5.0.0+] [[#QueryApplicationPlayStatistics]]
| 21 || [[#GetDesiredLanguage]]
|-
|-
| 111 || [6.0.0+] [[#QueryApplicationPlayStatisticsByUid]]
| 22 || [[#SetTerminateResult]]
|-
|-
| 112 || [20.0.0+]
| 23 || [[#GetDisplayVersion]]
|-
|-
| 113 || [20.0.0+]
| 24 || [2.0.0+] [[#GetLaunchStorageInfoForDebug]]
|-
|-
| 120 || [5.0.0+] [[#ExecuteProgram]]
| 25 || [3.0.0+] ExtendSaveData
|-
|-
| 121 || [5.0.0+] [[#ClearUserChannel]]
| 26 || [3.0.0+] GetSaveDataSize
|-
|-
| 122 || [5.0.0+] [[#UnpopToUserChannel]]
| 27 || [5.0.0+] CreateCacheStorage
|-
|-
| 123 || [5.0.0+] [[#GetPreviousProgramIndex]]
| 28 || [11.0.0+] [[#GetSaveDataSizeMax]]
|-
|-
| 124 || [6.0.0+] [[#EnableApplicationAllThreadDumpOnCrash]]
| 29 || [11.0.0+] [[#GetCacheStorageMax]]
|-
|-
| 130 || [8.0.0+] [[#GetGpuErrorDetectedSystemEvent]]
| 30 || [[#BeginBlockingHomeButtonShortAndLongPressed]]
|-
|-
| 131 || [11.0.0+] [[#SetDelayTimeToAbortOnGpuError]]
| 31 || [[#EndBlockingHomeButtonShortAndLongPressed]]
|-
|-
| 140 || [9.0.0+] [[#GetFriendInvitationStorageChannelEvent]]
| 32 || [[#BeginBlockingHomeButton]]
|-
|-
| 141 || [9.0.0+] [[#TryPopFromFriendInvitationStorageChannel]]  
| 33 || [[#EndBlockingHomeButton]]
|-
|-
| 150 || [9.0.0+] [[#GetNotificationStorageChannelEvent]]
| 34 || [10.0.0-15.0.1] [[#SelectApplicationLicense]]
|-
|-
| 151 || [9.0.0+] [[#TryPopFromNotificationStorageChannel]]
| 35 || [11.0.0+] [[#GetDeviceSaveDataSizeMax]]
|-
|-
| 160 || [9.0.0+] [[#GetHealthWarningDisappearedSystemEvent]]
| 36 || [14.0.0+] GetLimitedApplicationLicense
|-
|-
| 170 || [9.0.0+] [[#SetHdcpAuthenticationActivated]]
| 37 || [14.0.0+] GetLimitedApplicationLicenseUpgradableEvent
|-
|-
| 180 || [10.1.0+] [[#GetLaunchRequiredVersion]]
| 40 || [[#NotifyRunning]]
|-
|-
| 181 || [10.1.0+] [[#UpgradeLaunchRequiredVersion]]
| 50 || [2.0.0+] [[#GetPseudoDeviceId]]
|-
|-
| 190 || [11.0.0+] [[#SendServerMaintenanceOverlayNotification]]
| 60 || [2.0.0+] [[#SetMediaPlaybackStateForApplication]]
|-
|-
| 200 || [11.0.0+] [[#GetLastApplicationExitReason]]
| 65 || [3.0.0+] [[#IsGamePlayRecordingSupported]]
|-
|-
| 210 || [20.0.0+]
| 66 || [3.0.0+] [[#InitializeGamePlayRecording]]
|-
|-
| 220 || [20.0.0+] [[#SetAudioOutputPolicy|SetAudioOutputPolicy]]
| 67 || [3.0.0+] [[#SetGamePlayRecordingState]]
|-
|-
| 300 || [19.0.0+] [[#CreateMovieWriter]]
| 68 || [4.0.0+] [[#RequestFlushGamePlayingMovieForDebug]]
|-
|-
| 310 || [20.0.0+] [[#RequestExitApplicationAndTryPopMessage|RequestExitApplicationAndTryPopMessage]]
| 70 || [3.0.0+] [[#RequestToShutdown]]
|-
|-
| 320 || [20.0.0+]
| 71 || [3.0.0+] [[#RequestToReboot]]
|-
|-
| 330 || [20.2.0+] IsLanguageSelectionLimited
| 72 || [10.0.0+] [[#RequestToSleep]]
|-
|-
| 500 || [5.0.0+] [[#StartContinuousRecordingFlushForDebug]]
| 80 || [4.0.0+] [[#ExitAndRequestToShowThanksMessage]]
|-
| 90 || [4.0.0+] [[#EnableApplicationCrashReport]]
|-
| 100 || [5.0.0+] [[#InitializeApplicationCopyrightFrameBuffer]]
|-
| 101 || [5.0.0+] [[#SetApplicationCopyrightImage]]
|-
| 102 || [5.0.0+] [[#SetApplicationCopyrightVisibility]]
|-
| 110 || [5.0.0+] [[#QueryApplicationPlayStatistics]]
|-
| 111 || [6.0.0+] [[#QueryApplicationPlayStatisticsByUid]]
|-
| 112 || [20.0.0+]
|-
| 113 || [20.0.0+]
|-
| 120 || [5.0.0+] [[#ExecuteProgram]]
|-
|-
| 1000 || [5.0.0+] [[#CreateMovieMaker]]
| 121 || [5.0.0+] [[#ClearUserChannel]]
|-
|-
| 1001 || [5.0.0+] [[#PrepareForJit]]
| 122 || [5.0.0+] [[#UnpopToUserChannel]]
|}
|-
 
| 123 || [5.0.0+] [[#GetPreviousProgramIndex]]
The BOTW game uses this GamePlayRecording functionality from the main-nso "nninitStartup" function, with size 0x6000000(96MiB). The official GamePlayRecording-enable code does the following(this will panic on any failure):
|-
* [[SVC|Creates]] TransferMemory using the input buffer and size, with permissions=0.
| 124 || [6.0.0+] [[#EnableApplicationAllThreadDumpOnCrash]]
* Uses [[#InitializeGamePlayRecording]] with the TransferMemory.
|-
* Closes the TransferMemory handle, + TransferMemory cleanup.
| 130 || [8.0.0+] [[#GetGpuErrorDetectedSystemEvent]]
* Uses [[#SetGamePlayRecordingState]] with value 0x1.
|-
This GamePlayRecording functionality presumably enables the video-recording usable starting with [[4.0.0]].
| 131 || [11.0.0+] [[#SetDelayTimeToAbortOnGpuError]]
 
|-
==== PopLaunchParameter ====
| 140 || [9.0.0+] [[#GetFriendInvitationStorageChannelEvent]]
Takes an input u32 [[#LaunchParameterKind]], returns an output [[#IStorage]].
|-
 
| 141 || [9.0.0+] [[#TryPopFromFriendInvitationStorageChannel]]  
Pops a LaunchParameter [[#IStorage]], the storage will be removed from sysmodule state during this.
|-
 
| 150 || [9.0.0+] [[#GetNotificationStorageChannelEvent]]
==== CreateApplicationAndPushAndRequestToStart ====
|-
Takes an input [[NCM_services#ApplicationId|ApplicationId]] and an input [[#IStorage]], no output. ApplicationId=0 can be used to relaunch the current application.
| 151 || [9.0.0+] [[#TryPopFromNotificationStorageChannel]]
 
|-
==== CreateApplicationAndPushAndRequestToStartForQuest ====
| 160 || [9.0.0+] [[#GetHealthWarningDisappearedSystemEvent]]
Takes 2 input u32s (loaded from struct [[#ApplicationAttributeForQuest]]), an input [[NCM_services#ApplicationId|ApplicationId]], and an input [[#IStorage]], no output.
|-
 
| 170 || [9.0.0+] [[#SetHdcpAuthenticationActivated]]
==== CreateApplicationAndRequestToStart ====
|-
Takes an input [[NCM_services#ApplicationId|ApplicationId]], no output.
| 180 || [10.1.0+] [[#GetLaunchRequiredVersion]]
 
|-
Same as [[#CreateApplicationAndPushAndRequestToStart]] except without the input storage, official sw uses this when no input storage is specified.
| 181 || [10.1.0+] [[#UpgradeLaunchRequiredVersion]]
 
|-
==== CreateApplicationAndRequestToStartForQuest ====
| 190 || [11.0.0+] [[#SendServerMaintenanceOverlayNotification]]
Takes 2 input u32s (loaded from struct [[#ApplicationAttributeForQuest]]) and an input [[NCM_services#ApplicationId|ApplicationId]], no output.
|-
 
| 200 || [11.0.0+] [[#GetLastApplicationExitReason]]
Same as [[#CreateApplicationAndPushAndRequestToStartForQuest]] except without the input storage, official sw uses this when no input storage is specified.
|-
 
| 210 || [20.0.0+]
==== CreateApplicationWithAttributeAndPushAndRequestToStartForQuest ====
|-
Takes an input [[NCM_services#ApplicationId|ApplicationId]], a type-0x15 input buffer containing an [[#ApplicationAttribute]], an input [[#IStorage]], no output.
| 220 || [20.0.0+] [[#SetAudioOutputPolicy|SetAudioOutputPolicy]]
 
|-
[21.0.0+] Now returns an output [[#IStorage]].
| 230 || [S2] [20.0.0+] IsTensorRtSupported
 
|-
Same as [[#CreateApplicationAndPushAndRequestToStartForQuest]] except the entire attributes structure is directly specified via the input buffer. This command replaces [[#CreateApplicationAndPushAndRequestToStartForQuest]], official user-processes no longer use [[#CreateApplicationAndPushAndRequestToStartForQuest]].
| 300 || [19.0.0+] [[#CreateMovieWriter]]
 
|-
==== CreateApplicationWithAttributeAndRequestToStartForQuest ====
| 310 || [20.0.0+] [[#RequestExitApplicationAndTryPopMessage|RequestExitApplicationAndTryPopMessage]]
Takes an input [[NCM_services#ApplicationId|ApplicationId]] and a type-0x15 input buffer containing an [[#ApplicationAttribute]], no output.
|-
| 320 || [20.0.0+]
|-
| 321 || [S2] [20.0.0+]
|-
| 330 || [20.2.0+] IsLanguageSelectionLimited
|-
| 500 || [5.0.0+] [[#StartContinuousRecordingFlushForDebug]]
|-
| 1000 || [5.0.0+] [[#CreateMovieMaker]]
|-
| 1001 || [5.0.0+] [[#PrepareForJit]]
|}


Same as [[#CreateApplicationAndRequestToStartForQuest]] except the entire attributes structure is directly specified via the input buffer. This command replaces [[#CreateApplicationAndRequestToStartForQuest]], official user-processes no longer use [[#CreateApplicationAndPushAndRequestToStartForQuest]].
The BOTW game uses this GamePlayRecording functionality from the main-nso "nninitStartup" function, with size 0x6000000(96MiB). The official GamePlayRecording-enable code does the following(this will panic on any failure):
* [[SVC|Creates]] TransferMemory using the input buffer and size, with permissions=0.
* Uses [[#InitializeGamePlayRecording]] with the TransferMemory.
* Closes the TransferMemory handle, + TransferMemory cleanup.
* Uses [[#SetGamePlayRecordingState]] with value 0x1.
This GamePlayRecording functionality presumably enables the video-recording usable starting with [[4.0.0]].


==== EnsureSaveData ====
==== PopLaunchParameter ====
Takes an input u128 userID, returns an output u64 size.
Takes an input u32 [[#LaunchParameterKind]], returns an output [[#IStorage]].


Calls sdk func <code>nn::fs::EnsureApplicationSaveData</code>. [[qlaunch]] also calls this same sdk func directly.
Pops a LaunchParameter [[#IStorage]], the storage will be removed from sysmodule state during this.
 
==== CreateApplicationAndPushAndRequestToStart ====
Takes an input [[NCM_services#ApplicationId|ApplicationId]] and an input [[#IStorage]], no output. ApplicationId=0 can be used to relaunch the current application.
 
==== CreateApplicationAndPushAndRequestToStartForQuest ====
Takes 2 input u32s (loaded from struct [[#ApplicationAttributeForQuest]]), an input [[NCM_services#ApplicationId|ApplicationId]], and an input [[#IStorage]], no output.
 
==== CreateApplicationAndRequestToStart ====
Takes an input [[NCM_services#ApplicationId|ApplicationId]], no output.
 
Same as [[#CreateApplicationAndPushAndRequestToStart]] except without the input storage, official sw uses this when no input storage is specified.
 
==== CreateApplicationAndRequestToStartForQuest ====
Takes 2 input u32s (loaded from struct [[#ApplicationAttributeForQuest]]) and an input [[NCM_services#ApplicationId|ApplicationId]], no output.
 
Same as [[#CreateApplicationAndPushAndRequestToStartForQuest]] except without the input storage, official sw uses this when no input storage is specified.
 
==== CreateApplicationWithAttributeAndPushAndRequestToStartForQuest ====
Takes an input [[NCM_services#ApplicationId|ApplicationId]], a type-0x15 input buffer containing an [[#ApplicationAttribute]], an input [[#IStorage]], no output.
 
[21.0.0+] Now returns an output [[#IStorage]].
 
Same as [[#CreateApplicationAndPushAndRequestToStartForQuest]] except the entire attributes structure is directly specified via the input buffer. This command replaces [[#CreateApplicationAndPushAndRequestToStartForQuest]], official user-processes no longer use [[#CreateApplicationAndPushAndRequestToStartForQuest]].
 
==== CreateApplicationWithAttributeAndRequestToStartForQuest ====
Takes an input [[NCM_services#ApplicationId|ApplicationId]] and a type-0x15 input buffer containing an [[#ApplicationAttribute]], no output.
 
Same as [[#CreateApplicationAndRequestToStartForQuest]] except the entire attributes structure is directly specified via the input buffer. This command replaces [[#CreateApplicationAndRequestToStartForQuest]], official user-processes no longer use [[#CreateApplicationAndPushAndRequestToStartForQuest]].
 
==== EnsureSaveData ====
Takes an input u128 userID, returns an output u64 size.
 
Calls sdk func <code>nn::fs::EnsureApplicationSaveData</code>. [[qlaunch]] also calls this same sdk func directly.


Creates the various savedata as specified by the application [[NACP_Format|control.nacp]] when the savedata doesn't exist.
Creates the various savedata as specified by the application [[NACP_Format|control.nacp]] when the savedata doesn't exist.
Line 1,812: Line 2,014:
No input, returns an output u64.
No input, returns an output u64.


== ILibraryAppletCreator ==
=== IPerformanceFunctions ===
This is "nn::am::service::ILibraryAppletCreator".
This is "nn::am::service::IPerformanceFunctions".
 
This is exclusive to Switch 2.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Cmd || Name || Notes
! Cmd || Name
|-
|-
| 0 || [[#CreateLibraryAppletOld|CreateLibraryAppletOld]] ([1.0.0-19.0.1] CreateLibraryApplet) ||
| 0 || IsCpuOverclockEnabled
|-
|-
| 1 || [[#TerminateAllLibraryApplets]] ||
| 1 || SetCpuOverclockEnabled
|}
 
=== IGraphicsScalingParametersFunctions ===
This is "nn::am::service::IGraphicsScalingParametersFunctions".
 
This is exclusive to Switch 2.
 
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 10 || GetGraphicsScalingParameters
|-
| 1000 || SetSupportingGraphicsScalingParametersForDebug
|-
| 1010 || SetGpuQuotaForDebug
|-
| 1020 || ClearGpuQuotaForDebug
|-
| 1030 || SetScreenRatioForDebug
|-
| 1040 || ClearScreenRatioForDebug
|-
| 1050 || SetGraphicsScaleChangedNotificationEnabled
|}
 
== ILibraryAppletCreator ==
This is "nn::am::service::ILibraryAppletCreator".
 
{| class="wikitable" border="1"
|-
! Cmd || Name || Notes
|-
| 0 || [[#CreateLibraryAppletOld|CreateLibraryAppletOld]] ([1.0.0-19.0.1] CreateLibraryApplet) ||
|-
| 1 || [[#TerminateAllLibraryApplets]] ||
|-
|-
| 2 || [[#AreAnyLibraryAppletsLeft]] ||
| 2 || [[#AreAnyLibraryAppletsLeft]] ||
Line 1,899: Line 2,139:
|-
|-
| 60 || [10.0.0+] [[#PresetLibraryAppletGpuTimeSliceZero]] ||
| 60 || [10.0.0+] [[#PresetLibraryAppletGpuTimeSliceZero]] ||
|-
| 70 || [S2] ||
|-
|-
| 80 || [19.0.0+] RequestForLibraryAppletToGetForeground ||
| 80 || [19.0.0+] RequestForLibraryAppletToGetForeground ||
Line 2,072: Line 2,314:
| 120 || [13.0.0+] GetAppletLaunchedHistory
| 120 || [13.0.0+] GetAppletLaunchedHistory
|-
|-
| 130 || [21.0.0+]
| 130 || [21.0.0+] EnableStartupLogoDisappearedMessage
|-
|-
| 200 || [7.0.0+] [[#GetOperationModeSystemInfo]]
| 200 || [7.0.0+] [[#GetOperationModeSystemInfo]]
Line 2,095: Line 2,337:
|-
|-
| 611 || [22.0.0+]
| 611 || [22.0.0+]
|-
| 650 || [S2] BeginUsingCameraResource
|-
| 651 || [S2] EndUsingCameraResource
|-
|-
| 900 || [11.0.0+] [[#SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled]]
| 900 || [11.0.0+] [[#SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled]]
Line 2,111: Line 2,357:
|-
|-
| 1005 || [21.0.0+] GetPanelResolutionForSpecificTitle
| 1005 || [21.0.0+] GetPanelResolutionForSpecificTitle
|-
| 2000 || [S2] SetRtcModeChangedMessageEnabled
|-
| 2010 || [S2] GetCurrentDisplayLayoutRatio
|}
|}


Line 2,480: Line 2,730:
|-
|-
| 2200 || [S2] SetSharingLayerEnabled
| 2200 || [S2] SetSharingLayerEnabled
|-
| 2300 || [S2] [20.0.0+] SetCopyrightLayerEnabled
|-
| 2400 || [S2] SetRtcScreenSharingAudioEnabled
|-
| 2401 || [S2] [20.0.0+] SetStreamPlayMirroringAudioEnabled
|-
| 2402 || [S2] [20.0.0+]
|}
|}


Line 3,125: Line 3,383:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 ||  
| 1 ||  
|}
|}


=== Cmd0 ===
=== Cmd1 ===
No input. Returns an [[#IApplicationObserver]].
No input. Returns an [[#IApplicationObserver]].


Line 3,149: Line 3,407:
|-
|-
| 30 ||  
| 30 ||  
|-
| 40 || [S2] [20.0.0+]
|}
|}


Line 3,202: Line 3,462:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Cmd || Name || Notes
! Cmd || Name
|-
| 1 ||  
|-
|-
|}
| 102 ||
|-
| 103 ||
|-
| 104 ||
|-
| 110 ||
|-
| 120 ||
|-
| 121 ||
|-
| 130 ||
|-
| 140 || [20.0.0+]
|-
| 141 || [20.0.0+]
|-
| 200 ||
|-
| 201 ||
|-
| 210 || [20.0.0+]
|-
| 220 || [20.0.0+]
|}


== IDebugFunctions ==
== IDebugFunctions ==
Line 3,263: Line 3,550:
| 300 || [16.0.0+] TerminateAllRunningApplicationsForDebug
| 300 || [16.0.0+] TerminateAllRunningApplicationsForDebug
|-
|-
| 400 || [S2]
| 400 || [S2] LaunchDebugAppletForDebug
|-
|-
| 401 || [S2]
| 401 || [S2] TerminateDebugAppletForDebug
|-
|-
| 402 || [S2]
| 402 || [S2] IsDebugAppletLaunchedForDebug
|-
|-
| 403 || [S2]
| 403 || [S2]
Line 3,285: Line 3,572:
| 910 || [20.0.0+]
| 910 || [20.0.0+]
|-
|-
| 2000 || [S2]
| 2000 || [S2] [20.0.0+]
|-
|-
| 10000 || [S2]
| 10000 || [S2]
Line 3,381: Line 3,668:


=== CreateFloatingLibraryAppletAccepterForDebug ===
=== CreateFloatingLibraryAppletAccepterForDebug ===
Takes a PID, an input u64 reserved_pid, a type-0x5 input buffer containing an array of u32s, returns an [[#appletAE|IAllSystemAppletProxiesService]].
Takes a PID, an input u64 reserved_pid, a type-0x5 input buffer containing an array of u32s, returns an [[#IFloatingLibraryAppletAccepter|IFloatingLibraryAppletAccepter]].


If a state field is already set it must match the PID, otherwise when state==0 the PID is written into state etc.
If a state field is already set it must match the PID, otherwise when state==0 the PID is written into state etc.
Line 3,451: Line 3,738:


These commands return the data originally from [[#CreateHandleStorage]] input, both return the same s64.
These commands return the data originally from [[#CreateHandleStorage]] input, both return the same s64.
== IFloatingLibraryAppletAccepter ==
This is "nn::am::service::IFloatingLibraryAppletAccepter".
This interface has no commands.


= appletOE =
= appletOE =
Line 3,458: Line 3,750:
|-
|-
! Cmd || Name
! Cmd || Name
|-
| 2000 || [S2] [[#OpenCompatApplicationFunctions|OpenCompatApplicationFunctions]]
|-
|-
| 0 || [[#OpenApplicationProxy]]
| 0 || [[#OpenApplicationProxy]]
|-
| 10 || [S2] [[#OpenApplicationProxy2|OpenApplicationProxy2]]
|}
|}


Line 3,468: Line 3,764:


On failure, official user-processes will retry using this command in a loop while the retval is 0x19280, with svcSleepThread(10000000) being called first.
On failure, official user-processes will retry using this command in a loop while the retval is 0x19280, with svcSleepThread(10000000) being called first.
== OpenApplicationProxy2 ==
Unofficial name.
Takes an input u32, an u64 pid_reserved, a PID, and a process copy-handle (cur-proc handle alias). Returns an [[#IApplicationProxy]].


= idle:sys =
= idle:sys =
Line 3,696: Line 3,997:


This was added with [8.0.0+].
This was added with [8.0.0+].
[S2] Official sw no longer uses this (stubbed out).


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 3,940: Line 4,243:
Unofficial name.
Unofficial name.


No input. Returns an output TIPC handle to [[Switch_2:_GSV_services|GraphicsSupervisor]]..
No input. Returns an output TIPC handle to [[Switch_2:_GSV_services|GraphicsSupervisor]].


Same as [[#GetGraphicsSupervisor]] but for compat mode.
Same as [[#GetGraphicsSupervisor]] but for compat mode.
Line 4,068: Line 4,371:
|-
|-
| 0x00000013
| 0x00000013
| 0x010000000000100A
| [22.0.0+] 0x0100000000001043 ([1.0.0-21.2.0] 0x010000000000100A)
| [[Internet_Browser#010000000000100A|LibraryAppletWeb (web)]]
| [[Internet_Browser#010000000000100A|LibraryAppletWeb (web)]]
|-
|-
Line 4,088: Line 4,391:
|-
|-
| 0x00000018
| 0x00000018
| 0x0100000000001010
| [22.0.0+] 0x0100000000001042 ([1.0.0-21.2.0] 0x0100000000001010)
| [[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]]
| [[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]]
|-
|-
| 0x00000019
| 0x00000019
| 0x0100000000001011
| [22.0.0+] 0x0100000000001043 ([1.0.0-21.2.0] 0x0100000000001011)
| [[Internet_Browser#WifiWebAuthApplet|LibraryAppletWifiWebAuth (wifiWebAuth)]]
| [[Internet_Browser#WifiWebAuthApplet|LibraryAppletWifiWebAuth (wifiWebAuth)]]
|-
|-
Line 4,140: Line 4,443:
|-
|-
| 0x00000035
| 0x00000035
| [17.0.0+] 0x0100000000001010 ([16.0.0-16.1.0] 0x0100000000001042)
| [22.0.0+] 0x0100000000001042 ([17.0.0-21.2.0] 0x0100000000001010, [16.0.0-16.1.0] 0x0100000000001042)
| [17.0.0+] LibraryAppletLhub ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
| [17.0.0+] LibraryAppletLhub ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
|-
|-
| 0x00000036
| 0x00000036
| [17.0.0+] 0x0100000000001010 ([16.0.0-16.1.0] 0x0100000000001042)
| [22.0.0+] 0x0100000000001042 ([17.0.0-21.2.0] 0x0100000000001010, [16.0.0-16.1.0] 0x0100000000001042)
| [17.0.0+] LibraryAppletLogin ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
| [17.0.0+] LibraryAppletLogin ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
|-
|-
| 0x00000037
| 0x00000037
| [17.0.0+] 0x0100000000001010 ([16.0.0-16.1.0] 0x0100000000001042)
| [22.0.0+] 0x0100000000001042 ([17.0.0-21.2.0] 0x0100000000001010, [16.0.0-16.1.0] 0x0100000000001042)
| [17.0.0+] LibraryAppletShare ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
| [17.0.0+] LibraryAppletShare ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
|-
|-
Line 4,162: Line 4,465:
| 0x0100000000001007
| 0x0100000000001007
| [18.0.0+]
| [18.0.0+]
|-
| 0x00000052
| 0x0100000000001001
| [22.0.0+]
|-
|-
| 0x00000064
| 0x00000064
| 0x0100000000001048
| 0x0100000000001048
| [20.0.0+] [[Splay_Applet|splay]]
| [20.0.0+] [[Splay_Applet|splay]]
|-
| 0x00000066
| 0x0100000000001054
| [21.0.0+]
|-
|-
| 0x000003E8
| 0x000003E8
Line 4,226: Line 4,537:
| 0x010000000000D60E
| 0x010000000000D60E
| [10.0.0-16.1.0] AppletILA2
| [10.0.0-16.1.0] AppletILA2
|-
| 0x0100000A
|
| [[Auth_Applet|LibraryAppletAuth]]
|-
| 0x0100000B
|
| [[Cabinet_Applet|LibraryAppletCabinet]]
|-
| 0x0100000C
|
| [[Controller_Applet|LibraryAppletController]]
|-
| 0x0100000D
|
| [S2]
|-
|-
| 0x0100000E
| 0x0100000E
Line 4,243: Line 4,570:
| [S2] Swkbd
| [S2] Swkbd
|-
|-
| 0x01000013
| 0x01010012
|  
|
| [S2] OpenWeb
| [S2] [[MiiEdit_Applet|LibraryAppletMiiEdit]] (for ShowMiiEdit)
|-
|-
| 0x01000014
| 0x01020012
|  
|
| [S2] LibraryAppletShop
| [S2] [[MiiEdit_Applet|LibraryAppletMiiEdit]] (for AppendMii)
|-
|-
| 0x01000022
| 0x01070012
|  
|
| [S2] LibraryAppletPromoteQualification
| [S2] [[MiiEdit_Applet|LibraryAppletMiiEdit]] (for CreateMii)
|-
|-
| 0x01010025
| 0x01080012
|  
|
| [S2] SaveDataBackup
| [S2] [[MiiEdit_Applet|LibraryAppletMiiEdit]] (for EditMii)
|-
|-
| 0x01020025
| 0x01000013
|  
|  
| [S2] SaveDataBackup
| [S2] OpenWeb
|-
|-
| 0x01000032
| 0x01000014
|  
|  
| [S2] LibraryAppletOfflineWebApp_3
| [S2] LibraryAppletShop
|-
|-
| 0x01000033
| 0x01000015
|
| [S2] [[Album_Applet|Album]]
|-
| 0x01000017
|
| [S2] LibraryAppletOffline (for Gen0)
|-
| 0x01000018
|
| [S2] [[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare]] (for Lobby)
|-
| 0x0100001A
|
| [S2] [[MyPage_Applet|MyPageApplet]]
|-
| 0x01000022
|  
| [S2] LibraryAppletPromoteQualification
|-
| 0x01000024
|
| [S2] SplayApplet
|-
| 0x01030024
|
| [S2] SplayApplet
|-
| 0x01010025
|  
| [S2] SaveDataBackup (System Settings menu for Save Data Cloud)
|-
| 0x01020025
|  
| [S2] SaveDataBackup (Same as above except with ApplicationId specified)
|-
| 0x01000028
|
| [S2] Eula
|-
| 0x01000032
|  
| [S2] LibraryAppletOfflineWebApp_3
|-
| 0x01000033
|
| [S2] LibraryAppletOfflineWebSystem
|-
| 0x01000035
|
| [S2] LibraryAppletLhub
|-
| 0x01000036
|
| [S2] LibraryAppletLogin
|-
| 0x01000037
|
| [S2] LibraryAppletShare
|-
| 0x01000050
|
| [S2] PlayerSelect
|-
| 0x01000051
|
| [S2] PlayerSelect
|-
| 0x01000052
|
| [S2] PlayerSelect
|-
| 0x01000065
|  
|  
| [S2] LibraryAppletOfflineWebSystem
| [S2] Chat (ForChatStart)
|-
|-
| 0x01000035
| 0x01010065
|  
|  
| [S2] LibraryAppletLhub
| [S2] Chat (ForCameraConfiguration)
|-
|-
| 0x01000036
| 0x01020065
|  
|  
| [S2] LibraryAppletLogin
| [S2] Chat (ForFullScreen)
|-
|-
| 0x01000037
| 0x01030065
|  
|  
| [S2] LibraryAppletShare
| [S2] Chat (ForCameraSharingGuide)
|-
| 0x01000050
|
| [S2] PlayerSelect
|-
| 0x01000051
|
| [S2] PlayerSelect
|-
| 0x01000052
|
| [S2] PlayerSelect
|-
|-
| 0x700000C8
| 0x700000C8