Difference between revisions of "Applet Manager services"
(28 intermediate revisions by 4 users not shown) | |||
Line 12: | Line 12: | ||
| 100 || OpenSystemAppletProxy || Returns an [[#ISystemAppletProxy]]. | | 100 || OpenSystemAppletProxy || Returns an [[#ISystemAppletProxy]]. | ||
|- | |- | ||
− | | 200 || | + | | 200 || OpenLibraryAppletProxyOld ([1.0.0-2.3.0] OpenLibraryAppletProxy) || Returns an [[#ILibraryAppletProxy]]. |
|- | |- | ||
| 201 || [3.0.0+] [[#OpenLibraryAppletProxy]] || Returns an [[#ILibraryAppletProxy]]. | | 201 || [3.0.0+] [[#OpenLibraryAppletProxy]] || Returns an [[#ILibraryAppletProxy]]. | ||
Line 21: | Line 21: | ||
|- | |- | ||
| 400 || CreateSelfLibraryAppletCreatorForDevelop || Returns an [[#ILibraryAppletCreator]]. | | 400 || CreateSelfLibraryAppletCreatorForDevelop || Returns an [[#ILibraryAppletCreator]]. | ||
− | |||
|} | |} | ||
− | All of these commands except [[#OpenLibraryAppletProxy]] take the same input as [[#OpenApplicationProxy]], with the same user-process retry-loop as [[#OpenApplicationProxy]]. | + | All of these commands except [[#OpenLibraryAppletProxy]] take the same input as [[#OpenApplicationProxy]], with the same user-process retry-loop as [[#OpenApplicationProxy]]. These Open*Proxy commands (including appletOE) doesn't seem to usable from processes which aren't actual applets (such as sysmodules), at least for applet-types which aren't already in use. |
− | This service | + | This service is used by all system non-regular-applications. |
The 01000000000010XX system [[Title_list|titles]] use the following applet types(above Open{type}Proxy commands): | The 01000000000010XX system [[Title_list|titles]] use the following applet types(above Open{type}Proxy commands): | ||
Line 36: | Line 35: | ||
== OpenLibraryAppletProxy == | == OpenLibraryAppletProxy == | ||
− | Returns an [[# | + | Returns an [[#ILibraryAppletProxy]]. |
Takes a [[IPC_Marshalling|reserved]] input u64(official user-processes use hard-coded value 0), a PID,a process copy-handle(cur-proc handle alias), and an 0x80-byte type-0x15 input buffer '''AppletAttribute'''. | Takes a [[IPC_Marshalling|reserved]] input u64(official user-processes use hard-coded value 0), a PID,a process copy-handle(cur-proc handle alias), and an 0x80-byte type-0x15 input buffer '''AppletAttribute'''. | ||
Line 82: | Line 81: | ||
| 12 || UnlockForeground || | | 12 || UnlockForeground || | ||
|- | |- | ||
− | | 20 || PopFromGeneralChannel || Returns an [[ | + | | 20 || PopFromGeneralChannel || Returns an [[#IStorage]]. |
|- | |- | ||
| 21 || GetPopFromGeneralChannelEvent || | | 21 || GetPopFromGeneralChannelEvent || | ||
Line 129: | Line 128: | ||
| 14 || [2.0.0+] ShouldSleepOnBoot | | 14 || [2.0.0+] ShouldSleepOnBoot | ||
|- | |- | ||
+ | | 15 || [4.0.0+] GetHdcpAuthenticationFailedEvent | ||
|} | |} | ||
Line 172: | Line 172: | ||
| 120 || GetApplicationId || | | 120 || GetApplicationId || | ||
|- | |- | ||
− | | 121 || PushLaunchParameter || | + | | 121 || PushLaunchParameter || Takes an [[#IStorage]]. |
|- | |- | ||
| 122 || GetApplicationControlProperty || | | 122 || GetApplicationControlProperty || | ||
Line 227: | Line 227: | ||
! Cmd || Name || Notes | ! Cmd || Name || Notes | ||
|- | |- | ||
− | | 0 || PopInData || Returns an [[ | + | | 0 || PopInData || Returns an [[#IStorage]]. |
|- | |- | ||
− | | 1 || PushOutData || | + | | 1 || PushOutData || Takes an [[#IStorage]]. |
|- | |- | ||
− | | 2 || PopInteractiveInData || Returns an [[ | + | | 2 || PopInteractiveInData || Returns an [[#IStorage]]. |
|- | |- | ||
− | | 3 || PushInteractiveOutData || | + | | 3 || PushInteractiveOutData || Takes an [[#IStorage]]. |
|- | |- | ||
| 5 || GetPopInDataEvent || | | 5 || GetPopInDataEvent || | ||
Line 239: | Line 239: | ||
| 6 || GetPopInteractiveInDataEvent || | | 6 || GetPopInteractiveInDataEvent || | ||
|- | |- | ||
− | | 10 || ExitProcessAndReturn || | + | | 10 || [[#ExitProcessAndReturn]] || |
|- | |- | ||
| 11 || [[#GetLibraryAppletInfo]] || | | 11 || [[#GetLibraryAppletInfo]] || | ||
Line 255: | Line 255: | ||
| 17 || [2.0.0+] GetCallerAppletIdentityInfoStack || | | 17 || [2.0.0+] GetCallerAppletIdentityInfoStack || | ||
|- | |- | ||
− | | 20 || PopExtraStorage || Returns an [[ | + | | 18 || [4.0.0+] GetNextReturnDestinationAppletIdentityInfo || |
+ | |- | ||
+ | | 19 || [4.0.0+] GetDesirableKeyboardLayout || | ||
+ | |- | ||
+ | | 20 || PopExtraStorage || Returns an [[#IStorage]]. | ||
|- | |- | ||
| 25 || GetPopExtraStorageEvent || | | 25 || GetPopExtraStorageEvent || | ||
|- | |- | ||
− | | 30 || UnpopInData || | + | | 30 || UnpopInData || Takes an [[#IStorage]]. |
|- | |- | ||
− | | 31 || UnpopExtraStorage || | + | | 31 || UnpopExtraStorage || Takes an [[#IStorage]]. |
|- | |- | ||
| 40 || [2.0.0+] GetIndirectLayerProducerHandle || | | 40 || [2.0.0+] GetIndirectLayerProducerHandle || | ||
|- | |- | ||
| 50 || [2.0.0+] ReportVisibleError || | | 50 || [2.0.0+] ReportVisibleError || | ||
+ | |- | ||
+ | | 51 || [4.0.0+] ReportVisibleErrorWithErrorContext || | ||
+ | |- | ||
+ | | 60 || [4.0.0+] [[#GetMainAppletApplicationDesiredLanguage]] || | ||
+ | |- | ||
+ | | 90 || [5.0.0+] CreateApplicationAndPushAndRequestToLaunch || | ||
+ | |- | ||
+ | | 100 || [4.0.0+] CreateGameMovieTrimmer || | ||
|} | |} | ||
− | ====GetLibraryAppletInfo==== | + | ==== ExitProcessAndReturn ==== |
− | No input. Returns an u64 LibraryAppletInfo. | + | No input/output. |
+ | |||
+ | Exits the LibraryApplet and returns to running the title which launched this LibraryApplet ([[qlaunch]] for example). | ||
+ | |||
+ | ==== GetLibraryAppletInfo ==== | ||
+ | No input. Returns an u64 LibraryAppletInfo: +0 u32 is [[#AppletId]], +4 u32 is [[#LibraryAppletMode]]. | ||
+ | |||
+ | ==== GetMainAppletApplicationDesiredLanguage ==== | ||
+ | No input, returns an output [[Settings_services#LanguageCode|LanguageCode]]. | ||
== IOverlayAppletProxy == | == IOverlayAppletProxy == | ||
Line 293: | Line 313: | ||
|- | |- | ||
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]]. | | 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]]. | ||
− | |||
|} | |} | ||
Line 338: | Line 357: | ||
|- | |- | ||
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]]. | | 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]]. | ||
− | |||
|} | |} | ||
Line 346: | Line 364: | ||
! Cmd || Name || Notes | ! Cmd || Name || Notes | ||
|- | |- | ||
− | | 1 || PopLaunchParameter || Returns an [[ | + | | 1 || PopLaunchParameter || Returns an [[#IStorage]]. |
|- | |- | ||
− | | 10 || CreateApplicationAndPushAndRequestToStart || | + | | 10 || CreateApplicationAndPushAndRequestToStart || Takes an [[#IStorage]]. |
|- | |- | ||
− | | 11 || [2.0.0+] CreateApplicationAndPushAndRequestToStartForQuest || | + | | 11 || [2.0.0+] CreateApplicationAndPushAndRequestToStartForQuest || Takes an [[#IStorage]]. |
+ | |- | ||
+ | | 12 || [4.0.0+] CreateApplicationAndRequestToStart || | ||
+ | |- | ||
+ | | 13 || [4.0.0+] CreateApplicationAndRequestToStartForQuest || | ||
|- | |- | ||
| 20 || EnsureSaveData || | | 20 || EnsureSaveData || | ||
|- | |- | ||
− | | 21 || GetDesiredLanguage || | + | | 21 || [[#GetDesiredLanguage]] || |
|- | |- | ||
| 22 || [[#SetTerminateResult]] || | | 22 || [[#SetTerminateResult]] || | ||
Line 365: | Line 387: | ||
|- | |- | ||
| 26 || [2.0.0+] GetSaveDataSize || | | 26 || [2.0.0+] GetSaveDataSize || | ||
+ | |- | ||
+ | | 27 || [5.0.0+] CreateCacheStorage || | ||
|- | |- | ||
| 30 || BeginBlockingHomeButtonShortAndLongPressed || | | 30 || BeginBlockingHomeButtonShortAndLongPressed || | ||
Line 370: | Line 394: | ||
| 31 || EndBlockingHomeButtonShortAndLongPressed || | | 31 || EndBlockingHomeButtonShortAndLongPressed || | ||
|- | |- | ||
− | | 32 || BeginBlockingHomeButton || | + | | 32 || [[#BeginBlockingHomeButton]] || |
|- | |- | ||
| 33 || EndBlockingHomeButton || | | 33 || EndBlockingHomeButton || | ||
Line 385: | Line 409: | ||
|- | |- | ||
| 67 || [3.0.0+] [[#SetGamePlayRecordingState]] || | | 67 || [3.0.0+] [[#SetGamePlayRecordingState]] || | ||
+ | |- | ||
+ | | 68 || [4.0.0+] RequestFlushGamePlayingMovieForDebug || | ||
|- | |- | ||
| 70 || [3.0.0+] RequestToShutdown || | | 70 || [3.0.0+] RequestToShutdown || | ||
|- | |- | ||
| 71 || [3.0.0+] RequestToReboot || | | 71 || [3.0.0+] RequestToReboot || | ||
+ | |- | ||
+ | | 80 || [4.0.0+] ExitAndRequestToShowThanksMessage || | ||
+ | |- | ||
+ | | 90 || [4.0.0+] EnableApplicationCrashReport || | ||
+ | |- | ||
+ | | 100 || [5.0.0+] InitializeApplicationCopyrightFrameBuffer || | ||
+ | |- | ||
+ | | 101 || [5.0.0+] SetApplicationCopyrightImage || | ||
+ | |- | ||
+ | | 102 || [5.0.0+] SetApplicationCopyrightVisibility || | ||
+ | |- | ||
+ | | 110 || [5.0.0+] QueryApplicationPlayStatistics || | ||
+ | |- | ||
+ | | 120 || [5.0.0+] ExecuteProgram || | ||
+ | |- | ||
+ | | 121 || [5.0.0+] ClearUserChannel || | ||
+ | |- | ||
+ | | 122 || [5.0.0+] UnpopToUserChannel || | ||
+ | |- | ||
+ | | 500 || [5.0.0+] StartContinuousRecordingFlushForDebug || | ||
+ | |- | ||
+ | | 1000 || [5.0.0+] CreateMovieMaker || | ||
+ | |- | ||
+ | | 1001 || [5.0.0+] [[#PrepareForJit]] || | ||
|} | |} | ||
Line 397: | Line 447: | ||
* Uses [[#SetGamePlayRecordingState]] with value 0x1. | * Uses [[#SetGamePlayRecordingState]] with value 0x1. | ||
This GamePlayRecording functionality presumably enables the video-recording usable starting with [[4.0.0]]. | This GamePlayRecording functionality presumably enables the video-recording usable starting with [[4.0.0]]. | ||
+ | |||
+ | ==== GetDesiredLanguage ==== | ||
+ | No input, returns an output [[Settings_services#LanguageCode|LanguageCode]]. | ||
==== SetTerminateResult ==== | ==== SetTerminateResult ==== | ||
Line 402: | Line 455: | ||
For example, in some cases official apps use this with [[Error_codes|error]] 0x2A2 then uses svcBreak. | For example, in some cases official apps use this with [[Error_codes|error]] 0x2A2 then uses svcBreak. | ||
+ | |||
+ | ==== BeginBlockingHomeButton ==== | ||
+ | Takes an input s64 nanoseconds, no output. The input nanoseconds can be zero. | ||
==== NotifyRunning ==== | ==== NotifyRunning ==== | ||
Line 411: | Line 467: | ||
==== SetGamePlayRecordingState ==== | ==== SetGamePlayRecordingState ==== | ||
Takes an input u32. | Takes an input u32. | ||
+ | |||
+ | ==== PrepareForJit ==== | ||
+ | Takes no input. Launches title 010000000000003B (currently not present on retail systems) if some context variable is set. | ||
== ILibraryAppletCreator == | == ILibraryAppletCreator == | ||
Line 423: | Line 482: | ||
| 2 || AreAnyLibraryAppletsLeft || | | 2 || AreAnyLibraryAppletsLeft || | ||
|- | |- | ||
− | | 10 || CreateStorage || Returns an [[ | + | | 10 || CreateStorage || Returns an [[#IStorage]]. |
|- | |- | ||
− | | 11 || CreateTransferMemoryStorage || Returns an [[ | + | | 11 || CreateTransferMemoryStorage || Returns an [[#IStorage]]. |
− | |||
− | |||
|- | |- | ||
+ | | 12 || [2.0.0+] CreateHandleStorage || Returns an [[#IStorage]]. | ||
|} | |} | ||
Line 450: | Line 508: | ||
| 50 || SetOutOfFocusApplicationSuspendingEnabled || | | 50 || SetOutOfFocusApplicationSuspendingEnabled || | ||
|- | |- | ||
− | | 100 || PushInData || | + | | 100 || PushInData || Takes an [[#IStorage]]. |
|- | |- | ||
− | | 101 || PopOutData || Returns an [[ | + | | 101 || PopOutData || Returns an [[#IStorage]]. |
|- | |- | ||
− | | 102 || PushExtraStorage || | + | | 102 || PushExtraStorage || Takes an [[#IStorage]]. |
|- | |- | ||
− | | 103 || PushInteractiveInData || | + | | 103 || PushInteractiveInData || Takes an [[#IStorage]]. |
|- | |- | ||
− | | 104 || PopInteractiveOutData || Returns an [[ | + | | 104 || PopInteractiveOutData || Returns an [[#IStorage]]. |
|- | |- | ||
| 105 || GetPopOutDataEvent || | | 105 || GetPopOutDataEvent || | ||
Line 488: | Line 546: | ||
| 4 || DisallowToEnterSleep || | | 4 || DisallowToEnterSleep || | ||
|- | |- | ||
− | | 5 || GetOperationMode || | + | | 5 || [[#GetOperationMode]] || |
|- | |- | ||
− | | 6 || GetPerformanceMode || | + | | 6 || [[#GetPerformanceMode]] || |
|- | |- | ||
| 7 || GetCradleStatus || | | 7 || GetCradleStatus || | ||
Line 506: | Line 564: | ||
| 13 || GetAcquiredSleepLockEvent || | | 13 || GetAcquiredSleepLockEvent || | ||
|- | |- | ||
− | | 20 || PushToGeneralChannel || | + | | 20 || PushToGeneralChannel || Takes an [[#IStorage]]. |
|- | |- | ||
| 30 || GetHomeButtonReaderLockAccessor || Returns an [[#ILockAccessor]]. | | 30 || GetHomeButtonReaderLockAccessor || Returns an [[#ILockAccessor]]. | ||
Line 517: | Line 575: | ||
|- | |- | ||
| 51 || [3.0.0+] [[#SetVrModeEnabled]] || | | 51 || [3.0.0+] [[#SetVrModeEnabled]] || | ||
+ | |- | ||
+ | | 52 || [4.0.0+] SetLcdBacklighOffEnabled || | ||
|- | |- | ||
| 55 || [3.0.0+] IsInControllerFirmwareUpdateSection || | | 55 || [3.0.0+] IsInControllerFirmwareUpdateSection || | ||
Line 523: | Line 583: | ||
|- | |- | ||
| 61 || [3.0.0+] GetDefaultDisplayResolutionChangeEvent || | | 61 || [3.0.0+] GetDefaultDisplayResolutionChangeEvent || | ||
+ | |- | ||
+ | | 62 || [4.0.0+] GetHdcpAuthenticationState || | ||
+ | |- | ||
+ | | 63 || [4.0.0+] GetHdcpAuthenticationStateChangeEvent || | ||
+ | |- | ||
+ | | 64 || [5.0.0+] SetTvPowerStateMatchingMode || | ||
|} | |} | ||
Line 532: | Line 598: | ||
=== ReceiveMessage === | === ReceiveMessage === | ||
No input. Returns an output u32. Error 0x680 indicates no message is available. | No input. Returns an output u32. Error 0x680 indicates no message is available. | ||
+ | |||
+ | === GetOperationMode === | ||
+ | No input. Returns an output u8 for the current [[#OperationMode]]. | ||
+ | |||
+ | === GetPerformanceMode === | ||
+ | No input. Returns an output u32 for the current PerformanceMode. | ||
=== GetCurrentFocusState === | === GetCurrentFocusState === | ||
− | No input. Returns an output u8. | + | No input. Returns an output u8: |
+ | |||
+ | * 1: In focus. | ||
+ | * 2/3: Out of focus(running in "background"). | ||
=== SetVrModeEnabled === | === SetVrModeEnabled === | ||
Line 540: | Line 615: | ||
Updates internal AM state fields. If the new state doesn't match the previous state, this uses the [[Backlight_services]] {Disable/Enable}VrMode command depending on whether flag={disable/enable}. | Updates internal AM state fields. If the new state doesn't match the previous state, this uses the [[Backlight_services]] {Disable/Enable}VrMode command depending on whether flag={disable/enable}. | ||
+ | |||
+ | When the VrMode is set to true, the console shows a screen rendered like vr asking the user to move his face away and hit the 'close' button. When this button is pressed, the console resets the vrMode to false. | ||
== ISelfController == | == ISelfController == | ||
Line 546: | Line 623: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
− | | 0 || Exit | + | | 0 || [[#Exit]] |
|- | |- | ||
− | | 1 || LockExit | + | | 1 || [[#LockExit]] |
|- | |- | ||
− | | 2 || UnlockExit | + | | 2 || [[#UnlockExit]] |
|- | |- | ||
− | | 3 || [2.0.0+] EnterFatalSection | + | | 3 || [2.0.0+] [[#EnterFatalSection]] |
|- | |- | ||
− | | 4 || [2.0.0+] LeaveFatalSection | + | | 4 || [2.0.0+] [[#LeaveFatalSection]] |
|- | |- | ||
| 9 || GetLibraryAppletLaunchableEvent | | 9 || GetLibraryAppletLaunchableEvent | ||
|- | |- | ||
− | | 10 || SetScreenShotPermission | + | | 10 || [[#SetScreenShotPermission]] |
|- | |- | ||
− | | 11 || SetOperationModeChangedNotification | + | | 11 || [[#SetOperationModeChangedNotification]] |
|- | |- | ||
− | | 12 || SetPerformanceModeChangedNotification | + | | 12 || [[#SetPerformanceModeChangedNotification]] |
|- | |- | ||
| 13 || [[#SetFocusHandlingMode]] | | 13 || [[#SetFocusHandlingMode]] | ||
Line 568: | Line 645: | ||
| 14 || SetRestartMessageEnabled | | 14 || SetRestartMessageEnabled | ||
|- | |- | ||
− | | 15 || [2.0.0+] SetScreenShotAppletIdentityInfo | + | | 15 || [2.0.0+] [[#SetScreenShotAppletIdentityInfo]] |
|- | |- | ||
| 16 || [2.0.0+] [[#SetOutOfFocusSuspendingEnabled]] | | 16 || [2.0.0+] [[#SetOutOfFocusSuspendingEnabled]] | ||
|- | |- | ||
− | | 17 || [ | + | | 17 || [3.0.0+] SetControllerFirmwareUpdateSection |
+ | |- | ||
+ | | 18 || [3.0.0+] SetRequiresCaptureButtonShortPressedMessage | ||
|- | |- | ||
− | | | + | | 19 || [3.0.0+] [[#SetScreenShotImageOrientation]] |
|- | |- | ||
− | | | + | | 20 || [4.0.0+] SetDesirableKeyboardLayout |
|- | |- | ||
| 40 || [[#CreateManagedDisplayLayer]] | | 40 || [[#CreateManagedDisplayLayer]] | ||
+ | |- | ||
+ | | 41 || [4.0.0+] IsSystemBufferSharingEnabled | ||
+ | |- | ||
+ | | 42 || [4.0.0+] GetSystemSharedLayerHandle | ||
|- | |- | ||
| 50 || SetHandlesRequestToDisplay | | 50 || SetHandlesRequestToDisplay | ||
Line 596: | Line 679: | ||
| 65 || [2.0.0+] ReportUserIsActive | | 65 || [2.0.0+] ReportUserIsActive | ||
|- | |- | ||
− | | 66 || [ | + | | 66 || [3.0.0+] GetCurrentIlluminance |
|- | |- | ||
− | | 67 || [ | + | | 67 || [3.0.0+] IsIlluminanceAvailable |
+ | |- | ||
+ | | 68 || [4.0.0+] SetAutoSleepDisabled | ||
+ | |- | ||
+ | | 69 || [4.0.0+] IsAutoSleepDisabled | ||
+ | |- | ||
+ | | 70 || [5.0.0+] ReportMultimediaError | ||
+ | |- | ||
+ | | 80 || [5.0.0+] SetWirelessPriorityMode | ||
|} | |} | ||
− | ===SetFocusHandlingMode=== | + | === Exit === |
+ | No input/output. | ||
+ | |||
+ | === LockExit === | ||
+ | No input/output. | ||
+ | |||
+ | === UnlockExit === | ||
+ | No input/output. | ||
+ | |||
+ | === EnterFatalSection === | ||
+ | No input/output. | ||
+ | |||
+ | === LeaveFatalSection === | ||
+ | No input/output. | ||
+ | |||
+ | === SetScreenShotPermission === | ||
+ | Takes an input s32. No output. | ||
+ | |||
+ | Controls whether screenshot-capture is allowed. 0 = disable, 1 = enable, 2 = unknown. | ||
+ | |||
+ | === SetOperationModeChangedNotification === | ||
+ | Takes an input u8 bool flag. No output. | ||
+ | |||
+ | === SetPerformanceModeChangedNotification === | ||
+ | Takes an input u8 bool flag. No output. | ||
+ | |||
+ | === SetFocusHandlingMode === | ||
Takes 3 input u8s with each field located immediately after the previous u8, these are bool flags. No output. | Takes 3 input u8s with each field located immediately after the previous u8, these are bool flags. No output. | ||
− | ===SetOutOfFocusSuspendingEnabled=== | + | === SetScreenShotAppletIdentityInfo === |
+ | Takes an input 0x10-byte struct AppletIdentityInfo. No output. | ||
+ | |||
+ | === SetOutOfFocusSuspendingEnabled === | ||
Takes an input u8(bool flag). No output. | Takes an input u8(bool flag). No output. | ||
− | ===CreateManagedDisplayLayer=== | + | === SetScreenShotImageOrientation === |
+ | Takes an input s32. No output. | ||
+ | |||
+ | === CreateManagedDisplayLayer === | ||
Returns an output u64 LayerId which is then used by the user-process with [[Display_services#OpenLayer]]. | Returns an output u64 LayerId which is then used by the user-process with [[Display_services#OpenLayer]]. | ||
Line 670: | Line 793: | ||
|- | |- | ||
| 8 || [2.0.0+] TakeScreenShotOfOwnLayer | | 8 || [2.0.0+] TakeScreenShotOfOwnLayer | ||
+ | |- | ||
+ | | 9 || [5.0.0+] CopyBetweenCaptureBuffers | ||
|- | |- | ||
| 10 || AcquireLastApplicationCaptureBuffer | | 10 || AcquireLastApplicationCaptureBuffer | ||
Line 692: | Line 817: | ||
|- | |- | ||
| 21 || [2.0.0+] ClearAppletTransitionBuffer | | 21 || [2.0.0+] ClearAppletTransitionBuffer | ||
+ | |- | ||
+ | | 22 || [4.0.0+] AcquireLastApplicationCaptureSharedBuffer | ||
+ | |- | ||
+ | | 23 || [4.0.0+] ReleaseLastApplicationCaptureSharedBuffer | ||
+ | |- | ||
+ | | 24 || [4.0.0+] AcquireLastForegroundCaptureSharedBuffer | ||
+ | |- | ||
+ | | 25 || [4.0.0+] ReleaseLastForegroundCaptureSharedBuffer | ||
+ | |- | ||
+ | | 26 || [4.0.0+] AcquireCallerAppletCaptureSharedBuffer | ||
+ | |- | ||
+ | | 27 || [4.0.0+] ReleaseCallerAppletCaptureSharedBuffer | ||
|} | |} | ||
Line 705: | Line 842: | ||
| 2 || AreAnyLibraryAppletsLeft || | | 2 || AreAnyLibraryAppletsLeft || | ||
|- | |- | ||
− | | 10 || CreateStorage || Returns an [[ | + | | 10 || CreateStorage || Returns an [[#IStorage]]. |
|- | |- | ||
− | | 11 || CreateTransferMemoryStorage || Returns an [[ | + | | 11 || CreateTransferMemoryStorage || Returns an [[#|IStorage]]. |
|- | |- | ||
− | | 12 || [2.0.0+] CreateHandleStorage || Returns an [[ | + | | 12 || [2.0.0+] CreateHandleStorage || Returns an [[#IStorage]]. |
|} | |} | ||
Line 721: | Line 858: | ||
| 11 || OpenCallingLibraryApplet || Returns an [[#ILibraryAppletAccessor]]. | | 11 || OpenCallingLibraryApplet || Returns an [[#ILibraryAppletAccessor]]. | ||
|- | |- | ||
− | | 21 || PushContext || | + | | 21 || PushContext || Takes an [[#IStorage]]. |
|- | |- | ||
− | | 22 || PopContext || Returns an [[ | + | | 22 || PopContext || Returns an [[#IStorage]]. |
|- | |- | ||
| 23 || CancelWindingReservation || | | 23 || CancelWindingReservation || | ||
Line 730: | Line 867: | ||
|- | |- | ||
| 40 || ReserveToStartAndWaitAndUnwindThis || Returns an [[#ILibraryAppletAccessor]]. | | 40 || ReserveToStartAndWaitAndUnwindThis || Returns an [[#ILibraryAppletAccessor]]. | ||
+ | |- | ||
+ | | 41 || [4.0.0+] ReserveToStartAndWait || | ||
|} | |} | ||
− | ===GetLaunchReason=== | + | === GetLaunchReason === |
No input. Returns an u32 AppletProcessLaunchReason. | No input. Returns an u32 AppletProcessLaunchReason. | ||
Line 749: | Line 888: | ||
|- | |- | ||
| 20 || InvalidateTransitionLayer || | | 20 || InvalidateTransitionLayer || | ||
+ | |} | ||
+ | |||
+ | == IStorage == | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Cmd || Name || Notes | ||
+ | |- | ||
+ | | 0 || Open || No input. Returns an [[#IStorageAccessor]]. | ||
+ | |- | ||
+ | | 1 || OpenTransferStorage || No input. Returns an [[#ITransferStorageAccessor]]. | ||
+ | |} | ||
+ | |||
+ | Commands which take an IStorage as input use an unknown input u32 for that. | ||
+ | |||
+ | == IStorageAccessor == | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Cmd || Name || Notes | ||
+ | |- | ||
+ | | 0 || GetSize || No input. Returns an s64. | ||
+ | |- | ||
+ | | 10 || Write || Takes an input s64 and a type-0x21 input buffer. | ||
+ | |- | ||
+ | | 11 || Read || Takes an input s64 and a type-0x22 output buffer. | ||
+ | |} | ||
+ | |||
+ | == ITransferStorageAccessor == | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Cmd || Name || Notes | ||
+ | |- | ||
+ | | 0 || GetSize || No input. Returns an output s64. | ||
+ | |- | ||
+ | | 1 || GetHandle || No input. Returns an output u64 and handle. | ||
|} | |} | ||
Line 759: | Line 932: | ||
|- | |- | ||
| 0 || [[#OpenApplicationProxy]] || | | 0 || [[#OpenApplicationProxy]] || | ||
− | |||
|} | |} | ||
− | This | + | 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. |
== OpenApplicationProxy == | == OpenApplicationProxy == | ||
Line 772: | Line 944: | ||
= idle:sys = | = idle:sys = | ||
+ | This is "nn::idle::detail::IPolicyManagerSystem" | ||
+ | |||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Cmd || Name | ||
+ | |- | ||
+ | | 0 || GetAutoPowerDownEvent | ||
+ | |- | ||
+ | | 1 || [1.0.0-3.0.2] | ||
+ | |- | ||
+ | | 2 || [1.0.0-3.0.2] | ||
+ | |- | ||
+ | | 3 || | ||
+ | |- | ||
+ | | 4 || | ||
+ | |- | ||
+ | | 5 || | ||
+ | |} | ||
= omm = | = 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. | Operation Mode Manager (OMM) is a service responsible for arbitrating the operation changes between docked and handheld modes. | ||
Besides [[PTM_services]], this is the only service that interacts with the [[Dock]] through [[USB_services|usb:pd*]]. | Besides [[PTM_services]], this is the only service that interacts with the [[Dock]] through [[USB_services|usb:pd*]]. | ||
Line 800: | Line 992: | ||
|- | |- | ||
| 9 || [2.0.0+] | | 9 || [2.0.0+] | ||
+ | |- | ||
+ | | 10 || [3.0.0+] | ||
+ | |- | ||
+ | | 11 || [3.0.0+] | ||
+ | |- | ||
+ | | 12 || [3.0.0+] | ||
+ | |- | ||
+ | | 13 || [3.0.0+] | ||
+ | |- | ||
+ | | 14 || [3.0.0+] | ||
+ | |- | ||
+ | | 15 || [4.0.0+] | ||
+ | |- | ||
+ | | 16 || [4.0.0+] | ||
+ | |- | ||
+ | | 17 || [4.0.0+] | ||
+ | |- | ||
+ | | 18 || [4.0.0+] | ||
+ | |- | ||
+ | | 19 || [4.0.0+] | ||
+ | |- | ||
+ | | 20 || [4.0.0+] | ||
+ | |- | ||
+ | | 21 || [4.0.0+] | ||
+ | |- | ||
+ | | 22 || [4.0.0+] | ||
+ | |- | ||
+ | | 23 || [4.0.0+] | ||
|} | |} | ||
= spsm = | = spsm = | ||
− | This is "IPowerStateInterface". | + | This is "nn::spsm::detail::IPowerStateInterface". |
− | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 818: | Line 1,037: | ||
| 3 || | | 3 || | ||
|- | |- | ||
− | | 4 || | + | | 4 || GetNotificationMessageEventHandle |
|- | |- | ||
| 5 || | | 5 || | ||
Line 826: | Line 1,045: | ||
| 7 || | | 7 || | ||
|- | |- | ||
− | | 8 || | + | | 8 || AnalyzePerformanceLogForLastSleepWakeSequence |
+ | |- | ||
+ | | 9 || ChangeHomeButtonLongPressingTime | ||
|- | |- | ||
− | | | + | | 10 || |
+ | |- | ||
+ | | 11 || [1.0.0-3.0.2] | ||
|} | |} | ||
Line 918: | Line 1,141: | ||
| 0100000000001013 | | 0100000000001013 | ||
| "myPage" | | "myPage" | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | === LibraryAppletMode === | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! ID | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0x0 | ||
+ | | AllForeground | ||
|- | |- | ||
|} | |} | ||
Line 947: | Line 1,181: | ||
|} | |} | ||
− | ===NotificationMessage=== | + | === NotificationMessage === |
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! ID | ! ID | ||
! Description | ! Description | ||
+ | |- | ||
+ | | 0xF || [[#GetCurrentFocusState|FocusState]] changed | ||
|- | |- | ||
| 0x10 || ? | | 0x10 || ? | ||
Line 960: | Line 1,196: | ||
|} | |} | ||
− | =AppletResourceUserId= | + | === OperationMode === |
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Value | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0 || Handheld | ||
+ | |- | ||
+ | | 1 || Docked | ||
+ | |} | ||
+ | |||
+ | = AppletResourceUserId = | ||
This u64 is officially called "nn::applet::AppletResourceUserId". Used by a number of non-AM services. | This u64 is officially called "nn::applet::AppletResourceUserId". Used by a number of non-AM services. | ||
[[Category:Services]] | [[Category:Services]] |
Revision as of 19:07, 7 September 2018
AM (Applet Manager) provides services for interacting with system applets while abstracting several aspects of power and operation management.
Contains multiple raw images, with at least the following: "NN_OMM_CHARGING_BIN_{begin|end}"(charging icon), low-battery icon, and the Nintendo Switch logo displayed during system boot.
appletAE
This is "nn::am::service::IAllSystemAppletProxiesService".
Cmd | Name | Notes |
---|---|---|
100 | OpenSystemAppletProxy | Returns an #ISystemAppletProxy. |
200 | OpenLibraryAppletProxyOld ([1.0.0-2.3.0] OpenLibraryAppletProxy) | Returns an #ILibraryAppletProxy. |
201 | [3.0.0+] #OpenLibraryAppletProxy | Returns an #ILibraryAppletProxy. |
300 | OpenOverlayAppletProxy | Returns an #IOverlayAppletProxy. |
350 | OpenSystemApplicationProxy | Returns an #IApplicationProxy. |
400 | CreateSelfLibraryAppletCreatorForDevelop | Returns an #ILibraryAppletCreator. |
All of these commands except #OpenLibraryAppletProxy take the same input as #OpenApplicationProxy, with the same user-process retry-loop as #OpenApplicationProxy. These Open*Proxy commands (including appletOE) doesn't seem to usable from processes which aren't actual applets (such as sysmodules), at least for applet-types which aren't already in use.
This service is used by all system non-regular-applications.
The 01000000000010XX system titles use the following applet types(above Open{type}Proxy commands):
- "qlaunch": SystemApplet
- "overlay": OverlayApplet
- "starter": SystemApplication
- "maintenance": SystemApplet
- All others: LibraryApplet
OpenLibraryAppletProxy
Returns an #ILibraryAppletProxy.
Takes a reserved input u64(official user-processes use hard-coded value 0), a PID,a process copy-handle(cur-proc handle alias), and an 0x80-byte type-0x15 input buffer AppletAttribute.
Official user-processes use the same retry loop with this as the other Open*Proxy commands.
ISystemAppletProxy
Cmd | Name | Notes |
---|---|---|
0 | GetCommonStateGetter | Returns an #ICommonStateGetter. |
1 | GetSelfController | Returns an #ISelfController. |
2 | GetWindowController | Returns an #IWindowController. |
3 | GetAudioController | Returns an #IAudioController. |
4 | GetDisplayController | Returns an #IDisplayController. |
10 | GetProcessWindingController | Returns an #IProcessWindingController. |
11 | GetLibraryAppletCreator | Returns an #ILibraryAppletCreator. |
20 | GetHomeMenuFunctions | Returns an #IHomeMenuFunctions. |
21 | GetGlobalStateController | Returns an #IGlobalStateController. |
22 | GetApplicationCreator | Returns an #IApplicationCreator. |
1000 | GetDebugFunctions | Returns an #IDebugFunctions. |
IHomeMenuFunctions
Cmd | Name | Notes |
---|---|---|
10 | RequestToGetForeground | |
11 | LockForeground | |
12 | UnlockForeground | |
20 | PopFromGeneralChannel | Returns an #IStorage. |
21 | GetPopFromGeneralChannelEvent | |
30 | GetHomeButtonWriterLockAccessor | Returns an #ILockAccessor. |
31 | [2.0.0+] GetWriterLockAccessorEx | Returns an #ILockAccessor. |
ILockAccessor
Cmd | Name |
---|---|
1 | TryLock |
2 | Unlock |
3 | GetEvent |
IGlobalStateController
Cmd | Name |
---|---|
0 | RequestToEnterSleep |
1 | EnterSleep |
2 | StartSleepSequence |
3 | StartShutdownSequence |
4 | StartRebootSequence |
10 | LoadAndApplyIdlePolicySettings |
11 | [2.0.0+] NotifyCecSettingsChanged |
12 | [2.0.0+] SetDefaultHomeButtonLongPressTime |
13 | [2.0.0+] UpdateDefaultDisplayResolution |
14 | [2.0.0+] ShouldSleepOnBoot |
15 | [4.0.0+] GetHdcpAuthenticationFailedEvent |
IApplicationCreator
Cmd | Name | Notes |
---|---|---|
0 | CreateApplication | Returns an #IApplicationAccessor. |
1 | PopLaunchRequestedApplication | Returns an #IApplicationAccessor. |
10 | CreateSystemApplication | Returns an #IApplicationAccessor. |
100 | PopFloatingApplicationForDevelopment | Returns an #IApplicationAccessor. |
IApplicationAccessor
Cmd | Name | Notes |
---|---|---|
0 | GetAppletStateChangedEvent | |
1 | IsCompleted | |
10 | Start | |
20 | RequestExit | |
25 | Terminate | |
30 | GetResult | |
101 | RequestForApplicationToGetForeground | |
110 | TerminateAllLibraryApplets | |
111 | AreAnyLibraryAppletsLeft | |
112 | GetCurrentLibraryApplet | Returns an #IAppletAccessor. |
120 | GetApplicationId | |
121 | PushLaunchParameter | Takes an #IStorage. |
122 | GetApplicationControlProperty | |
123 | [2.0.0+] GetApplicationLaunchProperty |
IAppletAccessor
Cmd | Name |
---|---|
0 | GetAppletStateChangedEvent |
1 | IsCompleted |
10 | Start |
20 | RequestExit |
25 | Terminate |
30 | GetResult |
ILibraryAppletProxy
Cmd | Name | Notes |
---|---|---|
0 | GetCommonStateGetter | Returns an #ICommonStateGetter. |
1 | GetSelfController | Returns an #ISelfController. |
2 | GetWindowController | Returns an #IWindowController. |
3 | GetAudioController | Returns an #IAudioController. |
4 | GetDisplayController | Returns an #IDisplayController. |
10 | GetProcessWindingController | Returns an #IProcessWindingController. |
11 | GetLibraryAppletCreator | Returns an #ILibraryAppletCreator. |
20 | GetLibraryAppletSelfAccessor | Returns an #ILibraryAppletSelfAccessor. |
1000 | GetDebugFunctions | Returns an #IDebugFunctions. |
ILibraryAppletSelfAccessor
Cmd | Name | Notes |
---|---|---|
0 | PopInData | Returns an #IStorage. |
1 | PushOutData | Takes an #IStorage. |
2 | PopInteractiveInData | Returns an #IStorage. |
3 | PushInteractiveOutData | Takes an #IStorage. |
5 | GetPopInDataEvent | |
6 | GetPopInteractiveInDataEvent | |
10 | #ExitProcessAndReturn | |
11 | #GetLibraryAppletInfo | |
12 | GetMainAppletIdentityInfo | |
13 | CanUseApplicationCore | |
14 | GetCallerAppletIdentityInfo | |
15 | [2.0.0+] GetMainAppletApplicationControlProperty | |
16 | [2.0.0+] GetMainAppletStorageId | |
17 | [2.0.0+] GetCallerAppletIdentityInfoStack | |
18 | [4.0.0+] GetNextReturnDestinationAppletIdentityInfo | |
19 | [4.0.0+] GetDesirableKeyboardLayout | |
20 | PopExtraStorage | Returns an #IStorage. |
25 | GetPopExtraStorageEvent | |
30 | UnpopInData | Takes an #IStorage. |
31 | UnpopExtraStorage | Takes an #IStorage. |
40 | [2.0.0+] GetIndirectLayerProducerHandle | |
50 | [2.0.0+] ReportVisibleError | |
51 | [4.0.0+] ReportVisibleErrorWithErrorContext | |
60 | [4.0.0+] #GetMainAppletApplicationDesiredLanguage | |
90 | [5.0.0+] CreateApplicationAndPushAndRequestToLaunch | |
100 | [4.0.0+] CreateGameMovieTrimmer |
ExitProcessAndReturn
No input/output.
Exits the LibraryApplet and returns to running the title which launched this LibraryApplet (qlaunch for example).
GetLibraryAppletInfo
No input. Returns an u64 LibraryAppletInfo: +0 u32 is #AppletId, +4 u32 is #LibraryAppletMode.
GetMainAppletApplicationDesiredLanguage
No input, returns an output LanguageCode.
IOverlayAppletProxy
Cmd | Name | Notes |
---|---|---|
0 | GetCommonStateGetter | Returns an #ICommonStateGetter. |
1 | GetSelfController | Returns an #ISelfController. |
2 | GetWindowController | Returns an #IWindowController. |
3 | GetAudioController | Returns an #IAudioController. |
4 | GetDisplayController | Returns an #IDisplayController. |
10 | GetProcessWindingController | Returns an #IProcessWindingController. |
11 | GetLibraryAppletCreator | Returns an #ILibraryAppletCreator. |
20 | GetOverlayFunctions | Returns an #IOverlayFunctions. |
1000 | GetDebugFunctions | Returns an #IDebugFunctions. |
IOverlayFunctions
Cmd | Name |
---|---|
0 | BeginToWatchShortHomeButtonMessage |
1 | EndToWatchShortHomeButtonMessage |
2 | GetApplicationIdForLogo |
3 | SetGpuTimeSliceBoost |
4 | [2.0.0+] SetAutoSleepTimeAndDimmingTimeEnabled |
5 | [2.0.0+] TerminateApplicationAndSetReason |
6 | [2.0.0+] SetScreenShotPermissionGlobally |
IApplicationProxy
Cmd | Name | Notes |
---|---|---|
0 | GetCommonStateGetter | Returns an #ICommonStateGetter. |
1 | GetSelfController | Returns an #ISelfController. |
2 | GetWindowController | Returns an #IWindowController. |
3 | GetAudioController | Returns an #IAudioController. |
4 | GetDisplayController | Returns an #IDisplayController. |
10 | GetProcessWindingController | Returns an #IProcessWindingController. |
11 | GetLibraryAppletCreator | Returns an #ILibraryAppletCreator. |
20 | GetApplicationFunctions | Returns an #IApplicationFunctions. |
1000 | GetDebugFunctions | Returns an #IDebugFunctions. |
IApplicationFunctions
Cmd | Name | Notes |
---|---|---|
1 | PopLaunchParameter | Returns an #IStorage. |
10 | CreateApplicationAndPushAndRequestToStart | Takes an #IStorage. |
11 | [2.0.0+] CreateApplicationAndPushAndRequestToStartForQuest | Takes an #IStorage. |
12 | [4.0.0+] CreateApplicationAndRequestToStart | |
13 | [4.0.0+] CreateApplicationAndRequestToStartForQuest | |
20 | EnsureSaveData | |
21 | #GetDesiredLanguage | |
22 | #SetTerminateResult | |
23 | GetDisplayVersion | |
24 | [2.0.0+] GetLaunchStorageInfoForDebug | |
25 | [2.0.0+] ExtendSaveData | |
26 | [2.0.0+] GetSaveDataSize | |
27 | [5.0.0+] CreateCacheStorage | |
30 | BeginBlockingHomeButtonShortAndLongPressed | |
31 | EndBlockingHomeButtonShortAndLongPressed | |
32 | #BeginBlockingHomeButton | |
33 | EndBlockingHomeButton | |
40 | #NotifyRunning | |
50 | [2.0.0+] GetPseudoDeviceId | |
60 | [2.0.0+] SetMediaPlaybackStateForApplication | |
65 | [3.0.0+] IsGamePlayRecordingSupported | |
66 | [3.0.0+] #InitializeGamePlayRecording | |
67 | [3.0.0+] #SetGamePlayRecordingState | |
68 | [4.0.0+] RequestFlushGamePlayingMovieForDebug | |
70 | [3.0.0+] RequestToShutdown | |
71 | [3.0.0+] RequestToReboot | |
80 | [4.0.0+] ExitAndRequestToShowThanksMessage | |
90 | [4.0.0+] EnableApplicationCrashReport | |
100 | [5.0.0+] InitializeApplicationCopyrightFrameBuffer | |
101 | [5.0.0+] SetApplicationCopyrightImage | |
102 | [5.0.0+] SetApplicationCopyrightVisibility | |
110 | [5.0.0+] QueryApplicationPlayStatistics | |
120 | [5.0.0+] ExecuteProgram | |
121 | [5.0.0+] ClearUserChannel | |
122 | [5.0.0+] UnpopToUserChannel | |
500 | [5.0.0+] StartContinuousRecordingFlushForDebug | |
1000 | [5.0.0+] CreateMovieMaker | |
1001 | [5.0.0+] #PrepareForJit |
The BOTW game uses this GamePlayRecording functionality from the main-nso "nninitStartup" function, with size 0x6000000(96MiB). The official GamePlayRecording-enable code does the following(this will panic on any failure):
- Creates TransferMemory using the input buffer and size, with permissions=0.
- Uses #InitializeGamePlayRecording with the TransferMemory.
- Closes the TransferMemory handle, + TransferMemory cleanup.
- Uses #SetGamePlayRecordingState with value 0x1.
This GamePlayRecording functionality presumably enables the video-recording usable starting with 4.0.0.
GetDesiredLanguage
No input, returns an output LanguageCode.
SetTerminateResult
Takes an input u32 Result, no output.
For example, in some cases official apps use this with error 0x2A2 then uses svcBreak.
BeginBlockingHomeButton
Takes an input s64 nanoseconds, no output. The input nanoseconds can be zero.
NotifyRunning
Takes no input. Returns an output u8, which is ignored by official user-processes.
InitializeGamePlayRecording
Takes a TransferMemory handle and an u64 for the size of the TransferMemory.
SetGamePlayRecordingState
Takes an input u32.
PrepareForJit
Takes no input. Launches title 010000000000003B (currently not present on retail systems) if some context variable is set.
ILibraryAppletCreator
Cmd | Name | Notes |
---|---|---|
0 | CreateLibraryApplet | Returns an #ILibraryAppletAccessor. |
1 | TerminateAllLibraryApplets | |
2 | AreAnyLibraryAppletsLeft | |
10 | CreateStorage | Returns an #IStorage. |
11 | CreateTransferMemoryStorage | Returns an #IStorage. |
12 | [2.0.0+] CreateHandleStorage | Returns an #IStorage. |
ILibraryAppletAccessor
Cmd | Name | Notes |
---|---|---|
0 | GetAppletStateChangedEvent | |
1 | IsCompleted | |
10 | Start | |
20 | RequestExit | |
25 | Terminate | |
30 | GetResult | |
50 | SetOutOfFocusApplicationSuspendingEnabled | |
100 | PushInData | Takes an #IStorage. |
101 | PopOutData | Returns an #IStorage. |
102 | PushExtraStorage | Takes an #IStorage. |
103 | PushInteractiveInData | Takes an #IStorage. |
104 | PopInteractiveOutData | Returns an #IStorage. |
105 | GetPopOutDataEvent | |
106 | GetPopInteractiveOutDataEvent | |
110 | NeedsToExitProcess | |
120 | GetLibraryAppletInfo | |
150 | RequestForAppletToGetForeground | |
160 | [2.0.0+] GetIndirectLayerConsumerHandle |
ICommonStateGetter
Cmd | Name | Notes |
---|---|---|
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 | |
20 | PushToGeneralChannel | Takes an #IStorage. |
30 | GetHomeButtonReaderLockAccessor | Returns an #ILockAccessor. |
31 | [2.0.0+] GetReaderLockAccessorEx | Returns an #ILockAccessor. |
40 | [2.0.0+] GetCradleFwVersion | |
50 | [3.0.0+] IsVrModeEnabled | |
51 | [3.0.0+] #SetVrModeEnabled | |
52 | [4.0.0+] SetLcdBacklighOffEnabled | |
55 | [3.0.0+] IsInControllerFirmwareUpdateSection | |
60 | [3.0.0+] GetDefaultDisplayResolution | |
61 | [3.0.0+] GetDefaultDisplayResolutionChangeEvent | |
62 | [4.0.0+] GetHdcpAuthenticationState | |
63 | [4.0.0+] GetHdcpAuthenticationStateChangeEvent | |
64 | [5.0.0+] SetTvPowerStateMatchingMode |
Officially notification messages are handled by the application itself, not sdk-nso in ExeFS. Official apps call code in sdk-nso which basically uses svcWaitSynchronization with the event from #GetEventHandle to check whether a message is available, then if so it uses #ReceiveMessage. The actual handling for message IDs is done in the app itself(see #NotificationMessage).
GetEventHandle
No input. Returns an output event handle. This is signalled when a message is available with #ReceiveMessage.
ReceiveMessage
No input. Returns an output u32. Error 0x680 indicates no message is available.
GetOperationMode
No input. Returns an output u8 for the current #OperationMode.
GetPerformanceMode
No input. Returns an output u32 for the current PerformanceMode.
GetCurrentFocusState
No input. Returns an output u8:
- 1: In focus.
- 2/3: Out of focus(running in "background").
SetVrModeEnabled
Takes an input u8 bool flag. No output.
Updates internal AM state fields. If the new state doesn't match the previous state, this uses the Backlight_services {Disable/Enable}VrMode command depending on whether flag={disable/enable}.
When the VrMode is set to true, the console shows a screen rendered like vr asking the user to move his face away and hit the 'close' button. When this button is pressed, the console resets the vrMode to false.
ISelfController
Cmd | Name |
---|---|
0 | #Exit |
1 | #LockExit |
2 | #UnlockExit |
3 | [2.0.0+] #EnterFatalSection |
4 | [2.0.0+] #LeaveFatalSection |
9 | GetLibraryAppletLaunchableEvent |
10 | #SetScreenShotPermission |
11 | #SetOperationModeChangedNotification |
12 | #SetPerformanceModeChangedNotification |
13 | #SetFocusHandlingMode |
14 | SetRestartMessageEnabled |
15 | [2.0.0+] #SetScreenShotAppletIdentityInfo |
16 | [2.0.0+] #SetOutOfFocusSuspendingEnabled |
17 | [3.0.0+] SetControllerFirmwareUpdateSection |
18 | [3.0.0+] SetRequiresCaptureButtonShortPressedMessage |
19 | [3.0.0+] #SetScreenShotImageOrientation |
20 | [4.0.0+] SetDesirableKeyboardLayout |
40 | #CreateManagedDisplayLayer |
41 | [4.0.0+] IsSystemBufferSharingEnabled |
42 | [4.0.0+] GetSystemSharedLayerHandle |
50 | SetHandlesRequestToDisplay |
51 | ApproveToDisplay |
60 | OverrideAutoSleepTimeAndDimmingTime |
61 | SetMediaPlaybackState |
62 | SetIdleTimeDetectionExtension |
63 | GetIdleTimeDetectionExtension |
64 | SetInputDetectionSourceSet |
65 | [2.0.0+] ReportUserIsActive |
66 | [3.0.0+] GetCurrentIlluminance |
67 | [3.0.0+] IsIlluminanceAvailable |
68 | [4.0.0+] SetAutoSleepDisabled |
69 | [4.0.0+] IsAutoSleepDisabled |
70 | [5.0.0+] ReportMultimediaError |
80 | [5.0.0+] SetWirelessPriorityMode |
Exit
No input/output.
LockExit
No input/output.
UnlockExit
No input/output.
EnterFatalSection
No input/output.
LeaveFatalSection
No input/output.
SetScreenShotPermission
Takes an input s32. No output.
Controls whether screenshot-capture is allowed. 0 = disable, 1 = enable, 2 = unknown.
SetOperationModeChangedNotification
Takes an input u8 bool flag. No output.
SetPerformanceModeChangedNotification
Takes an input u8 bool flag. No output.
SetFocusHandlingMode
Takes 3 input u8s with each field located immediately after the previous u8, these are bool flags. No output.
SetScreenShotAppletIdentityInfo
Takes an input 0x10-byte struct AppletIdentityInfo. No output.
SetOutOfFocusSuspendingEnabled
Takes an input u8(bool flag). No output.
SetScreenShotImageOrientation
Takes an input s32. No output.
CreateManagedDisplayLayer
Returns an output u64 LayerId which is then used by the user-process with Display_services#OpenLayer.
IWindowController
Cmd | Name | Notes |
---|---|---|
0 | CreateWindow | Returns an IWindow object. |
1 | #GetAppletResourceUserId | |
10 | #AcquireForegroundRights | |
11 | ReleaseForegroundRights | |
12 | RejectToChangeIntoBackground |
GetAppletResourceUserId
Returns an output u64: #AppletResourceUserId.
AcquireForegroundRights
No input/output.
IAudioController
Cmd | Name |
---|---|
0 | SetExpectedMasterVolume |
1 | GetMainAppletExpectedMasterVolume |
2 | GetLibraryAppletExpectedMasterVolume |
3 | ChangeMainAppletMasterVolume |
4 | SetTransparentVolumeRate |
IDisplayController
Cmd | Name |
---|---|
0 | GetLastForegroundCaptureImage |
1 | UpdateLastForegroundCaptureImage |
2 | GetLastApplicationCaptureImage |
3 | GetCallerAppletCaptureImage |
4 | UpdateCallerAppletCaptureImage |
5 | GetLastForegroundCaptureImageEx |
6 | GetLastApplicationCaptureImageEx |
7 | GetCallerAppletCaptureImageEx |
8 | [2.0.0+] TakeScreenShotOfOwnLayer |
9 | [5.0.0+] CopyBetweenCaptureBuffers |
10 | AcquireLastApplicationCaptureBuffer |
11 | ReleaseLastApplicationCaptureBuffer |
12 | AcquireLastForegroundCaptureBuffer |
13 | ReleaseLastForegroundCaptureBuffer |
14 | AcquireCallerAppletCaptureBuffer |
15 | ReleaseCallerAppletCaptureBuffer |
16 | AcquireLastApplicationCaptureBufferEx |
17 | AcquireLastForegroundCaptureBufferEx |
18 | AcquireCallerAppletCaptureBufferEx |
20 | [2.0.0+] ClearCaptureBuffer |
21 | [2.0.0+] ClearAppletTransitionBuffer |
22 | [4.0.0+] AcquireLastApplicationCaptureSharedBuffer |
23 | [4.0.0+] ReleaseLastApplicationCaptureSharedBuffer |
24 | [4.0.0+] AcquireLastForegroundCaptureSharedBuffer |
25 | [4.0.0+] ReleaseLastForegroundCaptureSharedBuffer |
26 | [4.0.0+] AcquireCallerAppletCaptureSharedBuffer |
27 | [4.0.0+] ReleaseCallerAppletCaptureSharedBuffer |
ILibraryAppletCreator
Cmd | Name | Notes |
---|---|---|
0 | CreateLibraryApplet | Returns a #ILibraryAppletAccessor. |
1 | TerminateAllLibraryApplets | |
2 | AreAnyLibraryAppletsLeft | |
10 | CreateStorage | Returns an #IStorage. |
11 | CreateTransferMemoryStorage | Returns an IStorage. |
12 | [2.0.0+] CreateHandleStorage | Returns an #IStorage. |
IProcessWindingController
Cmd | Name | Notes |
---|---|---|
0 | #GetLaunchReason | |
11 | OpenCallingLibraryApplet | Returns an #ILibraryAppletAccessor. |
21 | PushContext | Takes an #IStorage. |
22 | PopContext | Returns an #IStorage. |
23 | CancelWindingReservation | |
30 | WindAndDoReserved | |
40 | ReserveToStartAndWaitAndUnwindThis | Returns an #ILibraryAppletAccessor. |
41 | [4.0.0+] ReserveToStartAndWait |
GetLaunchReason
No input. Returns an u32 AppletProcessLaunchReason.
Used by LibraryApplets.
IDebugFunctions
Cmd | Name | Notes |
---|---|---|
0 | NotifyMessageToHomeMenuForDebug | |
1 | OpenMainApplication | Returns an #IApplicationAccessor. |
10 | EmulateButtonEvent | |
20 | InvalidateTransitionLayer |
IStorage
Cmd | Name | Notes |
---|---|---|
0 | Open | No input. Returns an #IStorageAccessor. |
1 | OpenTransferStorage | No input. Returns an #ITransferStorageAccessor. |
Commands which take an IStorage as input use an unknown input u32 for that.
IStorageAccessor
Cmd | Name | Notes |
---|---|---|
0 | GetSize | No input. Returns an s64. |
10 | Write | Takes an input s64 and a type-0x21 input buffer. |
11 | Read | Takes an input s64 and a type-0x22 output buffer. |
ITransferStorageAccessor
Cmd | Name | Notes |
---|---|---|
0 | GetSize | No input. Returns an output s64. |
1 | GetHandle | No input. Returns an output u64 and handle. |
appletOE
This is "nn::am::service::IApplicationProxyService".
Cmd | Name | Notes |
---|---|---|
0 | #OpenApplicationProxy |
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.
OpenApplicationProxy
Returns an #IApplicationProxy. See #appletAE.
Takes a reserved input u64(official user-processes use hard-coded value 0), a PID, and a process copy-handle(cur-proc handle alias).
On failure, official user-processes will retry using this command in a loop while the retval is 0x19280, with svcSleepThread(10000000) being called first.
idle:sys
This is "nn::idle::detail::IPolicyManagerSystem"
Cmd | Name |
---|---|
0 | GetAutoPowerDownEvent |
1 | [1.0.0-3.0.2] |
2 | [1.0.0-3.0.2] |
3 | |
4 | |
5 |
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, this is the only service that interacts with the Dock through usb:pd*.
Cmd | Name |
---|---|
0 | GetOperationMode |
1 | GetOperationModeChangeEvent |
2 | EnableAudioVisual |
3 | DisableAudioVisual |
4 | EnterSleepAndWait |
5 | GetCradleStatus |
6 | FadeInDisplay |
7 | FadeOutDisplay |
8 | [2.0.0+] |
9 | [2.0.0+] |
10 | [3.0.0+] |
11 | [3.0.0+] |
12 | [3.0.0+] |
13 | [3.0.0+] |
14 | [3.0.0+] |
15 | [4.0.0+] |
16 | [4.0.0+] |
17 | [4.0.0+] |
18 | [4.0.0+] |
19 | [4.0.0+] |
20 | [4.0.0+] |
21 | [4.0.0+] |
22 | [4.0.0+] |
23 | [4.0.0+] |
spsm
This is "nn::spsm::detail::IPowerStateInterface".
Cmd | Name |
---|---|
0 | GetState |
1 | SleepSystemAndWaitAwake |
2 | |
3 | |
4 | GetNotificationMessageEventHandle |
5 | |
6 | |
7 | |
8 | AnalyzePerformanceLogForLastSleepWakeSequence |
9 | ChangeHomeButtonLongPressingTime |
10 | |
11 | [1.0.0-3.0.2] |
Enums
AppletId
ID | Title-id | Description |
---|---|---|
0x02 | 010000000000100C | "overlayDisp" |
0x03 | 0100000000001000 | "qlaunch" |
0x04 | 0100000000001012 | "starter" |
0x0A | 0100000000001001 | "auth" |
0x0B | 0100000000001002 | "cabinet" |
0x0C | 0100000000001003 | "controller" |
0x0D | 0100000000001004 | "dataErase" |
0x0E | 0100000000001005 | "error" |
0x0F | 0100000000001006 | "netConnect" |
0x10 | 0100000000001007 | "playerSelect" |
0x11 | 0100000000001008 | "swkbd" |
0x12 | 0100000000001009 | "miiEdit" |
0x13 | 010000000000100A | "LibAppletWeb" WebApplet applet |
0x14 | 010000000000100B | "LibAppletShop" ShopN applet |
0x15 | 010000000000100D | "photoViewer" |
0x16 | 010000000000100E | |
0x17 | 010000000000100F | "LibAppletOff" Offline applet |
0x18 | 0100000000001010 | "LibAppletLns" Whitelisted applet |
0x19 | 0100000000001011 | "LibAppletAuth" WifiWebAuth applet |
0x1A | 0100000000001013 | "myPage" |
LibraryAppletMode
ID | Description |
---|---|
0x0 | AllForeground |
ShimKind
This is from strings and code in the web-applets.
This indicates the type of web-applet.
shimKind value | Description |
---|---|
2 | LoginApplet |
4 | ShareApplet |
5 | WebApplet |
6 | WifiWebAuthApplet |
7 | LobbyApplet |
NotificationMessage
ID | Description |
---|---|
0xF | FocusState changed |
0x10 | ? |
0x1E | OperationMode changed |
0x1F | PerformanceMode changed |
OperationMode
Value | Description |
---|---|
0 | Handheld |
1 | Docked |
AppletResourceUserId
This u64 is officially called "nn::applet::AppletResourceUserId". Used by a number of non-AM services.