Applet Manager services: Difference between revisions

 
(86 intermediate revisions by 5 users not shown)
Line 11: Line 11:
|-
|-
| 100 || OpenSystemAppletProxy || Returns an [[#ISystemAppletProxy]].
| 100 || OpenSystemAppletProxy || Returns an [[#ISystemAppletProxy]].
|-
| 110 || [20.0.0+] ||
|-
|-
| 200 || OpenLibraryAppletProxyOld ([1.0.0-2.3.0] OpenLibraryAppletProxy) || Returns an [[#ILibraryAppletProxy]].
| 200 || OpenLibraryAppletProxyOld ([1.0.0-2.3.0] OpenLibraryAppletProxy) || Returns an [[#ILibraryAppletProxy]].
Line 23: Line 25:
|-
|-
| 410 || [6.0.0+] [[#GetSystemAppletControllerForDebug]] ||  
| 410 || [6.0.0+] [[#GetSystemAppletControllerForDebug]] ||  
|-
| 450 || [19.0.0+] [[#GetSystemProcessCommonFunctions]] ||
|-
| 460 || [20.0.0+] ||
|-
|-
| 1000 || [6.0.0+] [[#GetDebugFunctions]] ||  
| 1000 || [6.0.0+] [[#GetDebugFunctions]] ||  
Line 58: Line 64:


The cached value loaded from [[System_Settings|system-setting]] <code>am.debug!dev_function</code> must be set to 0x1 with size 0x1, and various state checks must pass, otherwise 0 is returned with no output interface.
The cached value loaded from [[System_Settings|system-setting]] <code>am.debug!dev_function</code> must be set to 0x1 with size 0x1, and various state checks must pass, otherwise 0 is returned with no output interface.
== GetSystemProcessCommonFunctions ==
No input. Returns an [[#ISystemProcessCommonFunctions]].


== GetDebugFunctions ==
== GetDebugFunctions ==
Line 65: Line 74:


== ISystemAppletProxy ==
== ISystemAppletProxy ==
This is "nn::am::service::ISystemAppletProxy".
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 95: Line 106:


=== IHomeMenuFunctions ===
=== IHomeMenuFunctions ===
This is "nn::am::service::IHomeMenuFunctions".
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Cmd || Name || Notes
! Cmd || Name
|-
| 10 || [[#RequestToGetForeground]]
|-
| 11 || [[#LockForeground]]
|-
| 12 || [[#UnlockForeground]]
|-
| 20 || [[#PopFromGeneralChannel]]
|-
| 21 || [[#GetPopFromGeneralChannelEvent]]
|-
| 30 || [[#GetHomeButtonWriterLockAccessor]]
|-
| 31 || [2.0.0+] [[#GetWriterLockAccessorEx]]
|-
|-
| 10 || [[#RequestToGetForeground]] ||
| 40 || [11.0.0+] [[#IsSleepEnabled]]
|-
|-
| 11 || [[#LockForeground]] ||
| 41 || [12.0.0+] [[#IsRebootEnabled]]
|-
|-
| 12 || [[#UnlockForeground]] ||
| 50 || [16.0.0+] [[#LaunchSystemApplet]]
|-
|-
| 20 || [[#PopFromGeneralChannel]] ||
| 51 || [16.0.0+] [[#LaunchStarter]]
|-
|-
| 21 || [[#GetPopFromGeneralChannelEvent]] ||
| 60 || [19.0.0+]  
|-
|-
| 30 || [[#GetHomeButtonWriterLockAccessor]] ||
| 61 || [19.0.0+]  
|-
|-
| 31 || [2.0.0+] [[#GetWriterLockAccessorEx]] ||
| 100 || [6.0.0+] [[#PopRequestLaunchApplicationForDebug]]
|-
|-
| 100 || [6.0.0+] [[#PopRequestLaunchApplicationForDebug]] ||
| 110 || [9.0.0+] [[#IsForceTerminateApplicationDisabledForDebug]]
|-
|-
| 110 || [9.0.0+] [[#IsForceTerminateApplicationDisabledForDebug]] ||
| 200 || [8.0.0+] [[#LaunchDevMenu]]
|-
|-
| 200 || [8.0.0+] [[#LaunchDevMenu]] ||
| 1000 || [11.0.0+] [[#SetLastApplicationExitReason]]
|}
|}


Line 144: Line 171:


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 160: Line 205:
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 175: Line 225:
| 3 || [[#GetEvent]]
| 3 || [[#GetEvent]]
|-
|-
| 4 || [10.0.0+] IsLocked
| 4 || [10.0.0+] [[#IsLocked]]
|}
|}


Line 190: Line 240:
===== 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 ===
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 275: Line 332:
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
|-
| 2 || [[#GetCradleDeviceInfo]]
|-
| 3 || GetCradleDeviceInfoChangeEvent
|-
| 4 || GetUpdateProgressInfo
|-
| 5 || GetLastInternalResult
|}
 
==== GetCradleDeviceInfo ====
No input, returns a 8-byte CradleDeviceInfo.
 
[13.0.0+] Now returns a total of 0xC-bytes.
 
=== IApplicationCreator ===
This is "nn::am::service::IApplicationCreator".
 
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
|-
| 0 || [[#CreateApplication]] ||
| 0 || [[#CreateApplication]]
|-
|-
| 1 || [[#PopLaunchRequestedApplication]] ||
| 1 || [[#PopLaunchRequestedApplication]]
|-
|-
| 10 || [[#CreateSystemApplication]] ||
| 10 || [[#CreateSystemApplication]]
|-
|-
| 100 || [[#PopFloatingApplicationForDevelopment]] ||
| 100 || [[#PopFloatingApplicationForDevelopment]]
|}
|}


Line 308: Line 397:


==== IApplicationAccessor ====
==== IApplicationAccessor ====
This is "nn::am::service::IApplicationAccessor".
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 360: Line 451:
| 190 || [9.0.0+] [[#PushToNotificationStorageChannel]] ||
| 190 || [9.0.0+] [[#PushToNotificationStorageChannel]] ||
|-
|-
| 200 || [10.0.0+] RequestApplicationSoftReset ||
| 200 || [10.0.0+] [[#RequestApplicationSoftReset]] ||
|-
| 201 || [10.0.0+] [[#RestartApplicationTimer]] ||
|-
|-
| 201 || [10.0.0+] RestartApplicationTimer ||
| 300 || [20.0.0+] ||
|-
| 301 || [20.0.0+] ||
|}
|}


Line 442: Line 537:


[[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.
[[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 =====
This is "nn::am::service::IAppletAccessor".
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 480: Line 583:


== 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"
|-
|-
! Cmd || Name || Notes
! Cmd || Name
|-
| 0 || [9.0.0+] [[#SetTerminateResult]]
|-
| 10 || [[#ReadThemeStorage]]
|-
| 11 || [[#WriteThemeStorage]]
|-
| 20 || [9.0.0+] [[#PushToAppletBoundChannel]]
|-
| 21 || [9.0.0+] [[#TryPopFromAppletBoundChannel]]
|-
|-
| 0 || [9.0.0+] [[#SetTerminateResult]] ||
| 40 || [8.0.0+] [[#GetDisplayLogicalResolution]]
|-
|-
| 10 || [[#ReadThemeStorage]] ||
| 42 || [8.0.0+] [[#SetDisplayMagnification]]
|-
|-
| 11 || [[#WriteThemeStorage]] ||
| 50 || [8.0.0+] [[#SetHomeButtonDoubleClickEnabled]]
|-
|-
| 20 || [9.0.0+] [[#PushToAppletBoundChannel]] ||
| 51 || [8.0.0+] [[#GetHomeButtonDoubleClickEnabled]]
|-
|-
| 21 || [9.0.0+] [[#TryPopFromAppletBoundChannel]] ||
| 52 || [10.0.0+] [[#IsHomeButtonShortPressedBlocked]]
|-
|-
| 40 || [8.0.0+] [[#GetDisplayLogicalResolution]] ||
| 60 || [11.0.0+] [[#IsVrModeCurtainRequired]]
|-
|-
| 42 || [8.0.0+] [[#SetDisplayMagnification]] ||
| 61 || [12.0.0+] IsSleepRequiredByHighTemperature
|-
|-
| 50 || [8.0.0+] [[#SetHomeButtonDoubleClickEnabled]] ||
| 62 || [12.0.0+] IsSleepRequiredByLowBattery
|-
|-
| 51 || [8.0.0+] [[#GetHomeButtonDoubleClickEnabled]] ||
| 70 || [11.0.0+] [[#SetCpuBoostRequestPriority]]
|-
|-
| 52 || [10.0.0+] IsHomeButtonShortPressedBlocked ||  
| 80 || [14.0.0+] SetHandlingCaptureButtonShortPressedMessageEnabledForApplet
|}
|-
 
| 81 || [14.0.0+] SetHandlingCaptureButtonLongPressedMessageEnabledForApplet
ReadThemeStorage/WriteThemeStorage: these commands copy data from/to a state buffer and the user specified buffer. The size of the state buffer is 0x400-bytes. The default content of the ThemeStorage prior to using the WriteThemeStorage cmd, is: <code>memset(statebuf, 0xAA, 0x400);</code>
|-
 
| 82 || [18.0.0+] SetBlockingCaptureButtonInEntireSystem
=== ReadThemeStorage ===
|-
| 90 || [15.0.0+] OpenNamedChannelAsParent
|-
| 91 || [15.0.0+] OpenNamedChannelAsChild
|-
| 100 || [15.0.0+] SetApplicationCoreUsageMode
|-
| 160 || [18.0.0+] GetNotificationReceiverService
|-
| 161 || [18.0.0+] GetNotificationSenderService
|-
| 300 || [17.0.0+] GetCurrentApplicationId
|-
| 310 || [19.0.0+] IsSystemAppletHomeMenu
|-
| 311 || [20.0.0+]
|-
| 320 || [19.0.0+] SetGpuTimeSliceBoost
|-
| 321 || [19.0.0+] SetGpuTimeSliceBoostDueToApplication
|-
| 322 || [20.0.0+]
|-
| 330 || [19.0.0+]
|-
| 340 || [20.0.0+]
|-
| 341 || [20.0.0+]
|-
| 342 || [20.0.0+]
|-
| 350 || [20.0.0+]
|-
| 360 || [20.0.0+]
|}
 
ReadThemeStorage/WriteThemeStorage: these commands copy data from/to a state buffer and the user specified buffer. The size of the state buffer is 0x400-bytes. The default content of the ThemeStorage prior to using the WriteThemeStorage cmd, is: <code>memset(statebuf, 0xAA, 0x400);</code>
 
=== ReadThemeStorage ===
Takes an input u64 '''offset''' and a type-0x22 output buffer, returns an output u64 '''actual_transfer_size'''.
Takes an input u64 '''offset''' and a type-0x22 output buffer, returns an output u64 '''actual_transfer_size'''.


Line 540: Line 693:
=== GetHomeButtonDoubleClickEnabled ===
=== GetHomeButtonDoubleClickEnabled ===
No input, returns an output u8 bool.
No input, returns an output u8 bool.
=== IsHomeButtonShortPressedBlocked ===
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 563: Line 727:
|-
|-
| 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 568: Line 736:


=== ILibraryAppletSelfAccessor ===
=== ILibraryAppletSelfAccessor ===
This is "nn::am::service::ILibraryAppletSelfAccessor".
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 638: Line 808:
| 130 || [9.0.0+] [[#GetGpuErrorDetectedSystemEvent]] ||
| 130 || [9.0.0+] [[#GetGpuErrorDetectedSystemEvent]] ||
|-
|-
| 140 || [10.0.0+] SetApplicationMemoryReservation ||
| 140 || [10.0.0+] [[#SetApplicationMemoryReservation]] ||
|-
|-
| 150 || [10.0.0+] ShouldSetGpuTimeSliceManually ||
| 150 || [10.0.0+] [[#ShouldSetGpuTimeSliceManually]] ||
|-
| 160 || [17.0.0+] [[#GetLibraryAppletInfoEx]] ||  
|}
|}


Line 766: Line 938:
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.


== IOverlayAppletProxy ==
==== SetApplicationMemoryReservation ====
{| class="wikitable" border="1"
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.
 
==== GetLibraryAppletInfoEx ====
No input, returns an output u64. Currently always returns 0.
 
== IOverlayAppletProxy ==
This is "nn::am::service::IOverlayAppletProxy".
 
{| class="wikitable" border="1"
|-
|-
! Cmd || Name || Notes
! Cmd || Name || Notes
Line 788: Line 973:
|-
|-
| 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 793: Line 980:


=== IOverlayFunctions ===
=== IOverlayFunctions ===
This is "nn::am::service::IOverlayFunctions".
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 816: Line 1,005:
|-
|-
| 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+] GetApplicationNintendoLogo
|-
| 41 || [18.0.0+] GetApplicationStartupMovie
|-
| 50 || [19.0.0+] SetGpuTimeSliceBoostForApplication
|-
| 60 || [19.0.0+]
|-
|-
| 90 || [7.0.0+] [[#SetRequiresGpuResourceUse]]
| 90 || [7.0.0+] [[#SetRequiresGpuResourceUse]]
Line 868: Line 1,067:


This writes the input bool into state, signals an Event, and returns 0.
This writes the input bool into state, signals an Event, and returns 0.
==== IsHealthWarningRequired ====
No input, returns an output u8 bool.


==== SetRequiresGpuResourceUse ====
==== SetRequiresGpuResourceUse ====
Line 882: Line 1,084:


== IApplicationProxy ==
== IApplicationProxy ==
This is "nn::am::service::IApplicationProxy".
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 906: Line 1,110:


=== 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]]
|-
| 11 || [3.0.0+] [[#CreateApplicationAndPushAndRequestToStartForQuest]]
|-
| 12 || [4.0.0+] [[#CreateApplicationAndRequestToStart]]
|-
| 13 || [4.0.0+] [[#CreateApplicationAndRequestToStartForQuest]]
|-
| 14 || [7.0.0+] [[#CreateApplicationWithAttributeAndPushAndRequestToStartForQuest]]
|-
| 15 || [7.0.0+] [[#CreateApplicationWithAttributeAndRequestToStartForQuest]]
|-
| 20 || [[#EnsureSaveData]]
|-
| 21 || [[#GetDesiredLanguage]]
|-
| 22 || [[#SetTerminateResult]]
|-
| 23 || [[#GetDisplayVersion]]
|-
| 24 || [2.0.0+] [[#GetLaunchStorageInfoForDebug]]
|-
| 25 || [3.0.0+] ExtendSaveData
|-
| 26 || [3.0.0+] GetSaveDataSize
|-
| 27 || [5.0.0+] CreateCacheStorage
|-
| 28 || [11.0.0+] [[#GetSaveDataSizeMax]]
|-
| 29 || [11.0.0+] [[#GetCacheStorageMax]]
|-
|-
| 1 || [[#PopLaunchParameter]] ||
| 30 || [[#BeginBlockingHomeButtonShortAndLongPressed]]
|-
|-
| 10 || [[#CreateApplicationAndPushAndRequestToStart]] ||
| 31 || [[#EndBlockingHomeButtonShortAndLongPressed]]
|-
|-
| 11 || [3.0.0+] [[#CreateApplicationAndPushAndRequestToStartForQuest]] ||
| 32 || [[#BeginBlockingHomeButton]]
|-
|-
| 12 || [4.0.0+] [[#CreateApplicationAndRequestToStart]] ||
| 33 || [[#EndBlockingHomeButton]]
|-
|-
| 13 || [4.0.0+] [[#CreateApplicationAndRequestToStartForQuest]] ||
| 34 || [10.0.0-15.0.1] [[#SelectApplicationLicense]]
|-
|-
| 14 || [7.0.0+] [[#CreateApplicationWithAttributeAndPushAndRequestToStartForQuest]] ||
| 35 || [11.0.0+] [[#GetDeviceSaveDataSizeMax]]
|-
|-
| 15 || [7.0.0+] [[#CreateApplicationWithAttributeAndRequestToStartForQuest]] ||
| 36 || [14.0.0+] GetLimitedApplicationLicense
|-
|-
| 20 || [[#EnsureSaveData]] ||
| 37 || [14.0.0+] GetLimitedApplicationLicenseUpgradableEvent
|-
|-
| 21 || [[#GetDesiredLanguage]] ||
| 40 || [[#NotifyRunning]]
|-
|-
| 22 || [[#SetTerminateResult]] ||
| 50 || [2.0.0+] [[#GetPseudoDeviceId]]
|-
|-
| 23 || [[#GetDisplayVersion]] ||
| 60 || [2.0.0+] [[#SetMediaPlaybackStateForApplication]]
|-
|-
| 24 || [2.0.0+] [[#GetLaunchStorageInfoForDebug]] ||
| 65 || [3.0.0+] [[#IsGamePlayRecordingSupported]]
|-
|-
| 25 || [3.0.0+] ExtendSaveData ||
| 66 || [3.0.0+] [[#InitializeGamePlayRecording]]
|-
|-
| 26 || [3.0.0+] GetSaveDataSize ||
| 67 || [3.0.0+] [[#SetGamePlayRecordingState]]
|-
|-
| 27 || [5.0.0+] CreateCacheStorage ||
| 68 || [4.0.0+] [[#RequestFlushGamePlayingMovieForDebug]]
|-
|-
| 30 || [[#BeginBlockingHomeButtonShortAndLongPressed]] ||
| 70 || [3.0.0+] [[#RequestToShutdown]]
|-
|-
| 31 || [[#EndBlockingHomeButtonShortAndLongPressed]] ||
| 71 || [3.0.0+] [[#RequestToReboot]]
|-
|-
| 32 || [[#BeginBlockingHomeButton]] ||
| 72 || [10.0.0+] [[#RequestToSleep]]
|-
|-
| 33 || [[#EndBlockingHomeButton]] ||
| 80 || [4.0.0+] [[#ExitAndRequestToShowThanksMessage]]
|-
|-
| 34 || [10.0.0+] SelectApplicationLicense ||
| 90 || [4.0.0+] [[#EnableApplicationCrashReport]]
|-
|-
| 40 || [[#NotifyRunning]] ||
| 100 || [5.0.0+] [[#InitializeApplicationCopyrightFrameBuffer]]  
|-
|-
| 50 || [2.0.0+] [[#GetPseudoDeviceId]] ||
| 101 || [5.0.0+] [[#SetApplicationCopyrightImage]]
|-
|-
| 60 || [2.0.0+] [[#SetMediaPlaybackStateForApplication]] ||
| 102 || [5.0.0+] [[#SetApplicationCopyrightVisibility]]
|-
|-
| 65 || [3.0.0+] [[#IsGamePlayRecordingSupported]] ||
| 110 || [5.0.0+] [[#QueryApplicationPlayStatistics]]
|-
|-
| 66 || [3.0.0+] [[#InitializeGamePlayRecording]] ||
| 111 || [6.0.0+] [[#QueryApplicationPlayStatisticsByUid]]
|-
|-
| 67 || [3.0.0+] [[#SetGamePlayRecordingState]] ||
| 112 || [20.0.0+]
|-
|-
| 68 || [4.0.0+] [[#RequestFlushGamePlayingMovieForDebug]] ||
| 113 || [20.0.0+]
|-
|-
| 70 || [3.0.0+] [[#RequestToShutdown]] ||
| 120 || [5.0.0+] [[#ExecuteProgram]]
|-
|-
| 71 || [3.0.0+] [[#RequestToReboot]] ||
| 121 || [5.0.0+] [[#ClearUserChannel]]
|-
|-
| 72 || [10.0.0+] RequestToSleep ||
| 122 || [5.0.0+] [[#UnpopToUserChannel]]
|-
|-
| 80 || [4.0.0+] [[#ExitAndRequestToShowThanksMessage]] ||
| 123 || [5.0.0+] [[#GetPreviousProgramIndex]]
|-
|-
| 90 || [4.0.0+] [[#EnableApplicationCrashReport]] ||
| 124 || [6.0.0+] [[#EnableApplicationAllThreadDumpOnCrash]]
|-
|-
| 100 || [5.0.0+] [[#InitializeApplicationCopyrightFrameBuffer]] ||
| 130 || [8.0.0+] [[#GetGpuErrorDetectedSystemEvent]]
|-
|-
| 101 || [5.0.0+] [[#SetApplicationCopyrightImage]] ||
| 131 || [11.0.0+] [[#SetDelayTimeToAbortOnGpuError]]
|-
|-
| 102 || [5.0.0+] [[#SetApplicationCopyrightVisibility]] ||
| 140 || [9.0.0+] [[#GetFriendInvitationStorageChannelEvent]]
|-
|-
| 110 || [5.0.0+] [[#QueryApplicationPlayStatistics]] ||
| 141 || [9.0.0+] [[#TryPopFromFriendInvitationStorageChannel]]  
|-
|-
| 111 || [6.0.0+] [[#QueryApplicationPlayStatisticsByUid]] ||
| 150 || [9.0.0+] [[#GetNotificationStorageChannelEvent]]
|-
|-
| 120 || [5.0.0+] [[#ExecuteProgram]] ||
| 151 || [9.0.0+] [[#TryPopFromNotificationStorageChannel]]
|-
|-
| 121 || [5.0.0+] [[#ClearUserChannel]] ||
| 160 || [9.0.0+] [[#GetHealthWarningDisappearedSystemEvent]]
|-
|-
| 122 || [5.0.0+] [[#UnpopToUserChannel]] ||
| 170 || [9.0.0+] [[#SetHdcpAuthenticationActivated]]
|-
|-
| 123 || [5.0.0+] [[#GetPreviousProgramIndex]] ||
| 180 || [10.1.0+] [[#GetLaunchRequiredVersion]]
|-
|-
| 124 || [6.0.0+] [[#EnableApplicationAllThreadDumpOnCrash]] ||
| 181 || [10.1.0+] [[#UpgradeLaunchRequiredVersion]]
|-
|-
| 130 || [8.0.0+] [[#GetGpuErrorDetectedSystemEvent]] ||
| 190 || [11.0.0+] [[#SendServerMaintenanceOverlayNotification]]
|-
|-
| 140 || [9.0.0+] [[#GetFriendInvitationStorageChannelEvent]] ||
| 200 || [11.0.0+] [[#GetLastApplicationExitReason]]
|-
|-
| 141 || [9.0.0+] [[#TryPopFromFriendInvitationStorageChannel]] ||
| 210 || [20.0.0+]
|-
|-
| 150 || [9.0.0+] [[#GetNotificationStorageChannelEvent]] ||
| 220 || [20.0.0+]
|-
|-
| 151 || [9.0.0+] [[#TryPopFromNotificationStorageChannel]] ||
| 300 || [19.0.0+] [[#CreateMovieWriter]]
|-
|-
| 160 || [9.0.0+] [[#GetHealthWarningDisappearedSystemEvent]] ||
| 310 || [20.0.0+]
|-
|-
| 170 || [9.0.0+] [[#SetHdcpAuthenticationActivated]] ||
| 320 || [20.0.0+]
|-
|-
| 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,079: Line 1,319:


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,097: Line 1,343:
==== EndBlockingHomeButton ====
==== EndBlockingHomeButton ====
No input/output.
No input/output.
==== SelectApplicationLicense ====
Takes an input array of [[#ApplicationLicenseType]], returns an output [[#ApplicationLicenseType]].
==== GetDeviceSaveDataSizeMax ====
No input, returns two output s64s.


==== NotifyRunning ====
==== NotifyRunning ====
Line 1,132: Line 1,384:


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,151: Line 1,406:


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,208: Line 1,463:
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,239: Line 1,497:
==== SetHdcpAuthenticationActivated ====
==== SetHdcpAuthenticationActivated ====
Takes an input u8 bool, no output.
Takes an input u8 bool, no output.
==== GetLaunchRequiredVersion ====
Takes an input [[NCM_services#ApplicationId|ApplicationId]], an u64, returns an output [[#LaunchRequiredVersion]].
sdknso passes hard-coded value 0 for the u64.
==== UpgradeLaunchRequiredVersion ====
Takes an input [[#LaunchRequiredVersion]], an [[NCM_services#ApplicationId|ApplicationId]], an u64, no output.
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.
==== CreateMovieWriter ====
Takes 8-bytes of input and a handle. Returns an [[#IMovieWriter]].
This internally uses the GRC cmd to open an [[GRC_services|IMovieWriter]]. This is therefore not usable on NX since that cmd is stubbed.


==== StartContinuousRecordingFlushForDebug ====
==== StartContinuousRecordingFlushForDebug ====
Line 1,253: Line 1,534:


==== PrepareForJit ====
==== PrepareForJit ====
Takes no input. Launches the [[JIT_services|jit-sysmodule]] if some context variable is not set, with that context variable being initialized afterwards.
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:
 
    if (this->jit_process) {
        Terminate(this->jit_process);
        this->jit_process = nullptr;
    }
 
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.
 
=== IMovieWriter ===
This is "nn::am::service::IMovieWriter".
 
This was added with [19.0.0+].
 
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 ||
|}
 
==== Cmd0 ====
No input. Returns a GRC [[GRC_services|IMovieWriter]].


=== IMovieMaker ===
=== IMovieMaker ===
This is "nn::am::service::IMovieMaker".
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 1,272: Line 1,581:


== ILibraryAppletCreator ==
== ILibraryAppletCreator ==
This is "nn::am::service::ILibraryAppletCreator".
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 1,281: Line 1,592:
|-
|-
| 2 || [[#AreAnyLibraryAppletsLeft]] ||
| 2 || [[#AreAnyLibraryAppletsLeft]] ||
|-
| 3 || [20.0.0+] ||
|-
|-
| 10 || [[#CreateStorage]] ||  
| 10 || [[#CreateStorage]] ||  
Line 1,324: Line 1,637:


=== ILibraryAppletAccessor ===
=== ILibraryAppletAccessor ===
This is "nn::am::service::ILibraryAppletAccessor".
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 1,342: Line 1,657:
| 50 || [[#SetOutOfFocusApplicationSuspendingEnabled]] ||
| 50 || [[#SetOutOfFocusApplicationSuspendingEnabled]] ||
|-
|-
| 60 || [10.0.0+] PresetLibraryAppletGpuTimeSliceZero ||
| 60 || [10.0.0+] [[#PresetLibraryAppletGpuTimeSliceZero]] ||
|-
|-
| 100 || [[#PushInData]] ||  
| 80 || [19.0.0+] RequestForLibraryAppletToGetForeground ||
|-
| 81 || [19.0.0+] GetCurrentChildLibraryApplet ||
|-
| 90 || [20.0.0+] ||
|-
| 100 || [[#PushInData]] ||  
|-
|-
| 101 || [[#PopOutData]] ||  
| 101 || [[#PopOutData]] ||  
Line 1,373: Line 1,694:


Official sw will assert prior to using this if applet-service was not initialized as *Application.
Official sw will assert prior to using this if applet-service was not initialized as *Application.
==== PresetLibraryAppletGpuTimeSliceZero ====
No input/output.
sdknso only uses with with [[Software_Keyboard|swkbd-inline]], immediately after creating the LibraryApplet.


==== PushInData ====
==== PushInData ====
Line 1,411: Line 1,737:


== 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]]
|-
| 5 || [[#GetOperationMode]]
|-
| 6 || [[#GetPerformanceMode]]
|-
| 7 || [[#GetCradleStatus]]
|-
| 8 || [[#GetBootMode]]
|-
| 9 || [[#GetCurrentFocusState]]
|-
| 10 || [[#RequestToAcquireSleepLock]]
|-
| 11 || [[#ReleaseSleepLock]]
|-
| 12 || [[#ReleaseSleepLockTransiently]]
|-
| 13 || [[#GetAcquiredSleepLockEvent]]
|-
| 14 || [11.0.0+] [[#GetWakeupCount]]
|-
| 15 || [19.0.0+]
|-
|-
| 0 || [[#GetEventHandle]] ||
| 20 || [[#PushToGeneralChannel]]
|-
|-
| 1 || [[#ReceiveMessage]] ||
| 30 || [[#GetHomeButtonReaderLockAccessor]]
|-
|-
| 2 || [[#GetThisAppletKind]] ||
| 31 || [2.0.0+] [[#GetReaderLockAccessorEx]]
|-
|-
| 3 || [[#AllowToEnterSleep]] ||
| 32 || [7.0.0+] [[#GetWriterLockAccessorEx]]
|-
|-
| 4 || [[#DisallowToEnterSleep]] ||
| 40 || [2.0.0+] [[#GetCradleFwVersion]]
|-
|-
| 5 || [[#GetOperationMode]] ||
| 50 || [3.0.0+] [[#IsVrModeEnabled]]
|-
|-
| 6 || [[#GetPerformanceMode]] ||
| 51 || [3.0.0+] [[#SetVrModeEnabled]]
|-
|-
| 7 || [[#GetCradleStatus]] ||
| 52 || [4.0.0+] [[#SetLcdBacklighOffEnabled]]
|-
|-
| 8 || [[#GetBootMode]] ||
| 53 || [7.0.0+] [[#BeginVrModeEx]]
|-
|-
| 9 || [[#GetCurrentFocusState]] ||
| 54 || [7.0.0+] [[#EndVrModeEx]]
|-
|-
| 10 || [[#RequestToAcquireSleepLock]] ||
| 55 || [3.0.0+] [[#IsInControllerFirmwareUpdateSection]]
|-
|-
| 11 || [[#ReleaseSleepLock]] ||
| 59 || [11.0.0+] [[#SetVrPositionForDebug]]
|-
|-
| 12 || [[#ReleaseSleepLockTransiently]] ||
| 60 || [3.0.0+] [[#GetDefaultDisplayResolution]]
|-
|-
| 13 || [[#GetAcquiredSleepLockEvent]] ||
| 61 || [3.0.0+] [[#GetDefaultDisplayResolutionChangeEvent]]
|-
|-
| 20 || [[#PushToGeneralChannel]] ||
| 62 || [4.0.0+] [[#GetHdcpAuthenticationState]]
|-
|-
| 30 || [[#GetHomeButtonReaderLockAccessor]] ||
| 63 || [4.0.0+] [[#GetHdcpAuthenticationStateChangeEvent]]
|-
|-
| 31 || [2.0.0+] [[#GetReaderLockAccessorEx]] ||
| 64 || [5.0.0+] [[#SetTvPowerStateMatchingMode]]
|-
|-
| 32 || [7.0.0+] [[#GetWriterLockAccessorEx]] ||
| 65 || [5.1.0+] [[#GetApplicationIdByContentActionName]]
|-
|-
| 40 || [2.0.0+] [[#GetCradleFwVersion]] ||
| 66 || [6.0.0+] [[#SetCpuBoostMode]]
|-
|-
| 50 || [3.0.0+] [[#IsVrModeEnabled]] ||
| 67 || [10.0.0+] [[#CancelCpuBoostMode]]
|-
|-
| 51 || [3.0.0+] [[#SetVrModeEnabled]] ||
| 68 || [11.0.0+] [[#GetBuiltInDisplayType]]
|-
|-
| 52 || [4.0.0+] [[#SetLcdBacklighOffEnabled]] ||
| 80 || [6.0.0+] [[#PerformSystemButtonPressingIfInFocus]]
|-
|-
| 53 || [7.0.0+] [[#BeginVrModeEx]] ||
| 90 || [7.0.0+] [[#SetPerformanceConfigurationChangedNotification]]
|-
|-
| 54 || [7.0.0+] [[#EndVrModeEx]] ||
| 91 || [7.0.0+] [[#GetCurrentPerformanceConfiguration]]
|-
|-
| 55 || [3.0.0+] [[#IsInControllerFirmwareUpdateSection]] ||
| 100 || [9.1.0+] [[#SetHandlingHomeButtonShortPressedEnabled]]
|-
|-
| 60 || [3.0.0+] [[#GetDefaultDisplayResolution]] ||
| 110 || [11.0.0+] [[#OpenMyGpuErrorHandler]]
|-
|-
| 61 || [3.0.0+] [[#GetDefaultDisplayResolutionChangeEvent]] ||
| 120 || [13.0.0+] GetAppletLaunchedHistory
|-
|-
| 62 || [4.0.0+] [[#GetHdcpAuthenticationState]] ||
| 200 || [7.0.0+] [[#GetOperationModeSystemInfo]]
|-
|-
| 63 || [4.0.0+] [[#GetHdcpAuthenticationStateChangeEvent]] ||
| 300 || [9.0.0+] [[#GetSettingsPlatformRegion]]
|-
|-
| 64 || [5.0.0+] [[#SetTvPowerStateMatchingMode]] ||
| 400 || [10.0.0+] [[#ActivateMigrationService]]
|-
|-
| 65 || [5.1.0+] [[#GetApplicationIdByContentActionName]] ||
| 401 || [10.0.0+] [[#DeactivateMigrationService]]
|-
|-
| 66 || [6.0.0+] [[#SetCpuBoostMode]] ||
| 500 || [11.0.0+] [[#DisableSleepTillShutdown]]
|-
|-
| 67 || [10.0.0+] CancelCpuBoostMode ||
| 501 || [11.0.0+] [[#SuppressDisablingSleepTemporarily]]
|-
|-
| 80 || [6.0.0+] [[#PerformSystemButtonPressingIfInFocus]] ||
| 502 || [12.0.0+] IsSleepEnabled
|-
|-
| 90 || [7.0.0+] [[#SetPerformanceConfigurationChangedNotification]] ||
| 503 || [12.0.0+] IsDisablingSleepSuppressed
|-
|-
| 91 || [7.0.0+] [[#GetCurrentPerformanceConfiguration]] ||
| 600 || [20.0.0+] ([17.0.0-18.1.0] OpenNamedChannelAsChild)
|-
|-
| 100 || [9.1.0+] [[#SetHandlingHomeButtonShortPressedEnabled]] ||
| 900 || [11.0.0+] [[#SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled]]
|-
|-
| 200 || [7.0.0+] [[#GetOperationModeSystemInfo]] ||
| 910 || [17.0.0+] GetLaunchRequiredTick
|-
|-
| 300 || [9.0.0+] [[#GetSettingsPlatformRegion]] ||
| 1000 || [19.0.0+] BeginVrMode3d
|-
|-
| 400 || [10.0.0+] ActivateMigrationService ||
| 1001 || [19.0.0+] EndVrMode3d
|-
|-
| 401 || [10.0.0+] DeactivateMigrationService ||
| 1002 || [19.0.0+] IsVrModeEnabled3d
|}
|}


Line 1,527: Line 1,887:


=== 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,540: Line 1,900:


=== 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,556: Line 1,913:
=== 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,613: Line 1,973:
=== 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,635: Line 2,006:


=== 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 ===
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,647: Line 2,028:
=== 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,658: Line 2,044:
This just returns the output from [[Settings_services#GetPlatformRegion|setsys GetPlatformRegion]].
This just returns the output from [[Settings_services#GetPlatformRegion|setsys GetPlatformRegion]].


== ISelfController ==
=== ActivateMigrationService ===
No input/output.
 
Besides various other functionality, if required this eventually uses [[NS_Services|ns]] LaunchLibraryApplet to launch [[Migration_services|migration]].
 
=== DeactivateMigrationService ===
No input/output.
 
=== 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 uses various [[NV_services#nvgem:cd|nvgem:cd]] commands.
 
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#Exit]]
| 100 || [[#GetManualGpuErrorInfoSize]]
|-
|-
| 1 || [[#LockExit]]
| 101 || [[#GetManualGpuErrorInfo]]
|-
|-
| 2 || [[#UnlockExit]]
| 102 || [[#GetManualGpuErrorDetectionSystemEvent]]
|-
|-
| 3 || [2.0.0+] [[#EnterFatalSection]]
| 103 || [[#FinishManualGpuErrorHandling]]
|-
|}
| 4 || [2.0.0+] [[#LeaveFatalSection]]
 
|-
==== GetManualGpuErrorInfoSize ====
| 9 || [[#GetLibraryAppletLaunchableEvent]]
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 ==
This is "nn::am::service::ISelfController".
 
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 || [[#Exit]]
|-
| 1 || [[#LockExit]]
|-
| 2 || [[#UnlockExit]]
|-
| 3 || [2.0.0+] [[#EnterFatalSection]]
|-
| 4 || [2.0.0+] [[#LeaveFatalSection]]
|-
| 9 || [[#GetLibraryAppletLaunchableEvent]]
|-
|-
| 10 || [[#SetScreenShotPermission]]
| 10 || [[#SetScreenShotPermission]]
Line 1,696: Line 2,137:
|-
|-
| 20 || [4.0.0+] [[#SetDesirableKeyboardLayout]]
| 20 || [4.0.0+] [[#SetDesirableKeyboardLayout]]
|-
| 21 || [13.0.0+] GetScreenShotProgramId
|-
| 22 || [19.0.0+] GetScreenShotAcdIndex
|-
| 23 || [19.0.0+] GetScreenShotApparentPlatform
|-
| 24 || [19.0.0+] GetScreenShotApplicationProperty
|-
|-
| 40 || [[#CreateManagedDisplayLayer]]
| 40 || [[#CreateManagedDisplayLayer]]
Line 1,705: Line 2,154:
| 43 || [5.0.0+] [[#GetSystemSharedBufferHandle]]
| 43 || [5.0.0+] [[#GetSystemSharedBufferHandle]]
|-
|-
| 44 || [10.0.0+] CreateManagedDisplaySeparableLayer
| 44 || [10.0.0+] [[#CreateManagedDisplaySeparableLayer]]
|-
| 45 || [10.0.0+] [[#SetManagedDisplayLayerSeparationMode]]
|-
|-
| 45 || [10.0.0+] SetManagedDisplayLayerSeparationMode
| 46 || [13.0.0+] [[#SetRecordingLayerCompositionEnabled]]
|-
|-
| 50 || [[#SetHandlesRequestToDisplay]]
| 50 || [[#SetHandlesRequestToDisplay]]
Line 1,748: Line 2,199:
|-
|-
| 110 || [8.0.0+] [[#SetApplicationAlbumUserData]]
| 110 || [8.0.0+] [[#SetApplicationAlbumUserData]]
|-
| 120 || [11.0.0+] [[#SaveCurrentScreenshot]]
|-
| 130 || [13.0.0+] [[#SetRecordVolumeMuted]]
|-
| 200 || [20.0.0+]
|-
| 210 || [20.0.0+]
|-
| 211 || [20.0.0+]
|-
| 220 || [20.0.0+]
|-
| 221 || [20.0.0+]
|-
| 230 || [20.0.0+]
|-
|-
| 1000 || [7.0.0+] [[#GetDebugStorageChannel]]
| 1000 || [7.0.0+] [[#GetDebugStorageChannel]]
Line 1,858: Line 2,325:


Same as [[#GetSystemSharedLayerHandle]] except this just gets the SharedBufferHandle.
Same as [[#GetSystemSharedLayerHandle]] except this just gets the SharedBufferHandle.
=== CreateManagedDisplaySeparableLayer ===
No input, returns two output u64 LayerIds.
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.
=== SetManagedDisplayLayerSeparationMode ===
Takes an input u32, no output.
sdknso exposes this as <code>nn::vi::SetRecordingLayerEnabled(bool)</code>.
The input u32 must be 0-1.
=== SetRecordingLayerCompositionEnabled ===
Takes an input bool, no output.


=== SetHandlesRequestToDisplay ===
=== SetHandlesRequestToDisplay ===
Line 1,929: Line 2,411:


=== 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 1,954: Line 2,434:


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 1,961: Line 2,449:


== 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 1,979: Line 2,469:


== IWindowController ==
== IWindowController ==
This is "nn::am::service::IWindowController".
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 2,035: Line 2,527:


== IAudioController ==
== IAudioController ==
This is "nn::am::service::IAudioController".
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 2,048: Line 2,542:
|-
|-
| 4 || [[#SetTransparentVolumeRate]]
| 4 || [[#SetTransparentVolumeRate]]
|-
| 5 || [20.0.0+]
|}
|}


Line 2,070: Line 2,566:


== IDisplayController ==
== IDisplayController ==
This is "nn::am::service::IDisplayController".
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 2,227: Line 2,725:


=== 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,268: Line 2,770:


== 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,329: Line 2,846:
Takes an input [[#ILibraryAppletAccessor]], no output.
Takes an input [[#ILibraryAppletAccessor]], no output.


== IDebugFunctions ==
== ISystemProcessCommonFunctions ==
This is "nn::am::service::ISystemProcessCommonFunctions".
 
This was added with [19.0.0+].
 
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Cmd || Name || Notes
! Cmd || Name
|-
|-
| 0 || [[#NotifyMessageToHomeMenuForDebug]] ||
| 0 ||  
|}
 
=== Cmd0 ===
No input. Returns an [[#IApplicationObserver]].
 
=== IApplicationObserver ===
This is "nn::am::service::IApplicationObserver".
 
This was added with [19.0.0+].
 
{| class="wikitable" border="1"
|-
|-
| 1 || [1.0.0-9.2.0] [[#OpenMainApplication]] ||  
! Cmd || Name
|-
|-
| 10 || [[#PerformSystemButtonPressing]] ||
| 1 ||  
|-
|-
| 20 || [[#InvalidateTransitionLayer]] ||
| 2 ||
|-
| 10 ||
|-
| 20 ||  
|-
| 30 ||
|}
 
== IDebugFunctions ==
This is "nn::am::service::IDebugFunctions".
 
{| class="wikitable" border="1"
|-
|-
| 30 || [6.0.0+] [[#RequestLaunchApplicationWithUserAndArgumentForDebug]] ||
! Cmd || Name
|-
|-
| 40 || [6.0.0+] [[#GetAppletResourceUsageInfo]] ||
| 0 || [[#NotifyMessageToHomeMenuForDebug]]
|-
|-
| 100 || [7.0.0+] [[#SetCpuBoostModeForApplet]] ||
| 1 || [1.0.0-9.2.0] [[#OpenMainApplication]]
|-
|-
| 101 || [10.0.0+] CancelCpuBoostModeForApplet ||
| 10 || [[#PerformSystemButtonPressing]]
|-
|-
| 110 || [9.0.0+] [[#PushToAppletBoundChannelForDebug]] ||
| 20 || [[#InvalidateTransitionLayer]]
|-
|-
| 111 || [9.0.0+] [[#TryPopFromAppletBoundChannelForDebug]] ||
| 30 || [6.0.0+] [[#RequestLaunchApplicationWithUserAndArgumentForDebug]]
|-
|-
| 120 || [9.0.0+] [[#AlarmSettingNotificationEnableAppEventReserve]] ||
| 31 || [12.0.0+] [[#RequestLaunchApplicationByApplicationLaunchInfoForDebug]]
|-
|-
| 121 || [9.0.0+] [[#AlarmSettingNotificationDisableAppEventReserve]] ||
| 40 || [6.0.0+] [[#GetAppletResourceUsageInfo]]
|-
|-
| 122 || [9.0.0+] [[#AlarmSettingNotificationPushAppEventNotify]] ||
| 50 || [15.0.0+] AddSystemProgramIdAndAppletIdForDebug
|-
|-
| 130 || [9.0.0+] [[#FriendInvitationSetApplicationParameter]] ||
| 51 || [16.0.0+] AddOperationConfirmedLibraryAppletIdForDebug
|-
|-
| 131 || [9.0.0+] [[#FriendInvitationClearApplicationParameter]] ||
| 52 || [17.0.0+] GetProgramIdFromAppletIdForDebug
|-
|-
| 132 || [9.0.0+] [[#FriendInvitationPushApplicationParameter]] ||
| 53 || [18.0.0+] GetProgramIdFromAppletIdAndLibraryAppletModeForDebug
|-
| 100 || [7.0.0+] [[#SetCpuBoostModeForApplet]]
|-
| 101 || [10.0.0+] [[#CancelCpuBoostModeForApplet]]
|-
| 110 || [9.0.0+] [[#PushToAppletBoundChannelForDebug]]
|-
| 111 || [9.0.0+] [[#TryPopFromAppletBoundChannelForDebug]]
|-
| 120 || [9.0.0+] [[#AlarmSettingNotificationEnableAppEventReserve]]
|-
| 121 || [9.0.0+] [[#AlarmSettingNotificationDisableAppEventReserve]]
|-
| 122 || [9.0.0+] [[#AlarmSettingNotificationPushAppEventNotify]]
|-
| 130 || [9.0.0+] [[#FriendInvitationSetApplicationParameter]]
|-
| 131 || [9.0.0+] [[#FriendInvitationClearApplicationParameter]]
|-
| 132 || [9.0.0+] [[#FriendInvitationPushApplicationParameter]]
|-
| 140 || [14.0.0+] RestrictPowerOperationForSecureLaunchModeForDebug
|-
| 200 || [15.0.0+] CreateFloatingLibraryAppletAccepterForDebug
|-
| 300 || [16.0.0+] TerminateAllRunningApplicationsForDebug
|-
| 410 || [18.0.0+] CreateGeneralStorageForDebug
|-
| 411 || [18.0.0+] ReadGeneralStorageForDebug
|-
| 412 || [18.0.0+] WriteGeneralStorageForDebug
|-
| 430 || [20.0.0+]
|-
| 431 || [20.0.0+]
|-
| 900 || [12.0.0+] GetGrcProcessLaunchedSystemEvent
|-
| 910 || [20.0.0+]
|}
|}


Line 2,387: Line 2,971:


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]]).
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]]).
=== RequestLaunchApplicationByApplicationLaunchInfoForDebug ===
Takes a total of 0x58-bytes of input, a type-0x5 input buffer containing an array of 0x10-byte entries, and a type-0x5 input buffer. No output.
[19.0.0+] Takes a total of 0x88-bytes of input, a type-0x5 input buffer containing an array of 0x10-byte entries, and a type-0x5 input buffer. No output.


=== GetAppletResourceUsageInfo ===
=== GetAppletResourceUsageInfo ===
Line 2,392: Line 2,981:


=== 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.
=== CancelCpuBoostModeForApplet ===
No input/output.


=== PushToAppletBoundChannelForDebug ===
=== PushToAppletBoundChannelForDebug ===
Line 2,441: Line 3,033:


== IStorage ==
== IStorage ==
This is "nn::am::service::IStorage".
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 2,455: Line 3,049:


== IStorageAccessor ==
== IStorageAccessor ==
This is "nn::am::service::IStorageAccessor".
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 2,467: Line 3,063:


== ITransferStorageAccessor ==
== ITransferStorageAccessor ==
This is "nn::am::service::ITransferStorageAccessor".
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 2,489: Line 3,087:


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.
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.
= (Switch 2) appletOE =
[S2] This is "nn::am::service::IApplicationProxyServiceForNxCompat".
{| class="wikitable" border="1"
|-
! Cmd || Name || Notes
|-
| 0 || [[#OpenApplicationProxy]] ||
|-
| 2000 || [[#OpenCompatApplicationFunctions]] ||  Returns an [[#(Switch 2) INxCompatApplicationFunctions]]
|}


== OpenApplicationProxy ==
== OpenApplicationProxy ==
Line 2,497: Line 3,107:
On failure, official user-processes will retry using this command in a loop while the retval is 0x19280, with svcSleepThread(10000000) being called first.
On failure, official user-processes will retry using this command in a loop while the retval is 0x19280, with svcSleepThread(10000000) being called first.


= idle:sys =
= (Switch 2) INxCompatApplicationFunctions =
This is "nn::idle::detail::IPolicyManagerSystem"
This is "nn::am::service::INxCompatApplicationFunctions".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Cmd || Name
! Cmd || Name || Notes
|-
| 2000 || GetTipcCompatInterface? || Returns a TIPC handle to [[#TipcCompatInterface]].
|-
| 2001 || ||
|-
| 2002 || ||
|-
| 2003 || || Called directly after "nn::vi::WriteToCopyrightFramebuffer".
|-
| 2004 || ||
|-
|-
| 0 || GetAutoPowerDownEvent
| 2010 || ||  
|-
|-
|rowspan="2"| 1 || [1.0.0-3.0.2]
| 2020 || Initialize? || Called during init. Takes no args.
|-
|-
| [7.0.0+] IsAutoPowerDownRequested
| 2030 || GetVsyncEvent? || Takes no args. Returns a event handle.
|-
|-
| 2 || [1.0.0-3.0.2]
| 2040 || GetVsyncTimestamp? || When above event triggers, this returns a timestamp.
|-
|-
| 3 || [[#SetHandlingContext]]
| 2050 || ||
|-
|-
| 4 || LoadAndApplySettings
| 2060 ||  ||  
|-
|-
| 5 || ReportUserIsActive
| 2070 || CreateMovieMaker || Same args as [[#CreateMovieMaker]]. Returns an [[#IMovieMaker]].
|}
|}


== SetHandlingContext ==
== (Switch 2) TipcCompatInterface ==
[3.0.0+] Now takes an additional 0x10-bytes of input.
 
= omm =
This is "nn::omm::detail::IOperationModeManager"
 
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*]].
 
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Cmd || Name
! Cmd (adjusted - 16) || Name || Notes
|-
|-
| 0 || GetOperationMode
| 4 || InitializeA || Sends current process handle, and struct { u64 aruid; u64 always_0x8000000000000005; u64 always_0; u64 always_0; u64 always_0; u64 svc_get_info_31_or_32_output; }.
|-
|-
| 1 || GetOperationModeChangeEvent
| 11 || InitializeB || Sends current process handle. No args. Sent directly after cmd4.
|-
|-
| 2 || EnableAudioVisual
| 101 || InitializeC || Sent directly after cmd11.
|-
|-
| 3 || DisableAudioVisual
| 111 || ||
|-
|-
| 4 || EnterSleepAndWait
| 112 || ||
|-
|-
| 5 || GetCradleStatus
| 114 || ||
|-
|-
| 6 || FadeInDisplay
| 115 || ||
|-
|-
| 7 || FadeOutDisplay
| 187 || ||
|-
|-
| 8 || [2.0.0+] GetCradleFwVersion
| 201 || ||
|-
|-
| 9 || [2.0.0+] NotifyCecSettingsChanged
| 301 || ||
|-
|-
| 10 || [3.0.0+] SetOperationModePolicy
| 327 || ||
|-
|-
| 11 || [3.0.0+] GetDefaultDisplayResolution
| 303 || ||
|-
|-
| 12 || [3.0.0+] GetDefaultDisplayResolutionChangeEvent
| 311 || ||
|-
|-
| 13 || [3.0.0+] UpdateDefaultDisplayResolution
| 312 || ||
|-
|-
| 14 || [3.0.0+] ShouldSleepOnBoot
| 314 || ||
|-
|-
| 15 || [4.0.0+] NotifyHdcpApplicationExecutionStarted
| 315 || ||
|-
|-
| 16 || [4.0.0+] NotifyHdcpApplicationExecutionFinished
| 321 || ||
|-
|-
| 17 || [4.0.0+] NotifyHdcpApplicationDrawingStarted
| 391 || ||
|-
|-
| 18 || [4.0.0+] NotifyHdcpApplicationDrawingFinished
| 401 || ||
|-
|-
| 19 || [4.0.0+] GetHdcpAuthenticationFailedEvent
| 402 || ||
|-
|-
| 20 || [4.0.0+] GetHdcpAuthenticationFailedEmulationEnabled
| 423 || ||
|-
|-
| 21 || [4.0.0+] SetHdcpAuthenticationFailedEmulation
| 434 || ||
|-
|-
| 22 || [4.0.0+] GetHdcpStateChangeEvent
| 497 || ||
|-
|-
| 23 || [4.0.0+] GetHdcpState
| 901 || ||
|-
|-
| 24 || [5.0.0+] ShowCardUpdateProcessing
| 902 || ||
|-
|-
| 25 || [5.0.0+] SetApplicationCecSettingsAndNotifyChanged
| 903 || ||
|-
|-
| 26 || [7.0.0+] [[#GetOperationModeSystemInfo]]
| 905 || ||
|-
|-
| 27 || [9.0.0+] GetAppletFullAwakingSystemEvent
| 911 || ||
|}
 
== GetOperationModeSystemInfo ==
No input, returns an output u32.
 
This is used by [[#GetOperationModeSystemInfo|ICommonStateGetter GetOperationModeSystemInfo]].
 
= spsm =
This is "nn::spsm::detail::IPowerStateInterface".
 
{| class="wikitable" border="1"
|-
|-
! Cmd || Name
| 912 || ||
|-
|-
| 0 || GetCurrentState
| 922 || ||
|-
|-
| 1 || EnterSleep
| 961 || ||
|-
| 991 || ||
|-
| 1001 || ||
|-
| 1002 || ||
|-
| 1003 || ||
|-
| 1101 || ||
|-
| 1102 || ||
|-
|-
| 2 || GetLastWakeReason
| 1401 || InitializeNvdrv2WithTransferMemory || Takes a TransferMemory handle, and u64 size. Returns an [[#INvDrv2User]].
|-
|-
| 3 || Shutdown
| 1402 || InitializeNvdrv2 || Returns an [[#INvDrv2User]].
|-
|-
| 4 || GetNotificationMessageEventHandle
| 1501 || ||
|-
|-
| 5 || ReceiveNotificationMessage
| 1502 || ||
|-
|-
| 6 || AnalyzeLogForLastSleepWakeSequence
| 1601 || ||
|-
|-
| 7 || ResetEventLog
| 1602 || ||
|-
|-
| 8 || AnalyzePerformanceLogForLastSleepWakeSequence
| 1603 || ||
|-
|-
| 9 || ChangeHomeButtonLongPressingTime
| 1611 || ||
|-
|-
| 10 || PutErrorState
| 1612 || ||
|-
|-
| 11 || [1.0.0-3.0.2] InvalidateCurrentHomeButtonPressing
| 1691 || ||
|}
|}


[3.0.0+] Cmd11 now takes a total of 8-bytes of input.
== (Switch 2) INvDrv2User ==
 
This is "nn::nvdrv::INvDrv2User".
= tcap =
This is "nn::tcap::server::IManager".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 2,635: Line 3,246:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || GetContinuousHighSkinTemperatureEvent
| 0 || Open
|-
|-
| 1 || SetOperationMode
| 1 || Ioctl
|-
|-
| 2 || LoadAndApplySettings
| 2 || Close
|}
 
= caps:su =
This is "nn::capsrv::sf::IScreenShotApplicationService".
 
This was added with [[6.0.0]].
 
This can be used by applications to save screenshots.
 
{| class="wikitable" border="1"
|-
|-
! Cmd || Name || Notes
| 4 || QueryEvent
|-
|-
| 32 || [7.0.0+] SetShimLibraryVersion || Takes a total of 0x10-bytes of input and a PID, no output.
| 9 || DumpStatus
|-
|-
| 201 || SaveScreenShot ||  
| 10 || InitializeDevtools
|-
|-
| 203 || SaveScreenShotEx0 ||  
| 11 || Ioctl2
|-
|-
| 205 || [8.0.0+] SaveScreenShotEx1 ||  
| 12 || Ioctl3
|-
|-
| 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.
| 13 || SetGraphicsFirmwareMemoryMarginEnabled
|}
|}


'''SetShimLibraryVersion''' is a wrapper for [[Capture_services|caps:c]] cmd33. Commands '''SaveScreenShot''', '''SaveScreenShotEx0''', '''SaveScreenShotEx1''' and '''SaveScreenShotEx2''' are wrappers for [[Display_services|caps:sc]] cmd210.
= idle:sys =
This is "nn::idle::detail::IPolicyManagerSystem"
 
This was moved to [[OMM_services|omm]] with [14.0.0+].


== SaveScreenShot ==
{| class="wikitable" border="1"
Takes two input u32s, an u64 AppletResourceUserId, a PID, and a type-0x45 input buffer containing image data. Returns an [[Capture_services|ApplicationAlbumEntry]].
|-
! Cmd || Name
|-
| 0 || GetAutoPowerDownEvent
|-
| 1 || [7.0.0+] IsAutoPowerDownRequested ([1.0.0-3.0.2] )
|-
| 2 || [1.0.0-3.0.2]
|-
| 3 || [[#SetHandlingContext]]
|-
| 4 || LoadAndApplySettings
|-
| 5 || ReportUserIsActive
|}


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.
== SetHandlingContext ==
[3.0.0+] Now takes an additional 0x10-bytes of input.


This cmd internally uses an all-zero ScreenShotAttributeEx0, with u32 +0 = input u32 and u32 +0x8 = 0x3.
[13.0.0+] Total input size is now 0x30 instead of 0x38.


== SaveScreenShotEx0 ==
= omm =
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]].
This is "nn::omm::detail::IOperationModeManager"


== SaveScreenShotEx1 ==
Operation Mode Manager (OMM) is a service responsible for arbitrating the operation changes between docked and handheld modes.
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]].
Besides [[PTM_services|PTM]], this is the only service that interacts with the [[Dock]] through [[USB_services|usb:pd*]].


== SaveScreenShotEx2 ==
This was moved to [[OMM_services|omm]] with [14.0.0+].
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 =
{| class="wikitable" border="1"
This section documents library applet launching.
|-
 
! Cmd || Name
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.
|-
 
| 0 || GetOperationMode
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
| 1 || GetOperationModeChangeEvent
|-
|-
| 0x0 || 4 || 1 || Common Arguments version
| 2 || EnableAudioVisual
|-
|-
| 0x4 || 4 || 0x20 || Common Arguments size
| 3 || DisableAudioVisual
|-
|-
| 0x8 || 4 || || Library applet version (API version)
| 4 || EnterSleepAndWait
|-
|-
| 0xC || 4 || 0 || Theme color
| 5 || GetCradleStatus
|-
|-
| 0x10 || 1 || 0 || Play startup sound
| 6 || FadeInDisplay
|-
|-
| 0x18 || 8 || N/A || System tick (see [[SVC#svcGetSystemTick|svcGetSystemTick]])
| 7 || FadeOutDisplay
|-
|-
|}
| 8 || [2.0.0+] GetCradleFwVersion
 
= Enums =
=== AppletId ===
See also [[:Category:Library Applets]].
 
{| class="wikitable" border="1"
|-
|-
! Id
| 9 || [2.0.0+] NotifyCecSettingsChanged
! ProgramId
! Description
|-
|-
| 0x01
| 10 || [3.0.0+] SetOperationModePolicy
|  
| Application (not valid for use with LibraryApplets)
|-
|-
| 0x02
| 11 || [3.0.0+] GetDefaultDisplayResolution
| 010000000000100C
| overlayDisp (OverlayApplet)
|-
|-
| 0x03
| 12 || [3.0.0+] GetDefaultDisplayResolutionChangeEvent
| 0100000000001000
| qlaunch (SystemAppletMenu)
|-
|-
| 0x04
| 13 || [3.0.0+] UpdateDefaultDisplayResolution
| 0100000000001012
| starter (DummyStarter)
|-
|-
| 0x0A
| 14 || [3.0.0+] ShouldSleepOnBoot
| 0100000000001001
| [[Auth_Applet|auth (LibraryAppletAuth)]]
|-
|-
| 0x0B
| 15 || [4.0.0+] NotifyHdcpApplicationExecutionStarted
| 0100000000001002
| cabinet (LibraryAppletCabinet)
|-
|-
| 0x0C
| 16 || [4.0.0+] NotifyHdcpApplicationExecutionFinished
| 0100000000001003
| [[Controller_Applet|controller (LibraryAppletController)]]
|-
|-
| 0x0D
| 17 || [4.0.0+] NotifyHdcpApplicationDrawingStarted
| 0100000000001004
| dataErase (LibraryAppletDataErase)
|-
|-
| 0x0E
| 18 || [4.0.0+] NotifyHdcpApplicationDrawingFinished
| 0100000000001005
| [[Error_Applet|error (LibraryAppletError)]]
|-
|-
| 0x0F
| 19 || [4.0.0+] GetHdcpAuthenticationFailedEvent
| 0100000000001006
| netConnect (LibraryAppletNetConnect)
|-
|-
| 0x10
| 20 || [4.0.0+] GetHdcpAuthenticationFailedEmulationEnabled
| 0100000000001007
| [[Profile_Selector|playerSelect (LibraryAppletPlayerSelect)]]
|-
|-
| 0x11
| 21 || [4.0.0+] SetHdcpAuthenticationFailedEmulation
| 0100000000001008
| [[Software_Keyboard|swkbd (LibraryAppletSwkbd)]]
|-
|-
| 0x12
| 22 || [4.0.0+] GetHdcpStateChangeEvent
| 0100000000001009
| miiEdit (LibraryAppletMiiEdit)
|-
|-
| 0x13
| 23 || [4.0.0+] GetHdcpState
| 010000000000100A
| [[Internet_Browser#010000000000100A|web (LibraryAppletWeb)]]
|-
|-
| 0x14
| 24 || [5.0.0+] ShowCardUpdateProcessing
| 010000000000100B
| [[Internet_Browser#ShopN|shop (LibraryAppletShop)]]
|-
|-
| 0x15
| 25 || [5.0.0+] SetApplicationCecSettingsAndNotifyChanged
| 010000000000100D
| [[Album_Applet|photoViewer (LibraryAppletPhotoViewer)]]
|-
|-
| 0x16
| 26 || [7.0.0+] [[#GetOperationModeSystemInfo]]
| 010000000000100E
| set (LibraryAppletSet)
|-
|-
| 0x17
| 27 || [9.0.0+] GetAppletFullAwakingSystemEvent
| 010000000000100F
| [[Internet_Browser#Offline_Applet|offlineWeb (LibraryAppletOfflineWeb)]]
|-
|-
| 0x18
| 28 || [12.0.0+] [[#CreateCradleFirmwareUpdater]]
| 0100000000001010
|}
| [[Internet_Browser#Whitelisted_Applets|loginShare (LibraryAppletLoginShare)]]
 
== GetOperationModeSystemInfo ==
No input, returns an output u32.
 
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"
|-
|-
| 0x19
! Cmd || Name
| 0100000000001011
| [[Internet_Browser#WifiWebAuthApplet|wifiWebAuth (LibraryAppletWifiWebAuth)]]
|-
|-
| 0x1A
| 0 || Start
| 0100000000001013
| [[MyPage_Applet|myPage (LibraryAppletMyPage)]]
|-
|-
| 0x1B
| 1 || Finish
| 010000000000101A
| gift (LibraryAppletGift)
|-
|-
| 0x1C
| 2 || GetUpdateDeviceStatus
| 010000000000101C
| userMigration (LibraryAppletUserMigration)
|-
|-
| 0x1D
| 3 || GetUpdateProgress
| 010000000000101D
| [9.0.0+] EncounterSys (LibraryAppletPreomiaSys)
|-
|-
| 0x1E
| 4 || GetUpdateDeviceStatusChangeEvent
| 0100000000001020
| [9.0.0+] story (LibraryAppletStory)
|-
|-
| 0x1F
| 5 || GetUpdateProgress2
| 010070000E3C0000
|}
| [9.0.0+] EncounterUsr (LibraryAppletPreomiaUsr)
 
= spsm =
This is "nn::spsm::detail::IPowerStateInterface".
 
This was moved to [[OMM_services|omm]] with [14.0.0+].
 
{| class="wikitable" border="1"
|-
|-
| 0x20
! Cmd || Name
| 010086000E49C000
| [9.0.0+] EncounterUsrDummy (LibraryAppletPreomiaUsrDummy)
|-
|-
| 0x21
| 0 || GetCurrentState
| 0100000000001038
| [10.0.0+] sample (LibraryAppletSample)
|-
|-
| 0x3F1
| 1 || EnterSleep
| 010000000000D619
| [10.0.0+]
|-
|-
| 0x3F2
| 2 || GetLastWakeReason
| 010000000000D610
| [10.0.0+]
|-
|-
| 0x3F3
| 3 || Shutdown
| 010000000000D611
| [10.0.0+]
|-
|-
| 0x3F4
| 4 || GetNotificationMessageEventHandle
| 010000000000D612
| [10.0.0+]
|-
|-
| 0x3F5
| 5 || ReceiveNotificationMessage
| 010000000000D613
| [10.0.0+]
|-
|-
| 0x3F6
| 6 || AnalyzeLogForLastSleepWakeSequence
| 010000000000D614
| [10.0.0+]
|-
|-
| 0x3F7
| 7 || ResetEventLog
| 010000000000D615
| [10.0.0+]
|-
|-
| 0x3F8
| 8 || AnalyzePerformanceLogForLastSleepWakeSequence
| 010000000000D616
| [10.0.0+]
|-
|-
| 0x3F9
| 9 || ChangeHomeButtonLongPressingTime
| 010000000000D617
| [10.0.0+]
|-
|-
| 0x3FA
| 10 || PutErrorState
| 010000000000D60A
| [10.0.0+]
|-
|-
| 0x3FB
| 11 || [1.0.0-3.0.2] InvalidateCurrentHomeButtonPressing
| 010000000000D60B
| [10.0.0+]
|-
| 0x3FC
| 010000000000D60C
| [10.0.0+]
|-
| 0x3FD
| 010000000000D60D
| [10.0.0+]
|-
| 0x3FE
| 010000000000D60E
| [10.0.0+]
|}
|}


=== LibraryAppletMode ===
[3.0.0+] Cmd11 now takes a total of 8-bytes of input.
 
= tcap =
This is "nn::tcap::server::IManager".
 
This was removed with [11.0.0+].
 
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! ID
! Cmd || Name
!  Description
|-
|-
| 0x0
| 0 || GetContinuousHighSkinTemperatureEvent
| AllForeground
|-
|-
| 0x1
| 1 || SetOperationMode
| Background
|-
| 0x2
| No UI
|-
| 0x3
| Background with indirect display, see also [[#GetIndirectLayerConsumerHandle]]. Only used by swkbd InlineKeyboard.
|-
| 0x4
| AllForegroundInitiallyHidden. Can be used by [7.0.0+] [[Internet_Browser|WebSession]].
|-
|-
| 2 || LoadAndApplySettings
|}
|}


=== AppletMessage ===
= caps:su =
This is "nn::capsrv::sf::IScreenShotApplicationService".
 
This was added with [6.0.0+].
 
This can be used by applications to save screenshots.
 
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! ID
! Cmd || Name
!  Description
|-
|-
| 0x4 || Exit requested
| 32 || [7.0.0+] [[#SetShimLibraryVersion]]
|-
|-
| 0xF || [[#GetCurrentFocusState|FocusState]] changed
| 201 || [[#SaveScreenShot]]
|-
|-
| 0x10 || Current applet execution was [[#SetRestartMessageEnabled|resumed]].
| 203 || [[#SaveScreenShotEx0]]
|-
|-
| 0x1E || OperationMode changed
| 205 || [8.0.0+] [[#SaveScreenShotEx1]]
|-
|-
| 0x1F || PerformanceMode changed
| 210 || [[#SaveScreenShotEx2]]
|-
| 0x33 || [[#SetHandlesRequestToDisplay|RequestToDisplay]]. Indicates that [[#ApproveToDisplay]] should be used.
|-
| 0x5A || Capture button was [[#SetRequiresCaptureButtonShortPressedMessage|short-pressed]].
|-
| 0x5C || Screenshot was [[#SetAlbumImageTakenNotificationEnabled|taken]].
|}
|}


This is "nn::am::AppletMessage".
== SetShimLibraryVersion ==
Takes a total of 0x10-bytes of input and a PID, no output.


=== OperationMode ===
This is a wrapper for [[Capture_services|caps:c]] cmd33. Commands '''SaveScreenShot''', '''SaveScreenShotEx0''', '''SaveScreenShotEx1''' and '''SaveScreenShotEx2''' are wrappers for [[Display_services|caps:sc]] cmd210.
{| class="wikitable" border="1"
|-
!  Value
!  Description
|-
| 0 || Handheld
|-
| 1 || Docked
|}


=== TvPowerStateMatchingMode ===
== SaveScreenShot ==
{| class="wikitable" border="1"
Takes two input u32s, an u64 AppletResourceUserId, a PID, and a type-0x45 input buffer containing image data. Returns an [[Capture_services|ApplicationAlbumEntry]].
|-
!  Value
!  Description
|-
| 0 || Unknown
|-
| 1 || Unknown
|}


This is "nn::oe::TvPowerStateMatchingMode". This is used with [[#SetTvPowerStateMatchingMode]].
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]].
 
= apm =
This is "nn::am::service::IApmManager".
 
This was added with [8.0.0+].


=== SystemButtonType ===
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Value
! Cmd || Name
!  Description
|-
|-
| 1 || PerformHomeButtonShortPressing
| 0 || [[#OpenSession]]
|-
|-
| 2 || PerformHomeButtonLongPressing
| 1 || GetPerformanceMode
|-
|-
| 3 || Short-pressing with the Power-button. Only available with [[#PerformSystemButtonPressing]].
| 6 || [7.0.0+] [[#IsCpuOverclockEnabled]]
|-
| 4 || Long-pressing with the Power-button. Only available with [[#PerformSystemButtonPressing]].
|-
| 5 || Shutdown the system. Only available with [[#PerformSystemButtonPressing]].
|-
| 6 || PerformCaptureButtonShortPressing
|-
| 7 || PerformCaptureButtonLongPressing
|}
|}


This is "nn::am::service::SystemButtonType". This is used with [[#PerformSystemButtonPressingIfInFocus]]/[[#PerformSystemButtonPressing]].
== OpenSession ==
Returns an [[#ISession]].
 
== IsCpuOverclockEnabled ==
No input, returns an output u8 bool.
 
== ISession ==
This is "nn::am::service::IApmSession".


=== LaunchParameterKind ===
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Value
! Cmd || Name
!  Description
|-
|-
| 1 || UserChannel. Application-specific LaunchParameter.
| 0 || SetPerformanceConfiguration
|-
|-
| 2 || account PreselectedUser
| 1 || GetPerformanceConfiguration
|-
|-
| 3 || Unknown if used by anything?
| 2 || [8.0.0+] SetCpuOverclockEnabled
|}
|}


=== LibraryAppletExitReason ===
= Library Applets =
{| class="wikitable" border="1"
This section documents library applet launching.
|-
 
!  Value
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.
!  Description
 
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"
|-
|-
| 0 || Normal
! Offset || Size || Typical Value || Notes
|-
|-
| 1 || Canceled
| 0x0 || 4 || 1 || Common Arguments version
|-
|-
| 2 || Abnormal
| 0x4 || 4 || 0x20 || Common Arguments size
|-
|-
| 10 || Unexpected
| 0x8 || 4 || || Library applet version (API version)
|}
 
=== ProgramSpecifyKind ===
{| class="wikitable" border="1"
|-
|-
!  Value
| 0xC || 4 || 0 || Theme color
!  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.
| 0x10 || 1 || 0 || Play startup sound
|-
|-
| 1 || [[NCM_services#ApplicationId|ApplicationId]]. "JumpToSubApplicationProgramForDevelopment". Only available when [[Settings_services#GetDebugModeFlag|DebugMode]] is 1.
| 0x18 || 8 || N/A || System tick (see [[SVC#svcGetSystemTick|svcGetSystemTick]])
|-
| 2 || u64 = value 0. "RestartProgram"
|-
|-
|}
|}


This is "nn::am::service::ProgramSpecifyKind". This controls the type of the u64 passed to [[#ExecuteProgram]].
= AppletId =
This is "nn::applet::AppletId". See also [[:Category:Library Applets]].


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"
{| class="wikitable" border="1"
|-
|-
! Value
! Value
! Description
! ProgramId
! Description
|-
|-
| 0 || Unknown.
| 0x00
|  
| None
|-
|-
| 1 || Unknown.
| 0x01
|}
|  
 
| Application (not valid for use with LibraryApplets)
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
| 0x02
| 010000000000100C
| OverlayApplet (overlayDisp)
|-
|-
| 0x0 || 0x1 || Flag. When non-zero, two state fields are set to 1.
| 0x03
| 0100000000001000
| SystemAppletMenu (qlaunch)
|-
|-
| 0x1 || 0x7F || Unused
| 0x04
|}
| 0100000000001012
 
| SystemApplication (starter)
This is "nn::am::AppletAttribute". This struct is 0x8-bytes.
 
This is used by [[#OpenLibraryAppletProxy]].
 
= AppletProcessLaunchReason =
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
| 0x0A
| 0100000000001001
| [[Auth_Applet|LibraryAppletAuth (auth)]]
|-
|-
| 0x0 || 0x1 || Flag. When non-zero, LibraryApplets then use [[#OpenCallingLibraryApplet]].
| 0x0B
| 0100000000001002
| [[Cabinet_Applet|LibraryAppletCabinet (cabinet)]]
|-
|-
| 0x1 || 0x2 || Always 0.
| 0x0C
| 0100000000001003
| [[Controller_Applet|LibraryAppletController (controller)]]
|-
|-
| 0x3 || 0x1 || Always 0.
| 0x0D
|}
| 0100000000001004
 
| LibraryAppletDataErase (dataErase)
This is "nn::am::service::AppletProcessLaunchReason". This struct is 0x4-bytes.
 
= LibraryAppletInfo =
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
| 0x0E
| 0100000000001005
| [[Error_Applet|LibraryAppletError (error)]]
|-
|-
| 0x0 || 0x4 || [[#AppletId]]
| 0x0F
| 0100000000001006
| LibraryAppletNetConnect (netConnect)
|-
|-
| 0x4 || 0x4 || [[#LibraryAppletMode]]
| 0x10
|}
| 0100000000001007
 
| [[Profile_Selector|LibraryAppletPlayerSelect (playerSelect)]]
This is "nn::am::service::LibraryAppletInfo". This struct is 0x8-bytes.
 
= AppletKind =
This is "nn::am::service::AppletKind". This is 8-bytes.
 
= AppletIdentityInfo =
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
| 0x11
| 0100000000001008
| [[Software_Keyboard|LibraryAppletSwkbd (swkbd)]]
|-
|-
| 0x0 || 0x4 || [[#AppletId]]
| 0x12
| 0100000000001009
| [[MiiEdit_Applet|LibraryAppletMiiEdit (miiEdit)]]
|-
|-
| 0x4 || 0x4 || Padding
| 0x13
| 010000000000100A
| [[Internet_Browser#010000000000100A|LibraryAppletWeb (web)]]
|-
|-
| 0x8 || 0x8 || [[NCM_services#ApplicationId|ApplicationId]]
| 0x14
|}
| 010000000000100B
 
| [[Internet_Browser#ShopN|LibraryAppletShop (shop)]]
This struct is "nn::am::service::AppletIdentityInfo". This struct is 0x10-bytes.
|-
 
| 0x15
= ApplicationAttributeForQuest =
| 010000000000100D
{| class="wikitable" border="1"
| [[Album_Applet|LibraryAppletPhotoViewer (photoViewer)]]
|-
| 0x16
| 010000000000100E
| LibraryAppletSet (set)
|-
| 0x17
| 010000000000100F
| [[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]] (LibraryAppletOfflineWebApp_0 in Ounce)
|-
| 0x18
| 0100000000001010
| [[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]]
|-
| 0x19
| 0100000000001011
| [[Internet_Browser#WifiWebAuthApplet|LibraryAppletWifiWebAuth (wifiWebAuth)]]
|-
| 0x1A
| 0100000000001013
| [[MyPage_Applet|LibraryAppletMyPage (myPage)]]
|-
| 0x1B
| 010000000000101A
| LibraryAppletGift (gift)
|-
| 0x1C
| 010000000000101C
| LibraryAppletUserMigration (userMigration)
|-
| 0x1D
| 010000000000101D
| [9.0.0+] LibraryAppletPreomiaSys (EncounterSys)
|-
| 0x1E
| 0100000000001020
| [9.0.0+] LibraryAppletStory (story)
|-
| 0x1F
| 010070000E3C0000
| [9.0.0+] LibraryAppletPreomiaUsr (EncounterUsr)
|-
| 0x20
| 010086000E49C000
| [9.0.0+] LibraryAppletPreomiaUsrDummy (EncounterUsrDummy)
|-
| 0x21
| 0100000000001038
| [10.0.0+] LibraryAppletSample (sample)
|-
| 0x22
| 0100000000001007
| [13.0.0+] LibraryAppletPromoteQualification (playerSelect)
|-
| 0x32
| 010000000000100F
| [17.0.0+] LibraryAppletOfflineWebApp_3 ([[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]] in NX)
|-
| 0x33
| 010000000000100F
| [17.0.0+] LibraryAppletOfflineWebSystem ([[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]] in NX)
|-
| 0x35
| [17.0.0+] 0100000000001010 ([16.0.0-16.1.0] 0100000000001042)
| [17.0.0+] LibraryAppletLhub ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
|-
| 0x36
| [17.0.0+] 0100000000001010 ([16.0.0-16.1.0] 0100000000001042)
| [17.0.0+] LibraryAppletLogin ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
|-
| 0x37
| [17.0.0+] 0100000000001010 ([16.0.0-16.1.0] 0100000000001042)
| [17.0.0+] LibraryAppletShare ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
|-
| 0x38
| 0100000000001043
| [16.0.0-16.1.0]
|-
| 0x50
| 0100000000001007
| [18.0.0+]
|-
| 0x51
| 0100000000001007
| [18.0.0+]
|-
| 0x64
| 0100000000001048
| [20.0.0+] [[Splay_Applet|splay]]
|-
| 0x3E8
|
| [10.0.0-16.1.0] DevlopmentTool
|-
| 0x3F1
| 010000000000D619
| [10.0.0-16.1.0] CombinationLA
|-
| 0x3F2
| 010000000000D610
| [10.0.0-16.1.0] AeSystemApplet
|-
| 0x3F3
| 010000000000D611
| [10.0.0-16.1.0] AeOverlayApplet
|-
| 0x3F4
| 010000000000D612
| [10.0.0-16.1.0] AeStarter
|-
| 0x3F5
| 010000000000D613
| [10.0.0-16.1.0] AeLibraryAppletAlone
|-
| 0x3F6
| 010000000000D614
| [10.0.0-16.1.0] AeLibraryApplet1
|-
| 0x3F7
| 010000000000D615
| [10.0.0-16.1.0] AeLibraryApplet2
|-
| 0x3F8
| 010000000000D616
| [10.0.0-16.1.0] AeLibraryApplet3
|-
| 0x3F9
| 010000000000D617
| [10.0.0-16.1.0] AeLibraryApplet4
|-
| 0x3FA
| 010000000000D60A
| [10.0.0-16.1.0] AppletISA
|-
| 0x3FB
| 010000000000D60B
| [10.0.0-16.1.0] AppletIOA
|-
| 0x3FC
| 010000000000D60C
| [10.0.0-16.1.0] AppletISTA
|-
| 0x3FD
| 010000000000D60D
| [10.0.0-16.1.0] AppletILA1
|-
| 0x3FE
| 010000000000D60E
| [10.0.0-16.1.0] AppletILA2
|-
| 0x700000C8
| 010000000000D65B
| [18.0.0+]
|-
| 0x700000C9
| 010000000000D65C
| [18.0.0+]
|-
| 0x700000DC
| 010000000000D619
| [17.0.0+] CombinationLA
|-
| 0x700000E6
| 010000000000D610
| [17.0.0+] AeSystemApplet
|-
| 0x700000E7
| 010000000000D611
| [17.0.0+] AeOverlayApplet
|-
| 0x700000E8
| 010000000000D612
| [17.0.0+] AeStarter
|-
| 0x700000E9
| 010000000000D613
| [17.0.0+] AeLibraryAppletAlone
|-
| 0x700000EA
| 010000000000D614
| [17.0.0+] AeLibraryApplet1
|-
| 0x700000EB
| 010000000000D615
| [17.0.0+] AeLibraryApplet2
|-
| 0x700000EC
| 010000000000D616
| [17.0.0+] AeLibraryApplet3
|-
| 0x700000ED
| 010000000000D617
| [17.0.0+] AeLibraryApplet4
|-
| 0x700000F0
| 010000000000D60A
| [17.0.0+] AppletISA
|-
| 0x700000F1
| 010000000000D60B
| [17.0.0+] AppletIOA
|-
| 0x700000F2
| 010000000000D60C
| [17.0.0+] AppletISTA
|-
| 0x700000F3
| 010000000000D60D
| [17.0.0+] AppletILA1
|-
| 0x700000F4
| 010000000000D60E
| [17.0.0+] AppletILA2
|-
| 0x700000FA
| 010000000000D677
| [20.1.0+]
|}
 
= LibraryAppletMode =
This is "nn::applet::LibraryAppletMode".
 
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 0x0
| AllForeground
|-
| 0x1
| PartialForeground
|-
| 0x2
| NoUi
|-
| 0x3
| PartialForegroundWithIndirectDisplay (see also [[#GetIndirectLayerConsumerHandle]], only used by swkbd [[Software_Keyboard|InlineKeyboard]])
|-
| 0x4
| AllForegroundInitiallyHidden (can be used by [7.0.0+] [[Internet_Browser|WebSession]])
|}
 
= AppletMessage =
This is "nn::am::AppletMessage".
 
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 0 || None
|-
| 1 || ChangeIntoForeground
|-
| 2 || ChangeIntoBackground
|-
| 4 || Exit
|-
| 6 || ApplicationExited
|-
| 7 ||
|-
| 15 || [[#FocusState|FocusStateChanged]]
|-
| 16 || [[#SetRestartMessageEnabled|Resume]]
|-
| 20 || DetectShortPressingHomeButton
|-
| 21 || DetectLongPressingHomeButton
|-
| 22 || DetectShortPressingPowerButton
|-
| 23 || DetectMiddlePressingPowerButton
|-
| 24 || DetectLongPressingPowerButton
|-
| 25 || RequestToPrepareSleep
|-
| 26 || FinishedSleepSequence
|-
| 27 || SleepRequiredByHighTemperature
|-
| 28 || SleepRequiredByLowBattery
|-
| 29 || AutoPowerDown
|-
| 30 || [[#OperationMode|OperationModeChanged]]
|-
| 31 || [[#PerformanceMode|PerformanceModeChanged]]
|-
| 32 || DetectReceivingCecSystemStandby
|-
| 33 || SdCardRemoved
|-
| 34 ||
|-
| 50 || LaunchApplicationRequested
|-
| 51 || [[#SetHandlesRequestToDisplay|RequestToDisplay]]
|-
| 55 || ShowApplicationLogo
|-
| 56 || HideApplicationLogo
|-
| 57 || ForceHideApplicationLogo
|-
| 58 ||
|-
| 59 ||
|-
| 60 || FloatingApplicationDetected
|-
| 61 || [7.0.0+] PerformanceConfigurationChanged
|-
| 70 ||
|-
| 71 ||
|-
| 72 ||
|-
| 73 ||
|-
| 75 ||
|-
| 80 ||
|-
| 81 ||
|-
| 82 ||
|-
| 83 ||
|-
| 85 ||
|-
| 86 ||
|-
| 90 || [[#SetRequiresCaptureButtonShortPressedMessage|DetectShortPressingCaptureButton]]
|-
| 92 || [[#SetAlbumImageTakenNotificationEnabled|AlbumScreenShotTaken]]
|-
| 93 || AlbumRecordingSaved
|-
| 94 ||
|-
| 100 ||
|-
| 101 ||
|-
| 110 || [14.0.0+] DetectShortPressingCaptureButtonForApplet
|-
| 111 || [14.0.0+] DetectLongPressingCaptureButtonForApplet
|-
| 1000 ||
|}
 
= OperationMode =
This is "nn::oe::OperationMode".
 
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 0 || Handheld
|-
| 1 || Console
|}
 
= PerformanceMode =
This is "nn::oe::PerformanceMode".
 
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| -1 || Invalid
|-
| 0 || Normal
|-
| 1 || Boost
|}
 
= FocusState =
This is "nn::oe::FocusState".
 
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 1 || InFocus
|-
| 2 || OutOfFocus
|-
| 3 || Background
|}
 
= CpuBoostMode =
This is "nn::oe::CpuBoostMode".
 
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 0 || Normal
|-
| 1 || FastLoad
|}
 
= WindowOriginMode =
This is "nn::oe::WindowOriginMode".
 
{| class="wikitable" border="1"
|-
! Value
! 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.
 
= ApplicationLaunchProperty =
This struct is 0x10-bytes.
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x8 || [[NCM_services#ApplicationId|ApplicationId]]
|-
| 0x8 || 0x4 || Application title-version.
|-
| 0xC || 0x1 || [[Filesystem_services#StorageId|StorageId]] for the Application base title.
|-
| 0xD || 0x1 || [[Filesystem_services#StorageId|StorageId]] for the Application update title.
|-
|-
! Offset || Size || Description
| 0xE || 0x1 || Unknown.
|-
|-
| 0x0 || 0x4 || See [[#ApplicationAttribute]].
| 0xF || 0x1 || Padding.
|-
| 0x4 || 0x4 || See [[#ApplicationAttribute]].
|-
| 0x8 || 0x4 || [7.0.0+] See [[#ApplicationAttribute]].
|}
|}


This struct is "nn::applet::ApplicationAttributeForQuest".
= ApplicationLaunchRequestInfo =
 
This is "nn::applet::ApplicationLaunchRequestInfo". This struct is 0x10-bytes.
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 =
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
! Offset || Size || Description
|-
|-
| 0x0 || 0x4 || Default is 0 for non-Quest. Only used when non-zero: unknown value in seconds.
| 0x0 || 0x4 || Unknown. The default is 0x0 with [[#CreateSystemApplication]], 0x3 with [[#CreateApplication]].
|-
|-
| 0x4 || 0x4 || Default is 0 for non-Quest. Only used when non-zero: unknown value in seconds.
| 0x4 || 0x4 || Unknown. The default is 0x0 with [[#CreateSystemApplication]], 0x3 with [[#CreateApplication]].
|-
|-
| 0x8 || 0x4 || float audio volume. Must be in the range of 0.0f-1.0f. The default is 1.0f.
| 0x8 || 0x8 || Unknown. The default is 0x0.
|-
| 0xC || 0x14 || Unused. Default is 0.
|}
|}


This struct is "nn::am::ApplicationAttribute". This struct is 0x20-bytes.
= AppletResourceUsageInfo =
 
This is "nn::am::service::AppletResourceUsageInfo". This struct is 0x20-bytes.
Internally AM only uses the first 0xC-bytes from ApplicationAttribute, regardless of the cmd.


= ApplicationLaunchProperty =
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
! Offset || Size || Description
|-
|-
| 0x0 || 0x8 || [[NCM_services#ApplicationId|ApplicationId]]
| 0x0 || 0x4 || Unknown counter.
|-
|-
| 0x8 || 0x4 || Application title-version.
| 0x4 || 0x4 || Unknown counter.
|-
|-
| 0xC || 0x1 || [[Filesystem_services#StorageId|StorageId]] for the Application base title.
| 0x8 || 0x4 || Output from [[NS_Services|NS GetRightsEnvironmentCountForDebug]].
|-
|-
| 0xD || 0x1 || [[Filesystem_services#StorageId|StorageId]] for the Application update title.
| 0xC || 0x14 || Always zero.
|-
| 0xE || 0x1 || Unknown.
|-
| 0xF || 0x1 || Padding.
|}
|}


This struct is 0x10-bytes.
= ApplicationLicenseType =
This is "nn::oe::ApplicationLicenseType". This is 1-byte.


= ApplicationLaunchRequestInfo =
= LaunchRequiredVersion =
{| class="wikitable" border="1"
This is "nn::oe::LaunchRequiredVersion". This is a 0x40-byte struct with 1-byte alignment.
|-
! 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.
= ServerEnvironmentType =
This is "nn::oe::ServerEnvironmentType".


= AppletResourceUsageInfo =
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
! Value
! Description
|-
| 0 || dd
|-
|-
| 0x0 || 0x4 || Unknown counter.
| 1 || lp
|-
|-
| 0x4 || 0x4 || Unknown counter.
| 2 || sd
|-
|-
| 0x8 || 0x4 || Output from [[NS_Services|NS GetRightsEnvironmentCountForDebug]].
| 3 || sp
|-
|-
| 0xC || 0x14 || Always zero.
| 4 || dp
|}
|}


This struct is "nn::am::service::AppletResourceUsageInfo". This struct is 0x20-bytes.
= 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 (Maintenance).


= Notes =
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.
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.


[[Category:Services]]
[[Category:Services]]