Changes

Jump to navigation Jump to search
Line 65: Line 65:     
== ISystemAppletProxy ==
 
== ISystemAppletProxy ==
 +
This is "nn::am::service::ISystemAppletProxy".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 95: Line 97:     
=== IHomeMenuFunctions ===
 
=== IHomeMenuFunctions ===
 +
This is "nn::am::service::IHomeMenuFunctions".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 113: Line 117:  
| 31 || [2.0.0+] [[#GetWriterLockAccessorEx]]
 
| 31 || [2.0.0+] [[#GetWriterLockAccessorEx]]
 
|-
 
|-
| 40 || [11.0.0+] IsSleepEnabled
+
| 40 || [11.0.0+] [[#IsSleepEnabled]]
 +
|-
 +
| 41 || [12.0.0+] [[#IsRebootEnabled]]
 +
|-
 +
| 50 || [16.0.0+] [[#LaunchSystemApplet]]
 +
|-
 +
| 51 || [16.0.0+] [[#LaunchStarter]]
 
|-
 
|-
 
| 100 || [6.0.0+] [[#PopRequestLaunchApplicationForDebug]]
 
| 100 || [6.0.0+] [[#PopRequestLaunchApplicationForDebug]]
Line 121: Line 131:  
| 200 || [8.0.0+] [[#LaunchDevMenu]]
 
| 200 || [8.0.0+] [[#LaunchDevMenu]]
 
|-
 
|-
| 1000 || [11.0.0+] SetLastApplicationExitReason
+
| 1000 || [11.0.0+] [[#SetLastApplicationExitReason]]
 
|}
 
|}
   Line 148: Line 158:     
The input value must be 0-3. 0 = HomeButton.
 
The input value must be 0-3. 0 = HomeButton.
 +
 +
==== IsSleepEnabled ====
 +
No input, returns an output bool.
 +
 +
==== IsRebootEnabled ====
 +
No input, returns an output bool.
 +
 +
==== LaunchSystemApplet ====
 +
No input/output.
 +
 +
This wraps [[NS_Services|ns]] LaunchSystemApplet, ignoring the u64 returned by that cmd (and other functionality).
 +
 +
==== LaunchStarter ====
 +
No input/output.
 +
 +
This is similar to [[#LaunchSystemApplet]], except this uses [[NS_Services|ns]] LaunchLibraryApplet with a ProgramId from global state.
 +
 +
The global state field is initialized elsewhere with the value of [[System_Settings|system-setting]] <code>am.debug!starter_id</code>, defaulting to ProgramId 0100000000001012 ([[Title_list|starter]]) if not available.
    
==== PopRequestLaunchApplicationForDebug ====
 
==== PopRequestLaunchApplicationForDebug ====
Line 164: Line 192:  
The cached value loaded from [[Settings_services#GetDebugModeFlag]] must be 1, otherwise an error is returned.
 
The cached value loaded from [[Settings_services#GetDebugModeFlag]] must be 1, otherwise an error is returned.
   −
Uses [[NS_Services#IApplicationManagerInterface]] cmd99.
+
Uses [[NS_Services|ns]] LaunchDevMenu.
    
This is used by [[qlaunch]]. 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.
 +
 +
==== SetLastApplicationExitReason ====
 +
Takes an input s32, no output.
    
==== ILockAccessor ====
 
==== ILockAccessor ====
 +
This is "nn::am::service::ILockAccessor".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 199: Line 232:     
=== IGlobalStateController ===
 
=== IGlobalStateController ===
 +
This is "nn::am::service::IGlobalStateController".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Cmd || Name
 +
|-
 +
| 0 || [[#RequestToEnterSleep]]
 
|-
 
|-
| 0 || [[#RequestToEnterSleep]] ||
+
| 1 || [[#EnterSleep]]
 
|-
 
|-
| 1 || [[#EnterSleep]] ||
+
| 2 || [[#StartSleepSequence]]
 
|-
 
|-
| 2 || [[#StartSleepSequence]] ||
+
| 3 || [[#StartShutdownSequence]]
 
|-
 
|-
| 3 || [[#StartShutdownSequence]] ||
+
| 4 || [[#StartRebootSequence]]
 
|-
 
|-
| 4 || [[#StartRebootSequence]] ||
+
| 9 || [7.0.0+] [[#IsAutoPowerDownRequested]]
 
|-
 
|-
| 9 || [7.0.0+] [[#IsAutoPowerDownRequested]] ||
+
| 10 || [[#LoadAndApplyIdlePolicySettings]]
 
|-
 
|-
| 10 || [[#LoadAndApplyIdlePolicySettings]] ||
+
| 11 || [2.0.0+] [[#NotifyCecSettingsChanged]]
 
|-
 
|-
| 11 || [2.0.0+] [[#NotifyCecSettingsChanged]] ||
+
| 12 || [3.0.0+] [[#SetDefaultHomeButtonLongPressTime]]
 
|-
 
|-
| 12 || [3.0.0+] [[#SetDefaultHomeButtonLongPressTime]] ||
+
| 13 || [3.0.0+] [[#UpdateDefaultDisplayResolution]]
 
|-
 
|-
| 13 || [3.0.0+] [[#UpdateDefaultDisplayResolution]] ||
+
| 14 || [3.0.0+] [[#ShouldSleepOnBoot]]
 
|-
 
|-
| 14 || [3.0.0+] [[#ShouldSleepOnBoot]] ||
+
| 15 || [4.0.0+] [[#GetHdcpAuthenticationFailedEvent]]
 
|-
 
|-
| 15 || [4.0.0+] [[#GetHdcpAuthenticationFailedEvent]] ||
+
| 30 || [12.0.0+] [[#OpenCradleFirmwareUpdater]]
 
|}
 
|}
   Line 282: Line 319:  
Uses [[#omm]] cmd GetHdcpAuthenticationFailedEvent.
 
Uses [[#omm]] cmd GetHdcpAuthenticationFailedEvent.
   −
=== IApplicationCreator ===
+
==== OpenCradleFirmwareUpdater ====
 +
No input, returns an [[#ICradleFirmwareUpdater]].
 +
 
 +
=== ICradleFirmwareUpdater ===
 +
This is "nn::am::service::ICradleFirmwareUpdater".
 +
 
 +
This was added with [12.0.0+].
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Cmd || Name
 +
|-
 +
| 0 || StartUpdate
 +
|-
 +
| 1 || FinishUpdate
 
|-
 
|-
| 0 || [[#CreateApplication]] ||
+
| 2 || [[#GetCradleDeviceInfo]]
 
|-
 
|-
| 1 || [[#PopLaunchRequestedApplication]] ||  
+
| 3 || GetCradleDeviceInfoChangeEvent
 
|-
 
|-
| 10 || [[#CreateSystemApplication]] ||  
+
| 4 || GetUpdateProgressInfo
 
|-
 
|-
| 100 || [[#PopFloatingApplicationForDevelopment]] ||  
+
| 5 || GetLastInternalResult
 
|}
 
|}
   −
[[#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.
+
==== GetCradleDeviceInfo ====
 +
No input, returns a 8-byte CradleDeviceInfo.
   −
==== CreateApplication ====
+
[13.0.0+] Now returns a total of 0xC-bytes.
Takes an input [[NCM_services#ApplicationId|ApplicationId]], returns an [[#IApplicationAccessor]].
     −
==== PopLaunchRequestedApplication ====
+
=== IApplicationCreator ===
No input, returns an [[#IApplicationAccessor]].
+
This is "nn::am::service::IApplicationCreator".
   −
==== CreateSystemApplication ====
+
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || [[#CreateApplication]]
 +
|-
 +
| 1 || [[#PopLaunchRequestedApplication]]
 +
|-
 +
| 10 || [[#CreateSystemApplication]]
 +
|-
 +
| 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 ====
 +
Takes an input [[NCM_services#ApplicationId|ApplicationId]], returns an [[#IApplicationAccessor]].
 +
 
 +
==== PopLaunchRequestedApplication ====
 +
No input, returns an [[#IApplicationAccessor]].
 +
 
 +
==== CreateSystemApplication ====
 
Takes an input [[NCM_services#ApplicationId|SystemApplicationId]], returns an [[#IApplicationAccessor]].
 
Takes an input [[NCM_services#ApplicationId|SystemApplicationId]], returns an [[#IApplicationAccessor]].
   Line 315: Line 384:     
==== IApplicationAccessor ====
 
==== IApplicationAccessor ====
 +
This is "nn::am::service::IApplicationAccessor".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 457: Line 528:     
===== IAppletAccessor =====
 
===== IAppletAccessor =====
 +
This is "nn::am::service::IAppletAccessor".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 493: Line 566:     
== IAppletCommonFunctions ==
 
== IAppletCommonFunctions ==
Added with [[7.0.0]].
+
This is "nn::am::service::IAppletCommonFunctions".
 +
 
 +
This was added with [7.0.0+].
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 519: Line 594:  
| 52 || [10.0.0+] [[#IsHomeButtonShortPressedBlocked]]
 
| 52 || [10.0.0+] [[#IsHomeButtonShortPressedBlocked]]
 
|-
 
|-
| 60 || [11.0.0+] IsVrModeCurtainRequired
+
| 60 || [11.0.0+] [[#IsVrModeCurtainRequired]]
 
|-
 
|-
| 70 || [11.0.0+] SetCpuBoostRequestPriority
+
| 61 || [12.0.0+] IsSleepRequiredByHighTemperature
 +
|-
 +
| 62 || [12.0.0+] IsSleepRequiredByLowBattery
 +
|-
 +
| 70 || [11.0.0+] [[#SetCpuBoostRequestPriority]]
 +
|-
 +
| 80 || [14.0.0+] SetHandlingCaptureButtonShortPressedMessageEnabledForApplet
 +
|-
 +
| 81 || [14.0.0+] SetHandlingCaptureButtonLongPressedMessageEnabledForApplet
 +
|-
 +
| 82 || [18.0.0+]
 +
|-
 +
| 90 || [15.0.0+] OpenNamedChannelAsParent
 +
|-
 +
| 91 || [15.0.0+] OpenNamedChannelAsChild
 +
|-
 +
| 100 || [15.0.0+] SetApplicationCoreUsageMode
 +
|-
 +
| 160 || [18.0.0+]
 +
|-
 +
| 161 || [18.0.0+]
 +
|-
 +
| 300 || [17.0.0+]
 
|}
 
|}
   Line 560: Line 657:  
=== IsHomeButtonShortPressedBlocked ===
 
=== IsHomeButtonShortPressedBlocked ===
 
No input, returns an output u8 bool.
 
No input, returns an output u8 bool.
 +
 +
=== IsVrModeCurtainRequired ===
 +
No input, returns an output bool.
 +
 +
=== SetCpuBoostRequestPriority ===
 +
Takes an input s32, no output.
    
== ILibraryAppletProxy ==
 
== ILibraryAppletProxy ==
 +
This is "nn::am::service::ILibraryAppletProxy".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 583: Line 688:  
|-
 
|-
 
| 21 || [7.0.0+] GetAppletCommonFunctions || No input, returns an [[#IAppletCommonFunctions]].
 
| 21 || [7.0.0+] GetAppletCommonFunctions || No input, returns an [[#IAppletCommonFunctions]].
 +
|-
 +
| 22 || [15.0.0+] GetHomeMenuFunctions || No input, returns an [[#IHomeMenuFunctions]].
 +
|-
 +
| 23 || [15.0.0+] GetGlobalStateController || No input, returns an [[#IGlobalStateController]].
 
|-
 
|-
 
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]].
 
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]].
Line 588: Line 697:     
=== ILibraryAppletSelfAccessor ===
 
=== ILibraryAppletSelfAccessor ===
 +
This is "nn::am::service::ILibraryAppletSelfAccessor".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 661: Line 772:  
|-
 
|-
 
| 150 || [10.0.0+] [[#ShouldSetGpuTimeSliceManually]] ||
 
| 150 || [10.0.0+] [[#ShouldSetGpuTimeSliceManually]] ||
 +
|-
 +
| 160 || [17.0.0+] [[#Cmd160]] ||
 
|}
 
|}
   Line 793: Line 906:  
==== ShouldSetGpuTimeSliceManually ====
 
==== ShouldSetGpuTimeSliceManually ====
 
No input, returns an output u8 bool.
 
No input, returns an output u8 bool.
 +
 +
==== Cmd160 ====
 +
No input, returns an output u64. Currently always returns 0.
    
== IOverlayAppletProxy ==
 
== IOverlayAppletProxy ==
 +
This is "nn::am::service::IOverlayAppletProxy".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 816: Line 934:  
|-
 
|-
 
| 21 || [7.0.0+] GetAppletCommonFunctions || No input, returns an [[#IAppletCommonFunctions]].
 
| 21 || [7.0.0+] GetAppletCommonFunctions || No input, returns an [[#IAppletCommonFunctions]].
 +
|-
 +
| 23 || [15.0.0+] GetGlobalStateController || No input, returns an [[#IGlobalStateController]].
 
|-
 
|-
 
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]].
 
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]].
Line 821: Line 941:     
=== IOverlayFunctions ===
 
=== IOverlayFunctions ===
 +
This is "nn::am::service::IOverlayFunctions".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 844: Line 966:  
|-
 
|-
 
| 20 || [8.0.0+] [[#SetHandlingHomeButtonShortPressedEnabled]]
 
| 20 || [8.0.0+] [[#SetHandlingHomeButtonShortPressedEnabled]]
 +
|-
 +
| 21 || [14.0.0+] SetHandlingTouchScreenInputEnabled
 
|-
 
|-
 
| 30 || [9.0.0+] [[#SetHealthWarningShowingState]]
 
| 30 || [9.0.0+] [[#SetHealthWarningShowingState]]
 
|-
 
|-
 
| 31 || [10.0.0+] [[#IsHealthWarningRequired]]
 
| 31 || [10.0.0+] [[#IsHealthWarningRequired]]
 +
|-
 +
| 40 || [18.0.0+]
 +
|-
 +
| 41 || [18.0.0+]
 
|-
 
|-
 
| 90 || [7.0.0+] [[#SetRequiresGpuResourceUse]]
 
| 90 || [7.0.0+] [[#SetRequiresGpuResourceUse]]
Line 913: Line 1,041:     
== IApplicationProxy ==
 
== IApplicationProxy ==
 +
This is "nn::am::service::IApplicationProxy".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 937: Line 1,067:     
=== IApplicationFunctions ===
 
=== IApplicationFunctions ===
 +
This is "nn::am::service::IApplicationFunctions".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Cmd || Name
 +
|-
 +
| 1 || [[#PopLaunchParameter]]
 +
|-
 +
| 10 || [[#CreateApplicationAndPushAndRequestToStart]]
 
|-
 
|-
| 1 || [[#PopLaunchParameter]] ||
+
| 11 || [3.0.0+] [[#CreateApplicationAndPushAndRequestToStartForQuest]]
 
|-
 
|-
| 10 || [[#CreateApplicationAndPushAndRequestToStart]] ||
+
| 12 || [4.0.0+] [[#CreateApplicationAndRequestToStart]]
 
|-
 
|-
| 11 || [3.0.0+] [[#CreateApplicationAndPushAndRequestToStartForQuest]] ||
+
| 13 || [4.0.0+] [[#CreateApplicationAndRequestToStartForQuest]]
 
|-
 
|-
| 12 || [4.0.0+] [[#CreateApplicationAndRequestToStart]] ||
+
| 14 || [7.0.0+] [[#CreateApplicationWithAttributeAndPushAndRequestToStartForQuest]]
 
|-
 
|-
| 13 || [4.0.0+] [[#CreateApplicationAndRequestToStartForQuest]] ||
+
| 15 || [7.0.0+] [[#CreateApplicationWithAttributeAndRequestToStartForQuest]]
 
|-
 
|-
| 14 || [7.0.0+] [[#CreateApplicationWithAttributeAndPushAndRequestToStartForQuest]] ||
+
| 20 || [[#EnsureSaveData]]
 
|-
 
|-
| 15 || [7.0.0+] [[#CreateApplicationWithAttributeAndRequestToStartForQuest]] ||
+
| 21 || [[#GetDesiredLanguage]]
 
|-
 
|-
| 20 || [[#EnsureSaveData]] ||
+
| 22 || [[#SetTerminateResult]]
 
|-
 
|-
| 21 || [[#GetDesiredLanguage]] ||
+
| 23 || [[#GetDisplayVersion]]
 
|-
 
|-
| 22 || [[#SetTerminateResult]] ||
+
| 24 || [2.0.0+] [[#GetLaunchStorageInfoForDebug]]
 
|-
 
|-
| 23 || [[#GetDisplayVersion]] ||
+
| 25 || [3.0.0+] ExtendSaveData
 
|-
 
|-
| 24 || [2.0.0+] [[#GetLaunchStorageInfoForDebug]] ||
+
| 26 || [3.0.0+] GetSaveDataSize
 
|-
 
|-
| 25 || [3.0.0+] ExtendSaveData ||
+
| 27 || [5.0.0+] CreateCacheStorage
 
|-
 
|-
| 26 || [3.0.0+] GetSaveDataSize ||
+
| 28 || [11.0.0+] [[#GetSaveDataSizeMax]]
 
|-
 
|-
| 27 || [5.0.0+] CreateCacheStorage ||
+
| 29 || [11.0.0+] [[#GetCacheStorageMax]]
 
|-
 
|-
| 28 || [11.0.0+] ||
+
| 30 || [[#BeginBlockingHomeButtonShortAndLongPressed]]
 
|-
 
|-
| 29 || [11.0.0+] ||
+
| 31 || [[#EndBlockingHomeButtonShortAndLongPressed]]
 
|-
 
|-
| 35 || [11.0.0+] ||
+
| 32 || [[#BeginBlockingHomeButton]]
 
|-
 
|-
| 30 || [[#BeginBlockingHomeButtonShortAndLongPressed]] ||
+
| 33 || [[#EndBlockingHomeButton]]
 
|-
 
|-
| 31 || [[#EndBlockingHomeButtonShortAndLongPressed]] ||
+
| 34 || [10.0.0-15.0.1] [[#SelectApplicationLicense]]
 
|-
 
|-
| 32 || [[#BeginBlockingHomeButton]] ||
+
| 35 || [11.0.0+] [[#GetDeviceSaveDataSizeMax]]
 
|-
 
|-
| 33 || [[#EndBlockingHomeButton]] ||
+
| 36 || [14.0.0+] GetLimitedApplicationLicense
 
|-
 
|-
| 34 || [10.0.0+] [[#SelectApplicationLicense]] ||
+
| 37 || [14.0.0+] GetLimitedApplicationLicenseUpgradableEvent
 
|-
 
|-
| 40 || [[#NotifyRunning]] ||
+
| 40 || [[#NotifyRunning]]
 
|-
 
|-
| 50 || [2.0.0+] [[#GetPseudoDeviceId]] ||
+
| 50 || [2.0.0+] [[#GetPseudoDeviceId]]
 
|-
 
|-
| 60 || [2.0.0+] [[#SetMediaPlaybackStateForApplication]] ||
+
| 60 || [2.0.0+] [[#SetMediaPlaybackStateForApplication]]
 
|-
 
|-
| 65 || [3.0.0+] [[#IsGamePlayRecordingSupported]] ||
+
| 65 || [3.0.0+] [[#IsGamePlayRecordingSupported]]
 
|-
 
|-
| 66 || [3.0.0+] [[#InitializeGamePlayRecording]] ||
+
| 66 || [3.0.0+] [[#InitializeGamePlayRecording]]
 
|-
 
|-
| 67 || [3.0.0+] [[#SetGamePlayRecordingState]] ||
+
| 67 || [3.0.0+] [[#SetGamePlayRecordingState]]
 
|-
 
|-
| 68 || [4.0.0+] [[#RequestFlushGamePlayingMovieForDebug]] ||
+
| 68 || [4.0.0+] [[#RequestFlushGamePlayingMovieForDebug]]
 
|-
 
|-
| 70 || [3.0.0+] [[#RequestToShutdown]] ||
+
| 70 || [3.0.0+] [[#RequestToShutdown]]
 
|-
 
|-
| 71 || [3.0.0+] [[#RequestToReboot]] ||
+
| 71 || [3.0.0+] [[#RequestToReboot]]
 
|-
 
|-
| 72 || [10.0.0+] [[#RequestToSleep]] ||
+
| 72 || [10.0.0+] [[#RequestToSleep]]
 
|-
 
|-
| 80 || [4.0.0+] [[#ExitAndRequestToShowThanksMessage]] ||
+
| 80 || [4.0.0+] [[#ExitAndRequestToShowThanksMessage]]
 
|-
 
|-
| 90 || [4.0.0+] [[#EnableApplicationCrashReport]] ||
+
| 90 || [4.0.0+] [[#EnableApplicationCrashReport]]
 
|-
 
|-
| 100 || [5.0.0+] [[#InitializeApplicationCopyrightFrameBuffer]] ||
+
| 100 || [5.0.0+] [[#InitializeApplicationCopyrightFrameBuffer]]  
 
|-
 
|-
| 101 || [5.0.0+] [[#SetApplicationCopyrightImage]] ||
+
| 101 || [5.0.0+] [[#SetApplicationCopyrightImage]]
 
|-
 
|-
| 102 || [5.0.0+] [[#SetApplicationCopyrightVisibility]] ||
+
| 102 || [5.0.0+] [[#SetApplicationCopyrightVisibility]]
 
|-
 
|-
| 110 || [5.0.0+] [[#QueryApplicationPlayStatistics]] ||
+
| 110 || [5.0.0+] [[#QueryApplicationPlayStatistics]]
 
|-
 
|-
| 111 || [6.0.0+] [[#QueryApplicationPlayStatisticsByUid]] ||
+
| 111 || [6.0.0+] [[#QueryApplicationPlayStatisticsByUid]]
 
|-
 
|-
| 120 || [5.0.0+] [[#ExecuteProgram]] ||
+
| 120 || [5.0.0+] [[#ExecuteProgram]]
 
|-
 
|-
| 121 || [5.0.0+] [[#ClearUserChannel]] ||
+
| 121 || [5.0.0+] [[#ClearUserChannel]]
 
|-
 
|-
| 122 || [5.0.0+] [[#UnpopToUserChannel]] ||
+
| 122 || [5.0.0+] [[#UnpopToUserChannel]]
 
|-
 
|-
| 123 || [5.0.0+] [[#GetPreviousProgramIndex]] ||
+
| 123 || [5.0.0+] [[#GetPreviousProgramIndex]]
 
|-
 
|-
| 124 || [6.0.0+] [[#EnableApplicationAllThreadDumpOnCrash]] ||
+
| 124 || [6.0.0+] [[#EnableApplicationAllThreadDumpOnCrash]]
 
|-
 
|-
| 130 || [8.0.0+] [[#GetGpuErrorDetectedSystemEvent]] ||
+
| 130 || [8.0.0+] [[#GetGpuErrorDetectedSystemEvent]]
 
|-
 
|-
| 131 || [11.0.0+] ||
+
| 131 || [11.0.0+] [[#SetDelayTimeToAbortOnGpuError]]
 
|-
 
|-
| 140 || [9.0.0+] [[#GetFriendInvitationStorageChannelEvent]] ||
+
| 140 || [9.0.0+] [[#GetFriendInvitationStorageChannelEvent]]
 
|-
 
|-
| 141 || [9.0.0+] [[#TryPopFromFriendInvitationStorageChannel]] ||
+
| 141 || [9.0.0+] [[#TryPopFromFriendInvitationStorageChannel]]  
 
|-
 
|-
| 150 || [9.0.0+] [[#GetNotificationStorageChannelEvent]] ||
+
| 150 || [9.0.0+] [[#GetNotificationStorageChannelEvent]]
 
|-
 
|-
| 151 || [9.0.0+] [[#TryPopFromNotificationStorageChannel]] ||
+
| 151 || [9.0.0+] [[#TryPopFromNotificationStorageChannel]]
 
|-
 
|-
| 160 || [9.0.0+] [[#GetHealthWarningDisappearedSystemEvent]] ||
+
| 160 || [9.0.0+] [[#GetHealthWarningDisappearedSystemEvent]]
 
|-
 
|-
| 170 || [9.0.0+] [[#SetHdcpAuthenticationActivated]] ||
+
| 170 || [9.0.0+] [[#SetHdcpAuthenticationActivated]]
 
|-
 
|-
| 180 || [10.1.0+] [[#GetLaunchRequiredVersion]] ||
+
| 180 || [10.1.0+] [[#GetLaunchRequiredVersion]]
 
|-
 
|-
| 181 || [10.1.0+] [[#UpgradeLaunchRequiredVersion]] ||
+
| 181 || [10.1.0+] [[#UpgradeLaunchRequiredVersion]]
 
|-
 
|-
| 190 || [11.0.0+] ||
+
| 190 || [11.0.0+] [[#SendServerMaintenanceOverlayNotification]]
 
|-
 
|-
| 200 || [11.0.0+] ||
+
| 200 || [11.0.0+] [[#GetLastApplicationExitReason]]
 
|-
 
|-
| 500 || [5.0.0+] [[#StartContinuousRecordingFlushForDebug]] ||
+
| 500 || [5.0.0+] [[#StartContinuousRecordingFlushForDebug]]
 
|-
 
|-
| 1000 || [5.0.0+] [[#CreateMovieMaker]] ||
+
| 1000 || [5.0.0+] [[#CreateMovieMaker]]
 
|-
 
|-
| 1001 || [5.0.0+] [[#PrepareForJit]] ||
+
| 1001 || [5.0.0+] [[#PrepareForJit]]
 
|}
 
|}
   Line 1,126: Line 1,262:     
This returns two u8s loaded from state, these are the same StorageIds from [[#ApplicationLaunchProperty]].
 
This returns two u8s loaded from state, these are the same StorageIds from [[#ApplicationLaunchProperty]].
 +
 +
==== GetSaveDataSizeMax ====
 +
No input, returns two ouput s64s.
 +
 +
==== GetCacheStorageMax ====
 +
No input, returns an output s32 and s64.
    
==== BeginBlockingHomeButtonShortAndLongPressed ====
 
==== BeginBlockingHomeButtonShortAndLongPressed ====
Line 1,147: Line 1,289:  
==== SelectApplicationLicense ====
 
==== SelectApplicationLicense ====
 
Takes an input array of [[#ApplicationLicenseType]], returns an output [[#ApplicationLicenseType]].
 
Takes an input array of [[#ApplicationLicenseType]], returns an output [[#ApplicationLicenseType]].
 +
 +
==== GetDeviceSaveDataSizeMax ====
 +
No input, returns two output s64s.
    
==== NotifyRunning ====
 
==== NotifyRunning ====
Line 1,204: Line 1,349:     
User-processes create the tmem with an user-specified buffer with permissions=0. '''width''' = 1280 and '''height''' = 720.
 
User-processes create the tmem with an user-specified buffer with permissions=0. '''width''' = 1280 and '''height''' = 720.
 +
 +
After the validation checks pass the input is passed to [[OMM_services|ommdisp]] cmd500.
    
This is used as an overlay for screenshots.
 
This is used as an overlay for screenshots.
    
==== SetApplicationCopyrightImage ====
 
==== SetApplicationCopyrightImage ====
Takes a type-0x45 input buffer, an s32 '''x''', an s32 '''y''', an s32 '''width''', an s32 '''height''', an s32 '''WindowOriginMode''', and no output.
+
Takes a type-0x45 input buffer, an s32 '''x''', an s32 '''y''', an s32 '''width''', an s32 '''height''', an s32 [[#WindowOriginMode]], and no output.
 
  −
The last s32 is "nn::oe::WindowOriginMode". This should be at least 1.
      
'''x''' and '''y''' must not have the negative bit set. '''width''' and '''height''' must not be <1.
 
'''x''' and '''y''' must not have the negative bit set. '''width''' and '''height''' must not be <1.
Line 1,261: Line 1,406:  
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 separate 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 Abort.
 +
 
 +
==== SetDelayTimeToAbortOnGpuError ====
 +
Takes an input s64 "nn::TimeSpan", no output.
    
==== GetFriendInvitationStorageChannelEvent ====
 
==== GetFriendInvitationStorageChannelEvent ====
Line 1,302: Line 1,450:     
sdknso passes hard-coded value 0 for the u64.
 
sdknso passes hard-coded value 0 for the u64.
 +
 +
==== SendServerMaintenanceOverlayNotification ====
 +
Takes two input [[PCV_services#PosixTime|PosixTime]], no output.
 +
 +
The second input value can optionally be 0.
 +
 +
==== GetLastApplicationExitReason ====
 +
No input, returns an output s32.
    
==== StartContinuousRecordingFlushForDebug ====
 
==== StartContinuousRecordingFlushForDebug ====
Line 1,316: Line 1,472:     
==== PrepareForJit ====
 
==== PrepareForJit ====
Takes no input. Launches the [[JIT_services|jit-sysmodule]] if it has not already been launched for the current application, storing a std::shared_ptr<> for jit-sysmodule process tracking object as an IApplicationFunctions member.
+
Takes no input. Launches the [[JIT_services|jit-sysmodule]] via [[NS_Services|ns]] LaunchLibraryApplet if it has not already been launched for the current application, storing a std::shared_ptr<> for jit-sysmodule process tracking object as an IApplicationFunctions member.
    
~IApplicationFunctions() includes:
 
~IApplicationFunctions() includes:
Line 1,326: Line 1,482:     
Thus the lifetime of the jit sysmodule is tied to the application which uses it, and each application gets its own fresh copy of the jit sysmodule.
 
Thus the lifetime of the jit sysmodule is tied to the application which uses it, and each application gets its own fresh copy of the jit sysmodule.
 +
 +
AM can also optionally launch jit-sysmodule automatically if the [[NACP]] enables it.
    
=== IMovieMaker ===
 
=== IMovieMaker ===
 +
This is "nn::am::service::IMovieMaker".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,344: Line 1,504:     
== ILibraryAppletCreator ==
 
== ILibraryAppletCreator ==
 +
This is "nn::am::service::ILibraryAppletCreator".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,396: Line 1,558:     
=== ILibraryAppletAccessor ===
 
=== ILibraryAppletAccessor ===
 +
This is "nn::am::service::ILibraryAppletAccessor".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,488: Line 1,652:     
== ICommonStateGetter ==
 
== ICommonStateGetter ==
 +
This is "nn::am::service::ICommonStateGetter".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Cmd || Name
 +
|-
 +
| 0 || [[#GetEventHandle]]
 +
|-
 +
| 1 || [[#ReceiveMessage]]
 +
|-
 +
| 2 || [[#GetThisAppletKind]]
 +
|-
 +
| 3 || [[#AllowToEnterSleep]]
 +
|-
 +
| 4 || [[#DisallowToEnterSleep]]
 
|-
 
|-
| 0 || [[#GetEventHandle]] ||
+
| 5 || [[#GetOperationMode]]
 
|-
 
|-
| 1 || [[#ReceiveMessage]] ||
+
| 6 || [[#GetPerformanceMode]]
 
|-
 
|-
| 2 || [[#GetThisAppletKind]] ||
+
| 7 || [[#GetCradleStatus]]
 
|-
 
|-
| 3 || [[#AllowToEnterSleep]] ||
+
| 8 || [[#GetBootMode]]
 
|-
 
|-
| 4 || [[#DisallowToEnterSleep]] ||
+
| 9 || [[#GetCurrentFocusState]]
 
|-
 
|-
| 5 || [[#GetOperationMode]] ||
+
| 10 || [[#RequestToAcquireSleepLock]]
 
|-
 
|-
| 6 || [[#GetPerformanceMode]] ||
+
| 11 || [[#ReleaseSleepLock]]
 
|-
 
|-
| 7 || [[#GetCradleStatus]] ||
+
| 12 || [[#ReleaseSleepLockTransiently]]
 
|-
 
|-
| 8 || [[#GetBootMode]] ||
+
| 13 || [[#GetAcquiredSleepLockEvent]]
 
|-
 
|-
| 9 || [[#GetCurrentFocusState]] ||
+
| 14 || [11.0.0+] [[#GetWakeupCount]]
 
|-
 
|-
| 10 || [[#RequestToAcquireSleepLock]] ||
+
| 20 || [[#PushToGeneralChannel]]
 
|-
 
|-
| 11 || [[#ReleaseSleepLock]] ||
+
| 30 || [[#GetHomeButtonReaderLockAccessor]]
 
|-
 
|-
| 12 || [[#ReleaseSleepLockTransiently]] ||
+
| 31 || [2.0.0+] [[#GetReaderLockAccessorEx]]
 
|-
 
|-
| 13 || [[#GetAcquiredSleepLockEvent]] ||
+
| 32 || [7.0.0+] [[#GetWriterLockAccessorEx]]
 
|-
 
|-
| 14 || [11.0.0+] ||
+
| 40 || [2.0.0+] [[#GetCradleFwVersion]]
 
|-
 
|-
| 20 || [[#PushToGeneralChannel]] ||
+
| 50 || [3.0.0+] [[#IsVrModeEnabled]]
 
|-
 
|-
| 30 || [[#GetHomeButtonReaderLockAccessor]] ||
+
| 51 || [3.0.0+] [[#SetVrModeEnabled]]
 
|-
 
|-
| 31 || [2.0.0+] [[#GetReaderLockAccessorEx]] ||
+
| 52 || [4.0.0+] [[#SetLcdBacklighOffEnabled]]
 
|-
 
|-
| 32 || [7.0.0+] [[#GetWriterLockAccessorEx]] ||
+
| 53 || [7.0.0+] [[#BeginVrModeEx]]
 
|-
 
|-
| 40 || [2.0.0+] [[#GetCradleFwVersion]] ||
+
| 54 || [7.0.0+] [[#EndVrModeEx]]
 
|-
 
|-
| 50 || [3.0.0+] [[#IsVrModeEnabled]] ||
+
| 55 || [3.0.0+] [[#IsInControllerFirmwareUpdateSection]]
 
|-
 
|-
| 51 || [3.0.0+] [[#SetVrModeEnabled]] ||
+
| 59 || [11.0.0+] [[#SetVrPositionForDebug]]
 
|-
 
|-
| 52 || [4.0.0+] [[#SetLcdBacklighOffEnabled]] ||
+
| 60 || [3.0.0+] [[#GetDefaultDisplayResolution]]
 
|-
 
|-
| 53 || [7.0.0+] [[#BeginVrModeEx]] ||
+
| 61 || [3.0.0+] [[#GetDefaultDisplayResolutionChangeEvent]]
 
|-
 
|-
| 54 || [7.0.0+] [[#EndVrModeEx]] ||
+
| 62 || [4.0.0+] [[#GetHdcpAuthenticationState]]
 
|-
 
|-
| 55 || [3.0.0+] [[#IsInControllerFirmwareUpdateSection]] ||
+
| 63 || [4.0.0+] [[#GetHdcpAuthenticationStateChangeEvent]]
 
|-
 
|-
| 59 || [11.0.0+] ||
+
| 64 || [5.0.0+] [[#SetTvPowerStateMatchingMode]]
 
|-
 
|-
| 60 || [3.0.0+] [[#GetDefaultDisplayResolution]] ||
+
| 65 || [5.1.0+] [[#GetApplicationIdByContentActionName]]
 
|-
 
|-
| 61 || [3.0.0+] [[#GetDefaultDisplayResolutionChangeEvent]] ||
+
| 66 || [6.0.0+] [[#SetCpuBoostMode]]
 
|-
 
|-
| 62 || [4.0.0+] [[#GetHdcpAuthenticationState]] ||
+
| 67 || [10.0.0+] [[#CancelCpuBoostMode]]
 
|-
 
|-
| 63 || [4.0.0+] [[#GetHdcpAuthenticationStateChangeEvent]] ||
+
| 68 || [11.0.0+] [[#GetBuiltInDisplayType]]
 
|-
 
|-
| 64 || [5.0.0+] [[#SetTvPowerStateMatchingMode]] ||
+
| 80 || [6.0.0+] [[#PerformSystemButtonPressingIfInFocus]]
 
|-
 
|-
| 65 || [5.1.0+] [[#GetApplicationIdByContentActionName]] ||
+
| 90 || [7.0.0+] [[#SetPerformanceConfigurationChangedNotification]]
 
|-
 
|-
| 66 || [6.0.0+] [[#SetCpuBoostMode]] ||
+
| 91 || [7.0.0+] [[#GetCurrentPerformanceConfiguration]]
 
|-
 
|-
| 67 || [10.0.0+] [[#CancelCpuBoostMode]] ||
+
| 100 || [9.1.0+] [[#SetHandlingHomeButtonShortPressedEnabled]]
 
|-
 
|-
| 68 || [11.0.0+] ||
+
| 110 || [11.0.0+] [[#OpenMyGpuErrorHandler]]
 
|-
 
|-
| 80 || [6.0.0+] [[#PerformSystemButtonPressingIfInFocus]] ||
+
| 120 || [13.0.0+] GetAppletLaunchedHistory
 
|-
 
|-
| 90 || [7.0.0+] [[#SetPerformanceConfigurationChangedNotification]] ||
+
| 200 || [7.0.0+] [[#GetOperationModeSystemInfo]]
 
|-
 
|-
| 91 || [7.0.0+] [[#GetCurrentPerformanceConfiguration]] ||
+
| 300 || [9.0.0+] [[#GetSettingsPlatformRegion]]
 
|-
 
|-
| 100 || [9.1.0+] [[#SetHandlingHomeButtonShortPressedEnabled]] ||
+
| 400 || [10.0.0+] [[#ActivateMigrationService]]
 
|-
 
|-
| 110 || [11.0.0+] || No input, returns an [[#IUnknown]].
+
| 401 || [10.0.0+] [[#DeactivateMigrationService]]
 
|-
 
|-
| 200 || [7.0.0+] [[#GetOperationModeSystemInfo]] ||
+
| 500 || [11.0.0+] [[#DisableSleepTillShutdown]]
 
|-
 
|-
| 300 || [9.0.0+] [[#GetSettingsPlatformRegion]] ||
+
| 501 || [11.0.0+] [[#SuppressDisablingSleepTemporarily]]
 
|-
 
|-
| 400 || [10.0.0+] [[#ActivateMigrationService]] ||
+
| 502 || [12.0.0+] IsSleepEnabled
 
|-
 
|-
| 401 || [10.0.0+] [[#DeactivateMigrationService]] ||
+
| 503 || [12.0.0+] IsDisablingSleepSuppressed
 
|-
 
|-
| 500 || [11.0.0+] ||
+
| 600 || [17.0.0+] OpenNamedChannelAsChild
 
|-
 
|-
| 501 || [11.0.0+] ||
+
| 900 || [11.0.0+] [[#SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled]]
 
|-
 
|-
| 900 || [11.0.0+] ||
+
| 910 || [17.0.0+] GetLaunchRequiredTick
 
|}
 
|}
   Line 1,618: Line 1,794:     
=== GetPerformanceMode ===
 
=== GetPerformanceMode ===
No input. Returns an output u32 for the current PerformanceMode.
+
No input. Returns an output u32 for the current [[#PerformanceMode]].
    
=== GetCradleStatus ===
 
=== GetCradleStatus ===
Line 1,631: Line 1,807:     
=== GetCurrentFocusState ===
 
=== GetCurrentFocusState ===
No input. Returns an output u8:
+
No input. Returns an output u8 [[#FocusState]].
 
  −
* 1: In focus.
  −
* 2/3: Out of focus(running in "background").
      
=== RequestToAcquireSleepLock ===
 
=== RequestToAcquireSleepLock ===
Line 1,647: Line 1,820:  
=== GetAcquiredSleepLockEvent ===
 
=== GetAcquiredSleepLockEvent ===
 
No input, returns an output Event handle with autoclear=false.
 
No input, returns an output Event handle with autoclear=false.
 +
 +
=== GetWakeupCount ===
 +
No input, returns an output u64.
    
=== PushToGeneralChannel ===
 
=== PushToGeneralChannel ===
Line 1,704: Line 1,880:  
=== IsInControllerFirmwareUpdateSection ===
 
=== IsInControllerFirmwareUpdateSection ===
 
No input, returns an output u8 bool.
 
No input, returns an output u8 bool.
 +
 +
=== SetVrPositionForDebug ===
 +
Takes 4 input s32s, no output.
 +
 +
The s32s are: x, y, width, height.
 +
 +
The cached value loaded from [[Settings_services#GetDebugModeFlag]] must be 1, otherwise an error is returned.
 +
 +
width must be 1-1280, height must be 1-720.
 +
 +
x and y must not be negative. x+width must be <=1280. y+height must be <=720.
    
=== GetDefaultDisplayResolution ===
 
=== GetDefaultDisplayResolution ===
Line 1,726: Line 1,913:     
=== SetCpuBoostMode ===
 
=== SetCpuBoostMode ===
Takes an input u32 '''CpuBoostMode''' (only modes 0 and 1 are valid) and passes it to [[PPC_services#apm:sys|SetCpuBoostMode]].
+
Takes an input u32 [[#CpuBoostMode]] and passes it to [[PPC_services#apm:sys|SetCpuBoostMode]].
    
=== CancelCpuBoostMode ===
 
=== CancelCpuBoostMode ===
 
No input/output.
 
No input/output.
 +
 +
=== GetBuiltInDisplayType ===
 +
No input, returns an output s32.
 +
 +
This is not exposed by sdknso.
 +
 +
This loads a s32 index from global state (originates from [[SPL_services#GetConfig|GetConfig]] [[SMC#HardwareType|HardwareType]]), Aborts if it's out-of-bounds, then the following is returned for the output s32: global_array[loaded_index].
    
=== PerformSystemButtonPressingIfInFocus ===
 
=== PerformSystemButtonPressingIfInFocus ===
Line 1,741: Line 1,935:  
=== GetCurrentPerformanceConfiguration ===
 
=== GetCurrentPerformanceConfiguration ===
 
No input, returns the result of calling [[PPC_services#apm:sys|GetCurrentPerformanceConfiguration]].
 
No input, returns the result of calling [[PPC_services#apm:sys|GetCurrentPerformanceConfiguration]].
 +
 +
=== OpenMyGpuErrorHandler ===
 +
No input, returns an [[#IGpuErrorHandler]].
 +
 +
The cached value loaded from [[Settings_services#GetDebugModeFlag]] must be 1, otherwise an error is returned.
    
=== GetOperationModeSystemInfo ===
 
=== GetOperationModeSystemInfo ===
Line 1,754: Line 1,953:  
=== ActivateMigrationService ===
 
=== ActivateMigrationService ===
 
No input/output.
 
No input/output.
 +
 +
Besides various other functionality, if required this eventually uses [[NS_Services|ns]] LaunchLibraryApplet to launch [[Migration_services|migration]].
    
=== DeactivateMigrationService ===
 
=== DeactivateMigrationService ===
 
No input/output.
 
No input/output.
   −
=== IUnknown ===
+
=== DisableSleepTillShutdown ===
 +
No input/output.
 +
 
 +
=== SuppressDisablingSleepTemporarily ===
 +
Takes an input u64 "nn::TimeSpanType", no output.
 +
 
 +
=== SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled ===
 +
No input/output.
 +
 
 +
=== IGpuErrorHandler ===
 +
This is "nn::am::service::IGpuErrorHandler".
 +
 
 
This was added with [11.0.0+].
 
This was added with [11.0.0+].
 +
 +
This uses various [[NV_services#nvgem:cd|nvgem:cd]] commands.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,765: Line 1,979:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 100 ||  
+
| 100 || [[#GetManualGpuErrorInfoSize]]
 
|-
 
|-
| 101 ||  
+
| 101 || [[#GetManualGpuErrorInfo]]
 
|-
 
|-
| 102 ||  
+
| 102 || [[#GetManualGpuErrorDetectionSystemEvent]]
 
|-
 
|-
| 103 ||  
+
| 103 || [[#FinishManualGpuErrorHandling]]
 
|}
 
|}
 +
 +
==== GetManualGpuErrorInfoSize ====
 +
No input, returns an output u64.
 +
 +
==== GetManualGpuErrorInfo ====
 +
Takes a type-0x6 output buffer, returns an output u64.
 +
 +
The OutBuffer_size must be >= the output size from [[#GetManualGpuErrorInfoSize]].
 +
 +
sdknso exposes the buffer as <code>void*</code>.
 +
 +
==== GetManualGpuErrorDetectionSystemEvent ====
 +
No input, returns an output Event handle with EventClearMode=0.
 +
 +
==== FinishManualGpuErrorHandling ====
 +
No input/output.
    
== ISelfController ==
 
== ISelfController ==
 +
This is "nn::am::service::ISelfController".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,812: Line 2,044:  
|-
 
|-
 
| 20 || [4.0.0+] [[#SetDesirableKeyboardLayout]]
 
| 20 || [4.0.0+] [[#SetDesirableKeyboardLayout]]
 +
|-
 +
| 21 || [13.0.0+] GetScreenShotProgramId
 
|-
 
|-
 
| 40 || [[#CreateManagedDisplayLayer]]
 
| 40 || [[#CreateManagedDisplayLayer]]
Line 1,824: Line 2,058:  
|-
 
|-
 
| 45 || [10.0.0+] [[#SetManagedDisplayLayerSeparationMode]]
 
| 45 || [10.0.0+] [[#SetManagedDisplayLayerSeparationMode]]
 +
|-
 +
| 46 || [13.0.0+] [[#SetRecordingLayerCompositionEnabled]]
 
|-
 
|-
 
| 50 || [[#SetHandlesRequestToDisplay]]
 
| 50 || [[#SetHandlesRequestToDisplay]]
Line 1,865: Line 2,101:  
| 110 || [8.0.0+] [[#SetApplicationAlbumUserData]]
 
| 110 || [8.0.0+] [[#SetApplicationAlbumUserData]]
 
|-
 
|-
| 120 || [11.0.0+]
+
| 120 || [11.0.0+] [[#SaveCurrentScreenshot]]
 +
|-
 +
| 130 || [13.0.0+] [[#SetRecordVolumeMuted]]
 
|-
 
|-
 
| 1000 || [7.0.0+] [[#GetDebugStorageChannel]]
 
| 1000 || [7.0.0+] [[#GetDebugStorageChannel]]
Line 1,988: Line 2,226:     
The input u32 must be 0-1.
 
The input u32 must be 0-1.
 +
 +
=== SetRecordingLayerCompositionEnabled ===
 +
Takes an input bool, no output.
    
=== SetHandlesRequestToDisplay ===
 
=== SetHandlesRequestToDisplay ===
Line 2,059: Line 2,300:     
=== SetWirelessPriorityMode ===
 
=== SetWirelessPriorityMode ===
Takes an input s32 enum '''WirelessPriorityMode''', no output.
+
Takes an input s32 [[#WirelessPriorityMode]], no output.
 
  −
The input value must be 1 or 2.
      
=== GetAccumulatedSuspendedTickValue ===
 
=== GetAccumulatedSuspendedTickValue ===
Line 2,084: Line 2,323:     
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.
 
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.
 +
 +
=== SaveCurrentScreenshot ===
 +
Takes an input s32 [[Capture_services#AlbumReportOption|AlbumReportOption]], no output.
 +
 +
sdknso exposes this under "nn::album::".
 +
 +
=== SetRecordVolumeMuted ===
 +
Takes an input bool, no output.
    
=== GetDebugStorageChannel ===
 
=== GetDebugStorageChannel ===
Line 2,091: Line 2,338:     
== IStorageChannel ==
 
== IStorageChannel ==
Added with [[7.0.0]].
+
This is "nn::am::service::IStorageChannel".
 +
 
 +
This was added with [7.0.0+].
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 2,109: Line 2,358:     
== IWindowController ==
 
== IWindowController ==
 +
This is "nn::am::service::IWindowController".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 2,165: Line 2,416:     
== IAudioController ==
 
== IAudioController ==
 +
This is "nn::am::service::IAudioController".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 2,200: Line 2,453:     
== IDisplayController ==
 
== IDisplayController ==
 +
This is "nn::am::service::IDisplayController".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 2,357: Line 2,612:     
=== ClearCaptureBuffer ===
 
=== ClearCaptureBuffer ===
Takes an input u8 bool, an s32, and an u32, returns no output.
+
Takes an input u8 bool, a s32 CaptureSharedBuffer, and an u32 color, returns no output.
 +
 
 +
Clear the input CaptureSharedBuffer with the specified RGBA8 color.
    
=== ClearAppletTransitionBuffer ===
 
=== ClearAppletTransitionBuffer ===
 
Takes an input u32, no output.
 
Takes an input u32, no output.
 +
 +
Clear the AppletTransitionBuffer with the specified RGBA8 color.
    
=== AcquireLastApplicationCaptureSharedBuffer ===
 
=== AcquireLastApplicationCaptureSharedBuffer ===
Line 2,398: Line 2,657:     
== ISystemAppletControllerForDebug ==
 
== ISystemAppletControllerForDebug ==
 +
This is "nn::am::service::ISystemAppletControllerForDebug".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Cmd || Name
 +
|-
 +
| 1 || RequestLaunchApplicationForDebug
 
|-
 
|-
| 1 || RequestLaunchApplicationForDebug ||  
+
| 2 || [7.0.0+] [[#GetDebugStorageChannel]]
 
|-
 
|-
| 2 || [7.0.0+] GetDebugStorageChannel || No input, returns an output [[#IStorageChannel]].
+
| 3 || [7.0.0+] [[#CreateStorageForDebug]]
 
|-
 
|-
| 3 || [7.0.0+] CreateStorageForDebug || Takes a total of 8-bytes of input, returns an [[#IStorage]].
+
| 4 || [12.0.0+] [[#CreateCradleFirmwareUpdaterForDebug]]
 
|}
 
|}
 +
 +
=== GetDebugStorageChannel ===
 +
No input. Returns an output [[#IStorageChannel]].
 +
 +
=== CreateStorageForDebug ===
 +
Takes a total of 8-bytes of input. Returns an [[#IStorage]].
 +
 +
=== CreateCradleFirmwareUpdaterForDebug ===
 +
No input. Returns an [[#ICradleFirmwareUpdater]].
    
== IProcessWindingController ==
 
== IProcessWindingController ==
 +
This is "nn::am::service::IProcessWindingController".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 2,460: Line 2,734:     
== IDebugFunctions ==
 
== IDebugFunctions ==
 +
This is "nn::am::service::IDebugFunctions".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Cmd || Name
 +
|-
 +
| 0 || [[#NotifyMessageToHomeMenuForDebug]]
 +
|-
 +
| 1 || [1.0.0-9.2.0] [[#OpenMainApplication]]
 +
|-
 +
| 10 || [[#PerformSystemButtonPressing]]
 +
|-
 +
| 20 || [[#InvalidateTransitionLayer]]
 +
|-
 +
| 30 || [6.0.0+] [[#RequestLaunchApplicationWithUserAndArgumentForDebug]]
 +
|-
 +
| 31 || [12.0.0+] RequestLaunchApplicationByApplicationLaunchInfoForDebug
 +
|-
 +
| 40 || [6.0.0+] [[#GetAppletResourceUsageInfo]]
 +
|-
 +
| 50 || [15.0.0+] AddSystemProgramIdAndAppletIdForDebug
 +
|-
 +
| 51 || [16.0.0+] AddOperationConfirmedLibraryAppletIdForDebug
 +
|-
 +
| 52 || [17.0.0+] GetProgramIdFromAppletIdForDebug
 +
|-
 +
| 53 || [18.0.0+]
 +
|-
 +
| 100 || [7.0.0+] [[#SetCpuBoostModeForApplet]]
 
|-
 
|-
| 0 || [[#NotifyMessageToHomeMenuForDebug]] ||
+
| 101 || [10.0.0+] [[#CancelCpuBoostModeForApplet]]
 
|-
 
|-
| 1 || [1.0.0-9.2.0] [[#OpenMainApplication]] ||
+
| 110 || [9.0.0+] [[#PushToAppletBoundChannelForDebug]]
 
|-
 
|-
| 10 || [[#PerformSystemButtonPressing]] ||
+
| 111 || [9.0.0+] [[#TryPopFromAppletBoundChannelForDebug]]
 
|-
 
|-
| 20 || [[#InvalidateTransitionLayer]] ||
+
| 120 || [9.0.0+] [[#AlarmSettingNotificationEnableAppEventReserve]]
 
|-
 
|-
| 30 || [6.0.0+] [[#RequestLaunchApplicationWithUserAndArgumentForDebug]] ||
+
| 121 || [9.0.0+] [[#AlarmSettingNotificationDisableAppEventReserve]]
 
|-
 
|-
| 40 || [6.0.0+] [[#GetAppletResourceUsageInfo]] ||
+
| 122 || [9.0.0+] [[#AlarmSettingNotificationPushAppEventNotify]]
 
|-
 
|-
| 100 || [7.0.0+] [[#SetCpuBoostModeForApplet]] ||
+
| 130 || [9.0.0+] [[#FriendInvitationSetApplicationParameter]]
 
|-
 
|-
| 101 || [10.0.0+] [[#CancelCpuBoostModeForApplet]] ||
+
| 131 || [9.0.0+] [[#FriendInvitationClearApplicationParameter]]
 
|-
 
|-
| 110 || [9.0.0+] [[#PushToAppletBoundChannelForDebug]] ||
+
| 132 || [9.0.0+] [[#FriendInvitationPushApplicationParameter]]
 
|-
 
|-
| 111 || [9.0.0+] [[#TryPopFromAppletBoundChannelForDebug]] ||
+
| 140 || [14.0.0+] RestrictPowerOperationForSecureLaunchModeForDebug
 
|-
 
|-
| 120 || [9.0.0+] [[#AlarmSettingNotificationEnableAppEventReserve]] ||
+
| 200 || [15.0.0+] CreateFloatingLibraryAppletAccepterForDebug
 
|-
 
|-
| 121 || [9.0.0+] [[#AlarmSettingNotificationDisableAppEventReserve]] ||
+
| 300 || [16.0.0+] TerminateAllRunningApplicationsForDebug
 
|-
 
|-
| 122 || [9.0.0+] [[#AlarmSettingNotificationPushAppEventNotify]] ||
+
| 410 || [18.0.0+]  
 
|-
 
|-
| 130 || [9.0.0+] [[#FriendInvitationSetApplicationParameter]] ||
+
| 411 || [18.0.0+]  
 
|-
 
|-
| 131 || [9.0.0+] [[#FriendInvitationClearApplicationParameter]] ||
+
| 412 || [18.0.0+]  
 
|-
 
|-
| 132 || [9.0.0+] [[#FriendInvitationPushApplicationParameter]] ||
+
| 900 || [12.0.0+] GetGrcProcessLaunchedSystemEvent
 
|}
 
|}
   Line 2,522: Line 2,822:     
=== SetCpuBoostModeForApplet ===
 
=== SetCpuBoostModeForApplet ===
Takes an input u32 '''CpuBoostMode''' (only modes 0 and 1 are valid) and passes it to [[PPC_services#apm:sys|SetCpuBoostMode]].
+
Takes an input u32 [[#CpuBoostMode]] 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.
 
The cached value loaded from [[Settings_services#GetDebugModeFlag]] must be 1, otherwise an error is returned.
Line 2,574: Line 2,874:     
== IStorage ==
 
== IStorage ==
 +
This is "nn::am::service::IStorage".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 2,588: Line 2,890:     
== IStorageAccessor ==
 
== IStorageAccessor ==
 +
This is "nn::am::service::IStorageAccessor".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 2,600: Line 2,904:     
== ITransferStorageAccessor ==
 
== ITransferStorageAccessor ==
 +
This is "nn::am::service::ITransferStorageAccessor".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 2,632: Line 2,938:  
= idle:sys =
 
= idle:sys =
 
This is "nn::idle::detail::IPolicyManagerSystem"
 
This is "nn::idle::detail::IPolicyManagerSystem"
 +
 +
This was moved to [[OMM_services|omm]] with [14.0.0+].
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 2,639: Line 2,947:  
| 0 || GetAutoPowerDownEvent
 
| 0 || GetAutoPowerDownEvent
 
|-
 
|-
|rowspan="2"| 1 || [1.0.0-3.0.2]
+
| 1 || [7.0.0+] IsAutoPowerDownRequested ([1.0.0-3.0.2] )
|-
  −
| [7.0.0+] IsAutoPowerDownRequested
   
|-
 
|-
 
| 2 || [1.0.0-3.0.2]
 
| 2 || [1.0.0-3.0.2]
Line 2,654: Line 2,960:  
== SetHandlingContext ==
 
== SetHandlingContext ==
 
[3.0.0+] Now takes an additional 0x10-bytes of input.
 
[3.0.0+] Now takes an additional 0x10-bytes of input.
 +
 +
[13.0.0+] Total input size is now 0x30 instead of 0x38.
    
= omm =
 
= omm =
Line 2,660: Line 2,968:  
Operation Mode Manager (OMM) is a service responsible for arbitrating the operation changes between docked and handheld modes.
 
Operation Mode Manager (OMM) is a service responsible for arbitrating the operation changes between docked and handheld modes.
 
Besides [[PTM_services|PTM]], this is the only service that interacts with the [[Dock]] through [[USB_services|usb:pd*]].
 
Besides [[PTM_services|PTM]], this is the only service that interacts with the [[Dock]] through [[USB_services|usb:pd*]].
 +
 +
This was moved to [[OMM_services|omm]] with [14.0.0+].
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 2,720: Line 3,030:  
|-
 
|-
 
| 27 || [9.0.0+] GetAppletFullAwakingSystemEvent
 
| 27 || [9.0.0+] GetAppletFullAwakingSystemEvent
 +
|-
 +
| 28 || [12.0.0+] [[#CreateCradleFirmwareUpdater]]
 
|}
 
|}
   Line 2,726: Line 3,038:     
This is used by [[#GetOperationModeSystemInfo|ICommonStateGetter GetOperationModeSystemInfo]].
 
This is used by [[#GetOperationModeSystemInfo|ICommonStateGetter GetOperationModeSystemInfo]].
 +
 +
== CreateCradleFirmwareUpdater ==
 +
No input. Returns an [[#ICradleFirmwareUpdater]].
 +
 +
== ICradleFirmwareUpdater ==
 +
This is "nn::am::service::ICradleFirmwareUpdater".
 +
 +
This was added with [12.0.0+].
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || Start
 +
|-
 +
| 1 || Finish
 +
|-
 +
| 2 || GetUpdateDeviceStatus
 +
|-
 +
| 3 || GetUpdateProgress
 +
|-
 +
| 4 || GetUpdateDeviceStatusChangeEvent
 +
|-
 +
| 5 || GetUpdateProgress2
 +
|}
    
= spsm =
 
= spsm =
 
This is "nn::spsm::detail::IPowerStateInterface".
 
This is "nn::spsm::detail::IPowerStateInterface".
 +
 +
This was moved to [[OMM_services|omm]] with [14.0.0+].
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 2,780: Line 3,119:  
This is "nn::capsrv::sf::IScreenShotApplicationService".
 
This is "nn::capsrv::sf::IScreenShotApplicationService".
   −
This was added with [[6.0.0]].
+
This was added with [6.0.0+].
    
This can be used by applications to save screenshots.
 
This can be used by applications to save screenshots.
Line 2,817: Line 3,156:  
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]].
 
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 =
+
= apm =
This section documents library applet launching.
+
This is "nn::am::service::IApmManager".
 
  −
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.
  −
 
  −
== CommonArguments ==
  −
The first [[#CreateStorage|IStorage]] passed to applets should contain the common library applet arguments. This is populated by <code>nn::la::CommonArgumentsWriter</code> and has the following format.
     −
This struct is 0x20-bytes.
+
This was added with [8.0.0+].
 
  −
Official sw handles the first 8-bytes separately, which is a header. With CommonArguments version 0x0, the header is 4-bytes, while starting with version 0x1 it's 8-bytes.
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Offset || Size || Typical Value || Notes
+
! Cmd || Name
 
|-
 
|-
| 0x0 || 4 || 1 || Common Arguments version
+
| 0 || [[#OpenSession]]
 +
|-
 +
| 1 || GetPerformanceMode
 +
|-
 +
| 6 || [7.0.0+] [[#IsCpuOverclockEnabled]]
 +
|}
 +
 
 +
== OpenSession ==
 +
Returns an [[#ISession]].
 +
 
 +
== IsCpuOverclockEnabled ==
 +
No input, returns an output u8 bool.
 +
 
 +
== ISession ==
 +
This is "nn::am::service::IApmSession".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || SetPerformanceConfiguration
 +
|-
 +
| 1 || GetPerformanceConfiguration
 +
|-
 +
| 2 || [8.0.0+] SetCpuOverclockEnabled
 +
|}
 +
 
 +
= 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.
 +
 
 +
== CommonArguments ==
 +
The first [[#CreateStorage|IStorage]] passed to applets should contain the common library applet arguments. This is populated by <code>nn::la::CommonArgumentsWriter</code> and has the following format.
 +
 
 +
This struct is 0x20-bytes.
 +
 
 +
Official sw handles the first 8-bytes separately, which is a header. With CommonArguments version 0x0, the header is 4-bytes, while starting with version 0x1 it's 8-bytes.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Typical Value || Notes
 +
|-
 +
| 0x0 || 4 || 1 || Common Arguments version
 
|-
 
|-
 
| 0x4 || 4 || 0x20 || Common Arguments size
 
| 0x4 || 4 || 0x20 || Common Arguments size
Line 2,849: Line 3,224:  
|}
 
|}
   −
= Enums =
+
= AppletId =
=== AppletId ===
+
This is "nn::applet::AppletId". See also [[:Category:Library Applets]].
See also [[:Category:Library Applets]].
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Id
+
! Value
 
! ProgramId
 
! ProgramId
 
! Description
 
! Description
 +
|-
 +
| 0x00
 +
|
 +
| None
 
|-
 
|-
 
| 0x01
 
| 0x01
Line 2,865: Line 3,243:  
| 0x02
 
| 0x02
 
| 010000000000100C
 
| 010000000000100C
| overlayDisp (OverlayApplet)
+
| OverlayApplet (overlayDisp)
 
|-
 
|-
 
| 0x03
 
| 0x03
 
| 0100000000001000
 
| 0100000000001000
| qlaunch (SystemAppletMenu)
+
| SystemAppletMenu (qlaunch)
 
|-
 
|-
 
| 0x04
 
| 0x04
 
| 0100000000001012
 
| 0100000000001012
| starter (DummyStarter)
+
| SystemApplication (starter)
 
|-
 
|-
 
| 0x0A
 
| 0x0A
 
| 0100000000001001
 
| 0100000000001001
| [[Auth_Applet|auth (LibraryAppletAuth)]]
+
| [[Auth_Applet|LibraryAppletAuth (auth)]]
 
|-
 
|-
 
| 0x0B
 
| 0x0B
 
| 0100000000001002
 
| 0100000000001002
| [[Cabinet_Applet|cabinet (LibraryAppletCabinet)]]
+
| [[Cabinet_Applet|LibraryAppletCabinet (cabinet)]]
 
|-
 
|-
 
| 0x0C
 
| 0x0C
 
| 0100000000001003
 
| 0100000000001003
| [[Controller_Applet|controller (LibraryAppletController)]]
+
| [[Controller_Applet|LibraryAppletController (controller)]]
 
|-
 
|-
 
| 0x0D
 
| 0x0D
 
| 0100000000001004
 
| 0100000000001004
| dataErase (LibraryAppletDataErase)
+
| LibraryAppletDataErase (dataErase)
 
|-
 
|-
 
| 0x0E
 
| 0x0E
 
| 0100000000001005
 
| 0100000000001005
| [[Error_Applet|error (LibraryAppletError)]]
+
| [[Error_Applet|LibraryAppletError (error)]]
 
|-
 
|-
 
| 0x0F
 
| 0x0F
 
| 0100000000001006
 
| 0100000000001006
| netConnect (LibraryAppletNetConnect)
+
| LibraryAppletNetConnect (netConnect)
 
|-
 
|-
 
| 0x10
 
| 0x10
 
| 0100000000001007
 
| 0100000000001007
| [[Profile_Selector|playerSelect (LibraryAppletPlayerSelect)]]
+
| [[Profile_Selector|LibraryAppletPlayerSelect (playerSelect)]]
 
|-
 
|-
 
| 0x11
 
| 0x11
 
| 0100000000001008
 
| 0100000000001008
| [[Software_Keyboard|swkbd (LibraryAppletSwkbd)]]
+
| [[Software_Keyboard|LibraryAppletSwkbd (swkbd)]]
 
|-
 
|-
 
| 0x12
 
| 0x12
 
| 0100000000001009
 
| 0100000000001009
| [[MiiEdit_Applet|miiEdit (LibraryAppletMiiEdit)]]
+
| [[MiiEdit_Applet|LibraryAppletMiiEdit (miiEdit)]]
 
|-
 
|-
 
| 0x13
 
| 0x13
 
| 010000000000100A
 
| 010000000000100A
| [[Internet_Browser#010000000000100A|web (LibraryAppletWeb)]]
+
| [[Internet_Browser#010000000000100A|LibraryAppletWeb (web)]]
 
|-
 
|-
 
| 0x14
 
| 0x14
 
| 010000000000100B
 
| 010000000000100B
| [[Internet_Browser#ShopN|shop (LibraryAppletShop)]]
+
| [[Internet_Browser#ShopN|LibraryAppletShop (shop)]]
 
|-
 
|-
 
| 0x15
 
| 0x15
 
| 010000000000100D
 
| 010000000000100D
| [[Album_Applet|photoViewer (LibraryAppletPhotoViewer)]]
+
| [[Album_Applet|LibraryAppletPhotoViewer (photoViewer)]]
 
|-
 
|-
 
| 0x16
 
| 0x16
 
| 010000000000100E
 
| 010000000000100E
| set (LibraryAppletSet)
+
| LibraryAppletSet (set)
 
|-
 
|-
 
| 0x17
 
| 0x17
 
| 010000000000100F
 
| 010000000000100F
| [[Internet_Browser#Offline_Applet|offlineWeb (LibraryAppletOfflineWeb)]]
+
| [[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]]
 
|-
 
|-
 
| 0x18
 
| 0x18
 
| 0100000000001010
 
| 0100000000001010
| [[Internet_Browser#Whitelisted_Applets|loginShare (LibraryAppletLoginShare)]]
+
| [[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]]
 
|-
 
|-
 
| 0x19
 
| 0x19
 
| 0100000000001011
 
| 0100000000001011
| [[Internet_Browser#WifiWebAuthApplet|wifiWebAuth (LibraryAppletWifiWebAuth)]]
+
| [[Internet_Browser#WifiWebAuthApplet|LibraryAppletWifiWebAuth (wifiWebAuth)]]
 
|-
 
|-
 
| 0x1A
 
| 0x1A
 
| 0100000000001013
 
| 0100000000001013
| [[MyPage_Applet|myPage (LibraryAppletMyPage)]]
+
| [[MyPage_Applet|LibraryAppletMyPage (myPage)]]
 
|-
 
|-
 
| 0x1B
 
| 0x1B
 
| 010000000000101A
 
| 010000000000101A
| gift (LibraryAppletGift)
+
| LibraryAppletGift (gift)
 
|-
 
|-
 
| 0x1C
 
| 0x1C
 
| 010000000000101C
 
| 010000000000101C
| userMigration (LibraryAppletUserMigration)
+
| LibraryAppletUserMigration (userMigration)
 
|-
 
|-
 
| 0x1D
 
| 0x1D
 
| 010000000000101D
 
| 010000000000101D
| [9.0.0+] EncounterSys (LibraryAppletPreomiaSys)
+
| [9.0.0+] LibraryAppletPreomiaSys (EncounterSys)
 
|-
 
|-
 
| 0x1E
 
| 0x1E
 
| 0100000000001020
 
| 0100000000001020
| [9.0.0+] story (LibraryAppletStory)
+
| [9.0.0+] LibraryAppletStory (story)
 
|-
 
|-
 
| 0x1F
 
| 0x1F
 
| 010070000E3C0000
 
| 010070000E3C0000
| [9.0.0+] EncounterUsr (LibraryAppletPreomiaUsr)
+
| [9.0.0+] LibraryAppletPreomiaUsr (EncounterUsr)
 
|-
 
|-
 
| 0x20
 
| 0x20
 
| 010086000E49C000
 
| 010086000E49C000
| [9.0.0+] EncounterUsrDummy (LibraryAppletPreomiaUsrDummy)
+
| [9.0.0+] LibraryAppletPreomiaUsrDummy (EncounterUsrDummy)
 
|-
 
|-
 
| 0x21
 
| 0x21
 
| 0100000000001038
 
| 0100000000001038
| [10.0.0+] sample (LibraryAppletSample)
+
| [10.0.0+] LibraryAppletSample (sample)
 +
|-
 +
| 0x22
 +
| 0100000000001007
 +
| [13.0.0+] LibraryAppletPromoteQualification (playerSelect)
 +
|-
 +
| 0x32
 +
| 010000000000100F
 +
| [17.0.0+] [[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]]
 +
|-
 +
| 0x33
 +
| 010000000000100F
 +
| [17.0.0+] [[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]]
 +
|-
 +
| 0x35
 +
| [17.0.0+] 0100000000001010 ([16.0.0-16.1.0] 0100000000001042)
 +
| [17.0.0+] [[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] ([16.0.0-16.1.0] )
 +
|-
 +
| 0x36
 +
| [17.0.0+] 0100000000001010 ([16.0.0-16.1.0] 0100000000001042)
 +
| [17.0.0+] [[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] ([16.0.0-16.1.0] )
 +
|-
 +
| 0x37
 +
| [17.0.0+] 0100000000001010 ([16.0.0-16.1.0] 0100000000001042)
 +
| [17.0.0+] [[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] ([16.0.0-16.1.0] )
 +
|-
 +
| 0x38
 +
| 0100000000001043
 +
| [16.0.0-16.1.0]
 +
|-
 +
| 0x50
 +
| 0100000000001007
 +
| [18.0.0+]
 +
|-
 +
| 0x51
 +
| 0100000000001007
 +
| [18.0.0+]
 +
|-
 +
| 0x3E8
 +
|
 +
| [10.0.0-16.1.0] DevlopmentTool
 
|-
 
|-
 
| 0x3F1
 
| 0x3F1
 
| 010000000000D619
 
| 010000000000D619
| [10.0.0+]
+
| [10.0.0-16.1.0] CombinationLA
 
|-
 
|-
 
| 0x3F2
 
| 0x3F2
 
| 010000000000D610
 
| 010000000000D610
| [10.0.0+]
+
| [10.0.0-16.1.0] AeSystemApplet
 
|-
 
|-
 
| 0x3F3
 
| 0x3F3
 
| 010000000000D611
 
| 010000000000D611
| [10.0.0+]
+
| [10.0.0-16.1.0] AeOverlayApplet
 
|-
 
|-
 
| 0x3F4
 
| 0x3F4
 
| 010000000000D612
 
| 010000000000D612
| [10.0.0+]
+
| [10.0.0-16.1.0] AeStarter
 
|-
 
|-
 
| 0x3F5
 
| 0x3F5
 
| 010000000000D613
 
| 010000000000D613
| [10.0.0+]
+
| [10.0.0-16.1.0] AeLibraryAppletAlone
 
|-
 
|-
 
| 0x3F6
 
| 0x3F6
 
| 010000000000D614
 
| 010000000000D614
| [10.0.0+]
+
| [10.0.0-16.1.0] AeLibraryApplet1
 
|-
 
|-
 
| 0x3F7
 
| 0x3F7
 
| 010000000000D615
 
| 010000000000D615
| [10.0.0+]
+
| [10.0.0-16.1.0] AeLibraryApplet2
 
|-
 
|-
 
| 0x3F8
 
| 0x3F8
 
| 010000000000D616
 
| 010000000000D616
| [10.0.0+]
+
| [10.0.0-16.1.0] AeLibraryApplet3
 
|-
 
|-
 
| 0x3F9
 
| 0x3F9
 
| 010000000000D617
 
| 010000000000D617
| [10.0.0+]
+
| [10.0.0-16.1.0] AeLibraryApplet4
 
|-
 
|-
 
| 0x3FA
 
| 0x3FA
 
| 010000000000D60A
 
| 010000000000D60A
| [10.0.0+]
+
| [10.0.0-16.1.0] AppletISA
 
|-
 
|-
 
| 0x3FB
 
| 0x3FB
 
| 010000000000D60B
 
| 010000000000D60B
| [10.0.0+]
+
| [10.0.0-16.1.0] AppletIOA
 
|-
 
|-
 
| 0x3FC
 
| 0x3FC
 
| 010000000000D60C
 
| 010000000000D60C
| [10.0.0+]
+
| [10.0.0-16.1.0] AppletISTA
 
|-
 
|-
 
| 0x3FD
 
| 0x3FD
 
| 010000000000D60D
 
| 010000000000D60D
| [10.0.0+]
+
| [10.0.0-16.1.0] AppletILA1
 
|-
 
|-
 
| 0x3FE
 
| 0x3FE
 
| 010000000000D60E
 
| 010000000000D60E
| [10.0.0+]
+
| [10.0.0-16.1.0] AppletILA2
|}
  −
 
  −
=== LibraryAppletMode ===
  −
{| class="wikitable" border="1"
   
|-
 
|-
!  ID
+
| 0x700000C8
!  Description
+
| 010000000000D65B
 +
| [18.0.0+]
 
|-
 
|-
| 0x0
+
| 0x700000C9
| AllForeground
+
| 010000000000D65C
 +
| [18.0.0+]
 
|-
 
|-
| 0x1
+
| 0x700000DC
| Background
+
| 010000000000D619
 +
| [17.0.0+] CombinationLA
 
|-
 
|-
| 0x2
+
| 0x700000E6
| No UI
+
| 010000000000D610
 +
| [17.0.0+] AeSystemApplet
 
|-
 
|-
| 0x3
+
| 0x700000E7
| Background with indirect display, see also [[#GetIndirectLayerConsumerHandle]]. Only used by swkbd InlineKeyboard.
+
| 010000000000D611
 +
| [17.0.0+] AeOverlayApplet
 
|-
 
|-
| 0x4
+
| 0x700000E8
| AllForegroundInitiallyHidden. Can be used by [7.0.0+] [[Internet_Browser|WebSession]].
+
| 010000000000D612
 +
| [17.0.0+] AeStarter
 
|-
 
|-
|}
+
| 0x700000E9
 
+
| 010000000000D613
=== AppletMessage ===
+
| [17.0.0+] AeLibraryAppletAlone
{| class="wikitable" border="1"
   
|-
 
|-
!  ID
+
| 0x700000EA
!  Description
+
| 010000000000D614
 +
| [17.0.0+] AeLibraryApplet1
 
|-
 
|-
| 0x4 || Exit requested
+
| 0x700000EB
 +
| 010000000000D615
 +
| [17.0.0+] AeLibraryApplet2
 
|-
 
|-
| 0xF || [[#GetCurrentFocusState|FocusState]] changed
+
| 0x700000EC
 +
| 010000000000D616
 +
| [17.0.0+] AeLibraryApplet3
 
|-
 
|-
| 0x10 || Current applet execution was [[#SetRestartMessageEnabled|resumed]].
+
| 0x700000ED
 +
| 010000000000D617
 +
| [17.0.0+] AeLibraryApplet4
 
|-
 
|-
| 0x1E || OperationMode changed
+
| 0x700000F0
 +
| 010000000000D60A
 +
| [17.0.0+] AppletISA
 
|-
 
|-
| 0x1F || PerformanceMode changed
+
| 0x700000F1
 +
| 010000000000D60B
 +
| [17.0.0+] AppletIOA
 
|-
 
|-
| 0x33 || [[#SetHandlesRequestToDisplay|RequestToDisplay]]. Indicates that [[#ApproveToDisplay]] should be used.
+
| 0x700000F2
 +
| 010000000000D60C
 +
| [17.0.0+] AppletISTA
 
|-
 
|-
| 0x5A || Capture button was [[#SetRequiresCaptureButtonShortPressedMessage|short-pressed]].
+
| 0x700000F3
 +
| 010000000000D60D
 +
| [17.0.0+] AppletILA1
 
|-
 
|-
| 0x5C || Screenshot was [[#SetAlbumImageTakenNotificationEnabled|taken]].
+
| 0x700000F4
 +
| 010000000000D60E
 +
| [17.0.0+] AppletILA2
 
|}
 
|}
   −
This is "nn::am::AppletMessage".
+
= LibraryAppletMode =
 +
This is "nn::applet::LibraryAppletMode".
   −
=== OperationMode ===
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Value
+
! Value
! Description
+
! Description
 
|-
 
|-
| 0 || Handheld
+
| 0x0
 +
| AllForeground
 
|-
 
|-
| 1 || Docked
+
| 0x1
|}
+
| PartialForeground
 
  −
=== TvPowerStateMatchingMode ===
  −
{| class="wikitable" border="1"
   
|-
 
|-
!  Value
+
| 0x2
!  Description
+
| NoUi
 
|-
 
|-
| 0 || Unknown
+
| 0x3
 +
| PartialForegroundWithIndirectDisplay (see also [[#GetIndirectLayerConsumerHandle]], only used by swkbd [[Software_Keyboard|InlineKeyboard]])
 
|-
 
|-
| 1 || Unknown
+
| 0x4
 +
| AllForegroundInitiallyHidden (can be used by [7.0.0+] [[Internet_Browser|WebSession]])
 
|}
 
|}
   −
This is "nn::oe::TvPowerStateMatchingMode". This is used with [[#SetTvPowerStateMatchingMode]].
+
= AppletMessage =
 +
This is "nn::am::AppletMessage".
   −
=== SystemButtonType ===
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Value
+
! Value
! Description
+
! Description
 
|-
 
|-
| 1 || PerformHomeButtonShortPressing
+
| 0 || None
 +
|-
 +
| 1 || ChangeIntoForeground
 
|-
 
|-
| 2 || PerformHomeButtonLongPressing
+
| 2 || ChangeIntoBackground
 
|-
 
|-
| 3 || Short-pressing with the Power-button. Only available with [[#PerformSystemButtonPressing]].
+
| 4 || Exit
 
|-
 
|-
| 4 || Long-pressing with the Power-button. Only available with [[#PerformSystemButtonPressing]].
+
| 6 || ApplicationExited
 
|-
 
|-
| 5 || Shutdown the system. Only available with [[#PerformSystemButtonPressing]].
+
| 7 ||  
 
|-
 
|-
| 6 || PerformCaptureButtonShortPressing
+
| 15 || [[#FocusState|FocusStateChanged]]
 
|-
 
|-
| 7 || PerformCaptureButtonLongPressing
+
| 16 || [[#SetRestartMessageEnabled|Resume]]
|}
  −
 
  −
This is "nn::am::service::SystemButtonType". This is used with [[#PerformSystemButtonPressingIfInFocus]]/[[#PerformSystemButtonPressing]].
  −
 
  −
=== LaunchParameterKind ===
  −
{| class="wikitable" border="1"
   
|-
 
|-
!  Value
+
| 20 || DetectShortPressingHomeButton
!  Description
   
|-
 
|-
| 1 || UserChannel. Application-specific LaunchParameter.
+
| 21 || DetectLongPressingHomeButton
 
|-
 
|-
| 2 || account PreselectedUser
+
| 22 || DetectShortPressingPowerButton
 
|-
 
|-
| 3 || Unknown if used by anything?
+
| 23 || DetectMiddlePressingPowerButton
|}
+
|-
 
+
| 24 || DetectLongPressingPowerButton
=== LibraryAppletExitReason ===
+
|-
{| class="wikitable" border="1"
+
| 25 || RequestToPrepareSleep
 +
|-
 +
| 26 || FinishedSleepSequence
 
|-
 
|-
!  Value
+
| 27 || SleepRequiredByHighTemperature
!  Description
   
|-
 
|-
| 0 || Normal
+
| 28 || SleepRequiredByLowBattery
 
|-
 
|-
| 1 || Canceled
+
| 29 || AutoPowerDown
 
|-
 
|-
| 2 || Abnormal
+
| 30 || [[#OperationMode|OperationModeChanged]]
 
|-
 
|-
| 10 || Unexpected
+
| 31 || [[#PerformanceMode|PerformanceModeChanged]]
|}
  −
 
  −
=== ProgramSpecifyKind ===
  −
{| class="wikitable" border="1"
   
|-
 
|-
!  Value
+
| 32 || DetectReceivingCecSystemStandby
!  Description
   
|-
 
|-
| 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.
+
| 33 || SdCardRemoved
 
|-
 
|-
| 1 || [[NCM_services#ApplicationId|ApplicationId]]. "JumpToSubApplicationProgramForDevelopment". Only available when [[Settings_services#GetDebugModeFlag|DebugMode]] is 1.
+
| 34 ||  
 
|-
 
|-
| 2 || u64 = value 0. "RestartProgram"
+
| 50 || LaunchApplicationRequested
 
|-
 
|-
|}
+
| 51 || [[#SetHandlesRequestToDisplay|RequestToDisplay]]
 
  −
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
+
| 55 || ShowApplicationLogo
!  Description
   
|-
 
|-
| 0 || Unknown.
+
| 56 || HideApplicationLogo
 
|-
 
|-
| 1 || Unknown.
+
| 57 || ForceHideApplicationLogo
|}
  −
 
  −
This is u32 enum "nn::applet::InputDetectionPolicy".
  −
 
  −
= AppletResourceUserId =
  −
This u64 is officially called "nn::applet::AppletResourceUserId". Used by a number of non-AM services.
  −
 
  −
= AppletAttribute =
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Offset || Size || Description
+
| 58 ||  
 
|-
 
|-
| 0x0 || 0x1 || Flag. When non-zero, two state fields are set to 1.
+
| 59 ||  
 
|-
 
|-
| 0x1 || 0x7F || Unused
+
| 60 || FloatingApplicationDetected
|}
+
|-
 
+
| 61 || [7.0.0+] PerformanceConfigurationChanged
This is "nn::am::AppletAttribute". This struct is 0x8-bytes.
+
|-
 
+
| 70 ||
This is used by [[#OpenLibraryAppletProxy]].
+
|-
 
+
| 71 ||
= AppletProcessLaunchReason =
+
|-
{| class="wikitable" border="1"
+
| 72 ||
 +
|-
 +
| 73 ||
 +
|-
 +
| 75 ||
 +
|-
 +
| 80 ||
 +
|-
 +
| 81 ||
 +
|-
 +
| 82 ||
 +
|-
 +
| 83 ||
 +
|-
 +
| 85 ||  
 +
|-
 +
| 86 ||
 +
|-
 +
| 90 || [[#SetRequiresCaptureButtonShortPressedMessage|DetectShortPressingCaptureButton]]
 +
|-
 +
| 92 || [[#SetAlbumImageTakenNotificationEnabled|AlbumScreenShotTaken]]
 +
|-
 +
| 93 || AlbumRecordingSaved
 +
|-
 +
| 94 ||
 +
|-
 +
| 100 ||
 
|-
 
|-
! Offset || Size || Description
+
| 101 ||  
 
|-
 
|-
| 0x0 || 0x1 || Flag. When non-zero, LibraryApplets then use [[#OpenCallingLibraryApplet]].
+
| 110 || [14.0.0+] DetectShortPressingCaptureButtonForApplet
 
|-
 
|-
| 0x1 || 0x2 || Always 0.
+
| 111 || [14.0.0+] DetectLongPressingCaptureButtonForApplet
 
|-
 
|-
| 0x3 || 0x1 || Always 0.
+
| 1000 ||  
 
|}
 
|}
   −
This is "nn::am::service::AppletProcessLaunchReason". This struct is 0x4-bytes.
+
= OperationMode =
 +
This is "nn::oe::OperationMode".
   −
= LibraryAppletInfo =
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Offset || Size || Description
+
! Value
 +
! Description
 
|-
 
|-
| 0x0 || 0x4 || [[#AppletId]]
+
| 0 || Handheld
 
|-
 
|-
| 0x4 || 0x4 || [[#LibraryAppletMode]]
+
| 1 || Console
 
|}
 
|}
   −
This is "nn::am::service::LibraryAppletInfo". This struct is 0x8-bytes.
+
= PerformanceMode =
 
+
This is "nn::oe::PerformanceMode".
= AppletKind =
+
 
This is "nn::am::service::AppletKind". This is 8-bytes.
+
{| class="wikitable" border="1"
 
+
|-
= AppletIdentityInfo =
+
! Value
{| class="wikitable" border="1"
+
! Description
|-
+
|-
! Offset || Size || Description
+
| -1 || Invalid
|-
+
|-
| 0x0 || 0x4 || [[#AppletId]]
+
| 0 || Normal
|-
+
|-
| 0x4 || 0x4 || Padding
+
| 1 || Boost
|-
+
|}
| 0x8 || 0x8 || [[NCM_services#ApplicationId|ApplicationId]]
+
 
|}
+
= FocusState =
 
+
This is "nn::oe::FocusState".
This struct is "nn::am::service::AppletIdentityInfo". This struct is 0x10-bytes.
+
 
 
+
{| class="wikitable" border="1"
= ApplicationAttributeForQuest =
+
|-
{| class="wikitable" border="1"
+
! Value
|-
+
! Description
! Offset || Size || Description
+
|-
|-
+
| 1 || InFocus
| 0x0 || 0x4 || See [[#ApplicationAttribute]].
+
|-
|-
+
| 2 || OutOfFocus
| 0x4 || 0x4 || See [[#ApplicationAttribute]].
+
|-
|-
+
| 3 || Background
| 0x8 || 0x4 || [7.0.0+] See [[#ApplicationAttribute]].
+
|}
|}
+
 
 
+
= CpuBoostMode =
This struct is "nn::applet::ApplicationAttributeForQuest".
+
This is "nn::oe::CpuBoostMode".
 
+
 
User-processes copy the first 0x8-bytes (0xC-bytes with [[#CreateApplicationWithAttributeAndPushAndRequestToStartForQuest]]/[[#CreateApplicationWithAttributeAndRequestToStartForQuest]]) to a [[#ApplicationAttribute]] with the rest of the struct being cleared, which is then passed to the actual cmd (CreateApplication*ToStartForQuest).
+
{| class="wikitable" border="1"
 
+
|-
= ApplicationAttribute =
+
! Value
{| class="wikitable" border="1"
+
! Description
|-
+
|-
! Offset || Size || Description
+
| 0 || Normal
|-
+
|-
| 0x0 || 0x4 || Default is 0 for non-Quest. Only used when non-zero: unknown value in seconds.
+
| 1 || FastLoad
|-
+
|}
| 0x4 || 0x4 || Default is 0 for non-Quest. Only used when non-zero: unknown value in seconds.
+
 
|-
+
= WindowOriginMode =
| 0x8 || 0x4 || float audio volume. Must be in the range of 0.0f-1.0f. The default is 1.0f.
+
This is "nn::oe::WindowOriginMode".
|-
+
 
| 0xC || 0x14 || Unused. Default is 0.
+
{| class="wikitable" border="1"
|}
+
|-
 
+
! Value
This struct is "nn::am::ApplicationAttribute". This struct is 0x20-bytes.
+
! Description
 +
|-
 +
| 0 || LowerLeft
 +
|-
 +
| 1 || UpperLeft
 +
|}
 +
 
 +
= WirelessPriorityMode =
 +
This is "nn::oe::WirelessPriorityMode".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Description
 +
|-
 +
| 0 || Default
 +
|-
 +
| 1 || OptimizedForWlan
 +
|}
 +
 
 +
= TvPowerStateMatchingMode =
 +
This is "nn::oe::TvPowerStateMatchingMode". This is used with [[#SetTvPowerStateMatchingMode]].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Description
 +
|-
 +
| 0 || Unknown
 +
|-
 +
| 1 || Unknown
 +
|}
 +
 
 +
= SystemButtonType =
 +
This is "nn::am::service::SystemButtonType". This is used with [[#PerformSystemButtonPressingIfInFocus]]/[[#PerformSystemButtonPressing]].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Description
 +
|-
 +
| 1 || PerformHomeButtonShortPressing
 +
|-
 +
| 2 || PerformHomeButtonLongPressing
 +
|-
 +
| 3 || Short-pressing with the Power-button. Only available with [[#PerformSystemButtonPressing]].
 +
|-
 +
| 4 || Long-pressing with the Power-button. Only available with [[#PerformSystemButtonPressing]].
 +
|-
 +
| 5 || Shutdown the system. Only available with [[#PerformSystemButtonPressing]].
 +
|-
 +
| 6 || PerformCaptureButtonShortPressing
 +
|-
 +
| 7 || PerformCaptureButtonLongPressing
 +
|}
 +
 
 +
= LaunchParameterKind =
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Description
 +
|-
 +
| 1 || UserChannel. Application-specific LaunchParameter.
 +
|-
 +
| 2 || account PreselectedUser
 +
|-
 +
| 3 || Unknown if used by anything?
 +
|}
 +
 
 +
= LibraryAppletExitReason =
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Description
 +
|-
 +
| 0 || Normal
 +
|-
 +
| 1 || Canceled
 +
|-
 +
| 2 || Abnormal
 +
|-
 +
| 10 || Unexpected
 +
|}
 +
 
 +
= ProgramSpecifyKind =
 +
This is "nn::am::service::ProgramSpecifyKind". This controls the type of the u64 passed to [[#ExecuteProgram]].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Description
 +
|-
 +
| 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 || [[NCM_services#ApplicationId|ApplicationId]]. "JumpToSubApplicationProgramForDevelopment". Only available when [[Settings_services#GetDebugModeFlag|DebugMode]] is 1.
 +
|-
 +
| 2 || u64 = value 0. "RestartProgram"
 +
|}
 +
 
 +
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 =
 +
This is u32 enum "nn::applet::InputDetectionPolicy".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Description
 +
|-
 +
| 0 || Unknown
 +
|-
 +
| 1 || Unknown
 +
|}
 +
 
 +
= AppletResourceUserId =
 +
This is "nn::applet::AppletResourceUserId". Used by a number of non-AM services.
 +
 
 +
= AppletAttribute =
 +
This is "nn::am::AppletAttribute". This struct is 0x80 bytes.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x1 || Flag. When non-zero, two state fields are set to 1.
 +
|-
 +
| 0x1 || 0x7F || Unused
 +
|}
 +
 
 +
This is used by [[#OpenLibraryAppletProxy]].
 +
 
 +
= AppletProcessLaunchReason =
 +
This is "nn::am::service::AppletProcessLaunchReason". This struct is 0x4-bytes.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x1 || Flag. When non-zero, LibraryApplets then use [[#OpenCallingLibraryApplet]].
 +
|-
 +
| 0x1 || 0x2 || Always 0.
 +
|-
 +
| 0x3 || 0x1 || Always 0.
 +
|}
 +
 
 +
= LibraryAppletInfo =
 +
This is "nn::am::service::LibraryAppletInfo". This struct is 0x8-bytes.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || [[#AppletId]]
 +
|-
 +
| 0x4 || 0x4 || [[#LibraryAppletMode]]
 +
|}
 +
 
 +
= AppletKind =
 +
This is "nn::am::service::AppletKind". This is 8-bytes.
 +
 
 +
= AppletIdentityInfo =
 +
This struct is "nn::am::service::AppletIdentityInfo". This struct is 0x10-bytes.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || [[#AppletId]]
 +
|-
 +
| 0x4 || 0x4 || Padding
 +
|-
 +
| 0x8 || 0x8 || [[NCM_services#ApplicationId|ApplicationId]]
 +
|}
 +
 
 +
= ApplicationAttributeForQuest =
 +
This struct is "nn::applet::ApplicationAttributeForQuest".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || See [[#ApplicationAttribute]].
 +
|-
 +
| 0x4 || 0x4 || See [[#ApplicationAttribute]].
 +
|-
 +
| 0x8 || 0x4 || [7.0.0+] See [[#ApplicationAttribute]].
 +
|}
 +
 
 +
User-processes copy the first 0x8-bytes (0xC-bytes with [[#CreateApplicationWithAttributeAndPushAndRequestToStartForQuest]]/[[#CreateApplicationWithAttributeAndRequestToStartForQuest]]) to a [[#ApplicationAttribute]] with the rest of the struct being cleared, which is then passed to the actual cmd (CreateApplication*ToStartForQuest).
 +
 
 +
= ApplicationAttribute =
 +
This struct is "nn::am::ApplicationAttribute". This struct is 0x20-bytes.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || Default is 0 for non-Quest. Only used when non-zero: unknown value in seconds.
 +
|-
 +
| 0x4 || 0x4 || Default is 0 for non-Quest. Only used when non-zero: unknown value in seconds.
 +
|-
 +
| 0x8 || 0x4 || float audio volume. Must be in the range of 0.0f-1.0f. The default is 1.0f.
 +
|-
 +
| 0xC || 0x14 || Unused. Default is 0.
 +
|}
    
Internally AM only uses the first 0xC-bytes from ApplicationAttribute, regardless of the cmd.
 
Internally AM only uses the first 0xC-bytes from ApplicationAttribute, regardless of the cmd.
    
= ApplicationLaunchProperty =
 
= ApplicationLaunchProperty =
 +
This struct is 0x10-bytes.
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 3,294: Line 3,937:  
|}
 
|}
   −
This struct is 0x10-bytes.
+
= ApplicationLaunchRequestInfo =
 +
This is "nn::applet::ApplicationLaunchRequestInfo". This struct is 0x10-bytes.
   −
= ApplicationLaunchRequestInfo =
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 3,308: Line 3,951:  
|}
 
|}
   −
This struct is "nn::applet::ApplicationLaunchRequestInfo". This struct is 0x10-bytes.
+
= AppletResourceUsageInfo =
 +
This is "nn::am::service::AppletResourceUsageInfo". This struct is 0x20-bytes.
   −
= AppletResourceUsageInfo =
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 3,323: Line 3,966:  
| 0xC || 0x14 || Always zero.
 
| 0xC || 0x14 || Always zero.
 
|}
 
|}
  −
This struct is "nn::am::service::AppletResourceUsageInfo". This struct is 0x20-bytes.
      
= ApplicationLicenseType =
 
= ApplicationLicenseType =
Line 3,331: Line 3,972:  
= LaunchRequiredVersion =
 
= LaunchRequiredVersion =
 
This is "nn::oe::LaunchRequiredVersion". This is a 0x40-byte struct with 1-byte alignment.
 
This is "nn::oe::LaunchRequiredVersion". This is a 0x40-byte struct with 1-byte alignment.
 +
 +
= ServerEnvironmentType =
 +
This is "nn::oe::ServerEnvironmentType".
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Description
 +
|-
 +
| 0 || dd
 +
|-
 +
| 1 || lp
 +
|-
 +
| 2 || sd
 +
|-
 +
| 3 || sp
 +
|-
 +
| 4 || dp
 +
|}
    
= Notes =
 
= Notes =
AM-sysmodule will only initialize [[Shared_Database_services|pdm:ntfy]] / use pdm:ntfy service commands when the value from [[Process_Manager_services|pm:bm]] GetBootMode is not 0x1.
+
AM-sysmodule will only initialize [[Shared_Database_services|pdm:ntfy]] / use pdm:ntfy service commands when the value from [[Process_Manager_services|pm:bm]] GetBootMode is not 0x1 (Maintenance).
 +
 
 +
An object constructor also writes the output from [[Process_Manager_services|pm:bm]] GetBootMode into the created object. A vfunc for this object checks whether this field is Maintenance: if so, it calls a vfunc then a func and returns. Otherwise after calling various (v)funcs, if required this eventually uses [[OMM_services|ommdisp]] cmd600.
    
[[Category:Services]]
 
[[Category:Services]]

Navigation menu