Changes

Jump to navigation Jump to search
17,745 bytes added ,  23:23, 30 July 2020
no edit summary
Line 113: Line 113:  
| 31 || [2.0.0+] [[#GetWriterLockAccessorEx]] ||  
 
| 31 || [2.0.0+] [[#GetWriterLockAccessorEx]] ||  
 
|-
 
|-
| 100 || [6.0.0+] PopRequestLaunchApplicationForDebug ||
+
| 100 || [6.0.0+] [[#PopRequestLaunchApplicationForDebug]] ||
 +
|-
 +
| 110 || [9.0.0+] [[#IsForceTerminateApplicationDisabledForDebug]] ||
 
|-
 
|-
 
| 200 || [8.0.0+] [[#LaunchDevMenu]] ||
 
| 200 || [8.0.0+] [[#LaunchDevMenu]] ||
Line 142: Line 144:     
The input value must be 0-3. 0 = HomeButton.
 
The input value must be 0-3. 0 = HomeButton.
 +
 +
==== PopRequestLaunchApplicationForDebug ====
 +
Takes a type-0x6 output buffer containing an array of u128 userIDs, returns an output [[NCM_services#ApplicationId|ApplicationId]] and an output s32 '''total_userIDs'''.
 +
 +
The total entries in the userID buffer must be >= {total userIDs in state}.
 +
 +
==== IsForceTerminateApplicationDisabledForDebug ====
 +
No input, returns an output u8 bool.
 +
 +
When the cached value loaded from [[Settings_services#GetDebugModeFlag]] is 0 this will just set the bool to 0. Otherwise, the bool is loaded using data from [[System_Settings|system-setting]] <code>am.debug!disable_force_terminate_application</code>.
    
==== LaunchDevMenu ====
 
==== LaunchDevMenu ====
Line 150: Line 162:  
Uses [[NS_Services#IApplicationManagerInterface]] cmd99.
 
Uses [[NS_Services#IApplicationManagerInterface]] cmd99.
   −
On success, official sw will enter an infinite loop with sleep-thread value 86400000000000.
+
This is used by [[qlaunch]]. On success, official sw will enter an infinite loop with sleep-thread value 86400000000000.
    
==== ILockAccessor ====
 
==== ILockAccessor ====
Line 162: Line 174:  
|-
 
|-
 
| 3 || [[#GetEvent]]
 
| 3 || [[#GetEvent]]
 +
|-
 +
| 4 || [10.0.0+] [[#IsLocked]]
 
|}
 
|}
   Line 176: Line 190:  
===== GetEvent =====
 
===== GetEvent =====
 
No input, returns an output Event handle with autoclear=false.
 
No input, returns an output Event handle with autoclear=false.
 +
 +
==== IsLocked ====
 +
No input, returns an output u8 bool.
    
=== IGlobalStateController ===
 
=== IGlobalStateController ===
Line 274: Line 291:  
| 100 || [[#PopFloatingApplicationForDevelopment]] ||  
 
| 100 || [[#PopFloatingApplicationForDevelopment]] ||  
 
|}
 
|}
 +
 +
[[#CreateApplication]]/[[#CreateSystemApplication]] eventually call the same internal func. With [[#CreateApplication]], two ptrs passed to the internal func are NULL, while with [[#CreateSystemApplication]] these are loaded from state. The initial content of [[#ApplicationLaunchRequestInfo]] is all-zero with [[#CreateSystemApplication]], while with [[#CreateApplication]] the first two u32s are value 0x3 with the rest all-zero. The [[#AppletId]] is set to 0x01 with [[#CreateApplication]], while with [[#CreateSystemApplication]] it's 0x04.
    
==== CreateApplication ====
 
==== CreateApplication ====
Takes an input u64 titleID (<code>nn::ncm::ApplicationId</code>), returns an [[#IApplicationAccessor]].
+
Takes an input [[NCM_services#ApplicationId|ApplicationId]], returns an [[#IApplicationAccessor]].
    
==== PopLaunchRequestedApplication ====
 
==== PopLaunchRequestedApplication ====
Line 282: Line 301:     
==== CreateSystemApplication ====
 
==== CreateSystemApplication ====
Takes an input u64 titleID (<code>nn::ncm::SystemApplicationId</code>), returns an [[#IApplicationAccessor]].
+
Takes an input [[NCM_services#ApplicationId|SystemApplicationId]], returns an [[#IApplicationAccessor]].
   −
[[qlaunch]] only uses this with a hard-coded titleID for the "starter" title.
+
[[qlaunch]] only uses this with a hard-coded id for the "starter" title.
    
==== PopFloatingApplicationForDevelopment ====
 
==== PopFloatingApplicationForDevelopment ====
Line 339: Line 358:  
|-
 
|-
 
| 170 || [8.0.0+] [[#HasSaveDataAccessPermission]] ||
 
| 170 || [8.0.0+] [[#HasSaveDataAccessPermission]] ||
 +
|-
 +
| 180 || [9.0.0+] [[#PushToFriendInvitationStorageChannel]] ||
 +
|-
 +
| 190 || [9.0.0+] [[#PushToNotificationStorageChannel]] ||
 +
|-
 +
| 200 || [10.0.0+] [[#RequestApplicationSoftReset]] ||
 +
|-
 +
| 201 || [10.0.0+] [[#RestartApplicationTimer]] ||
 
|}
 
|}
   Line 350: Line 377:     
===== GetApplicationId =====
 
===== GetApplicationId =====
No input, returns an output u64 titleID.
+
No input, returns an output [[NCM_services#ApplicationId|ApplicationId]].
 
  −
Gets the Application titleID.
      
===== PushLaunchParameter =====
 
===== PushLaunchParameter =====
Line 359: Line 384:  
===== GetApplicationControlProperty =====
 
===== GetApplicationControlProperty =====
 
No input, takes a type-0x6 output buffer.
 
No input, takes a type-0x6 output buffer.
 +
 +
The output buffer must be at least 0x4000-bytes. Returns an error when the [[#AppletId]] is 0x04, aka when the IApplicationAccessor is for a SystemApplication.
    
This gets the application [[NACP_Format|control.nacp]].
 
This gets the application [[NACP_Format|control.nacp]].
Line 365: Line 392:  
Takes a type-0x6 output buffer.
 
Takes a type-0x6 output buffer.
   −
The output buffer size must be at least 0x10-bytes. Returns an error when the [[#AppletId]] is 0x04 (starter).  
+
The output buffer size must be at least 0x10-bytes. Returns an error when the [[#AppletId]] is 0x04, aka when the IApplicationAccessor is for a SystemApplication.
    
This gets the [[#ApplicationLaunchProperty]].
 
This gets the [[#ApplicationLaunchProperty]].
Line 401: Line 428:     
===== HasSaveDataAccessPermission =====
 
===== HasSaveDataAccessPermission =====
Takes an input u64 titleID, returns an output u8 bool flag.
+
Takes an input [[NCM_services#ApplicationId|ApplicationId]], returns an output u8 bool flag.
   −
Gets whether the savedata specified by the input titleID is accessible. The output flag indicates whether it's accessible.
+
Gets whether the savedata specified by the input ApplicationId is accessible. The output flag indicates whether it's accessible.
   −
If the titleID matches the current application titleID, this immediately returns success with flag=1.
+
If the ApplicationId matches the current application, this immediately returns success with flag=1.
 +
 
 +
===== PushToFriendInvitationStorageChannel =====
 +
Takes an input [[#IStorage]], no output.
 +
 
 +
Clears the FriendInvitation StorageChannel, then pushes the input storage there.
 +
 
 +
===== PushToNotificationStorageChannel =====
 +
Takes an input [[#IStorage]], no output.
 +
 
 +
Clears the Notification StorageChannel, then pushes the input storage there.
 +
 
 +
[[qlaunch]] will only push data for this when launching the Application when the Alarm was triggered, where the system was previously in sleep-mode. This data is the [[Glue_services|Notification]] ApplicationParameter.
 +
 
 +
===== RequestApplicationSoftReset =====
 +
No input/output.
 +
 
 +
===== RestartApplicationTimer =====
 +
No input/output.
    
===== IAppletAccessor =====
 
===== IAppletAccessor =====
Line 449: Line 494:  
|-
 
|-
 
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 +
|-
 +
| 0 || [9.0.0+] [[#SetTerminateResult]] ||
 
|-
 
|-
 
| 10 || [[#ReadThemeStorage]] ||  
 
| 10 || [[#ReadThemeStorage]] ||  
 
|-
 
|-
 
| 11 || [[#WriteThemeStorage]] ||  
 
| 11 || [[#WriteThemeStorage]] ||  
 +
|-
 +
| 20 || [9.0.0+] [[#PushToAppletBoundChannel]] ||
 +
|-
 +
| 21 || [9.0.0+] [[#TryPopFromAppletBoundChannel]] ||
 
|-
 
|-
 
| 40 || [8.0.0+] [[#GetDisplayLogicalResolution]] ||  
 
| 40 || [8.0.0+] [[#GetDisplayLogicalResolution]] ||  
Line 461: Line 512:  
|-
 
|-
 
| 51 || [8.0.0+] [[#GetHomeButtonDoubleClickEnabled]] ||  
 
| 51 || [8.0.0+] [[#GetHomeButtonDoubleClickEnabled]] ||  
 +
|-
 +
| 52 || [10.0.0+] [[#IsHomeButtonShortPressedBlocked]] ||
 
|}
 
|}
   Line 471: Line 524:  
Takes an input u64 '''offset''' and a type-0x21 input buffer, no output.
 
Takes an input u64 '''offset''' and a type-0x21 input buffer, no output.
   −
=== GetDisplayLogicalResolution ===
+
=== PushToAppletBoundChannel ===
No input, returns an output s32 '''width''' and s32 '''height'''.
+
Takes an input [[#IStorage]], no output.
 +
 
 +
This is similar to [[#PushToAppletBoundChannelForDebug]] (no DebugMode check), except the used s32 is loaded from elsewhere and must be in the range 31-32.
 +
 
 +
=== TryPopFromAppletBoundChannel ===
 +
No input, returns an output [[#IStorage]].
 +
 
 +
This is similar to [[#TryPopFromAppletBoundChannelForDebug]] (no DebugMode check), except the used s32 is loaded from elsewhere and must be in the range 31-32.
 +
 
 +
=== GetDisplayLogicalResolution ===
 +
No input, returns an output s32 '''width''' and s32 '''height'''.
    
=== SetDisplayMagnification ===
 
=== SetDisplayMagnification ===
Line 485: Line 548:     
=== GetHomeButtonDoubleClickEnabled ===
 
=== GetHomeButtonDoubleClickEnabled ===
 +
No input, returns an output u8 bool.
 +
 +
=== IsHomeButtonShortPressedBlocked ===
 
No input, returns an output u8 bool.
 
No input, returns an output u8 bool.
   Line 579: Line 645:  
|-
 
|-
 
| 110 || [6.0.0+] [[#GetMainAppletAvailableUsers]] ||
 
| 110 || [6.0.0+] [[#GetMainAppletAvailableUsers]] ||
 +
|-
 +
| 120 || [9.0.0+] [[#GetLaunchStorageInfoForDebug]] ||
 +
|-
 +
| 130 || [9.0.0+] [[#GetGpuErrorDetectedSystemEvent]] ||
 +
|-
 +
| 140 || [10.0.0+] [[#SetApplicationMemoryReservation]] ||
 +
|-
 +
| 150 || [10.0.0+] [[#ShouldSetGpuTimeSliceManually]] ||
 
|}
 
|}
   Line 664: Line 738:     
==== GetCurrentApplicationId ====
 
==== GetCurrentApplicationId ====
No input, returns an output u64.
+
No input, returns an output [[NCM_services#ApplicationId|ApplicationId]].
   −
Gets the titleID for the currently running Application. titleID=0 when no Application is running.
+
Gets the [[NCM_services#ApplicationId|ApplicationId]] for the currently running Application. ApplicationId=0 when no Application is running.
    
==== RequestExitToSelf ====
 
==== RequestExitToSelf ====
Line 674: Line 748:     
==== CreateApplicationAndPushAndRequestToLaunch ====
 
==== CreateApplicationAndPushAndRequestToLaunch ====
Takes an input u64 titleID and an input #IStorage, no output.
+
Takes an input [[NCM_services#ApplicationId|ApplicationId]] and an input #IStorage, no output.
    
This is is similar to [[#CreateApplicationAndPushAndRequestToStart]].
 
This is is similar to [[#CreateApplicationAndPushAndRequestToStart]].
Line 703: Line 777:     
Normally the output bool is set to 0, however when no users are available it's set to 1 with '''total_entries''' = -1.
 
Normally the output bool is set to 0, however when no users are available it's set to 1 with '''total_entries''' = -1.
 +
 +
==== SetApplicationMemoryReservation ====
 +
Takes an input u64, no output.
 +
 +
An Application must be currently running. The input u64 must be 0x1000-byte aligned.
 +
 +
==== ShouldSetGpuTimeSliceManually ====
 +
No input, returns an output u8 bool.
    
== IOverlayAppletProxy ==
 
== IOverlayAppletProxy ==
Line 754: Line 836:  
|-
 
|-
 
| 20 || [8.0.0+] [[#SetHandlingHomeButtonShortPressedEnabled]]
 
| 20 || [8.0.0+] [[#SetHandlingHomeButtonShortPressedEnabled]]
 +
|-
 +
| 30 || [9.0.0+] [[#SetHealthWarningShowingState]]
 +
|-
 +
| 31 || [10.0.0+] [[#IsHealthWarningRequired]]
 
|-
 
|-
 
| 90 || [7.0.0+] [[#SetRequiresGpuResourceUse]]
 
| 90 || [7.0.0+] [[#SetRequiresGpuResourceUse]]
Line 767: Line 853:     
==== GetApplicationIdForLogo ====
 
==== GetApplicationIdForLogo ====
No input, returns an output u64 titleID.
+
No input, returns an output [[NCM_services#ApplicationId|ApplicationId]].
   −
Gets the application titleID for displaying the logo screen during application launch.
+
Gets the ApplicationId for displaying the logo screen during application launch.
   −
When no application is running, this returns success with titleID=0.
+
When no application is running, this returns success with ApplicationId=0.
    
==== SetGpuTimeSliceBoost ====
 
==== SetGpuTimeSliceBoost ====
Line 787: Line 873:  
==== StartShutdownSequenceForOverlay ====
 
==== StartShutdownSequenceForOverlay ====
 
No input/output.
 
No input/output.
 +
 +
On success, official sw will enter an infinite loop with sleep-thread value 86400000000000.
    
==== StartRebootSequenceForOverlay ====
 
==== StartRebootSequenceForOverlay ====
 
No input/output.
 
No input/output.
 +
 +
On success, official sw will enter an infinite loop with sleep-thread value 86400000000000.
    
==== SetHandlingHomeButtonShortPressedEnabled ====
 
==== SetHandlingHomeButtonShortPressedEnabled ====
 
Takes an input u8 bool, no output.
 
Takes an input u8 bool, no output.
 +
 +
==== SetHealthWarningShowingState ====
 +
Takes an input u8 bool, no output.
 +
 +
This writes the input bool into state, signals an Event, and returns 0.
 +
 +
==== IsHealthWarningRequired ====
 +
No input, returns an output u8 bool.
    
==== SetRequiresGpuResourceUse ====
 
==== SetRequiresGpuResourceUse ====
Line 801: Line 899:  
==== BeginToObserveHidInputForDevelop ====
 
==== BeginToObserveHidInputForDevelop ====
 
No input/output.
 
No input/output.
 +
 +
Sets various state fields and signals an userspace-event.
 +
 +
Enables HID input for the OverlayApplet, without disabling input for the foreground applet.
    
== IApplicationProxy ==
 
== IApplicationProxy ==
Line 845: Line 947:  
| 15 || [7.0.0+] [[#CreateApplicationWithAttributeAndRequestToStartForQuest]] ||  
 
| 15 || [7.0.0+] [[#CreateApplicationWithAttributeAndRequestToStartForQuest]] ||  
 
|-
 
|-
| 20 || EnsureSaveData ||
+
| 20 || [[#EnsureSaveData]] ||
 
|-
 
|-
 
| 21 || [[#GetDesiredLanguage]] ||
 
| 21 || [[#GetDesiredLanguage]] ||
Line 868: Line 970:  
|-
 
|-
 
| 33 || [[#EndBlockingHomeButton]] ||
 
| 33 || [[#EndBlockingHomeButton]] ||
 +
|-
 +
| 34 || [10.0.0+] [[#SelectApplicationLicense]] ||
 
|-
 
|-
 
| 40 || [[#NotifyRunning]] ||
 
| 40 || [[#NotifyRunning]] ||
Line 886: Line 990:  
|-
 
|-
 
| 71 || [3.0.0+] [[#RequestToReboot]] ||
 
| 71 || [3.0.0+] [[#RequestToReboot]] ||
 +
|-
 +
| 72 || [10.0.0+] [[#RequestToSleep]] ||
 
|-
 
|-
 
| 80 || [4.0.0+] [[#ExitAndRequestToShowThanksMessage]] ||  
 
| 80 || [4.0.0+] [[#ExitAndRequestToShowThanksMessage]] ||  
Line 913: Line 1,019:  
| 130 || [8.0.0+] [[#GetGpuErrorDetectedSystemEvent]] ||  
 
| 130 || [8.0.0+] [[#GetGpuErrorDetectedSystemEvent]] ||  
 
|-
 
|-
| 500 || [5.0.0+] StartContinuousRecordingFlushForDebug ||  
+
| 140 || [9.0.0+] [[#GetFriendInvitationStorageChannelEvent]] ||  
 
|-
 
|-
| 1000 || [5.0.0+] [[#CreateMovieMaker]] ||  
+
| 141 || [9.0.0+] [[#TryPopFromFriendInvitationStorageChannel]] ||
 +
|-
 +
| 150 || [9.0.0+] [[#GetNotificationStorageChannelEvent]] ||
 +
|-
 +
| 151 || [9.0.0+] [[#TryPopFromNotificationStorageChannel]] ||
 +
|-
 +
| 160 || [9.0.0+] [[#GetHealthWarningDisappearedSystemEvent]] ||
 +
|-
 +
| 170 || [9.0.0+] [[#SetHdcpAuthenticationActivated]] ||
 +
|-
 +
| 180 || [10.1.0+] [[#GetLaunchRequiredVersion]] ||
 +
|-
 +
| 181 || [10.1.0+] [[#UpgradeLaunchRequiredVersion]] ||
 +
|-
 +
| 500 || [5.0.0+] [[#StartContinuousRecordingFlushForDebug]] ||
 +
|-
 +
| 1000 || [5.0.0+] [[#CreateMovieMaker]] ||  
 
|-
 
|-
 
| 1001 || [5.0.0+] [[#PrepareForJit]] ||
 
| 1001 || [5.0.0+] [[#PrepareForJit]] ||
Line 933: Line 1,055:     
==== CreateApplicationAndPushAndRequestToStart ====
 
==== CreateApplicationAndPushAndRequestToStart ====
Takes an input u64 titleID and an input [[#IStorage]], no output. titleID=0 can be used to relaunch the current application.
+
Takes an input [[NCM_services#ApplicationId|ApplicationId]] and an input [[#IStorage]], no output. ApplicationId=0 can be used to relaunch the current application.
    
==== CreateApplicationAndPushAndRequestToStartForQuest ====
 
==== CreateApplicationAndPushAndRequestToStartForQuest ====
Takes 2 input u32s (loaded from struct [[#ApplicationAttributeForQuest]]), an input u64 titleID, and an input [[#IStorage]], no output.
+
Takes 2 input u32s (loaded from struct [[#ApplicationAttributeForQuest]]), an input [[NCM_services#ApplicationId|ApplicationId]], and an input [[#IStorage]], no output.
    
==== CreateApplicationAndRequestToStart ====
 
==== CreateApplicationAndRequestToStart ====
Takes an input u64 titleID, no output.
+
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.
 
Same as [[#CreateApplicationAndPushAndRequestToStart]] except without the input storage, official sw uses this when no input storage is specified.
    
==== CreateApplicationAndRequestToStartForQuest ====
 
==== CreateApplicationAndRequestToStartForQuest ====
Takes 2 input u32s (loaded from struct [[#ApplicationAttributeForQuest]]) and an input u64 titleID, no output.
+
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.
 
Same as [[#CreateApplicationAndPushAndRequestToStartForQuest]] except without the input storage, official sw uses this when no input storage is specified.
    
==== CreateApplicationWithAttributeAndPushAndRequestToStartForQuest ====
 
==== CreateApplicationWithAttributeAndPushAndRequestToStartForQuest ====
Takes an input u64 titleID, a type-0x15 input buffer containing an [[#ApplicationAttribute]], an input [[#IStorage]], no output.
+
Takes an input [[NCM_services#ApplicationId|ApplicationId]], a type-0x15 input buffer containing an [[#ApplicationAttribute]], an input [[#IStorage]], no output.
    
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]].
 
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 ====
 
==== CreateApplicationWithAttributeAndRequestToStartForQuest ====
Takes an input u64 titleID and a type-0x15 input buffer containing an [[#ApplicationAttribute]], no output.
+
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]].
 
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.
 +
 +
Official user-processes launch the dataErase LibraryApplet depending on the Result, the above output size is used with this.
    
==== GetDesiredLanguage ====
 
==== GetDesiredLanguage ====
Line 974: Line 1,105:  
No input, returns an output u8 [[Filesystem_services#StorageId|StorageId]] and u8 [[Filesystem_services#StorageId|StorageId]].
 
No input, returns an output u8 [[Filesystem_services#StorageId|StorageId]] and u8 [[Filesystem_services#StorageId|StorageId]].
   −
Just returns two u8s loaded from state.
+
This returns two u8s loaded from state, these are the same StorageIds from [[#ApplicationLaunchProperty]].
    
==== BeginBlockingHomeButtonShortAndLongPressed ====
 
==== BeginBlockingHomeButtonShortAndLongPressed ====
Line 993: Line 1,124:  
==== EndBlockingHomeButton ====
 
==== EndBlockingHomeButton ====
 
No input/output.
 
No input/output.
 +
 +
==== SelectApplicationLicense ====
 +
Takes an input array of [[#ApplicationLicenseType]], returns an output [[#ApplicationLicenseType]].
    
==== NotifyRunning ====
 
==== NotifyRunning ====
Line 1,016: Line 1,150:  
==== RequestFlushGamePlayingMovieForDebug ====
 
==== RequestFlushGamePlayingMovieForDebug ====
 
No input/output.
 
No input/output.
 +
 +
Requests to save the video recording, as if the Capture-button was held.
    
==== RequestToShutdown ====
 
==== RequestToShutdown ====
Line 1,026: Line 1,162:     
On success, official sw will enter an infinite loop with sleep-thread value 86400000000000.
 
On success, official sw will enter an infinite loop with sleep-thread value 86400000000000.
 +
 +
==== RequestToSleep ====
 +
No input/output.
    
==== ExitAndRequestToShowThanksMessage ====
 
==== ExitAndRequestToShowThanksMessage ====
Line 1,063: Line 1,202:     
==== QueryApplicationPlayStatistics ====
 
==== QueryApplicationPlayStatistics ====
Takes a type-0x6 output buffer containing an array of [[Shared_Database_services|ApplicationPlayStatistics]] and a type-0x5 input buffer containing an array of u64 titleIDs. Returns an output s32 for actual total output entries.
+
Takes a type-0x6 output buffer containing an array of [[Shared_Database_services|ApplicationPlayStatistics]] and a type-0x5 input buffer containing an array of [[NCM_services#ApplicationId|ApplicationId]]. Returns an output s32 for actual total output entries.
    
The number of entries in each array is the same.
 
The number of entries in each array is the same.
Line 1,072: Line 1,211:     
==== QueryApplicationPlayStatisticsByUid ====
 
==== QueryApplicationPlayStatisticsByUid ====
Takes a u128 userID, a type-0x6 output buffer containing an array of [[Shared_Database_services|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 [[Shared_Database_services|ApplicationPlayStatistics]] and a type-0x5 input buffer containing an array of [[NCM_services#ApplicationId|ApplicationId]]. Returns an output s32 for actual total output entries.
    
Same as [[#QueryApplicationPlayStatistics]] except this uses [[Shared_Database_services|pdm:qry]] cmd16, to get playstats specific to userIDs.  
 
Same as [[#QueryApplicationPlayStatistics]] except this uses [[Shared_Database_services|pdm:qry]] cmd16, to get playstats specific to userIDs.  
Line 1,093: Line 1,232:  
==== GetPreviousProgramIndex ====
 
==== GetPreviousProgramIndex ====
 
No input, returns an output s32.
 
No input, returns an output s32.
 +
 +
Gets the ProgramIndex of the Application which launched this title. The output ProgramIndex is -1 when there was no previous title.
    
==== EnableApplicationAllThreadDumpOnCrash ====
 
==== EnableApplicationAllThreadDumpOnCrash ====
Line 1,100: Line 1,241:  
No input, returns an output Event handle with autoclear=false.
 
No input, returns an output Event handle with autoclear=false.
   −
This is used by sdknso during applet-application initialization. A seperate thread is setup where event-waiting is handled. When the Event is signaled, official sw will assert.
+
This is used by sdknso during applet-application initialization. A separate thread is setup where event-waiting is handled. When the Event is signaled, official sw will assert.
   −
==== CreateMovieMaker ====
+
==== GetFriendInvitationStorageChannelEvent ====
Takes an input u64 and handle, returns an [[#IMovieMaker]].
+
No input, returns an output Event handle with EventClearMode=0.
 +
 
 +
This is exposed by sdknso under <code>nn::friends::</code>. This returns a ptr to the cached Event in global state, with the Event being loaded if not previously initialized.
   −
==== PrepareForJit ====
+
==== TryPopFromFriendInvitationStorageChannel ====
Takes no input. Launches title 010000000000003B (currently not present on retail systems) if some context variable is not set, with that context variable being initialized afterwards.
+
No input, returns an output [[#IStorage]].
   −
=== IMovieMaker ===
+
This uses the same StorageChannel as [[#PushToFriendInvitationStorageChannel]].
{| class="wikitable" border="1"
  −
|-
  −
! Cmd || Name
  −
|-
  −
| 0 || [[#GetGrcMovieMaker]]
  −
|-
  −
| 1 || [[#GetLayerHandle]]
  −
|}
     −
==== GetGrcMovieMaker ====
+
This is exposed by sdknso under <code>nn::friends::</code>. When the storage_size is <0x10, this returns false. <code>data_size = storage_size-0x10;</code> Then the first 0x10-bytes from storage are read to stack, which is later copied to the output Uid on success prior to returning. Then the storage is read into the specified output buffer with storage-offset 0x10, where the size is <code>size = data_size > buf_size ? buf_size : data_size</code>. Reading is skipped if size is zero. Afterwards the used size is written to an output param. On success, true is returned.
No input, returns a GRC [[GRC_services|IMovieMaker]].
     −
==== GetLayerHandle ====
+
==== GetNotificationStorageChannelEvent ====
No input, returns an output u64.
+
No input, returns an output Event handle with EventClearMode=0.
   −
== ILibraryAppletCreator ==
+
This is exposed by sdknso under <code>nn::notification::</code>. This returns a ptr to the cached Event in global state, with the Event being loaded if not previously initialized.
{| class="wikitable" border="1"
  −
|-
  −
! Cmd || Name || Notes
  −
|-
  −
| 0 || [[#CreateLibraryApplet]] ||
  −
|-
  −
| 1 || [[#TerminateAllLibraryApplets]] ||
  −
|-
  −
| 2 || [[#AreAnyLibraryAppletsLeft]] ||
  −
|-
  −
| 10 || [[#CreateStorage]] ||
  −
|-
  −
| 11 || [[#CreateTransferMemoryStorage]] ||
  −
|-
  −
| 12 || [2.0.0+] [[#CreateHandleStorage]] ||
  −
|}
     −
=== CreateLibraryApplet ===
+
==== TryPopFromNotificationStorageChannel ====
Takes 2 input u32s [[#AppletId]] and [[#LibraryAppletMode]], returns an [[#ILibraryAppletAccessor]].
+
No input, returns an output [[#IStorage]].
   −
=== TerminateAllLibraryApplets ===
+
This uses the same StorageChannel as [[#PushToNotificationStorageChannel]].
No input/output.
     −
Stubbed with an ILibraryAppletCreator from [[#CreateSelfLibraryAppletCreatorForDevelop]], just returns an error.
+
This is exposed by sdknso under <code>nn::notification::</code>. The storage is read into the specified output buffer, where the size is <code>size = storage_size > buf_size ? buf_size : storage_size</code>. Reading is skipped if size is zero. Afterwards the used size is written to an output param.
   −
=== AreAnyLibraryAppletsLeft ===
+
==== GetHealthWarningDisappearedSystemEvent ====
No input, returns an output u8 bool.
+
No input, returns an output Event with EventClearMode=0.
   −
Stubbed with an ILibraryAppletCreator from [[#CreateSelfLibraryAppletCreatorForDevelop]], just returns an error.
+
==== SetHdcpAuthenticationActivated ====
 +
Takes an input u8 bool, no output.
   −
=== CreateStorage ===
+
==== GetLaunchRequiredVersion ====
Takes an input s64 for the storage size, returns an [[#IStorage]].
+
Takes an input [[NCM_services#ApplicationId|ApplicationId]], an u64, returns an output [[#LaunchRequiredVersion]].
   −
This allocates a buffer with the specified size which can then be accessed via [[#IStorageAccessor]].
+
sdknso passes hard-coded value 0 for the u64.
   −
=== CreateTransferMemoryStorage ===
+
==== UpgradeLaunchRequiredVersion ====
Takes an input TransferMemory copy-handle, an input u8 bool, and an s64 size, returns an [[#IStorage]].
+
Takes an input [[#LaunchRequiredVersion]], an [[NCM_services#ApplicationId|ApplicationId]], an u64, no output.
   −
The user-process creates the TransferMemory with permissions=0.
+
sdknso passes hard-coded value 0 for the u64.
   −
The TransferMemory is mapped, which can then be accessed via [[#IStorageAccessor]]. The input bool controls whether writing to the storage is allowed: [[#Write]] will throw an error if this flag is not set.
+
==== StartContinuousRecordingFlushForDebug ====
 +
Takes an input s64 nanoseconds-value, returns an output Event handle with autoclear=false.
   −
=== CreateHandleStorage ===
+
The cached value loaded from [[System_Settings|system-setting]] <code>am.debug!dev_function</code> must be set to 0x1 with size 0x1, otherwise an error is returned.
Takes an input copy-handle and an input s64, returns an [[#IStorage]]. In some cases the s64 must not have the negative bit set.
+
 
 +
==== CreateMovieMaker ====
 +
Takes an input u64 size and a TransferMemory handle, returns an [[#IMovieMaker]].
 +
 
 +
Official sw retries using the cmd in a loop on error 0x8D4 with svcSleepThread(100000000) being used first.
 +
 
 +
Official sw uses permissions=None for the TransferMemory, with an user-specified buffer. The size of the buffer used by official sw is 0x6000000.
   −
The input can be arbitrary, however official sw is only (?) known to use this for TransferMemory (with s64=size).
+
==== PrepareForJit ====
 +
Takes no input. Launches the [[JIT_services|jit-sysmodule]] if some context variable is not set, with that context variable being initialized afterwards.
   −
=== ILibraryAppletAccessor ===
+
=== IMovieMaker ===
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Cmd || Name
 
|-
 
|-
| 0 || [[#GetAppletStateChangedEvent]] ||
+
| 0 || [[#GetGrcMovieMaker]]
 
|-
 
|-
| 1 || [[#IsCompleted]] ||
+
| 1 || [[#GetLayerHandle]]
 +
|}
 +
 
 +
==== GetGrcMovieMaker ====
 +
No input, returns a GRC [[GRC_services|IMovieMaker]].
 +
 
 +
==== GetLayerHandle ====
 +
No input, returns an output u64.
 +
 
 +
== ILibraryAppletCreator ==
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 10 || [[#Start]] ||
+
! Cmd || Name || Notes
 
|-
 
|-
| 20 || [[#RequestExit]] ||
+
| 0 || [[#CreateLibraryApplet]] ||  
 
|-
 
|-
| 25 || [[#Terminate]] ||
+
| 1 || [[#TerminateAllLibraryApplets]] ||
 
|-
 
|-
| 30 || [[#GetResult]] ||
+
| 2 || [[#AreAnyLibraryAppletsLeft]] ||
 
|-
 
|-
| 50 || [[#SetOutOfFocusApplicationSuspendingEnabled]] ||
+
| 10 || [[#CreateStorage]] ||  
 
|-
 
|-
| 100 || [[#PushInData]] ||  
+
| 11 || [[#CreateTransferMemoryStorage]] ||  
 
|-
 
|-
| 101 || [[#PopOutData]] ||
+
| 12 || [2.0.0+] [[#CreateHandleStorage]] ||  
|-
  −
| 102 || [[#PushExtraStorage]] ||
  −
|-
  −
| 103 || [[#PushInteractiveInData]] ||
  −
|-
  −
| 104 || [[#PopInteractiveOutData]] ||
  −
|-
  −
| 105 || [[#GetPopOutDataEvent]] ||
  −
|-
  −
| 106 || [[#GetPopInteractiveOutDataEvent]] ||
  −
|-
  −
| 110 || [[#NeedsToExitProcess]] ||
  −
|-
  −
| 120 || [[#GetLibraryAppletInfo]] ||
  −
|-
  −
| 150 || [[#RequestForAppletToGetForeground]] ||
  −
|-
  −
| 160 || [2.0.0+] [[#GetIndirectLayerConsumerHandle]] ||
   
|}
 
|}
   −
Commands <=30 are inherited from [[#IAppletAccessor]]. GetLibraryAppletInfo is identical to the [[#ILibraryAppletSelfAccessor]] cmd.
+
=== CreateLibraryApplet ===
 +
Takes 2 input u32s [[#AppletId]] and [[#LibraryAppletMode]], returns an [[#ILibraryAppletAccessor]].
   −
==== SetOutOfFocusApplicationSuspendingEnabled ====
+
=== TerminateAllLibraryApplets ===
Takes an input u8 bool, no output.
+
No input/output.
   −
Official sw will assert prior to using this if applet-service was not initialized as *Application.
+
Stubbed with an ILibraryAppletCreator from [[#CreateSelfLibraryAppletCreatorForDevelop]], just returns an error.
   −
==== PushInData ====
+
Terminates all LibraryApplets which were created by the current applet (or by the Application when used from the [[#IApplicationAccessor]] cmd).
Takes an input [[#IStorage]], no output.
     −
==== PopOutData ====
+
=== AreAnyLibraryAppletsLeft ===
No input, returns an output [[#IStorage]].
+
No input, returns an output u8 bool.
   −
==== PushExtraStorage ====
+
Stubbed with an ILibraryAppletCreator from [[#CreateSelfLibraryAppletCreatorForDevelop]], just returns an error.
Takes an input [[#IStorage]], no output.
     −
==== PushInteractiveInData ====
+
Gets whether any LibraryApplets ([[#ILibraryAppletAccessor]]) which were created by the current applet are still open (or by the Application when used from the [[#IApplicationAccessor]] cmd).
Takes an input [[#IStorage]], no output.
     −
==== PopInteractiveOutData ====
+
=== CreateStorage ===
No input, returns an output [[#IStorage]].
+
Takes an input s64 for the storage size, returns an [[#IStorage]].
   −
==== GetPopOutDataEvent ====
+
This allocates a buffer with the specified size which can then be accessed via [[#IStorageAccessor]].
No input, returns an output handle with autoclear=false.
     −
==== GetPopInteractiveOutDataEvent ====
+
=== CreateTransferMemoryStorage ===
No input, returns an output event handle with autoclear=false.
+
Takes an input TransferMemory copy-handle, an input u8 bool, and an s64 size, returns an [[#IStorage]].
   −
==== NeedsToExitProcess ====
+
The user-process creates the TransferMemory with permissions=0.
No input, returns an output u8 bool.
     −
Stubbed, just returns an error.
+
The TransferMemory is mapped, which can then be accessed via [[#IStorageAccessor]]. The input bool controls whether writing to the storage is allowed: [[#Write]] will throw an error if this flag is not set.
   −
==== RequestForAppletToGetForeground ====
+
=== CreateHandleStorage ===
No input/output.
+
Takes an input copy-handle and an input s64, returns an [[#IStorage]]. In some cases the s64 must not have the negative bit set.
   −
Stubbed, just returns an error.
+
The input can be arbitrary, however official sw is only (?) known to use this for TransferMemory (with s64=size).
   −
==== GetIndirectLayerConsumerHandle ====
+
=== ILibraryAppletAccessor ===
Takes an input PID and an input u64 AppletResourceUserId, returns an output u64 IndirectLayerConsumerHandle.
+
{| class="wikitable" border="1"
 
+
|-
Official sw uses this during LibraryApplet creation when [[#LibraryAppletMode]] is 0x3.
  −
 
  −
== ICommonStateGetter ==
  −
{| class="wikitable" border="1"
  −
|-
   
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 
|-
 
|-
| 0 || [[#GetEventHandle]] ||
+
| 0 || [[#GetAppletStateChangedEvent]] ||
 
|-
 
|-
| 1 || [[#ReceiveMessage]] ||
+
| 1 || [[#IsCompleted]] ||
 
|-
 
|-
| 2 || [[#GetThisAppletKind]] ||
+
| 10 || [[#Start]] ||
 
|-
 
|-
| 3 || [[#AllowToEnterSleep]] ||
+
| 20 || [[#RequestExit]] ||
 
|-
 
|-
| 4 || [[#DisallowToEnterSleep]] ||
+
| 25 || [[#Terminate]] ||
 
|-
 
|-
| 5 || [[#GetOperationMode]] ||
+
| 30 || [[#GetResult]] ||
 
|-
 
|-
| 6 || [[#GetPerformanceMode]] ||
+
| 50 || [[#SetOutOfFocusApplicationSuspendingEnabled]] ||
 
|-
 
|-
| 7 || [[#GetCradleStatus]] ||
+
| 60 || [10.0.0+] [[#PresetLibraryAppletGpuTimeSliceZero]] ||
 
|-
 
|-
| 8 || [[#GetBootMode]] ||
+
| 100 || [[#PushInData]] ||  
 
|-
 
|-
| 9 || [[#GetCurrentFocusState]] ||
+
| 101 || [[#PopOutData]] ||  
 
|-
 
|-
| 10 || [[#RequestToAcquireSleepLock]] ||
+
| 102 || [[#PushExtraStorage]] ||  
 
|-
 
|-
| 11 || [[#ReleaseSleepLock]] ||
+
| 103 || [[#PushInteractiveInData]] ||  
 
|-
 
|-
| 12 || [[#ReleaseSleepLockTransiently]] ||
+
| 104 || [[#PopInteractiveOutData]] ||  
 
|-
 
|-
| 13 || [[#GetAcquiredSleepLockEvent]] ||
+
| 105 || [[#GetPopOutDataEvent]] ||
 
|-
 
|-
| 20 || [[#PushToGeneralChannel]] ||  
+
| 106 || [[#GetPopInteractiveOutDataEvent]] ||
 
|-
 
|-
| 30 || [[#GetHomeButtonReaderLockAccessor]] ||  
+
| 110 || [[#NeedsToExitProcess]] ||
 
|-
 
|-
| 31 || [2.0.0+] [[#GetReaderLockAccessorEx]] ||  
+
| 120 || [[#GetLibraryAppletInfo]] ||  
 
|-
 
|-
| 32 || [7.0.0+] [[#GetWriterLockAccessorEx]] ||
+
| 150 || [[#RequestForAppletToGetForeground]] ||
 
|-
 
|-
| 40 || [2.0.0+] [[#GetCradleFwVersion]] ||
+
| 160 || [2.0.0+] [[#GetIndirectLayerConsumerHandle]] ||
|-
+
|}
| 50 || [3.0.0+] [[#IsVrModeEnabled]] ||
+
 
|-
+
Commands <=30 are inherited from [[#IAppletAccessor]]. GetLibraryAppletInfo is identical to the [[#ILibraryAppletSelfAccessor]] cmd.
| 51 || [3.0.0+] [[#SetVrModeEnabled]] ||
+
 
|-
+
==== SetOutOfFocusApplicationSuspendingEnabled ====
| 52 || [4.0.0+] [[#SetLcdBacklighOffEnabled]] ||
+
Takes an input u8 bool, no output.
|-
+
 
| 53 || [7.0.0+] [[#BeginVrModeEx]] ||
+
Official sw will assert prior to using this if applet-service was not initialized as *Application.
|-
+
 
| 54 || [7.0.0+] [[#EndVrModeEx]] ||
+
==== PresetLibraryAppletGpuTimeSliceZero ====
|-
+
No input/output.
| 55 || [3.0.0+] [[#IsInControllerFirmwareUpdateSection]] ||
+
 
|-
+
sdknso only uses with with [[Software_Keyboard|swkbd-inline]], immediately after creating the LibraryApplet.
| 60 || [3.0.0+] [[#GetDefaultDisplayResolution]] ||
+
 
|-
+
==== PushInData ====
| 61 || [3.0.0+] [[#GetDefaultDisplayResolutionChangeEvent]] ||
+
Takes an input [[#IStorage]], no output.
|-
  −
| 62 || [4.0.0+] [[#GetHdcpAuthenticationState]] ||
  −
|-
  −
| 63 || [4.0.0+] [[#GetHdcpAuthenticationStateChangeEvent]] ||
  −
|-
  −
| 64 || [5.0.0+] [[#SetTvPowerStateMatchingMode]] ||
  −
|-
  −
| 65 || [5.1.0+] [[#GetApplicationIdByContentActionName]] ||
  −
|-
  −
| 66 || [6.0.0+] [[#SetCpuBoostMode]] ||
  −
|-
  −
| 80 || [6.0.0+] [[#PerformSystemButtonPressingIfInFocus]] ||
  −
|-
  −
| 90 || [7.0.0+] [[#SetPerformanceConfigurationChangedNotification]] ||
  −
|-
  −
| 91 || [7.0.0+] [[#GetCurrentPerformanceConfiguration]] ||
  −
|-
  −
| 200 || [7.0.0+] [[#GetOperationModeSystemInfo]] ||
  −
|}
     −
Officially notification messages are handled by the application itself, not sdk-nso in ExeFS. Official apps call code in sdk-nso which basically uses svcWaitSynchronization with the event from [[#GetEventHandle]] to check whether a message is available, then if so it uses [[#ReceiveMessage]]. The actual handling for message IDs is done in the app itself(see [[#AppletMessage]]).
+
==== PopOutData ====
 +
No input, returns an output [[#IStorage]].
   −
[7.0.0+] User-processes now use BeginVrModeEx/EndVrModeEx instead of [[#SetVrModeEnabled]]. Prior to using using BeginVrModeEx, [[Parental_Control_services|pctl]] IsStereoVisionPermitted is used and error 0xD08E is thrown if not allowed by pctl.
+
==== PushExtraStorage ====
 +
Takes an input [[#IStorage]], no output.
   −
=== GetEventHandle ===
+
==== PushInteractiveInData ====
No input. Returns an output event handle. This is signalled when a message is available with [[#ReceiveMessage]].
+
Takes an input [[#IStorage]], no output.
   −
=== ReceiveMessage ===
+
==== PopInteractiveOutData ====
No input. Returns an output [[#AppletMessage]]. Error 0x680 indicates no message is available.
+
No input, returns an output [[#IStorage]].
   −
=== GetThisAppletKind ===
+
==== GetPopOutDataEvent ====
No input, returns an output [[#AppletKind]].
+
No input, returns an output handle with autoclear=false.
   −
Stubbed, just returns an error.
+
==== GetPopInteractiveOutDataEvent ====
 +
No input, returns an output event handle with autoclear=false.
   −
=== AllowToEnterSleep ===
+
==== NeedsToExitProcess ====
No input/output.
+
No input, returns an output u8 bool.
    
Stubbed, just returns an error.
 
Stubbed, just returns an error.
   −
=== DisallowToEnterSleep ===
+
==== RequestForAppletToGetForeground ====
 
No input/output.
 
No input/output.
    
Stubbed, just returns an error.
 
Stubbed, just returns an error.
   −
=== GetOperationMode ===
+
==== GetIndirectLayerConsumerHandle ====
No input. Returns an output u8 for the current [[#OperationMode]].
+
Takes an input PID and an input u64 AppletResourceUserId, returns an output u64 IndirectLayerConsumerHandle.
   −
=== GetPerformanceMode ===
+
Official sw uses this during LibraryApplet creation when [[#LibraryAppletMode]] is 0x3.
No input. Returns an output u32 for the current PerformanceMode.
     −
=== GetCradleStatus ===
+
== ICommonStateGetter ==
No input, returns an output u8.
+
{| class="wikitable" border="1"
 
+
|-
This uses [[#omm]] GetCradleStatus.
+
! Cmd || Name || Notes
 
+
|-
=== GetBootMode ===
+
| 0 || [[#GetEventHandle]] ||
No input, returns an output u8.
+
|-
 
+
| 1 || [[#ReceiveMessage]] ||
Returns the value from [[Process_Manager_services|pm:bm]] GetBootMode.
+
|-
 
+
| 2 || [[#GetThisAppletKind]] ||
=== GetCurrentFocusState ===
+
|-
No input. Returns an output u8:
+
| 3 || [[#AllowToEnterSleep]] ||
 
+
|-
* 1: In focus.
+
| 4 || [[#DisallowToEnterSleep]] ||
* 2/3: Out of focus(running in "background").
+
|-
 
+
| 5 || [[#GetOperationMode]] ||
=== RequestToAcquireSleepLock ===
+
|-
No input/output.
+
| 6 || [[#GetPerformanceMode]] ||
 
+
|-
=== ReleaseSleepLock ===
+
| 7 || [[#GetCradleStatus]] ||
No input/output.
+
|-
 
+
| 8 || [[#GetBootMode]] ||
=== ReleaseSleepLockTransiently ===
+
|-
No input/output.
+
| 9 || [[#GetCurrentFocusState]] ||
 
+
|-
=== GetAcquiredSleepLockEvent ===
+
| 10 || [[#RequestToAcquireSleepLock]] ||
No input, returns an output Event handle with autoclear=false.
+
|-
 
+
| 11 || [[#ReleaseSleepLock]] ||
=== PushToGeneralChannel ===
+
|-
Takes an input [[#IStorage]], no output.
+
| 12 || [[#ReleaseSleepLockTransiently]] ||
 
+
|-
This is not usable under an Application, however it is usable under a LibraryApplet.
+
| 13 || [[#GetAcquiredSleepLockEvent]] ||
 
+
|-
Used for sending requests to [[qlaunch]]. sdk-nso creates a 0x10-byte storage which is sent to this. The following are the functions which use this, with the data written to the storage:
+
| 20 || [[#PushToGeneralChannel]] ||
* <code>RequestHomeMenu</code> <code>5341 4d53 0100 0000 0200 0000 0100 0000</code> Returns to the main Home Menu, equivalent to pressing the HOME button.
+
|-
* <code>RequestJumpToSystemUpdate</code> <code>5341 4d53 0100 0000 0b00 0000 0100 0000</code> Equivalent to entering "System Update" under System Settings. When leaving this, it returns to the main Home Menu.
+
| 30 || [[#GetHomeButtonReaderLockAccessor]] ||
 
+
|-
=== GetHomeButtonReaderLockAccessor ===
+
| 31 || [2.0.0+] [[#GetReaderLockAccessorEx]] ||
No input, returns an output [[#ILockAccessor]].
+
|-
 
+
| 32 || [7.0.0+] [[#GetWriterLockAccessorEx]] ||
Similar to using [[#GetReaderLockAccessorEx]] with inval=0.
+
|-
 
+
| 40 || [2.0.0+] [[#GetCradleFwVersion]] ||
=== GetReaderLockAccessorEx ===
+
|-
Takes an input u32, returns an output [[#ILockAccessor]].
+
| 50 || [3.0.0+] [[#IsVrModeEnabled]] ||
 
+
|-
The input value must be 0-3. 0 = HomeButton.
+
| 51 || [3.0.0+] [[#SetVrModeEnabled]] ||
 
+
|-
=== GetWriterLockAccessorEx ===
+
| 52 || [4.0.0+] [[#SetLcdBacklighOffEnabled]] ||
Takes an input u32, returns an output [[#ILockAccessor]].
+
|-
 
+
| 53 || [7.0.0+] [[#BeginVrModeEx]] ||
The input value must be 0-3. 0 = HomeButton.
+
|-
 
+
| 54 || [7.0.0+] [[#EndVrModeEx]] ||
=== GetCradleFwVersion ===
+
|-
No input, returns 4 output u32s.
+
| 55 || [3.0.0+] [[#IsInControllerFirmwareUpdateSection]] ||
 
+
|-
This uses [[#omm]] GetCradleFwVersion.
+
| 60 || [3.0.0+] [[#GetDefaultDisplayResolution]] ||
 
+
|-
=== IsVrModeEnabled ===
+
| 61 || [3.0.0+] [[#GetDefaultDisplayResolutionChangeEvent]] ||
No input, returns an output u8 bool.
+
|-
 +
| 62 || [4.0.0+] [[#GetHdcpAuthenticationState]] ||
 +
|-
 +
| 63 || [4.0.0+] [[#GetHdcpAuthenticationStateChangeEvent]] ||
 +
|-
 +
| 64 || [5.0.0+] [[#SetTvPowerStateMatchingMode]] ||
 +
|-
 +
| 65 || [5.1.0+] [[#GetApplicationIdByContentActionName]] ||
 +
|-
 +
| 66 || [6.0.0+] [[#SetCpuBoostMode]] ||
 +
|-
 +
| 67 || [10.0.0+] [[#CancelCpuBoostMode]] ||
 +
|-
 +
| 80 || [6.0.0+] [[#PerformSystemButtonPressingIfInFocus]] ||
 +
|-
 +
| 90 || [7.0.0+] [[#SetPerformanceConfigurationChangedNotification]] ||
 +
|-
 +
| 91 || [7.0.0+] [[#GetCurrentPerformanceConfiguration]] ||
 +
|-
 +
| 100 || [9.1.0+] [[#SetHandlingHomeButtonShortPressedEnabled]] ||
 +
|-
 +
| 200 || [7.0.0+] [[#GetOperationModeSystemInfo]] ||
 +
|-
 +
| 300 || [9.0.0+] [[#GetSettingsPlatformRegion]] ||
 +
|-
 +
| 400 || [10.0.0+] [[#ActivateMigrationService]] ||
 +
|-
 +
| 401 || [10.0.0+] [[#DeactivateMigrationService]] ||
 +
|}
   −
=== SetVrModeEnabled ===
+
Officially notification messages are handled by the application itself, not sdk-nso in ExeFS. Official apps call code in sdk-nso which basically uses svcWaitSynchronization with the event from [[#GetEventHandle]] to check whether a message is available, then if so it uses [[#ReceiveMessage]]. The actual handling for message IDs is done in the app itself(see [[#AppletMessage]]).
Takes an input u8 bool flag. No output.
     −
Updates internal AM state fields. If the new state doesn't match the previous state, this uses the [[Backlight_services]] {Disable/Enable}VrMode command depending on whether flag={disable/enable}.
+
[7.0.0+] User-processes now use BeginVrModeEx/EndVrModeEx instead of [[#SetVrModeEnabled]]. Prior to using using BeginVrModeEx, [[Parental_Control_services|pctl]] IsStereoVisionPermitted is used and error 0xD08E is thrown if not allowed by pctl.
   −
When the VrMode is set to true, the console shows a screen rendered like vr asking the user to move his face away and hit the 'close' button. When this button is pressed, the console resets the vrMode to false.
+
=== GetEventHandle ===
 +
No input. Returns an output event handle. This is signalled when a message is available with [[#ReceiveMessage]].
   −
=== SetLcdBacklighOffEnabled ===
+
=== ReceiveMessage ===
Takes an input u8 bool, no output.
+
No input. Returns an output [[#AppletMessage]]. Error 0x680 indicates no message is available.
   −
Sets whether the LCD screen blacklight is turned off.
+
=== GetThisAppletKind ===
 +
No input, returns an output [[#AppletKind]].
 +
 
 +
Stubbed, just returns an error.
   −
=== BeginVrModeEx ===
+
=== AllowToEnterSleep ===
 
No input/output.
 
No input/output.
   −
Identical to [[#SetVrModeEnabled]] except with hard-coded flag=1.
+
Stubbed, just returns an error.
   −
=== EndVrModeEx ===
+
=== DisallowToEnterSleep ===
 
No input/output.
 
No input/output.
   −
Identical to [[#SetVrModeEnabled]] except with hard-coded flag=0.
+
Stubbed, just returns an error.
   −
=== IsInControllerFirmwareUpdateSection ===
+
=== GetOperationMode ===
No input, returns an output u8 bool.
+
No input. Returns an output u8 for the current [[#OperationMode]].
   −
=== GetDefaultDisplayResolution ===
+
=== GetPerformanceMode ===
No input, returns two output s32s '''width''' and '''height'''.
+
No input. Returns an output u32 for the current PerformanceMode.
   −
=== GetDefaultDisplayResolutionChangeEvent ===
+
=== GetCradleStatus ===
No input, returns an output Event handle with autoclear=true.
+
No input, returns an output u8.
   −
=== GetHdcpAuthenticationState ===
+
This uses [[#omm]] GetCradleStatus.
No input, returns an output s32.
     −
=== GetHdcpAuthenticationStateChangeEvent ===
+
=== GetBootMode ===
No input, returns an output Event handle with autoclear=true.
+
No input, returns an output u8.
   −
=== SetTvPowerStateMatchingMode ===
+
Returns the value from [[Process_Manager_services|pm:bm]] GetBootMode.
Takes an input s32 [[#TvPowerStateMatchingMode]], no output.
     −
=== GetApplicationIdByContentActionName ===
+
=== GetCurrentFocusState ===
Takes a type-0x5 input buffer containing a string, returns an output u64 titleID.
+
No input. Returns an output u8:
   −
Gets the application titleID for the specified ContentActionName string. Returns an error when the current [[#AppletId]] isn't 0x04 (starter).
+
* 1: In focus.
 +
* 2/3: Out of focus(running in "background").
   −
=== SetCpuBoostMode ===
+
=== RequestToAcquireSleepLock ===
Takes an input u32 '''CpuBoostMode''' (only modes 0 and 1 are valid) and passes it to [[PPC_services#apm:sys|SetCpuBoostMode]].
+
No input/output.
 +
 
 +
=== ReleaseSleepLock ===
 +
No input/output.
   −
=== PerformSystemButtonPressingIfInFocus ===
+
=== ReleaseSleepLockTransiently ===
Takes an input [[#SystemButtonType]], no output.
+
No input/output.
   −
Just returns 0 when a state field is not value 1. Verifies that the input button is allowed, then calls the same func as [[#PerformSystemButtonPressing]] internally.
+
=== GetAcquiredSleepLockEvent ===
 +
No input, returns an output Event handle with autoclear=false.
   −
=== SetPerformanceConfigurationChangedNotification ===
+
=== PushToGeneralChannel ===
Takes an input u8 bool, no output.
+
Takes an input [[#IStorage]], no output.
   −
=== GetCurrentPerformanceConfiguration ===
+
This is not usable under an Application, however it is usable under a LibraryApplet.
No input, returns the result of calling [[PPC_services#apm:sys|GetCurrentPerformanceConfiguration]].
     −
=== GetOperationModeSystemInfo ===
+
Used for sending requests to [[qlaunch]]. sdk-nso creates a 0x10-byte storage which is sent to this. The following are the functions which use this, with the data written to the storage:
No input, returns an output u32.
+
* <code>RequestHomeMenu</code> <code>5341 4d53 0100 0000 0200 0000 0100 0000</code> Returns to the main Home Menu, equivalent to pressing the HOME button.
 +
* <code>RequestJumpToSystemUpdate</code> <code>5341 4d53 0100 0000 0b00 0000 0100 0000</code> Equivalent to entering "System Update" under System Settings. When leaving this, it returns to the main Home Menu.
   −
This returns the output from omm [[#Cmd26]].
+
=== GetHomeButtonReaderLockAccessor ===
 +
No input, returns an output [[#ILockAccessor]].
   −
== ISelfController ==
+
Similar to using [[#GetReaderLockAccessorEx]] with inval=0.
{| class="wikitable" border="1"
+
 
|-
+
=== GetReaderLockAccessorEx ===
! Cmd || Name
+
Takes an input u32, returns an output [[#ILockAccessor]].
|-
+
 
| 0 || [[#Exit]]
+
The input value must be 0-3. 0 = HomeButton.
|-
+
 
| 1 || [[#LockExit]]
+
=== GetWriterLockAccessorEx ===
|-
+
Takes an input u32, returns an output [[#ILockAccessor]].
| 2 || [[#UnlockExit]]
+
 
|-
+
The input value must be 0-3. 0 = HomeButton.
| 3 || [2.0.0+] [[#EnterFatalSection]]
+
 
|-
+
=== GetCradleFwVersion ===
| 4 || [2.0.0+] [[#LeaveFatalSection]]
+
No input, returns 4 output u32s.
|-
+
 
| 9 || [[#GetLibraryAppletLaunchableEvent]]
+
This uses [[#omm]] GetCradleFwVersion.
|-
+
 
| 10 || [[#SetScreenShotPermission]]
+
=== IsVrModeEnabled ===
|-
+
No input, returns an output u8 bool.
| 11 || [[#SetOperationModeChangedNotification]]
+
 
|-
+
=== SetVrModeEnabled ===
| 12 || [[#SetPerformanceModeChangedNotification]]
+
Takes an input u8 bool flag. No output.
|-
+
 
| 13 || [[#SetFocusHandlingMode]]
+
Updates internal AM state fields. If the new state doesn't match the previous state, this uses the [[Backlight_services]] {Disable/Enable}VrMode command depending on whether flag={disable/enable}.
|-
+
 
| 14 || [[#SetRestartMessageEnabled]]
+
When the VrMode is set to true, the console shows a screen rendered like vr asking the user to move his face away and hit the 'close' button. When this button is pressed, the console resets the vrMode to false.
|-
+
 
| 15 || [2.0.0+] [[#SetScreenShotAppletIdentityInfo]]
+
=== SetLcdBacklighOffEnabled ===
|-
+
Takes an input u8 bool, no output.
| 16 || [2.0.0+] [[#SetOutOfFocusSuspendingEnabled]]
+
 
|-
+
Sets whether the LCD screen blacklight is turned off.
| 17 || [3.0.0+] [[#SetControllerFirmwareUpdateSection]]
+
 
|-
+
=== BeginVrModeEx ===
| 18 || [3.0.0+] [[#SetRequiresCaptureButtonShortPressedMessage]]
+
No input/output.
|-
+
 
| 19 || [3.0.0+] [[#SetAlbumImageOrientation]]
+
Identical to [[#SetVrModeEnabled]] except with hard-coded flag=1.
|-
+
 
| 20 || [4.0.0+] [[#SetDesirableKeyboardLayout]]
+
=== EndVrModeEx ===
|-
+
No input/output.
| 40 || [[#CreateManagedDisplayLayer]]
+
 
|-
+
Identical to [[#SetVrModeEnabled]] except with hard-coded flag=0.
| 41 || [4.0.0+] [[#IsSystemBufferSharingEnabled]]
+
 
|-
+
=== IsInControllerFirmwareUpdateSection ===
| 42 || [4.0.0+] [[#GetSystemSharedLayerHandle]]
+
No input, returns an output u8 bool.
|-
+
 
| 43 || [5.0.0+] [[#GetSystemSharedBufferHandle]]
+
=== GetDefaultDisplayResolution ===
|-
+
No input, returns two output s32s '''width''' and '''height'''.
| 50 || [[#SetHandlesRequestToDisplay]]
+
 
|-
+
=== GetDefaultDisplayResolutionChangeEvent ===
| 51 || [[#ApproveToDisplay]]
+
No input, returns an output Event handle with autoclear=true.
|-
+
 
| 60 || [[#OverrideAutoSleepTimeAndDimmingTime]]
+
=== GetHdcpAuthenticationState ===
|-
+
No input, returns an output s32.
| 61 || [[#SetMediaPlaybackState]]
+
 
|-
+
=== GetHdcpAuthenticationStateChangeEvent ===
| 62 || [[#SetIdleTimeDetectionExtension]]
+
No input, returns an output Event handle with autoclear=true.
|-
  −
| 63 || [[#GetIdleTimeDetectionExtension]]
  −
|-
  −
| 64 || [[#SetInputDetectionSourceSet]]
  −
|-
  −
| 65 || [2.0.0+] [[#ReportUserIsActive]]
  −
|-
  −
| 66 || [3.0.0+] [[#GetCurrentIlluminance]]
  −
|-
  −
| 67 || [3.0.0+] [[#IsIlluminanceAvailable]]
  −
|-
  −
| 68 || [5.0.0+] [[#SetAutoSleepDisabled]]
  −
|-
  −
| 69 || [5.0.0+] [[#IsAutoSleepDisabled]]
  −
|-
  −
| 70 || [4.0.0+] [[#ReportMultimediaError]]
  −
|-
  −
| 71 || [5.0.0+] [[#GetCurrentIlluminanceEx]]
  −
|-
  −
| 80 || [4.0.0+] [[#SetWirelessPriorityMode]]
  −
|-
  −
| 90 || [6.0.0+] [[#GetAccumulatedSuspendedTickValue]]
  −
|-
  −
| 91 || [6.0.0+] [[#GetAccumulatedSuspendedTickChangedEvent]]
  −
|-
  −
| 100 || [7.0.0+] [[#SetAlbumImageTakenNotificationEnabled]]
  −
|-
  −
| 110 || [8.0.0+] [[#SetApplicationAlbumUserData]]
  −
|-
  −
| 1000 || [7.0.0+] [[#GetDebugStorageChannel]]
  −
|}
     −
=== Exit ===
+
=== SetTvPowerStateMatchingMode ===
No input/output.
+
Takes an input s32 [[#TvPowerStateMatchingMode]], no output.
   −
Exits the current applet. On success, official sw will enter an infinite loop with sleep-thread value 86400000000000.
+
=== GetApplicationIdByContentActionName ===
 +
Takes a type-0x5 input buffer containing a string, returns an output [[NCM_services#ApplicationId|ApplicationId]].
   −
=== LockExit ===
+
Gets the ApplicationId for the specified ContentActionName string. Returns an error when the current [[#AppletId]] isn't 0x04 (when the current applet isn't a SystemApplication).
No input/output.
     −
Locks exit process of pressing X to close in HOME Menu for an application or HOME button for an applet. When locked, it will show the "waiting for software to be closed dialog" until UnlockExit is called or a 15 seconds timeout (when the latter occurs, the process is force-terminated).
+
=== SetCpuBoostMode ===
 +
Takes an input u32 '''CpuBoostMode''' (only modes 0 and 1 are valid) and passes it to [[PPC_services#apm:sys|SetCpuBoostMode]].
   −
=== UnlockExit ===
+
=== CancelCpuBoostMode ===
 
No input/output.
 
No input/output.
   −
Unlocks exit process, if LockExit was previously used.
+
=== PerformSystemButtonPressingIfInFocus ===
 +
Takes an input [[#SystemButtonType]], no output.
 +
 
 +
Just returns 0 when a state field is not value 1. Verifies that the input button is allowed, then calls the same func as [[#PerformSystemButtonPressing]] internally.
   −
=== EnterFatalSection ===
+
=== SetPerformanceConfigurationChangedNotification ===
No input/output.
+
Takes an input u8 bool, no output.
   −
=== LeaveFatalSection ===
+
=== GetCurrentPerformanceConfiguration ===
No input/output.
+
No input, returns the result of calling [[PPC_services#apm:sys|GetCurrentPerformanceConfiguration]].
   −
[[#EnterFatalSection]] must be executed at least once before executing this command, otherwise error code 0x40080 will be returned. EnterFatalSection and LeaveFatalSection work in pairs, that is, N calls to EnterFatalSection must be performed first in order to perform N executions of LeaveFatalSection. Essentially, these two functions operate like how one would lock and unlock a recursive mutex.
+
=== GetOperationModeSystemInfo ===
 +
No input, returns an output u32.
   −
=== GetLibraryAppletLaunchableEvent ===
+
This returns the output from [[#GetOperationModeSystemInfo_2|omm GetOperationModeSystemInfo]].
No input, returns an output event handle with autoclear=false.
     −
=== SetScreenShotPermission ===
+
=== GetSettingsPlatformRegion ===
Takes an input s32. No output.
+
No input, returns an output u8.
   −
Controls whether screenshot-capture is allowed.
+
This just returns the output from [[Settings_services#GetPlatformRegion|setsys GetPlatformRegion]].
   −
{| class="wikitable" border="1"
+
=== ActivateMigrationService ===
 +
No input/output.
 +
 
 +
=== DeactivateMigrationService ===
 +
No input/output.
 +
 
 +
== ISelfController ==
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || [[#Exit]]
 
|-
 
|-
! Value || Description
+
| 1 || [[#LockExit]]
 +
|-
 +
| 2 || [[#UnlockExit]]
 +
|-
 +
| 3 || [2.0.0+] [[#EnterFatalSection]]
 +
|-
 +
| 4 || [2.0.0+] [[#LeaveFatalSection]]
 
|-
 
|-
| 0 || Inherit from parent applet
+
| 9 || [[#GetLibraryAppletLaunchableEvent]]
 
|-
 
|-
| 1 || Enable
+
| 10 || [[#SetScreenShotPermission]]
 
|-
 
|-
| 2 || Disable
+
| 11 || [[#SetOperationModeChangedNotification]]
 
|-
 
|-
|}
+
| 12 || [[#SetPerformanceModeChangedNotification]]
 
+
|-
=== SetOperationModeChangedNotification ===
+
| 13 || [[#SetFocusHandlingMode]]
Takes an input u8 bool flag. No output.
+
|-
 
+
| 14 || [[#SetRestartMessageEnabled]]
=== SetPerformanceModeChangedNotification ===
+
|-
Takes an input u8 bool flag. No output.
+
| 15 || [2.0.0+] [[#SetScreenShotAppletIdentityInfo]]
 
+
|-
=== SetFocusHandlingMode ===
+
| 16 || [2.0.0+] [[#SetOutOfFocusSuspendingEnabled]]
Takes 3 input u8s with each field located immediately after the previous u8, these are bool flags. No output.
+
|-
 
+
| 17 || [3.0.0+] [[#SetControllerFirmwareUpdateSection]]
=== SetRestartMessageEnabled ===
+
|-
Takes an input u8 bool flag, no output.
+
| 18 || [3.0.0+] [[#SetRequiresCaptureButtonShortPressedMessage]]
 
+
|-
See [[#AppletMessage]].
+
| 19 || [3.0.0+] [[#SetAlbumImageOrientation]]
 
+
|-
=== SetScreenShotAppletIdentityInfo ===
+
| 20 || [4.0.0+] [[#SetDesirableKeyboardLayout]]
Takes an input [[#AppletIdentityInfo]], no output.
+
|-
 
+
| 40 || [[#CreateManagedDisplayLayer]]
=== SetOutOfFocusSuspendingEnabled ===
+
|-
Takes an input u8 bool flag. No output.
+
| 41 || [4.0.0+] [[#IsSystemBufferSharingEnabled]]
 
+
|-
=== SetControllerFirmwareUpdateSection ===
+
| 42 || [4.0.0+] [[#GetSystemSharedLayerHandle]]
Takes an input u8 bool flag, no output.
+
|-
 
+
| 43 || [5.0.0+] [[#GetSystemSharedBufferHandle]]
This throws error 0x40280 when the internal state flag already matches the input value.
+
|-
 
+
| 44 || [10.0.0+] [[#CreateManagedDisplaySeparableLayer]]
=== SetRequiresCaptureButtonShortPressedMessage ===
+
|-
Takes an input u8 bool flag, no output.
+
| 45 || [10.0.0+] [[#SetManagedDisplayLayerSeparationMode]]
 
+
|-
See [[#AppletMessage]].
+
| 50 || [[#SetHandlesRequestToDisplay]]
 
+
|-
When enabled with a non-Overlay applet, Overlay applet will not be notified of capture button short-presses for screenshots.
+
| 51 || [[#ApproveToDisplay]]
 
+
|-
=== SetAlbumImageOrientation ===
+
| 60 || [[#OverrideAutoSleepTimeAndDimmingTime]]
Takes an input u32 "nn::album::ImageOrientation". No output.
+
|-
 
+
| 61 || [[#SetMediaPlaybackState]]
The input value must not be >3.
+
|-
 
+
| 62 || [[#SetIdleTimeDetectionExtension]]
=== SetDesirableKeyboardLayout ===
+
|-
Takes an input u32, no output.
+
| 63 || [[#GetIdleTimeDetectionExtension]]
 
+
|-
The input u32 is "nn::settings::KeyboardLayout".
+
| 64 || [[#SetInputDetectionSourceSet]]
 
+
|-
=== CreateManagedDisplayLayer ===
+
| 65 || [2.0.0+] [[#ReportUserIsActive]]
Returns an output u64 LayerId which is then used by the user-process with [[Display_services#OpenLayer]].
+
|-
 +
| 66 || [3.0.0+] [[#GetCurrentIlluminance]]
 +
|-
 +
| 67 || [3.0.0+] [[#IsIlluminanceAvailable]]
 +
|-
 +
| 68 || [5.0.0+] [[#SetAutoSleepDisabled]]
 +
|-
 +
| 69 || [5.0.0+] [[#IsAutoSleepDisabled]]
 +
|-
 +
| 70 || [4.0.0+] [[#ReportMultimediaError]]
 +
|-
 +
| 71 || [5.0.0+] [[#GetCurrentIlluminanceEx]]
 +
|-
 +
| 72 || [9.0.0+] [[#SetInputDetectionPolicy]]
 +
|-
 +
| 80 || [4.0.0+] [[#SetWirelessPriorityMode]]
 +
|-
 +
| 90 || [6.0.0+] [[#GetAccumulatedSuspendedTickValue]]
 +
|-
 +
| 91 || [6.0.0+] [[#GetAccumulatedSuspendedTickChangedEvent]]
 +
|-
 +
| 100 || [7.0.0+] [[#SetAlbumImageTakenNotificationEnabled]]
 +
|-
 +
| 110 || [8.0.0+] [[#SetApplicationAlbumUserData]]
 +
|-
 +
| 1000 || [7.0.0+] [[#GetDebugStorageChannel]]
 +
|}
   −
=== IsSystemBufferSharingEnabled ===
+
=== Exit ===
 
No input/output.
 
No input/output.
   −
Not available when the current applet is an Application ([[#AppletId]] == 0x01).
+
Exits the current applet. On success, official sw will enter an infinite loop with sleep-thread value 86400000000000.
   −
Checks whether SystemBufferSharing is enabled, throwing an error otherwise.
+
=== LockExit ===
 +
No input/output.
   −
=== GetSystemSharedLayerHandle ===
+
Locks exit process of pressing X to close in HOME Menu for an application or HOME button for an applet. When locked, it will show the "waiting for software to be closed dialog" until UnlockExit is called or a 15 seconds timeout (when the latter occurs, the process is force-terminated).
No input, returns two output u64s "nn::vi::fbshare::SharedBufferHandle" and "nn::vi::fbshare::SharedLayerHandle".
     −
Runs code similar to [[#IsSystemBufferSharingEnabled]] first.
+
=== UnlockExit ===
 +
No input/output.
   −
=== GetSystemSharedBufferHandle ===
+
Unlocks exit process, if LockExit was previously used.
No input, returns an output u64 "nn::vi::fbshare::SharedBufferHandle".
     −
Runs code similar to [[#IsSystemBufferSharingEnabled]] first.
+
=== EnterFatalSection ===
 +
No input/output.
   −
Same as [[#GetSystemSharedLayerHandle]] except this just gets the SharedBufferHandle.
+
=== LeaveFatalSection ===
 +
No input/output.
   −
=== SetHandlesRequestToDisplay ===
+
[[#EnterFatalSection]] must be executed at least once before executing this command, otherwise error code 0x40080 will be returned. EnterFatalSection and LeaveFatalSection work in pairs, that is, N calls to EnterFatalSection must be performed first in order to perform N executions of LeaveFatalSection. Essentially, these two functions operate like how one would lock and unlock a recursive mutex.
Takes an input u8 bool, no output.
     −
Sets an internal state flag. When the input flag is 0, this will in additional run the same code as [[#ApproveToDisplay]].
+
=== GetLibraryAppletLaunchableEvent ===
 +
No input, returns an output event handle with autoclear=false.
   −
See [[#AppletMessage]].
+
=== SetScreenShotPermission ===
 +
Takes an input s32. No output.
   −
=== ApproveToDisplay ===
+
Controls whether screenshot-capture is allowed.
No input/output.
     −
Used to handle the notification enabled by [[#SetHandlesRequestToDisplay]].
+
{| class="wikitable" border="1"
 +
|-
 +
! Value || Description
 +
|-
 +
| 0 || Inherit from parent applet
 +
|-
 +
| 1 || Enable
 +
|-
 +
| 2 || Disable
 +
|-
 +
|}
   −
=== OverrideAutoSleepTimeAndDimmingTime ===
+
=== SetOperationModeChangedNotification ===
Takes 4 input s32s, no output.
+
Takes an input u8 bool flag. No output.
   −
=== SetMediaPlaybackState ===
+
=== SetPerformanceModeChangedNotification ===
Takes an input u8 bool, no output.
+
Takes an input u8 bool flag. No output.
   −
=== SetIdleTimeDetectionExtension ===
+
=== SetFocusHandlingMode ===
Takes an input u32, no output.
+
Takes 3 input u8s with each field located immediately after the previous u8, these are bool flags. No output.
   −
The input value must be 0-2: 0 = disabled, 1 = Extended, and 2 = ExtendedUnsafe.
+
=== SetRestartMessageEnabled ===
 +
Takes an input u8 bool flag, no output.
   −
=== GetIdleTimeDetectionExtension ===
+
See [[#AppletMessage]].
No input, returns an output u32.
     −
Returns the value set by [[#SetIdleTimeDetectionExtension]].
+
=== SetScreenShotAppletIdentityInfo ===
 +
Takes an input [[#AppletIdentityInfo]], no output.
   −
=== SetInputDetectionSourceSet ===
+
=== SetOutOfFocusSuspendingEnabled ===
Takes an input u32, no output.
+
Takes an input u8 bool flag. No output.
   −
=== ReportUserIsActive ===
+
=== SetControllerFirmwareUpdateSection ===
No input/output.
+
Takes an input u8 bool flag, no output.
   −
Uses idle:sys ReportUserIsActive.
+
This throws error 0x40280 when the internal state flag already matches the input value.
   −
Reports that the user is active, for idle detection (screen dimming / auto-sleep). This is equivalent to when the user uses HID input.
+
=== SetRequiresCaptureButtonShortPressedMessage ===
 +
Takes an input u8 bool flag, no output.
   −
=== GetCurrentIlluminance ===
+
See [[#AppletMessage]].
No input, returns an output float.
     −
Uses [[Backlight_services|lbl]] command GetAmbientLightSensorValue, where only the output float is used.
+
When enabled with a non-Overlay applet, Overlay applet will not be notified of capture button short-presses for screenshots.
   −
=== IsIlluminanceAvailable ===
+
=== SetAlbumImageOrientation ===
No input, returns an output u8 bool.
+
Takes an input u32 "nn::album::ImageOrientation". No output.
   −
Uses [[Backlight_services|lbl]] command IsAmbientLightSensorAvailable.
+
The input value must not be >3.
   −
User-processes can use this to determine whether to continue with using GetCurrentIlluminance(Ex).
+
=== SetDesirableKeyboardLayout ===
 +
Takes an input u32, no output.
   −
=== SetAutoSleepDisabled ===
+
The input u32 is "nn::settings::KeyboardLayout".
Takes an input u8 bool, no output.
     −
=== IsAutoSleepDisabled ===
+
=== CreateManagedDisplayLayer ===
No input, returns an output u8 bool.
+
Returns an output u64 LayerId which is then used by the user-process with [[Display_services#OpenLayer]].
   −
=== ReportMultimediaError ===
+
=== IsSystemBufferSharingEnabled ===
Takes an input Result and a type-0x5 input buffer, no output.
+
No input/output.
   −
The buffer contains a 0x138-byte "movie::MultimediaTelemetryReport" struct.
+
Not available when the current applet is an Application ([[#AppletId]] == 0x01).
 +
 
 +
Checks whether SystemBufferSharing is enabled, throwing an error otherwise.
 +
 
 +
=== GetSystemSharedLayerHandle ===
 +
No input, returns two output u64s "nn::vi::fbshare::SharedBufferHandle" and "nn::vi::fbshare::SharedLayerHandle".
 +
 
 +
Runs code similar to [[#IsSystemBufferSharingEnabled]] first.
   −
=== GetCurrentIlluminanceEx ===
+
=== GetSystemSharedBufferHandle ===
No input, returns an output u8 bool and float.
+
No input, returns an output u64 "nn::vi::fbshare::SharedBufferHandle".
   −
Uses [[Backlight_services|lbl]] command GetAmbientLightSensorValue.
+
Runs code similar to [[#IsSystemBufferSharingEnabled]] first.
   −
=== SetWirelessPriorityMode ===
+
Same as [[#GetSystemSharedLayerHandle]] except this just gets the SharedBufferHandle.
Takes an input s32 enum '''WirelessPriorityMode''', no output.
     −
The input value must be 1 or 2.
+
=== CreateManagedDisplaySeparableLayer ===
 +
No input, returns two output u64 LayerIds.
   −
=== GetAccumulatedSuspendedTickValue ===
+
sdknso now uses this instead of [[#CreateManagedDisplayLayer]]. sdknso caches the output from the cmd so that it's only used once. The first u64 is used the same as the original LayerId from [[#CreateManagedDisplayLayer]]. <code>nn::vi::CreateRecordingLayer</code> uses the second LayerId, the layer creation is identical besides which LayerId is used.
No input, returns an output u64 tick value.
     −
Gets the total time in ticks that the process was suspended, relative to when the applet-service was last initialized.
+
=== SetManagedDisplayLayerSeparationMode ===
 +
Takes an input u32, no output.
   −
=== GetAccumulatedSuspendedTickChangedEvent ===
+
sdknso exposes this as <code>nn::vi::SetRecordingLayerEnabled(bool)</code>.
No input, returns an output Event handle with autoclear=true.
     −
This is signaled when the output from [[#GetAccumulatedSuspendedTickValue]] is updated.
+
The input u32 must be 0-1.
   −
=== SetAlbumImageTakenNotificationEnabled ===
+
=== SetHandlesRequestToDisplay ===
 
Takes an input u8 bool, no output.
 
Takes an input u8 bool, no output.
 +
 +
Sets an internal state flag. When the input flag is 0, this will in additional run the same code as [[#ApproveToDisplay]].
    
See [[#AppletMessage]].
 
See [[#AppletMessage]].
   −
=== SetApplicationAlbumUserData ===
+
=== ApproveToDisplay ===
Takes a type-0x21 input buffer, no output.
+
No input/output.
   −
The buffer contains arbitrary UserData.
+
Used to handle the notification enabled by [[#SetHandlesRequestToDisplay]].
   −
The size must be <=0x400. The input buffer is copied to a buffer loaded from a state ptr (throwing an error when the state ptr is not set), with the u32 size being written to statebuf+0x400 afterwards.
+
=== OverrideAutoSleepTimeAndDimmingTime ===
 +
Takes 4 input s32s, no output.
 +
 
 +
=== SetMediaPlaybackState ===
 +
Takes an input u8 bool, no output.
   −
=== GetDebugStorageChannel ===
+
=== SetIdleTimeDetectionExtension ===
No input, returns an output [[#IStorageChannel]].
+
Takes an input u32, no output.
   −
The cached value loaded from [[System_Settings|system-setting]] <code>am.debug!dev_function</code> must be set to 0x1 with size 0x1, otherwise an error is returned.
+
The input value must be 0-2: 0 = disabled, 1 = Extended, and 2 = ExtendedUnsafe.
   −
== IStorageChannel ==
+
=== GetIdleTimeDetectionExtension ===
Added with [[7.0.0]].
+
No input, returns an output u32.
   −
{| class="wikitable" border="1"
+
Returns the value set by [[#SetIdleTimeDetectionExtension]].
|-
  −
! Cmd || Name || Notes
  −
|-
  −
| 0 || Push || No input, returns an output [[#IStorage]].
  −
|-
  −
| 1 || Unpop || No input, returns an output [[#IStorage]].
  −
|-
  −
| 2 || Pop || No input, returns an output [[#IStorage]].
  −
|-
  −
| 3 || GetPopEventHandle || No input, returns an output handle.
  −
|-
  −
| 4 || Clear || No input/output.
  −
|}
     −
== IWindowController ==
+
=== SetInputDetectionSourceSet ===
{| class="wikitable" border="1"
+
Takes an input u32, no output.
|-
  −
! Cmd || Name || Notes
  −
|-
  −
| 0 || [[#CreateWindow]] ||
  −
|-
  −
| 1 || [[#GetAppletResourceUserId]] ||
  −
|-
  −
| 2 || [6.0.0+] [[#GetAppletResourceUserIdOfCallerApplet]] ||
  −
|-
  −
| 10 || [[#AcquireForegroundRights]] ||
  −
|-
  −
| 11 || [[#ReleaseForegroundRights]] ||
  −
|-
  −
| 12 || [[#RejectToChangeIntoBackground]] ||
  −
|-
  −
| 20 || [7.0.0+] [[#SetAppletWindowVisibility]] ||
  −
|-
  −
| 21 || [7.0.0+] [[#SetAppletGpuTimeSlice]] ||
  −
|}
     −
=== CreateWindow ===
+
=== ReportUserIsActive ===
Takes an input u32, returns an output [[#IWindow]].
+
No input/output.
   −
Stubbed, just returns an error.
+
Uses idle:sys ReportUserIsActive.
   −
=== GetAppletResourceUserId ===
+
Reports that the user is active, for idle detection (screen dimming / auto-sleep). This is equivalent to when the user uses HID input.
No input, returns an output u64 [[#AppletResourceUserId]].
     −
=== GetAppletResourceUserIdOfCallerApplet ===
+
=== GetCurrentIlluminance ===
No input, returns an output u64 [[#AppletResourceUserId]].
+
No input, returns an output float.
   −
=== AcquireForegroundRights ===
+
Uses [[Backlight_services|lbl]] command GetAmbientLightSensorValue, where only the output float is used.
No input/output.
     −
Just returns 0.
+
=== IsIlluminanceAvailable ===
 +
No input, returns an output u8 bool.
 +
 
 +
Uses [[Backlight_services|lbl]] command IsAmbientLightSensorAvailable.
 +
 
 +
User-processes can use this to determine whether to continue with using GetCurrentIlluminance(Ex).
   −
=== ReleaseForegroundRights ===
+
=== SetAutoSleepDisabled ===
No input/output.
+
Takes an input u8 bool, no output.
   −
Just returns 0.
+
=== IsAutoSleepDisabled ===
 +
No input, returns an output u8 bool.
   −
=== RejectToChangeIntoBackground ===
+
=== ReportMultimediaError ===
No input/output.
+
Takes an input Result and a type-0x5 input buffer, no output.
   −
Just returns 0.
+
The buffer contains a 0x138-byte "movie::MultimediaTelemetryReport" struct.
   −
=== SetAppletWindowVisibility ===
+
=== GetCurrentIlluminanceEx ===
Takes an input u8 bool, no output.
+
No input, returns an output u8 bool and float.
   −
=== SetAppletGpuTimeSlice ===
+
Uses [[Backlight_services|lbl]] command GetAmbientLightSensorValue.
Takes an input s64, no output.
     −
The input s64 must not be negative.
+
=== SetInputDetectionPolicy ===
 +
Takes an input [[#InputDetectionPolicy]], no output.
   −
== IAudioController ==
+
=== SetWirelessPriorityMode ===
{| class="wikitable" border="1"
+
Takes an input s32 enum '''WirelessPriorityMode''', no output.
|-
  −
! Cmd || Name
  −
|-
  −
| 0 || [[#SetExpectedMasterVolume]]
  −
|-
  −
| 1 || [[#GetMainAppletExpectedMasterVolume]]
  −
|-
  −
| 2 || [[#GetLibraryAppletExpectedMasterVolume]]
  −
|-
  −
| 3 || [[#ChangeMainAppletMasterVolume]]
  −
|-
  −
| 4 || [[#SetTransparentVolumeRate]]
  −
|}
     −
GetMainAppletExpectedMasterVolume/SetExpectedMasterVolume are used for saving/restoring state for LibraryApplet launching, with SetExpectedMasterVolume being used with new state prior to launching a LibraryApplet. With official sw these applet funcs are used directly in the main-codebin.
+
The input value must be 1 or 2.
   −
=== SetExpectedMasterVolume ===
+
=== GetAccumulatedSuspendedTickValue ===
Takes two input floats, no output.
+
No input, returns an output u64 tick value.
   −
Writes the input floats to state: first one is used by [[#GetMainAppletExpectedMasterVolume]], second one is used by [[#GetLibraryAppletExpectedMasterVolume]].
+
Gets the total time in ticks that the process was suspended, relative to when the applet-service was last initialized.
   −
=== GetMainAppletExpectedMasterVolume ===
+
=== GetAccumulatedSuspendedTickChangedEvent ===
No input, returns an output float.
+
No input, returns an output Event handle with autoclear=true.
   −
=== GetLibraryAppletExpectedMasterVolume ===
+
This is signaled when the output from [[#GetAccumulatedSuspendedTickValue]] is updated.
No input, returns an output float.
     −
=== ChangeMainAppletMasterVolume ===
+
=== SetAlbumImageTakenNotificationEnabled ===
Takes an input float and an input u64, no output.
+
Takes an input u8 bool, no output.
   −
=== SetTransparentVolumeRate ===
+
See [[#AppletMessage]].
Takes an input float, no output.
+
 
 +
=== SetApplicationAlbumUserData ===
 +
Takes a type-0x21 input buffer, no output.
 +
 
 +
The buffer contains arbitrary UserData.
 +
 
 +
The size must be <=0x400. The input buffer is copied to a buffer loaded from a state ptr (throwing an error when the state ptr is not set), with the u32 size being written to statebuf+0x400 afterwards.
 +
 
 +
=== GetDebugStorageChannel ===
 +
No input, returns an output [[#IStorageChannel]].
 +
 
 +
The cached value loaded from [[System_Settings|system-setting]] <code>am.debug!dev_function</code> must be set to 0x1 with size 0x1, otherwise an error is returned.
 +
 
 +
== IStorageChannel ==
 +
Added with [[7.0.0]].
   −
== IDisplayController ==
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name
+
! Cmd || Name || Notes
 
|-
 
|-
| 0 || [[#GetLastForegroundCaptureImage]]
+
| 0 || Push || No input, returns an output [[#IStorage]].
 
|-
 
|-
| 1 || [[#UpdateLastForegroundCaptureImage]]
+
| 1 || Unpop || No input, returns an output [[#IStorage]].
 
|-
 
|-
| 2 || [[#GetLastApplicationCaptureImage]]
+
| 2 || Pop || No input, returns an output [[#IStorage]].
 
|-
 
|-
| 3 || [[#GetCallerAppletCaptureImage]]
+
| 3 || GetPopEventHandle || No input, returns an output handle.
 
|-
 
|-
| 4 || [[#UpdateCallerAppletCaptureImage]]
+
| 4 || Clear || No input/output.
 +
|}
 +
 
 +
== IWindowController ==
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 5 || [[#GetLastForegroundCaptureImageEx]]
+
! Cmd || Name || Notes
 
|-
 
|-
| 6 || [[#GetLastApplicationCaptureImageEx]]
+
| 0 || [[#CreateWindow]] ||
 
|-
 
|-
| 7 || [[#GetCallerAppletCaptureImageEx]]
+
| 1 || [[#GetAppletResourceUserId]] ||
 
|-
 
|-
| 8 || [2.0.0+] [[#TakeScreenShotOfOwnLayer]]
+
| 2 || [6.0.0+] [[#GetAppletResourceUserIdOfCallerApplet]] ||
 
|-
 
|-
| 9 || [5.0.0+] [[#CopyBetweenCaptureBuffers]]
+
| 10 || [[#AcquireForegroundRights]] ||
 
|-
 
|-
| 10 || [[#AcquireLastApplicationCaptureBuffer]]
+
| 11 || [[#ReleaseForegroundRights]] ||
 
|-
 
|-
| 11 || [[#ReleaseLastApplicationCaptureBuffer]]
+
| 12 || [[#RejectToChangeIntoBackground]] ||
 
|-
 
|-
| 12 || [[#AcquireLastForegroundCaptureBuffer]]
+
| 20 || [7.0.0+] [[#SetAppletWindowVisibility]] ||
 
|-
 
|-
| 13 || [[#ReleaseLastForegroundCaptureBuffer]]
+
| 21 || [7.0.0+] [[#SetAppletGpuTimeSlice]] ||  
|-
+
|}
| 14 || [[#AcquireCallerAppletCaptureBuffer]]
+
 
|-
+
=== CreateWindow ===
| 15 || [[#ReleaseCallerAppletCaptureBuffer]]
+
Takes an input u32, returns an output [[#IWindow]].
|-
+
 
| 16 || [[#AcquireLastApplicationCaptureBufferEx]]
+
Stubbed, just returns an error.
|-
+
 
| 17 || [[#AcquireLastForegroundCaptureBufferEx]]
+
=== GetAppletResourceUserId ===
|-
+
No input, returns an output u64 [[#AppletResourceUserId]].
| 18 || [[#AcquireCallerAppletCaptureBufferEx]]
+
 
|-
+
=== GetAppletResourceUserIdOfCallerApplet ===
| 20 || [3.0.0+] [[#ClearCaptureBuffer]]
+
No input, returns an output u64 [[#AppletResourceUserId]].
|-
  −
| 21 || [3.0.0+] [[#ClearAppletTransitionBuffer]]
  −
|-
  −
| 22 || [4.0.0+] [[#AcquireLastApplicationCaptureSharedBuffer]]
  −
|-
  −
| 23 || [4.0.0+] [[#ReleaseLastApplicationCaptureSharedBuffer]]
  −
|-
  −
| 24 || [4.0.0+] [[#AcquireLastForegroundCaptureSharedBuffer]]
  −
|-
  −
| 25 || [4.0.0+] [[#ReleaseLastForegroundCaptureSharedBuffer]]
  −
|-
  −
| 26 || [4.0.0+] [[#AcquireCallerAppletCaptureSharedBuffer]]
  −
|-
  −
| 27 || [4.0.0+] [[#ReleaseCallerAppletCaptureSharedBuffer]]
  −
|-
  −
| 28 || [6.0.0+] [[#TakeScreenShotOfOwnLayerEx]]
  −
|}
     −
=== GetLastForegroundCaptureImage ===
+
=== AcquireForegroundRights ===
Takes a type-0x6 output buffer.
+
No input/output.
   −
Stubbed, just returns an error.
+
Just returns 0.
   −
=== UpdateLastForegroundCaptureImage ===
+
=== ReleaseForegroundRights ===
 
No input/output.
 
No input/output.
   −
=== GetLastApplicationCaptureImage ===
+
Just returns 0.
Takes a type-0x6 output buffer.
     −
Stubbed, just returns an error.
+
=== RejectToChangeIntoBackground ===
 +
No input/output.
   −
=== GetCallerAppletCaptureImage ===
+
Just returns 0.
Takes a type-0x6 output buffer.
     −
Stubbed, just returns an error.
+
=== SetAppletWindowVisibility ===
 +
Takes an input u8 bool, no output.
   −
=== UpdateCallerAppletCaptureImage ===
+
=== SetAppletGpuTimeSlice ===
No input/output.
+
Takes an input s64, no output.
   −
Calls the same func internally as [[#UpdateLastForegroundCaptureImage]], except this passes param value 2 instead of 1.
+
The input s64 must not be negative.
   −
=== GetLastForegroundCaptureImageEx ===
+
== IAudioController ==
Takes a type-0x6 output buffer, returns an output u8 bool.
+
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || [[#SetExpectedMasterVolume]]
 +
|-
 +
| 1 || [[#GetMainAppletExpectedMasterVolume]]
 +
|-
 +
| 2 || [[#GetLibraryAppletExpectedMasterVolume]]
 +
|-
 +
| 3 || [[#ChangeMainAppletMasterVolume]]
 +
|-
 +
| 4 || [[#SetTransparentVolumeRate]]
 +
|}
   −
The buffer size must match 0x384000.
+
GetMainAppletExpectedMasterVolume/SetExpectedMasterVolume are used for saving/restoring state for LibraryApplet launching, with SetExpectedMasterVolume being used with new state prior to launching a LibraryApplet. With official sw these applet funcs are used directly in the main-codebin.
   −
=== GetLastApplicationCaptureImageEx ===
+
=== SetExpectedMasterVolume ===
Takes a type-0x6 output buffer, returns an output u8 bool.
+
Takes two input floats, no output.
   −
The buffer size must match 0x384000.
+
Writes the input floats to state: first one is used by [[#GetMainAppletExpectedMasterVolume]], second one is used by [[#GetLibraryAppletExpectedMasterVolume]].
   −
Calls the same internal func as [[#GetLastForegroundCaptureImageEx]], except that the last param is set to value 0 instead of 1.
+
=== GetMainAppletExpectedMasterVolume ===
 +
No input, returns an output float.
   −
=== GetCallerAppletCaptureImageEx ===
+
=== GetLibraryAppletExpectedMasterVolume ===
Takes a type-0x6 output buffer, returns an output u8 bool.
+
No input, returns an output float.
   −
The buffer size must match 0x384000.
+
=== ChangeMainAppletMasterVolume ===
 +
Takes an input float and an input u64, no output.
   −
Calls the same internal func as [[#GetLastForegroundCaptureImageEx]], except that the last param is set to value 2 instead of 1.
+
=== SetTransparentVolumeRate ===
 +
Takes an input float, no output.
   −
=== TakeScreenShotOfOwnLayer ===
+
== IDisplayController ==
Takes an input u8 bool and a s32, no output.
+
{| class="wikitable" border="1"
 
+
|-
=== CopyBetweenCaptureBuffers ===
+
! Cmd || Name
Takes two input s32s, no output.
+
|-
 
+
| 0 || [[#GetLastForegroundCaptureImage]]
=== AcquireLastApplicationCaptureBuffer ===
+
|-
No input, returns an output handle.
+
| 1 || [[#UpdateLastForegroundCaptureImage]]
 
+
|-
Stubbed, just returns an error.
+
| 2 || [[#GetLastApplicationCaptureImage]]
 
+
|-
=== ReleaseLastApplicationCaptureBuffer ===
+
| 3 || [[#GetCallerAppletCaptureImage]]
No input/output.
+
|-
 
+
| 4 || [[#UpdateCallerAppletCaptureImage]]
Clears a state field if it's not already 0, returning an error otherwise. On newer sysvers: then a func is called which just returns 0, then this cmd returns 0.
+
|-
 
+
| 5 || [[#GetLastForegroundCaptureImageEx]]
=== AcquireLastForegroundCaptureBuffer ===
+
|-
No input, returns an output handle.
+
| 6 || [[#GetLastApplicationCaptureImageEx]]
 
+
|-
Stubbed, just returns an error.
+
| 7 || [[#GetCallerAppletCaptureImageEx]]
 
+
|-
=== ReleaseLastForegroundCaptureBuffer ===
+
| 8 || [2.0.0+] [[#TakeScreenShotOfOwnLayer]]
No input/output.
+
|-
 
+
| 9 || [5.0.0+] [[#CopyBetweenCaptureBuffers]]
Same as [[#ReleaseLastApplicationCaptureBuffer]] except with a different state field + different input param for the called func.
+
|-
 
+
| 10 || [[#AcquireLastApplicationCaptureBuffer]]
=== AcquireCallerAppletCaptureBuffer ===
+
|-
No input, returns an output handle.
+
| 11 || [[#ReleaseLastApplicationCaptureBuffer]]
 +
|-
 +
| 12 || [[#AcquireLastForegroundCaptureBuffer]]
 +
|-
 +
| 13 || [[#ReleaseLastForegroundCaptureBuffer]]
 +
|-
 +
| 14 || [[#AcquireCallerAppletCaptureBuffer]]
 +
|-
 +
| 15 || [[#ReleaseCallerAppletCaptureBuffer]]
 +
|-
 +
| 16 || [[#AcquireLastApplicationCaptureBufferEx]]
 +
|-
 +
| 17 || [[#AcquireLastForegroundCaptureBufferEx]]
 +
|-
 +
| 18 || [[#AcquireCallerAppletCaptureBufferEx]]
 +
|-
 +
| 20 || [3.0.0+] [[#ClearCaptureBuffer]]
 +
|-
 +
| 21 || [3.0.0+] [[#ClearAppletTransitionBuffer]]
 +
|-
 +
| 22 || [4.0.0+] [[#AcquireLastApplicationCaptureSharedBuffer]]
 +
|-
 +
| 23 || [4.0.0+] [[#ReleaseLastApplicationCaptureSharedBuffer]]
 +
|-
 +
| 24 || [4.0.0+] [[#AcquireLastForegroundCaptureSharedBuffer]]
 +
|-
 +
| 25 || [4.0.0+] [[#ReleaseLastForegroundCaptureSharedBuffer]]
 +
|-
 +
| 26 || [4.0.0+] [[#AcquireCallerAppletCaptureSharedBuffer]]
 +
|-
 +
| 27 || [4.0.0+] [[#ReleaseCallerAppletCaptureSharedBuffer]]
 +
|-
 +
| 28 || [6.0.0+] [[#TakeScreenShotOfOwnLayerEx]]
 +
|}
 +
 
 +
=== GetLastForegroundCaptureImage ===
 +
Takes a type-0x6 output buffer.
    
Stubbed, just returns an error.
 
Stubbed, just returns an error.
   −
=== ReleaseCallerAppletCaptureBuffer ===
+
=== UpdateLastForegroundCaptureImage ===
 
No input/output.
 
No input/output.
   −
Same as [[#ReleaseLastApplicationCaptureBuffer]] except with a different state field + different input param for the called func.
+
=== GetLastApplicationCaptureImage ===
 +
Takes a type-0x6 output buffer.
   −
=== AcquireLastApplicationCaptureBufferEx ===
+
Stubbed, just returns an error.
No input, returns an output TransferMemory handle and an output u8 bool.
     −
The state field used by [[#ReleaseLastApplicationCaptureBuffer]] must be 0. Calls a func which just returns an error (this is only the case on newer sysvers), hence this cmd will just return that error. If that func would have returned successfully, the state field would be set to 1 and the cmd would return 0.
+
=== GetCallerAppletCaptureImage ===
 +
Takes a type-0x6 output buffer.
   −
On old sysvers, the output TransferMemory is size 0x384000 with permissions=RW.
+
Stubbed, just returns an error.
   −
=== AcquireLastForegroundCaptureBufferEx ===
+
=== UpdateCallerAppletCaptureImage ===
No input, returns an output TransferMemory handle and an output u8 bool.
+
No input/output.
   −
Same as [[#AcquireLastApplicationCaptureBufferEx]] except this uses the [[#ReleaseLastForegroundCaptureBuffer]] state field, and uses a different input param value for the called func.
+
Calls the same func internally as [[#UpdateLastForegroundCaptureImage]], except this passes param value 2 instead of 1.
   −
=== AcquireCallerAppletCaptureBufferEx ===
+
=== GetLastForegroundCaptureImageEx ===
No input, returns an output TransferMemory handle and an output u8 bool.
+
Takes a type-0x6 output buffer, returns an output u8 bool.
   −
Same as [[#AcquireLastApplicationCaptureBufferEx]] except this uses the [[#ReleaseCallerAppletCaptureBuffer]] state field, and uses a different input param value for the called func.
+
The buffer size must match 0x384000.
   −
=== ClearCaptureBuffer ===
+
=== GetLastApplicationCaptureImageEx ===
Takes an input u8 bool, an s32, and an u32, returns no output.
+
Takes a type-0x6 output buffer, returns an output u8 bool.
   −
=== ClearAppletTransitionBuffer ===
+
The buffer size must match 0x384000.
Takes an input u32, no output.
     −
=== AcquireLastApplicationCaptureSharedBuffer ===
+
Calls the same internal func as [[#GetLastForegroundCaptureImageEx]], except that the last param is set to value 0 instead of 1.
No input, returns an output u8 bool and an s32.
     −
This loads data from state.
+
=== GetCallerAppletCaptureImageEx ===
 +
Takes a type-0x6 output buffer, returns an output u8 bool.
 +
 
 +
The buffer size must match 0x384000.
 +
 
 +
Calls the same internal func as [[#GetLastForegroundCaptureImageEx]], except that the last param is set to value 2 instead of 1.
   −
=== ReleaseLastApplicationCaptureSharedBuffer ===
+
=== TakeScreenShotOfOwnLayer ===
No input/output.
+
Takes an input u8 bool and a s32, no output.
   −
Depending on whether a state field is 0, this just returns an error or returns 0.
+
=== CopyBetweenCaptureBuffers ===
 +
Takes two input s32s, no output.
   −
=== AcquireLastForegroundCaptureSharedBuffer ===
+
=== AcquireLastApplicationCaptureBuffer ===
No input, returns an output u8 bool and an s32.
+
No input, returns an output handle.
   −
Calls the same func internally as [[#AcquireLastApplicationCaptureSharedBuffer]], except this passes value 1 for the last param instead of 0.
+
Stubbed, just returns an error.
   −
=== ReleaseLastForegroundCaptureSharedBuffer ===
+
=== ReleaseLastApplicationCaptureBuffer ===
 
No input/output.
 
No input/output.
   −
Calls the same func internally as [[#ReleaseLastApplicationCaptureSharedBuffer]], except this passes value 1 for the last param instead of 0.
+
Clears a state field if it's not already 0, returning an error otherwise. On newer sysvers: then a func is called which just returns 0, then this cmd returns 0.
   −
=== AcquireCallerAppletCaptureSharedBuffer ===
+
=== AcquireLastForegroundCaptureBuffer ===
No input, returns an output u8 bool and an s32.
+
No input, returns an output handle.
   −
Calls the same func internally as [[#AcquireLastApplicationCaptureSharedBuffer]], except this passes value 2 for the last param instead of 0.
+
Stubbed, just returns an error.
   −
=== ReleaseCallerAppletCaptureSharedBuffer ===
+
=== ReleaseLastForegroundCaptureBuffer ===
 
No input/output.
 
No input/output.
   −
Calls the same func internally as [[#ReleaseLastApplicationCaptureSharedBuffer]], except this passes value 2 for the last param instead of 0.
+
Same as [[#ReleaseLastApplicationCaptureBuffer]] except with a different state field + different input param for the called func.
   −
=== TakeScreenShotOfOwnLayerEx ===
+
=== AcquireCallerAppletCaptureBuffer ===
Takes two input u8 bools and a s32, no output.
+
No input, returns an output handle.
 +
 
 +
Stubbed, just returns an error.
 +
 
 +
=== ReleaseCallerAppletCaptureBuffer ===
 +
No input/output.
 +
 
 +
Same as [[#ReleaseLastApplicationCaptureBuffer]] except with a different state field + different input param for the called func.
 +
 
 +
=== AcquireLastApplicationCaptureBufferEx ===
 +
No input, returns an output TransferMemory handle and an output u8 bool.
   −
Calls the same func internally as [[#TakeScreenShotOfOwnLayer]], except the last bool param is the last cmd param bool instead of hard-coded 0. This flag indicates whether the screenshot should be taken Immediately.
+
The state field used by [[#ReleaseLastApplicationCaptureBuffer]] must be 0. Calls a func which just returns an error (this is only the case on newer sysvers), hence this cmd will just return that error. If that func would have returned successfully, the state field would be set to 1 and the cmd would return 0.
   −
== ISystemAppletControllerForDebug ==
+
On old sysvers, the output TransferMemory is size 0x384000 with permissions=RW.
{| class="wikitable" border="1"
  −
|-
  −
! Cmd || Name || Notes
  −
|-
  −
| 1 || RequestLaunchApplicationForDebug ||
  −
|-
  −
| 2 || [7.0.0+] GetDebugStorageChannel || No input, returns an output [[#IStorageChannel]].
  −
|-
  −
| 3 || [7.0.0+] CreateStorageForDebug || Takes a total of 8-bytes of input, returns an [[#IStorage]].
  −
|}
     −
== IProcessWindingController ==
+
=== AcquireLastForegroundCaptureBufferEx ===
{| class="wikitable" border="1"
+
No input, returns an output TransferMemory handle and an output u8 bool.
|-
  −
! Cmd || Name || Notes
  −
|-
  −
| 0 || [[#GetLaunchReason]] ||
  −
|-
  −
| 11 || [[#OpenCallingLibraryApplet]] ||
  −
|-
  −
| 21 || [[#PushContext]] ||
  −
|-
  −
| 22 || [[#PopContext]] ||
  −
|-
  −
| 23 || [[#CancelWindingReservation]] ||
  −
|-
  −
| 30 || [[#WindAndDoReserved]] ||
  −
|-
  −
| 40 || [[#ReserveToStartAndWaitAndUnwindThis]] ||
  −
|-
  −
| 41 || [4.0.0+] [[#ReserveToStartAndWait]] ||
  −
|}
     −
=== GetLaunchReason ===
+
Same as [[#AcquireLastApplicationCaptureBufferEx]] except this uses the [[#ReleaseLastForegroundCaptureBuffer]] state field, and uses a different input param value for the called func.
No input, returns an output [[#AppletProcessLaunchReason]].
     −
Used by LibraryApplets.
+
=== AcquireCallerAppletCaptureBufferEx ===
 +
No input, returns an output TransferMemory handle and an output u8 bool.
   −
=== OpenCallingLibraryApplet ===
+
Same as [[#AcquireLastApplicationCaptureBufferEx]] except this uses the [[#ReleaseCallerAppletCaptureBuffer]] state field, and uses a different input param value for the called func.
No input, returns an output [[#ILibraryAppletAccessor]].
     −
The objptr from state is cleared during this, an error is thrown if it's already 0.
+
=== ClearCaptureBuffer ===
 +
Takes an input u8 bool, an s32, and an u32, returns no output.
   −
=== PushContext ===
+
=== ClearAppletTransitionBuffer ===
Takes an input [[#IStorage]], no output.
+
Takes an input u32, no output.
   −
=== PopContext ===
+
=== AcquireLastApplicationCaptureSharedBuffer ===
No input, returns an output [[#IStorage]].
+
No input, returns an output u8 bool and an s32.
   −
=== CancelWindingReservation ===
+
This loads data from state.
 +
 
 +
=== ReleaseLastApplicationCaptureSharedBuffer ===
 +
No input/output.
 +
 
 +
Depending on whether a state field is 0, this just returns an error or returns 0.
 +
 
 +
=== AcquireLastForegroundCaptureSharedBuffer ===
 +
No input, returns an output u8 bool and an s32.
 +
 
 +
Calls the same func internally as [[#AcquireLastApplicationCaptureSharedBuffer]], except this passes value 1 for the last param instead of 0.
 +
 
 +
=== ReleaseLastForegroundCaptureSharedBuffer ===
 
No input/output.
 
No input/output.
   −
=== WindAndDoReserved ===
+
Calls the same func internally as [[#ReleaseLastApplicationCaptureSharedBuffer]], except this passes value 1 for the last param instead of 0.
 +
 
 +
=== AcquireCallerAppletCaptureSharedBuffer ===
 +
No input, returns an output u8 bool and an s32.
 +
 
 +
Calls the same func internally as [[#AcquireLastApplicationCaptureSharedBuffer]], except this passes value 2 for the last param instead of 0.
 +
 
 +
=== ReleaseCallerAppletCaptureSharedBuffer ===
 
No input/output.
 
No input/output.
   −
=== ReserveToStartAndWaitAndUnwindThis ===
+
Calls the same func internally as [[#ReleaseLastApplicationCaptureSharedBuffer]], except this passes value 2 for the last param instead of 0.
Takes an input [[#ILibraryAppletAccessor]], no output.
+
 
 +
=== TakeScreenShotOfOwnLayerEx ===
 +
Takes two input u8 bools and a s32, no output.
   −
=== ReserveToStartAndWait ===
+
Calls the same func internally as [[#TakeScreenShotOfOwnLayer]], except the last bool param is the last cmd param bool instead of hard-coded 0. This flag indicates whether the screenshot should be taken Immediately.
Takes an input [[#ILibraryAppletAccessor]], no output.
     −
== IDebugFunctions ==
+
== ISystemAppletControllerForDebug ==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 
|-
 
|-
| 0 || [[#NotifyMessageToHomeMenuForDebug]] ||
+
| 1 || RequestLaunchApplicationForDebug ||  
 
|-
 
|-
| 1 || [[#OpenMainApplication]] ||  
+
| 2 || [7.0.0+] GetDebugStorageChannel || No input, returns an output [[#IStorageChannel]].
 +
|-
 +
| 3 || [7.0.0+] CreateStorageForDebug || Takes a total of 8-bytes of input, returns an [[#IStorage]].
 +
|}
 +
 
 +
== IProcessWindingController ==
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name || Notes
 +
|-
 +
| 0 || [[#GetLaunchReason]] ||
 
|-
 
|-
| 10 || [[#PerformSystemButtonPressing]] ||
+
| 11 || [[#OpenCallingLibraryApplet]] ||
 +
|-
 +
| 21 || [[#PushContext]] ||
 +
|-
 +
| 22 || [[#PopContext]] ||  
 
|-
 
|-
| 20 || [[#InvalidateTransitionLayer]] ||
+
| 23 || [[#CancelWindingReservation]] ||
 
|-
 
|-
| 30 || [6.0.0+] [[#RequestLaunchApplicationWithUserAndArgumentForDebug]] ||
+
| 30 || [[#WindAndDoReserved]] ||
 
|-
 
|-
| 40 || [6.0.0+] [[#GetAppletResourceUsageInfo]] ||
+
| 40 || [[#ReserveToStartAndWaitAndUnwindThis]] ||  
 
|-
 
|-
| 100 || [7.0.0+] [[#SetCpuBoostModeForApplet]] ||
+
| 41 || [4.0.0+] [[#ReserveToStartAndWait]] ||
 
|}
 
|}
   −
=== NotifyMessageToHomeMenuForDebug ===
+
=== GetLaunchReason ===
Takes an input [[#AppletMessage]], no output.
+
No input, returns an output [[#AppletProcessLaunchReason]].
   −
Stubbed, just returns an error.
+
Used by LibraryApplets.
   −
=== OpenMainApplication ===
+
=== OpenCallingLibraryApplet ===
No input, returns an output [[#IApplicationAccessor]].
+
No input, returns an output [[#ILibraryAppletAccessor]].
   −
Should not be used when no Application is running (svcBreak).
+
The objptr from state is cleared during this, an error is thrown if it's already 0.
 +
 
 +
=== PushContext ===
 +
Takes an input [[#IStorage]], no output.
   −
=== PerformSystemButtonPressing ===
+
=== PopContext ===
Takes an input [[#SystemButtonType]], no output.
+
No input, returns an output [[#IStorage]].
   −
=== InvalidateTransitionLayer ===
+
=== CancelWindingReservation ===
 
No input/output.
 
No input/output.
   −
=== RequestLaunchApplicationWithUserAndArgumentForDebug ===
+
=== WindAndDoReserved ===
Takes an input u8 bool flag, an u64 Application titleID, a type-0x5 input buffer containing an array of u128 userIDs, and a type-0x5 input buffer, no output.
+
No input/output.
   −
Requests to launch the specified Application, with the specified users. When the bool flag is true, the content of the second input buffer is used to create a storage which is pushed to the UserChannel for this Application (see [[#LaunchParameterKind]]).
+
=== ReserveToStartAndWaitAndUnwindThis ===
 +
Takes an input [[#ILibraryAppletAccessor]], no output.
   −
=== GetAppletResourceUsageInfo ===
+
=== ReserveToStartAndWait ===
No input, returns an output [[#AppletResourceUsageInfo]].
+
Takes an input [[#ILibraryAppletAccessor]], no output.
   −
=== SetCpuBoostModeForApplet ===
+
== IDebugFunctions ==
Takes an input u32 '''CpuBoostMode''' (only modes 0 and 1 are valid) and passes it to [[PPC_services#apm:sys|SetCpuBoostMode]].
  −
 
  −
The cached value loaded from [[Settings_services#GetDebugModeFlag]] must be 1, otherwise an error is returned.
  −
 
  −
== IStorage ==
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 
|-
 
|-
| 0 || Open || No input. Returns an [[#IStorageAccessor]].
+
| 0 || [[#NotifyMessageToHomeMenuForDebug]] ||
 +
|-
 +
| 1 || [1.0.0-9.2.0] [[#OpenMainApplication]] ||
 +
|-
 +
| 10 || [[#PerformSystemButtonPressing]] ||
 
|-
 
|-
| 1 || [2.0.0+] OpenTransferStorage || No input. Returns an [[#ITransferStorageAccessor]].
+
| 20 || [[#InvalidateTransitionLayer]] ||
|}
+
|-
 
+
| 30 || [6.0.0+] [[#RequestLaunchApplicationWithUserAndArgumentForDebug]] ||
Open can only be used when the IStorage was created by [[#CreateStorage]] or [[#CreateTransferMemoryStorage]]. OpenTransferStorage can only be used when the IStorage was created by [[#CreateHandleStorage]].
+
|-
 
+
| 40 || [6.0.0+] [[#GetAppletResourceUsageInfo]] ||
Only 1 *Accessor session can be open for each IStorage at a time.
+
|-
 
+
| 100 || [7.0.0+] [[#SetCpuBoostModeForApplet]] ||
== IStorageAccessor ==
+
|-
{| class="wikitable" border="1"
+
| 101 || [10.0.0+] [[#CancelCpuBoostModeForApplet]] ||
 +
|-
 +
| 110 || [9.0.0+] [[#PushToAppletBoundChannelForDebug]] ||
 
|-
 
|-
! Cmd || Name || Notes
+
| 111 || [9.0.0+] [[#TryPopFromAppletBoundChannelForDebug]] ||
 
|-
 
|-
| 0 || GetSize || No input. Returns an s64.
+
| 120 || [9.0.0+] [[#AlarmSettingNotificationEnableAppEventReserve]] ||
 
|-
 
|-
| 10 || Write || Takes an input s64 and a type-0x21 input buffer.
+
| 121 || [9.0.0+] [[#AlarmSettingNotificationDisableAppEventReserve]] ||
 
|-
 
|-
| 11 || Read || Takes an input s64 and a type-0x22 output buffer.
+
| 122 || [9.0.0+] [[#AlarmSettingNotificationPushAppEventNotify]] ||
|}
  −
 
  −
== ITransferStorageAccessor ==
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Cmd || Name || Notes
+
| 130 || [9.0.0+] [[#FriendInvitationSetApplicationParameter]] ||
 
|-
 
|-
| 0 || GetSize || No input. Returns an output s64.
+
| 131 || [9.0.0+] [[#FriendInvitationClearApplicationParameter]] ||
 
|-
 
|-
| 1 || GetHandle || No input. Returns an output s64 and handle.
+
| 132 || [9.0.0+] [[#FriendInvitationPushApplicationParameter]] ||
 
|}
 
|}
   −
These commands return the data originally from [[#CreateHandleStorage]] input, both return the same s64.
+
=== NotifyMessageToHomeMenuForDebug ===
 +
Takes an input [[#AppletMessage]], no output.
   −
= appletOE =
+
Stubbed, just returns an error.
This is "nn::am::service::IApplicationProxyService".
     −
{| class="wikitable" border="1"
+
=== OpenMainApplication ===
|-
+
No input, returns an output [[#IApplicationAccessor]].
! Cmd || Name || Notes
+
 
|-
+
Should not be used when no Application is running (svcBreak).
| 0 || [[#OpenApplicationProxy]] ||
+
 
|}
+
=== PerformSystemButtonPressing ===
 +
Takes an input [[#SystemButtonType]], no output.
 +
 
 +
=== InvalidateTransitionLayer ===
 +
No input/output.
   −
This is used by all regular-applications, including [[flog]] and "Retail Interactive Display Menu". Only one session can be open for this service at a time.
+
=== RequestLaunchApplicationWithUserAndArgumentForDebug ===
 +
Takes an input u8 bool flag, an [[NCM_services#ApplicationId|ApplicationId]], a type-0x5 input buffer containing an array of u128 userIDs, and a type-0x5 input buffer, no output.
   −
== OpenApplicationProxy ==
+
Requests to launch the specified Application, with the specified users. When the bool flag is true, the content of the second input buffer is used to create a storage which is pushed to the UserChannel for this Application (see [[#LaunchParameterKind]]).
Returns an [[#IApplicationProxy]]. See [[#appletAE]].
     −
Takes a [[IPC_Marshalling|reserved]] input u64 (official user-processes use hard-coded value 0), a PID, and a process copy-handle (cur-proc handle alias).
+
=== GetAppletResourceUsageInfo ===
 +
No input, returns an output [[#AppletResourceUsageInfo]].
   −
On failure, official user-processes will retry using this command in a loop while the retval is 0x19280, with svcSleepThread(10000000) being called first.
+
=== SetCpuBoostModeForApplet ===
 +
Takes an input u32 '''CpuBoostMode''' (only modes 0 and 1 are valid) and passes it to [[PPC_services#apm:sys|SetCpuBoostMode]].
   −
= idle:sys =
+
The cached value loaded from [[Settings_services#GetDebugModeFlag]] must be 1, otherwise an error is returned.
This is "nn::idle::detail::IPolicyManagerSystem"
     −
{| class="wikitable" border="1"
+
=== CancelCpuBoostModeForApplet ===
|-
+
No input/output.
! Cmd || Name
+
 
|-
+
=== PushToAppletBoundChannelForDebug ===
| 0 || GetAutoPowerDownEvent
+
Takes an input [[#IStorage]] and a s32, no output.
|-
+
 
|rowspan="2"| 1 || [1.0.0-3.0.2]
+
The cached value loaded from [[Settings_services#GetDebugModeFlag]] must be 1, otherwise an error is returned.
|-
+
 
| [7.0.0+]
+
The s32 must match the value already stored in state when the state value is non-zero, otherwise an error is returned. When the state value is 0, the s32 is written into state. Then the input storage is pushed to the StorageChannel.
|-
+
 
| 2 || [1.0.0-3.0.2]
+
=== TryPopFromAppletBoundChannelForDebug ===
|-
+
Takes an input s32, returns an output [[#IStorage]].
| 3 || SetHandlingContext
+
 
|-
+
The cached value loaded from [[Settings_services#GetDebugModeFlag]] must be 1, otherwise an error is returned.
| 4 || LoadAndApplySettings
+
 
|-
+
The s32 must not be 0 and must match the value previously saved by [[#PushToAppletBoundChannelForDebug]], otherwise errors are returned. Then the output storage is popped from the StorageChannel.
| 5 || ReportUserIsActive
+
 
|}
+
=== AlarmSettingNotificationEnableAppEventReserve ===
 +
Takes an input [[#IStorage]] and an [[NCM_services#ApplicationId|ApplicationId]], no output.
 +
 
 +
Clears a StorageChannel, pushes the input storage there, and writes the ApplicationId into state.
 +
 
 +
=== AlarmSettingNotificationDisableAppEventReserve ===
 +
No input/output.
 +
 
 +
Clears the StorageChannel/saved-ApplicationId used by [[#AlarmSettingNotificationEnableAppEventReserve]].
 +
 
 +
=== AlarmSettingNotificationPushAppEventNotify ===
 +
Takes an input [[#IStorage]], no output.
 +
 
 +
Same as [[#PushToNotificationStorageChannel]] except this uses the MainApplication.
 +
 
 +
=== FriendInvitationSetApplicationParameter ===
 +
Takes an input [[#IStorage]] and an [[NCM_services#ApplicationId|ApplicationId]], no output.
 +
 
 +
Clears a StorageChannel, pushes the input storage there, and writes the ApplicationId into state.
 +
 
 +
=== FriendInvitationClearApplicationParameter ===
 +
No input/output.
   −
[3.0.0+] SetHandlingContext now takes an additional 0x10-bytes of input.
+
Clears the StorageChannel/saved-ApplicationId used by [[#FriendInvitationSetApplicationParameter]].
   −
= omm =
+
=== FriendInvitationPushApplicationParameter ===
This is "nn::omm::detail::IOperationModeManager"
+
Takes an input [[#IStorage]], no output.
   −
Operation Mode Manager (OMM) is a service responsible for arbitrating the operation changes between docked and handheld modes.
+
Same as [[#PushToFriendInvitationStorageChannel]] except this uses the MainApplication.
Besides [[PTM_services]], this is the only service that interacts with the [[Dock]] through [[USB_services|usb:pd*]].
      +
== IStorage ==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 
|-
 
|-
| 0 || GetOperationMode ||  
+
| 0 || Open || No input. Returns an [[#IStorageAccessor]].
 
|-
 
|-
| 1 || GetOperationModeChangeEvent ||  
+
| 1 || [2.0.0+] OpenTransferStorage || No input. Returns an [[#ITransferStorageAccessor]].
 +
|}
 +
 
 +
Open can only be used when the IStorage was created by [[#CreateStorage]] or [[#CreateTransferMemoryStorage]]. OpenTransferStorage can only be used when the IStorage was created by [[#CreateHandleStorage]].
 +
 
 +
Only 1 *Accessor session can be open for each IStorage at a time.
 +
 
 +
== IStorageAccessor ==
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 2 || EnableAudioVisual ||  
+
! Cmd || Name || Notes
 
|-
 
|-
| 3 || DisableAudioVisual ||  
+
| 0 || GetSize || No input. Returns an s64.
 
|-
 
|-
| 4 || EnterSleepAndWait ||  
+
| 10 || Write || Takes an input s64 and a type-0x21 input buffer.
 
|-
 
|-
| 5 || GetCradleStatus ||  
+
| 11 || Read || Takes an input s64 and a type-0x22 output buffer.
 +
|}
 +
 
 +
== ITransferStorageAccessor ==
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 6 || FadeInDisplay ||  
+
! Cmd || Name || Notes
 
|-
 
|-
| 7 || FadeOutDisplay ||  
+
| 0 || GetSize || No input. Returns an output s64.
 
|-
 
|-
| 8 || [2.0.0+] GetCradleFwVersion ||  
+
| 1 || GetHandle || No input. Returns an output s64 and handle.
 +
|}
 +
 
 +
These commands return the data originally from [[#CreateHandleStorage]] input, both return the same s64.
 +
 
 +
= appletOE =
 +
This is "nn::am::service::IApplicationProxyService".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 9 || [2.0.0+] NotifyCecSettingsChanged ||  
+
! Cmd || Name || Notes
 
|-
 
|-
| 10 || [3.0.0+] SetOperationModePolicy ||  
+
| 0 || [[#OpenApplicationProxy]] ||  
|-
+
|}
| 11 || [3.0.0+] GetDefaultDisplayResolution ||
+
 
|-
+
This is used by all regular-applications, including [[flog]] and "Retail Interactive Display Menu". Only one session can be open for this service at a time.
| 12 || [3.0.0+] GetDefaultDisplayResolutionChangeEvent ||  
+
 
 +
== OpenApplicationProxy ==
 +
Returns an [[#IApplicationProxy]]. See [[#appletAE]].
 +
 
 +
Takes a [[IPC_Marshalling|reserved]] input u64 (official user-processes use hard-coded value 0), a PID, and a process copy-handle (cur-proc handle alias).
 +
 
 +
On failure, official user-processes will retry using this command in a loop while the retval is 0x19280, with svcSleepThread(10000000) being called first.
 +
 
 +
= idle:sys =
 +
This is "nn::idle::detail::IPolicyManagerSystem"
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 13 || [3.0.0+] UpdateDefaultDisplayResolution ||  
+
! Cmd || Name
 
|-
 
|-
| 14 || [3.0.0+] ShouldSleepOnBoot ||  
+
| 0 || GetAutoPowerDownEvent
 
|-
 
|-
| 15 || [4.0.0+] NotifyHdcpApplicationExecutionStarted ||
+
|rowspan="2"| 1 || [1.0.0-3.0.2]
 
|-
 
|-
| 16 || [4.0.0+] NotifyHdcpApplicationExecutionFinished ||
+
| [7.0.0+] IsAutoPowerDownRequested
 
|-
 
|-
| 17 || [4.0.0+] NotifyHdcpApplicationDrawingStarted ||
+
| 2 || [1.0.0-3.0.2]
 
|-
 
|-
| 18 || [4.0.0+] NotifyHdcpApplicationDrawingFinished ||
+
| 3 || [[#SetHandlingContext]]
 
|-
 
|-
| 19 || [4.0.0+] GetHdcpAuthenticationFailedEvent ||  
+
| 4 || LoadAndApplySettings
 
|-
 
|-
| 20 || [4.0.0+] GetHdcpAuthenticationFailedEmulationEnabled ||
+
| 5 || ReportUserIsActive
|-
  −
| 21 || [4.0.0+] SetHdcpAuthenticationFailedEmulation ||
  −
|-
  −
| 22 || [4.0.0+] GetHdcpStateChangeEvent ||
  −
|-
  −
| 23 || [4.0.0+] GetHdcpState ||
  −
|-
  −
| 24 || [5.0.0+] ShowCardUpdateProcessing ||
  −
|-
  −
| 25 || [5.0.0+] SetApplicationCecSettingsAndNotifyChanged ||
  −
|-
  −
| 26 || [7.0.0+] ||  
   
|}
 
|}
   −
== Cmd26 ==
+
== SetHandlingContext ==
No input, returns an output u32.
+
[3.0.0+] Now takes an additional 0x10-bytes of input.
   −
This is used by [[#GetOperationModeSystemInfo]].
+
= omm =
 +
This is "nn::omm::detail::IOperationModeManager"
   −
= spsm =
+
Operation Mode Manager (OMM) is a service responsible for arbitrating the operation changes between docked and handheld modes.
This is "nn::spsm::detail::IPowerStateInterface".
+
Besides [[PTM_services|PTM]], this is the only service that interacts with the [[Dock]] through [[USB_services|usb:pd*]].
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 2,359: Line 2,604:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || GetState
+
| 0 || GetOperationMode
 +
|-
 +
| 1 || GetOperationModeChangeEvent
 
|-
 
|-
| 1 || SleepSystemAndWaitAwake
+
| 2 || EnableAudioVisual
 
|-
 
|-
| 2 ||  
+
| 3 || DisableAudioVisual
 
|-
 
|-
| 3 ||  
+
| 4 || EnterSleepAndWait
 
|-
 
|-
| 4 || GetNotificationMessageEventHandle
+
| 5 || GetCradleStatus
 
|-
 
|-
| 5 ||  
+
| 6 || FadeInDisplay
 
|-
 
|-
| 6 ||  
+
| 7 || FadeOutDisplay
 
|-
 
|-
| 7 ||  
+
| 8 || [2.0.0+] GetCradleFwVersion
 
|-
 
|-
| 8 || AnalyzePerformanceLogForLastSleepWakeSequence
+
| 9 || [2.0.0+] NotifyCecSettingsChanged
 
|-
 
|-
| 9 || ChangeHomeButtonLongPressingTime
+
| 10 || [3.0.0+] SetOperationModePolicy
 
|-
 
|-
| 10 ||  
+
| 11 || [3.0.0+] GetDefaultDisplayResolution
 
|-
 
|-
| 11 || [1.0.0-3.0.2]
+
| 12 || [3.0.0+] GetDefaultDisplayResolutionChangeEvent
|}
+
|-
 
+
| 13 || [3.0.0+] UpdateDefaultDisplayResolution
[3.0.0+] Cmd11 now takes a total of 8-bytes of input.
+
|-
 
+
| 14 || [3.0.0+] ShouldSleepOnBoot
= tcap =
+
|-
This is "nn::tcap::server::IManager".
+
| 15 || [4.0.0+] NotifyHdcpApplicationExecutionStarted
 
+
|-
{| class="wikitable" border="1"
+
| 16 || [4.0.0+] NotifyHdcpApplicationExecutionFinished
 +
|-
 +
| 17 || [4.0.0+] NotifyHdcpApplicationDrawingStarted
 +
|-
 +
| 18 || [4.0.0+] NotifyHdcpApplicationDrawingFinished
 +
|-
 +
| 19 || [4.0.0+] GetHdcpAuthenticationFailedEvent
 +
|-
 +
| 20 || [4.0.0+] GetHdcpAuthenticationFailedEmulationEnabled
 +
|-
 +
| 21 || [4.0.0+] SetHdcpAuthenticationFailedEmulation
 +
|-
 +
| 22 || [4.0.0+] GetHdcpStateChangeEvent
 +
|-
 +
| 23 || [4.0.0+] GetHdcpState
 
|-
 
|-
! Cmd || Name
+
| 24 || [5.0.0+] ShowCardUpdateProcessing
 
|-
 
|-
| 0 || GetContinuousHighSkinTemperatureEvent
+
| 25 || [5.0.0+] SetApplicationCecSettingsAndNotifyChanged
 
|-
 
|-
| 1 || SetOperationMode
+
| 26 || [7.0.0+] [[#GetOperationModeSystemInfo]]
 
|-
 
|-
| 2 || LoadAndApplySettings
+
| 27 || [9.0.0+] GetAppletFullAwakingSystemEvent
 
|}
 
|}
   −
= caps:su =
+
== GetOperationModeSystemInfo ==
This is "nn::capsrv::sf::IScreenShotApplicationService".
+
No input, returns an output u32.
   −
This was added with [[6.0.0]].
+
This is used by [[#GetOperationModeSystemInfo|ICommonStateGetter GetOperationModeSystemInfo]].
   −
This can be used by applications to save screenshots.
+
= spsm =
 +
This is "nn::spsm::detail::IPowerStateInterface".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Cmd || Name
 
|-
 
|-
| 32 || [7.0.0+] SetShimLibraryVersion || Takes a total of 0x10-bytes of input and a PID, no output.
+
| 0 || GetCurrentState
 
|-
 
|-
| 201 || SaveScreenShot ||  
+
| 1 || EnterSleep
 
|-
 
|-
| 203 || SaveScreenShotEx0 ||  
+
| 2 || GetLastWakeReason
 
|-
 
|-
| 205 || [8.0.0+] SaveScreenShotEx1 ||  
+
| 3 || Shutdown
 +
|-
 +
| 4 || GetNotificationMessageEventHandle
 +
|-
 +
| 5 || ReceiveNotificationMessage
 +
|-
 +
| 6 || AnalyzeLogForLastSleepWakeSequence
 +
|-
 +
| 7 || ResetEventLog
 +
|-
 +
| 8 || AnalyzePerformanceLogForLastSleepWakeSequence
 +
|-
 +
| 9 || ChangeHomeButtonLongPressingTime
 +
|-
 +
| 10 || PutErrorState
 
|-
 
|-
| 210 || SaveScreenShotEx2 || Takes a total of 0x50-bytes of input, a type-0x15 input buffer, and a type-0x45 input buffer. Returns a total of 0x20-bytes of output.
+
| 11 || [1.0.0-3.0.2] InvalidateCurrentHomeButtonPressing
 
|}
 
|}
   −
'''SetShimLibraryVersion''' is a wrapper for [[Capture_services|caps:c]] cmd33. Commands '''SaveScreenShot''', '''SaveScreenShotEx0''', '''SaveScreenShotEx1''' and '''SaveScreenShotEx2''' are wrappers for [[Display_services|caps:sc]] cmd210.
+
[3.0.0+] Cmd11 now takes a total of 8-bytes of input.
   −
== SaveScreenShot ==
+
= tcap =
Takes two input u32s, an u64 AppletResourceUserId, a PID, and a type-0x45 input buffer. Returns a 0x20-byte struct '''ApplicationAlbumEntry'''.
+
This is "nn::tcap::server::IManager".
   −
Official user-processes doesn't use this, instead [[#SaveScreenShotEx0]] is used: ScreenShotAttributeEx0 is all-zero except +0 is set to an input u32.
+
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || GetContinuousHighSkinTemperatureEvent
 +
|-
 +
| 1 || SetOperationMode
 +
|-
 +
| 2 || LoadAndApplySettings
 +
|}
   −
== SaveScreenShotEx0 ==
+
= caps:su =
Takes an input 0x40-byte struct '''ScreenShotAttributeEx0''', an input u32, an input u64 AppletResourceUserId, a PID, and a type-0x45 input buffer. Returns a 0x20-byte struct '''ApplicationAlbumEntry'''.
+
This is "nn::capsrv::sf::IScreenShotApplicationService".
   −
= Library Applets =
+
This was added with [[6.0.0]].
This section documents library applet launching.
     −
Before starting the applet, [[#IStorage]]s are [[#ILibraryAppletCreator|created]] and written, then passed to [[#ILibraryAppletAccessor]] PushInData. The [[#IStorage]] session is closed afterwards. The first [[#IStorage]] is [[#CommonArguments]], followed by any applet-specific [[#IStorage]]s.
+
This can be used by applications to save screenshots.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name || Notes
 +
|-
 +
| 32 || [7.0.0+] SetShimLibraryVersion || Takes a total of 0x10-bytes of input and a PID, no output.
 +
|-
 +
| 201 || SaveScreenShot ||
 +
|-
 +
| 203 || SaveScreenShotEx0 ||
 +
|-
 +
| 205 || [8.0.0+] SaveScreenShotEx1 ||
 +
|-
 +
| 210 || SaveScreenShotEx2 || Takes a total of 0x50-bytes of input, a type-0x15 input buffer, and a type-0x45 input buffer.  Returns a total of 0x20-bytes of output.
 +
|}
 +
 
 +
'''SetShimLibraryVersion''' is a wrapper for [[Capture_services|caps:c]] cmd33. Commands '''SaveScreenShot''', '''SaveScreenShotEx0''', '''SaveScreenShotEx1''' and '''SaveScreenShotEx2''' are wrappers for [[Display_services|caps:sc]] cmd210.
 +
 
 +
== SaveScreenShot ==
 +
Takes two input u32s, an u64 AppletResourceUserId, a PID, and a type-0x45 input buffer containing image data. Returns an [[Capture_services|ApplicationAlbumEntry]].
 +
 
 +
Official user-processes doesn't use this, instead [[#SaveScreenShotEx0]] is used: ScreenShotAttributeEx0 is all-zero, except +4 is set to an input u32 and u32 +0xC = 0x1.
 +
 
 +
This cmd internally uses an all-zero ScreenShotAttributeEx0, with u32 +0 = input u32 and u32 +0x8 = 0x3.
 +
 
 +
== SaveScreenShotEx0 ==
 +
Takes an input 0x40-byte struct '''ScreenShotAttributeEx0''', an input u32, an input u64 AppletResourceUserId, a PID, and a type-0x45 input buffer containing image data. Returns an [[Capture_services|ApplicationAlbumEntry]].
 +
 
 +
== SaveScreenShotEx1 ==
 +
Takes an input 0x40-byte struct '''ScreenShotAttributeEx0''', an input u32, an input u64 AppletResourceUserId, a PID, a type-0x15 input buffer containing an [[Capture_services|ApplicationData]], and a type-0x45 input buffer containing image data. Returns an [[Capture_services|ApplicationAlbumEntry]].
 +
 
 +
== SaveScreenShotEx2 ==
 +
Takes an input 0x40-byte struct '''ScreenShotAttributeEx0''', an input u32, an input u64 AppletResourceUserId, a type-0x15 input buffer containing an [[Capture_services|UserIdList]], and a type-0x45 input buffer containing image data. Returns an [[Capture_services|ApplicationAlbumEntry]].
 +
 
 +
= Library Applets =
 +
This section documents library applet launching.
 +
 
 +
Before starting the applet, [[#IStorage]]s are [[#ILibraryAppletCreator|created]] and written, then passed to [[#ILibraryAppletAccessor]] PushInData. The [[#IStorage]] session is closed afterwards. The first [[#IStorage]] is [[#CommonArguments]], followed by any applet-specific [[#IStorage]]s.
    
Once the applet finishes running successfully, [[#ILibraryAppletAccessor]] PopOutData can be used to get the applet-specific [[#IStorage]] containing the applet output data.
 
Once the applet finishes running successfully, [[#ILibraryAppletAccessor]] PopOutData can be used to get the applet-specific [[#IStorage]] containing the applet output data.
Line 2,470: Line 2,792:  
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! ID
+
! Id
! Title-id
+
! ProgramId
! Description
+
! Description
 
|-
 
|-
 
| 0x01
 
| 0x01
 
|  
 
|  
| Application. Not valid for use with LibraryApplets.
+
| Application (not valid for use with LibraryApplets)
 
|-
 
|-
 
| 0x02
 
| 0x02
 
| 010000000000100C
 
| 010000000000100C
| "overlayDisp"
+
| overlayDisp (OverlayApplet)
 
|-
 
|-
 
| 0x03
 
| 0x03
 
| 0100000000001000
 
| 0100000000001000
| "qlaunch"
+
| qlaunch (SystemAppletMenu)
 
|-
 
|-
 
| 0x04
 
| 0x04
 
| 0100000000001012
 
| 0100000000001012
| "starter"
+
| starter (DummyStarter)
 
|-
 
|-
 
| 0x0A
 
| 0x0A
 
| 0100000000001001
 
| 0100000000001001
| [[Auth_Applet|"auth"]]
+
| [[Auth_Applet|auth (LibraryAppletAuth)]]
 
|-
 
|-
 
| 0x0B
 
| 0x0B
 
| 0100000000001002
 
| 0100000000001002
| "cabinet"
+
| [[Cabinet_Applet|cabinet (LibraryAppletCabinet)]]
 
|-
 
|-
 
| 0x0C
 
| 0x0C
 
| 0100000000001003
 
| 0100000000001003
| "controller"
+
| [[Controller_Applet|controller (LibraryAppletController)]]
 
|-
 
|-
 
| 0x0D
 
| 0x0D
 
| 0100000000001004
 
| 0100000000001004
| "dataErase"
+
| dataErase (LibraryAppletDataErase)
 
|-
 
|-
 
| 0x0E
 
| 0x0E
 
| 0100000000001005
 
| 0100000000001005
| [[Error_Applet|"error"]]
+
| [[Error_Applet|error (LibraryAppletError)]]
 
|-
 
|-
 
| 0x0F
 
| 0x0F
 
| 0100000000001006
 
| 0100000000001006
| "netConnect"
+
| netConnect (LibraryAppletNetConnect)
 
|-
 
|-
 
| 0x10
 
| 0x10
 
| 0100000000001007
 
| 0100000000001007
| [[Profile_Selector|"playerSelect"]]
+
| [[Profile_Selector|playerSelect (LibraryAppletPlayerSelect)]]
 
|-
 
|-
 
| 0x11
 
| 0x11
 
| 0100000000001008
 
| 0100000000001008
| [[Software_Keyboard|"swkbd"]]
+
| [[Software_Keyboard|swkbd (LibraryAppletSwkbd)]]
 
|-
 
|-
 
| 0x12
 
| 0x12
 
| 0100000000001009
 
| 0100000000001009
| "miiEdit"
+
| [[MiiEdit_Applet|miiEdit (LibraryAppletMiiEdit)]]
 
|-
 
|-
 
| 0x13
 
| 0x13
 
| 010000000000100A
 
| 010000000000100A
| "LibAppletWeb" [[Internet_Browser#010000000000100A|WebApplet]] applet
+
| [[Internet_Browser#010000000000100A|web (LibraryAppletWeb)]]
 
|-
 
|-
 
| 0x14
 
| 0x14
 
| 010000000000100B
 
| 010000000000100B
| "LibAppletShop" [[Internet_Browser#ShopN|ShopN]] applet
+
| [[Internet_Browser#ShopN|shop (LibraryAppletShop)]]
 
|-
 
|-
 
| 0x15
 
| 0x15
 
| 010000000000100D
 
| 010000000000100D
| "photoViewer"
+
| [[Album_Applet|photoViewer (LibraryAppletPhotoViewer)]]
 
|-
 
|-
 
| 0x16
 
| 0x16
 
| 010000000000100E
 
| 010000000000100E
| "set"
+
| set (LibraryAppletSet)
 
|-
 
|-
 
| 0x17
 
| 0x17
 
| 010000000000100F
 
| 010000000000100F
| "LibAppletOff" [[Internet_Browser#Offline_Applet|Offline]] applet
+
| [[Internet_Browser#Offline_Applet|offlineWeb (LibraryAppletOfflineWeb)]]
 
|-
 
|-
 
| 0x18
 
| 0x18
 
| 0100000000001010
 
| 0100000000001010
| "LibAppletLns" [[Internet_Browser#Whitelisted_Applets|Whitelisted]] applet
+
| [[Internet_Browser#Whitelisted_Applets|loginShare (LibraryAppletLoginShare)]]
 
|-
 
|-
 
| 0x19
 
| 0x19
 
| 0100000000001011
 
| 0100000000001011
| "LibAppletAuth" [[Internet_Browser#WifiWebAuthApplet|WifiWebAuth]] applet
+
| [[Internet_Browser#WifiWebAuthApplet|wifiWebAuth (LibraryAppletWifiWebAuth)]]
 
|-
 
|-
 
| 0x1A
 
| 0x1A
 
| 0100000000001013
 
| 0100000000001013
| "myPage"
+
| [[MyPage_Applet|myPage (LibraryAppletMyPage)]]
|}
+
|-
 +
| 0x1B
 +
| 010000000000101A
 +
| gift (LibraryAppletGift)
 +
|-
 +
| 0x1C
 +
| 010000000000101C
 +
| userMigration (LibraryAppletUserMigration)
 +
|-
 +
| 0x1D
 +
| 010000000000101D
 +
| [9.0.0+] EncounterSys (LibraryAppletPreomiaSys)
 +
|-
 +
| 0x1E
 +
| 0100000000001020
 +
| [9.0.0+] story (LibraryAppletStory)
 +
|-
 +
| 0x1F
 +
| 010070000E3C0000
 +
| [9.0.0+] EncounterUsr (LibraryAppletPreomiaUsr)
 +
|-
 +
| 0x20
 +
| 010086000E49C000
 +
| [9.0.0+] EncounterUsrDummy (LibraryAppletPreomiaUsrDummy)
 +
|-
 +
| 0x21
 +
| 0100000000001038
 +
| [10.0.0+] sample (LibraryAppletSample)
 +
|-
 +
| 0x3F1
 +
| 010000000000D619
 +
| [10.0.0+]
 +
|-
 +
| 0x3F2
 +
| 010000000000D610
 +
| [10.0.0+]
 +
|-
 +
| 0x3F3
 +
| 010000000000D611
 +
| [10.0.0+]
 +
|-
 +
| 0x3F4
 +
| 010000000000D612
 +
| [10.0.0+]
 +
|-
 +
| 0x3F5
 +
| 010000000000D613
 +
| [10.0.0+]
 +
|-
 +
| 0x3F6
 +
| 010000000000D614
 +
| [10.0.0+]
 +
|-
 +
| 0x3F7
 +
| 010000000000D615
 +
| [10.0.0+]
 +
|-
 +
| 0x3F8
 +
| 010000000000D616
 +
| [10.0.0+]
 +
|-
 +
| 0x3F9
 +
| 010000000000D617
 +
| [10.0.0+]
 +
|-
 +
| 0x3FA
 +
| 010000000000D60A
 +
| [10.0.0+]
 +
|-
 +
| 0x3FB
 +
| 010000000000D60B
 +
| [10.0.0+]
 +
|-
 +
| 0x3FC
 +
| 010000000000D60C
 +
| [10.0.0+]
 +
|-
 +
| 0x3FD
 +
| 010000000000D60D
 +
| [10.0.0+]
 +
|-
 +
| 0x3FE
 +
| 010000000000D60E
 +
| [10.0.0+]
 +
|}
    
=== LibraryAppletMode ===
 
=== LibraryAppletMode ===
Line 2,688: Line 3,094:  
!  Description
 
!  Description
 
|-
 
|-
| 0 || u8 ProgramIndex. "ExecuteProgram". After using [[#ExecutProgram]] with this successfully, official user-processes will enter an infinite loop with sleep-thread value 86400000000000.
+
| 0 || u8 ProgramIndex. "ExecuteProgram". [[NS_Services|NS]] handles ProgramIndex by launching ApplicationId+ProgramIndex. After using [[#ExecuteProgram]] with this successfully, official user-processes will enter an infinite loop with sleep-thread value 86400000000000.
 
|-
 
|-
| 1 || u64 titleID. "JumpToSubApplicationProgramForDevelopment". Only available when [[Settings_services#GetDebugModeFlag|DebugMode]] is 1.
+
| 1 || [[NCM_services#ApplicationId|ApplicationId]]. "JumpToSubApplicationProgramForDevelopment". Only available when [[Settings_services#GetDebugModeFlag|DebugMode]] is 1.
 
|-
 
|-
 
| 2 || u64 = value 0. "RestartProgram"
 
| 2 || u64 = value 0. "RestartProgram"
Line 2,697: Line 3,103:     
This is "nn::am::service::ProgramSpecifyKind". This controls the type of the u64 passed to [[#ExecuteProgram]].
 
This is "nn::am::service::ProgramSpecifyKind". This controls the type of the u64 passed to [[#ExecuteProgram]].
 +
 +
ProgramIndex values where the title is not installed should not be used: [[qlaunch]] will display an error message and the current title will become "corrupted", however Home Menu will have an option to repair it.
 +
 +
= InputDetectionPolicy =
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Value
 +
!  Description
 +
|-
 +
| 0 || Unknown.
 +
|-
 +
| 1 || Unknown.
 +
|}
 +
 +
This is u32 enum "nn::applet::InputDetectionPolicy".
    
= AppletResourceUserId =
 
= AppletResourceUserId =
Line 2,753: Line 3,174:  
| 0x4 || 0x4 || Padding
 
| 0x4 || 0x4 || Padding
 
|-
 
|-
| 0x8 || 0x8 || titleID
+
| 0x8 || 0x8 || [[NCM_services#ApplicationId|ApplicationId]]
 
|}
 
|}
   Line 2,797: Line 3,218:  
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x8 || Application titleID.
+
| 0x0 || 0x8 || [[NCM_services#ApplicationId|ApplicationId]]
 
|-
 
|-
 
| 0x8 || 0x4 || Application title-version.
 
| 0x8 || 0x4 || Application title-version.
 
|-
 
|-
| 0xC || 0x1 || [[Filesystem_services#StorageId|StorageId]] for the Application base title.
+
| 0xC || 0x1 || [[Filesystem_services#StorageId|StorageId]] for the Application base title.
|-
+
|-
| 0xD || 0x1 || [[Filesystem_services#StorageId|StorageId]] for the Application update title.
+
| 0xD || 0x1 || [[Filesystem_services#StorageId|StorageId]] for the Application update title.
|-
+
|-
| 0xE || 0x1 || Unknown.
+
| 0xE || 0x1 || Unknown.
|-
+
|-
| 0xF || 0x1 || Padding.
+
| 0xF || 0x1 || Padding.
|}
+
|}
 
+
 
This struct is 0x10-bytes.
+
This struct is 0x10-bytes.
 +
 
 +
= ApplicationLaunchRequestInfo =
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || Unknown. The default is 0x0 with [[#CreateSystemApplication]], 0x3 with [[#CreateApplication]].
 +
|-
 +
| 0x4 || 0x4 || Unknown. The default is 0x0 with [[#CreateSystemApplication]], 0x3 with [[#CreateApplication]].
 +
|-
 +
| 0x8 || 0x8 || Unknown. The default is 0x0.
 +
|}
 +
 
 +
This struct is "nn::applet::ApplicationLaunchRequestInfo". This struct is 0x10-bytes.
 +
 
 +
= AppletResourceUsageInfo =
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || Unknown counter.
 +
|-
 +
| 0x4 || 0x4 || Unknown counter.
 +
|-
 +
| 0x8 || 0x4 || Output from [[NS_Services|NS GetRightsEnvironmentCountForDebug]].
 +
|-
 +
| 0xC || 0x14 || Always zero.
 +
|}
 +
 
 +
This struct is "nn::am::service::AppletResourceUsageInfo". This struct is 0x20-bytes.
   −
= ApplicationLaunchRequestInfo =
+
= ApplicationLicenseType =
{| class="wikitable" border="1"
+
This is "nn::oe::ApplicationLicenseType". This is 1-byte.
|-
  −
! Offset || Size || Description
  −
|-
  −
| 0x0 || 0x4 || Unknown.
  −
|-
  −
| 0x4 || 0x4 || Unknown.
  −
|-
  −
| 0x8 || 0x8 || Unknown.
  −
|}
     −
This struct is "nn::applet::ApplicationLaunchRequestInfo". This struct is 0x10-bytes.
+
= LaunchRequiredVersion =
 
+
This is "nn::oe::LaunchRequiredVersion". This is a 0x40-byte struct with 1-byte alignment.
= AppletResourceUsageInfo =
  −
{| class="wikitable" border="1"
  −
|-
  −
! Offset || Size || Description
  −
|-
  −
| 0x0 || 0x4 || Unknown counter.
  −
|-
  −
| 0x4 || 0x4 || Unknown counter.
  −
|-
  −
| 0x8 || 0x4 || Output from [[NS_Services|NS GetRightsEnvironmentCountForDebug]].
  −
|-
  −
| 0xC || 0x14 || Always zero.
  −
|}
  −
 
  −
This struct is "nn::am::service::AppletResourceUsageInfo". This struct is 0x20-bytes.
      
= Notes =
 
= Notes =

Navigation menu