Changes

Jump to navigation Jump to search
no edit summary
Line 69: Line 69:  
|-
 
|-
 
| 22 || GetApplicationCreator || Returns an [[#IApplicationCreator]].
 
| 22 || GetApplicationCreator || Returns an [[#IApplicationCreator]].
 +
|-
 +
| 23 || [7.0.0+] GetAppletCommonFunctions || Returns an [[#IAppletCommonFunctions]].
 
|-
 
|-
 
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]].
 
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]].
Line 93: Line 95:  
|-
 
|-
 
| 100 || [6.0.0+] PopRequestLaunchApplicationForDebug ||
 
| 100 || [6.0.0+] PopRequestLaunchApplicationForDebug ||
 +
|-
 +
| 200 || [8.0.0+] LaunchDevMenu ||
 
|}
 
|}
   Line 125: Line 129:  
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name
+
! Cmd || Name || Notes
 +
|-
 +
| 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]] ||
 
|-
 
|-
| 10 || LoadAndApplyIdlePolicySettings
+
| 10 || LoadAndApplyIdlePolicySettings ||
 
|-
 
|-
| 11 || [2.0.0+] NotifyCecSettingsChanged
+
| 11 || [2.0.0+] NotifyCecSettingsChanged ||
 
|-
 
|-
| 12 || [2.0.0+] SetDefaultHomeButtonLongPressTime
+
| 12 || [3.0.0+] SetDefaultHomeButtonLongPressTime ||
 
|-
 
|-
| 13 || [2.0.0+] UpdateDefaultDisplayResolution
+
| 13 || [3.0.0+] UpdateDefaultDisplayResolution ||
 
|-
 
|-
| 14 || [2.0.0+] [[#ShouldSleepOnBoot]]
+
| 14 || [3.0.0+] [[#ShouldSleepOnBoot]] ||
 
|-
 
|-
| 15 || [4.0.0+] GetHdcpAuthenticationFailedEvent
+
| 15 || [4.0.0+] GetHdcpAuthenticationFailedEvent ||
 
|}
 
|}
 +
 +
==== IsAutoPowerDownRequested ====
 +
No input, returns an output u8 bool.
    
==== ShouldSleepOnBoot ====
 
==== ShouldSleepOnBoot ====
Line 223: Line 232:  
|-
 
|-
 
| 150 || [6.0.0+] ReportApplicationExitTimeout ||  
 
| 150 || [6.0.0+] ReportApplicationExitTimeout ||  
 +
|-
 +
| 160 || [8.0.0+] SetApplicationAttribute ||
 +
|-
 +
| 170 || [8.0.0+] HasSaveDataAccessPermission ||
 
|}
 
|}
   Line 268: Line 281:  
==== GetResult====
 
==== GetResult====
 
No input/output.
 
No input/output.
 +
 +
== IAppletCommonFunctions ==
 +
Added with [[7.0.0]].
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name || Notes
 +
|-
 +
| 10 || ReadThemeStorage || Takes an input u64 '''offset''' and a type-0x22 output buffer, returns an output u64 '''actual_transfer_size'''.
 +
|-
 +
| 11 || WriteThemeStorage || Takes an input u64 '''offset''' and a type-0x21 input buffer, no output.
 +
|-
 +
| 40 || [8.0.0+] GetDisplayLogicalResolution ||
 +
|-
 +
| 42 || [8.0.0+] SetDisplayMagnification ||
 +
|-
 +
| 50 || [8.0.0+] SetHomeButtonDoubleClickEnabled ||
 +
|-
 +
| 51 || [8.0.0+] GetHomeButtonDoubleClickEnabled ||
 +
|}
 +
 +
These commands copy data from/to a state buffer and the user specified buffer. The size of the state buffer is 0x400-bytes.
    
== ILibraryAppletProxy ==
 
== ILibraryAppletProxy ==
Line 289: Line 324:  
|-
 
|-
 
| 20 || OpenLibraryAppletSelfAccessor || Returns an [[#ILibraryAppletSelfAccessor]].
 
| 20 || OpenLibraryAppletSelfAccessor || Returns an [[#ILibraryAppletSelfAccessor]].
 +
|-
 +
| 21 || [7.0.0+] GetAppletCommonFunctions || No input, returns an [[#IAppletCommonFunctions]].
 
|-
 
|-
 
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]].
 
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]].
Line 324: Line 361:  
| 16 || [2.0.0+] [[#GetMainAppletStorageId]] ||
 
| 16 || [2.0.0+] [[#GetMainAppletStorageId]] ||
 
|-
 
|-
| 17 || [2.0.0+] GetCallerAppletIdentityInfoStack ||
+
| 17 || [3.0.0+] GetCallerAppletIdentityInfoStack ||
 
|-
 
|-
 
| 18 || [4.0.0+] GetNextReturnDestinationAppletIdentityInfo ||
 
| 18 || [4.0.0+] GetNextReturnDestinationAppletIdentityInfo ||
Line 340: Line 377:  
| 40 || [2.0.0+] GetIndirectLayerProducerHandle ||
 
| 40 || [2.0.0+] GetIndirectLayerProducerHandle ||
 
|-
 
|-
| 50 || [2.0.0+] ReportVisibleError ||
+
| 50 || [3.0.0+] ReportVisibleError ||
 
|-
 
|-
 
| 51 || [4.0.0+] ReportVisibleErrorWithErrorContext ||
 
| 51 || [4.0.0+] ReportVisibleErrorWithErrorContext ||
 
|-
 
|-
 
| 60 || [4.0.0+] [[#GetMainAppletApplicationDesiredLanguage]] ||
 
| 60 || [4.0.0+] [[#GetMainAppletApplicationDesiredLanguage]] ||
 +
|-
 +
| 70 || [8.0.0+] GetCurrentApplicationId ||
 
|-
 
|-
 
| 80 || [6.0.0+] RequestExitToSelf ||
 
| 80 || [6.0.0+] RequestExitToSelf ||
Line 352: Line 391:  
| 100 || [4.0.0+] [[#CreateGameMovieTrimmer]] ||
 
| 100 || [4.0.0+] [[#CreateGameMovieTrimmer]] ||
 
|-
 
|-
| 101 || [6.0.0+] ReserveResourceForMovieOperation ||
+
| 101 || [5.0.0+] ReserveResourceForMovieOperation ||
 
|-
 
|-
| 102 || [6.0.0+] UnreserveResourceForMovieOperation ||
+
| 102 || [5.0.0+] UnreserveResourceForMovieOperation ||
 
|-
 
|-
 
| 110 || [6.0.0+] GetMainAppletAvailableUsers ||
 
| 110 || [6.0.0+] GetMainAppletAvailableUsers ||
Line 429: Line 468:  
|-
 
|-
 
| 20 || GetOverlayFunctions || Returns an [[#IOverlayFunctions]].
 
| 20 || GetOverlayFunctions || Returns an [[#IOverlayFunctions]].
 +
|-
 +
| 21 || [7.0.0+] GetAppletCommonFunctions || No input, returns an [[#IAppletCommonFunctions]].
 
|-
 
|-
 
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]].
 
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]].
Line 450: Line 491:  
| 5 || [2.0.0+] TerminateApplicationAndSetReason
 
| 5 || [2.0.0+] TerminateApplicationAndSetReason
 
|-
 
|-
| 6 || [2.0.0+] SetScreenShotPermissionGlobally
+
| 6 || [3.0.0+] SetScreenShotPermissionGlobally
 
|-
 
|-
 
| 10 || [6.0.0+] StartShutdownSequenceForOverlay
 
| 10 || [6.0.0+] StartShutdownSequenceForOverlay
Line 456: Line 497:  
| 11 || [6.0.0+] StartRebootSequenceForOverlay
 
| 11 || [6.0.0+] StartRebootSequenceForOverlay
 
|-
 
|-
| 101 || [6.0.0+] BeginToObserveHidInputForDevelop
+
| 20 || [8.0.0+] SetHandlingHomeButtonShortPressedEnabled
 +
|-
 +
| 90 || [7.0.0+] SetRequiresGpuResourceUse
 +
|-
 +
| 101 || [5.0.0+] BeginToObserveHidInputForDevelop
 
|}
 
|}
 +
 +
==== SetRequiresGpuResourceUse ====
 +
Takes an input u8, no output.
    
== IApplicationProxy ==
 
== IApplicationProxy ==
Line 492: Line 540:  
| 10 || [[#CreateApplicationAndPushAndRequestToStart]] ||  
 
| 10 || [[#CreateApplicationAndPushAndRequestToStart]] ||  
 
|-
 
|-
| 11 || [2.0.0+] [[#CreateApplicationAndPushAndRequestToStartForQuest]] ||  
+
| 11 || [3.0.0+] [[#CreateApplicationAndPushAndRequestToStartForQuest]] ||
 +
|-
 +
| 12 || [4.0.0+] [[#CreateApplicationAndRequestToStart]] ||  
 
|-
 
|-
| 12 || [4.0.0+] CreateApplicationAndRequestToStart ||  
+
| 13 || [4.0.0+] [[#CreateApplicationAndRequestToStartForQuest]] ||  
 
|-
 
|-
| 13 || [4.0.0+] CreateApplicationAndRequestToStartForQuest ||  
+
| 14 || [7.0.0+] CreateApplicationWithAttributeAndPushAndRequestToStartForQuest || Takes a total of 8-bytes and a type-0x15 input buffer, return an output [[#IStorage]].
 +
|-
 +
| 15 || [7.0.0+] CreateApplicationWithAttributeAndRequestToStartForQuest || Takes a total of 8-bytes and a type-0x15 input buffer, no output.
 
|-
 
|-
 
| 20 || EnsureSaveData ||
 
| 20 || EnsureSaveData ||
Line 508: Line 560:  
| 24 || [2.0.0+] GetLaunchStorageInfoForDebug ||
 
| 24 || [2.0.0+] GetLaunchStorageInfoForDebug ||
 
|-
 
|-
| 25 || [2.0.0+] ExtendSaveData ||
+
| 25 || [3.0.0+] ExtendSaveData ||
 
|-
 
|-
| 26 || [2.0.0+] GetSaveDataSize ||
+
| 26 || [3.0.0+] GetSaveDataSize ||
 
|-
 
|-
 
| 27 || [5.0.0+] CreateCacheStorage ||
 
| 27 || [5.0.0+] CreateCacheStorage ||
Line 516: Line 568:  
| 30 || BeginBlockingHomeButtonShortAndLongPressed ||
 
| 30 || BeginBlockingHomeButtonShortAndLongPressed ||
 
|-
 
|-
| 31 || EndBlockingHomeButtonShortAndLongPressed ||
+
| 31 || [[#EndBlockingHomeButtonShortAndLongPressed]] ||
 
|-
 
|-
 
| 32 || [[#BeginBlockingHomeButton]] ||
 
| 32 || [[#BeginBlockingHomeButton]] ||
 
|-
 
|-
| 33 || EndBlockingHomeButton ||
+
| 33 || [[#EndBlockingHomeButton]] ||
 
|-
 
|-
 
| 40 || [[#NotifyRunning]] ||
 
| 40 || [[#NotifyRunning]] ||
Line 534: Line 586:  
| 67 || [3.0.0+] [[#SetGamePlayRecordingState]] ||
 
| 67 || [3.0.0+] [[#SetGamePlayRecordingState]] ||
 
|-
 
|-
| 68 || [4.0.0+] RequestFlushGamePlayingMovieForDebug ||  
+
| 68 || [4.0.0+] [[#RequestFlushGamePlayingMovieForDebug]] ||  
 
|-
 
|-
| 70 || [3.0.0+] RequestToShutdown ||
+
| 70 || [3.0.0+] [[#RequestToShutdown]] ||
 
|-
 
|-
| 71 || [3.0.0+] RequestToReboot ||
+
| 71 || [3.0.0+] [[#RequestToReboot]] ||
 
|-
 
|-
| 80 || [4.0.0+] ExitAndRequestToShowThanksMessage ||  
+
| 80 || [4.0.0+] [[#ExitAndRequestToShowThanksMessage]] ||  
 
|-
 
|-
| 90 || [4.0.0+] EnableApplicationCrashReport ||  
+
| 90 || [4.0.0+] [[#EnableApplicationCrashReport]] ||  
 
|-
 
|-
 
| 100 || [5.0.0+] InitializeApplicationCopyrightFrameBuffer ||  
 
| 100 || [5.0.0+] InitializeApplicationCopyrightFrameBuffer ||  
Line 548: Line 600:  
| 101 || [5.0.0+] SetApplicationCopyrightImage ||  
 
| 101 || [5.0.0+] SetApplicationCopyrightImage ||  
 
|-
 
|-
| 102 || [5.0.0+] SetApplicationCopyrightVisibility ||  
+
| 102 || [5.0.0+] [[#SetApplicationCopyrightVisibility]] ||  
 
|-
 
|-
 
| 110 || [5.0.0+] [[#QueryApplicationPlayStatistics]] ||  
 
| 110 || [5.0.0+] [[#QueryApplicationPlayStatistics]] ||  
Line 556: Line 608:  
| 120 || [5.0.0+] ExecuteProgram ||  
 
| 120 || [5.0.0+] ExecuteProgram ||  
 
|-
 
|-
| 121 || [5.0.0+] ClearUserChannel ||  
+
| 121 || [5.0.0+] [[#ClearUserChannel]] ||  
 
|-
 
|-
 
| 122 || [5.0.0+] UnpopToUserChannel ||  
 
| 122 || [5.0.0+] UnpopToUserChannel ||  
 
|-
 
|-
| 123 || [6.0.0+] GetPreviousProgramIndex ||  
+
| 123 || [5.0.0+] GetPreviousProgramIndex ||  
 
|-
 
|-
 
| 124 || [6.0.0+] EnableApplicationAllThreadDumpOnCrash ||  
 
| 124 || [6.0.0+] EnableApplicationAllThreadDumpOnCrash ||  
 +
|-
 +
| 130 || [8.0.0+] GetGpuErrorDetectedSystemEvent ||
 
|-
 
|-
 
| 500 || [5.0.0+] StartContinuousRecordingFlushForDebug ||  
 
| 500 || [5.0.0+] StartContinuousRecordingFlushForDebug ||  
Line 587: Line 641:     
==== CreateApplicationAndPushAndRequestToStartForQuest ====
 
==== CreateApplicationAndPushAndRequestToStartForQuest ====
Takes 2 input u32s, an input u64 titleID, and an input [[#IStorage]], no output.
+
Takes 2 input u32s (loaded from struct ApplicationAttributeForQuest), an input u64 titleID, and an input [[#IStorage]], no output.
 +
 
 +
==== CreateApplicationAndRequestToStart ====
 +
Takes an input u64 titleID, no output.
 +
 
 +
Same as [[#CreateApplicationAndPushAndRequestToStart]] except without the input storage, official sw uses this when no input storage is specified.
 +
 
 +
==== CreateApplicationAndRequestToStartForQuest ====
 +
Takes 2 input u32s (loaded from struct ApplicationAttributeForQuest) and an input u64 titleID, no output.
 +
 
 +
Same as [[#CreateApplicationAndPushAndRequestToStartForQuest]] except without the input storage, official sw uses this when no input storage is specified.
    
==== GetDesiredLanguage ====
 
==== GetDesiredLanguage ====
Line 596: Line 660:     
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.
 +
 +
==== EndBlockingHomeButtonShortAndLongPressed ====
 +
No input/output.
    
==== BeginBlockingHomeButton ====
 
==== BeginBlockingHomeButton ====
 
Takes an input s64 nanoseconds, no output. The input nanoseconds can be zero.
 
Takes an input s64 nanoseconds, no output. The input nanoseconds can be zero.
 +
 +
==== EndBlockingHomeButton ====
 +
No input/output.
    
==== NotifyRunning ====
 
==== NotifyRunning ====
Line 614: Line 684:  
==== SetGamePlayRecordingState ====
 
==== SetGamePlayRecordingState ====
 
Takes an input u32. 0 = disable/pause, 1 = enable/restart.
 
Takes an input u32. 0 = disable/pause, 1 = enable/restart.
 +
 +
==== RequestFlushGamePlayingMovieForDebug ====
 +
No input/output.
 +
 +
==== RequestToShutdown ====
 +
No input/output.
 +
 +
==== RequestToReboot ====
 +
No input/output.
 +
 +
==== ExitAndRequestToShowThanksMessage ====
 +
No input/output.
 +
 +
Used to exit the application and return to the kiosk menu. Official sw uses [[#UnlockExit]] immediately before this.
 +
 +
==== EnableApplicationCrashReport ====
 +
Takes an input u8 bool, no output.
 +
 +
==== SetApplicationCopyrightVisibility ====
 +
Takes an input u8 bool, no output.
    
==== QueryApplicationPlayStatistics ====
 
==== QueryApplicationPlayStatistics ====
Line 619: Line 709:     
The number of entries in each array is the same. ApplicationPlayStatistics is a 8-byte struct.
 
The number of entries in each array is the same. ApplicationPlayStatistics is a 8-byte struct.
 +
 +
==== ClearUserChannel ====
 +
No input/output.
    
==== CreateMovieMaker ====
 
==== CreateMovieMaker ====
Line 803: Line 896:  
|-
 
|-
 
| 31 || [2.0.0+] [[#GetReaderLockAccessorEx]] ||  
 
| 31 || [2.0.0+] [[#GetReaderLockAccessorEx]] ||  
 +
|-
 +
| 32 || [7.0.0+] [[#GetWriterLockAccessorEx]] ||
 
|-
 
|-
 
| 40 || [2.0.0+] GetCradleFwVersion ||
 
| 40 || [2.0.0+] GetCradleFwVersion ||
Line 811: Line 906:  
|-
 
|-
 
| 52 || [4.0.0+] SetLcdBacklighOffEnabled ||
 
| 52 || [4.0.0+] SetLcdBacklighOffEnabled ||
 +
|-
 +
| 53 || [7.0.0+] [[#BeginVrModeEx]] ||
 +
|-
 +
| 54 || [7.0.0+] [[#EndVrModeEx]] ||
 
|-
 
|-
 
| 55 || [3.0.0+] [[#IsInControllerFirmwareUpdateSection]] ||
 
| 55 || [3.0.0+] [[#IsInControllerFirmwareUpdateSection]] ||
Line 824: Line 923:  
| 64 || [5.0.0+] SetTvPowerStateMatchingMode ||
 
| 64 || [5.0.0+] SetTvPowerStateMatchingMode ||
 
|-
 
|-
| 65 || [6.0.0+] GetApplicationIdByContentActionName ||
+
| 65 || [5.1.0+] GetApplicationIdByContentActionName ||
 
|-
 
|-
| 66 || [6.0.0+] SetCpuAndGpuBoostMode ||
+
| 66 || [6.0.0+] [[#SetCpuBoostMode]] ||
 
|-
 
|-
 
| 80 || [6.0.0+] PerformSystemButtonPressingIfInFocus ||
 
| 80 || [6.0.0+] PerformSystemButtonPressingIfInFocus ||
 +
|-
 +
| 90 || [7.0.0+] SetPerformanceConfigurationChangedNotification ||
 +
|-
 +
| 91 || [7.0.0+] GetCurrentPerformanceConfiguration ||
 +
|-
 +
| 200 || [7.0.0+] GetOperationModeSystemInfo ||
 
|}
 
|}
    
Officially notification messages are handled by the application itself, not sdk-nso in ExeFS. Official apps call code in sdk-nso which basically uses svcWaitSynchronization with the event from [[#GetEventHandle]] to check whether a message is available, then if so it uses [[#ReceiveMessage]]. The actual handling for message IDs is done in the app itself(see [[#NotificationMessage]]).
 
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]]).
 +
 +
[7.0.0+] User-processes now use BeginVrModeEx/EndVrModeEx instead of [[#SetVrModeEnabled]]. Prior to using using BeginVrModeEx, [[Parental_Control_services|pctl]] IsStereoVisionPermitted is used and error 0xD08E is thrown if not allowed by pctl.
    
=== GetEventHandle ===
 
=== GetEventHandle ===
Line 876: Line 983:     
=== GetReaderLockAccessorEx ===
 
=== GetReaderLockAccessorEx ===
 +
Takes an input u32, returns an output [[#ILockAccessor]].
 +
 +
=== GetWriterLockAccessorEx ===
 
Takes an input u32, returns an output [[#ILockAccessor]].
 
Takes an input u32, returns an output [[#ILockAccessor]].
   Line 887: Line 997:     
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.
 
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.
 +
 +
=== BeginVrModeEx ===
 +
No input/output.
 +
 +
Identical to [[#SetVrModeEnabled]] except with hard-coded flag=1.
 +
 +
=== EndVrModeEx ===
 +
No input/output.
 +
 +
Identical to [[#SetVrModeEnabled]] except with hard-coded flag=0.
    
=== IsInControllerFirmwareUpdateSection ===
 
=== IsInControllerFirmwareUpdateSection ===
Line 893: Line 1,013:  
=== GetDefaultDisplayResolutionChangeEvent ===
 
=== GetDefaultDisplayResolutionChangeEvent ===
 
No input, returns an output handle.
 
No input, returns an output handle.
 +
 +
=== SetCpuBoostMode ===
 +
Takes an input u32 '''CpuBoostMode''' (only modes 0 and 1 are valid) and passes it to [[PPC_services#apm:sys|SetCpuBoostMode]].
 +
 +
=== SetPerformanceConfigurationChangedNotification ===
 +
Takes an input u8 bool, no output.
 +
 +
=== GetCurrentPerformanceConfiguration ===
 +
No input, returns the result of calling [[PPC_services#apm:sys|GetCurrentPerformanceConfiguration]].
 +
 +
=== GetOperationModeSystemInfo ===
 +
No input, returns a total of 4-bytes of output.
    
== ISelfController ==
 
== ISelfController ==
Line 939: Line 1,071:  
| 42 || [4.0.0+] GetSystemSharedLayerHandle
 
| 42 || [4.0.0+] GetSystemSharedLayerHandle
 
|-
 
|-
| 43 || [6.0.0+] GetSystemSharedBufferHandle
+
| 43 || [5.0.0+] GetSystemSharedBufferHandle
 
|-
 
|-
 
| 50 || SetHandlesRequestToDisplay
 
| 50 || SetHandlesRequestToDisplay
Line 957: Line 1,089:  
| 65 || [2.0.0+] ReportUserIsActive
 
| 65 || [2.0.0+] ReportUserIsActive
 
|-
 
|-
| 66 || [3.0.0+] GetCurrentIlluminance
+
| 66 || [3.0.0+] [[#GetCurrentIlluminance]]
 
|-
 
|-
 
| 67 || [3.0.0+] [[#IsIlluminanceAvailable]]
 
| 67 || [3.0.0+] [[#IsIlluminanceAvailable]]
 
|-
 
|-
| 68 || [4.0.0+] SetAutoSleepDisabled
+
| 68 || [5.0.0+] SetAutoSleepDisabled
 
|-
 
|-
| 69 || [4.0.0+] IsAutoSleepDisabled
+
| 69 || [5.0.0+] IsAutoSleepDisabled
 
|-
 
|-
| 70 || [5.0.0+] ReportMultimediaError
+
| 70 || [4.0.0+] ReportMultimediaError
 
|-
 
|-
| 71 || [6.0.0+] GetCurrentIlluminanceEx
+
| 71 || [5.0.0+] [[#GetCurrentIlluminanceEx]]
 
|-
 
|-
| 80 || [5.0.0+] SetWirelessPriorityMode
+
| 80 || [4.0.0+] SetWirelessPriorityMode
 
|-
 
|-
 
| 90 || [6.0.0+] GetAccumulatedSuspendedTickValue
 
| 90 || [6.0.0+] GetAccumulatedSuspendedTickValue
 
|-
 
|-
 
| 91 || [6.0.0+] GetAccumulatedSuspendedTickChangedEvent
 
| 91 || [6.0.0+] GetAccumulatedSuspendedTickChangedEvent
 +
|-
 +
| 100 || [7.0.0+] [[#SetAlbumImageTakenNotificationEnabled]]
 +
|-
 +
| 110 || [8.0.0+] SetApplicationAlbumUserData
 +
|-
 +
| 1000 || [7.0.0+] [[#GetDebugStorageChannel]]
 
|}
 
|}
   Line 994: Line 1,132:  
=== LeaveFatalSection ===
 
=== LeaveFatalSection ===
 
No input/output.
 
No input/output.
 +
 +
[[#EnterFatalSection]] must be executed at least once before executing this command, otherwise error code 0x40080 will be returned. EnterFatalSection and LeaveFatalSection work in pairs, that is, N calls to EnterFatalSection must be performed first in order to perform N executions of LeaveFatalSection. Essentially, these two functions operate like how one would lock and unlock a recursive mutex.
    
=== GetLibraryAppletLaunchableEvent ===
 
=== GetLibraryAppletLaunchableEvent ===
Line 1,026: Line 1,166:  
=== SetMediaPlaybackState ===
 
=== SetMediaPlaybackState ===
 
Takes an input u8 bool, no output.
 
Takes an input u8 bool, no output.
 +
 +
=== GetCurrentIlluminance ===
 +
No input, returns an output float.
 +
 +
Uses [[Backlight_services|lbl]] command GetAmbientLightSensorValue, where only the output float is used.
    
=== IsIlluminanceAvailable ===
 
=== IsIlluminanceAvailable ===
 
No input, returns an output u8 bool.
 
No input, returns an output u8 bool.
 +
 +
Uses [[Backlight_services|lbl]] command IsAmbientLightSensorAvailable.
 +
 +
User-processes can use this to determine whether to continue with using GetCurrentIlluminance(Ex).
 +
 +
=== GetCurrentIlluminanceEx ===
 +
No input, returns an output u8 bool and float.
 +
 +
Uses [[Backlight_services|lbl]] command GetAmbientLightSensorValue.
 +
 +
=== SetAlbumImageTakenNotificationEnabled ===
 +
Takes an input u8, no output.
 +
 +
=== GetDebugStorageChannel ===
 +
Returns an output [[#IStorageChannel]].
 +
 +
== IStorageChannel ==
 +
Added with [[7.0.0]].
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name || Notes
 +
|-
 +
| 0 || Push || No input, returns an output [[#IStorage]].
 +
|-
 +
| 1 || Unpop || No input, returns an output [[#IStorage]].
 +
|-
 +
| 2 || Pop || No input, returns an output [[#IStorage]].
 +
|-
 +
| 3 || GetPopEventHandle || No input, returns an output handle.
 +
|-
 +
| 4 || Clear || No input/output.
 +
|}
    
== IWindowController ==
 
== IWindowController ==
Line 1,046: Line 1,224:  
|-
 
|-
 
| 12 || RejectToChangeIntoBackground ||
 
| 12 || RejectToChangeIntoBackground ||
 +
|-
 +
| 20 || [7.0.0+] SetAppletWindowVisibility || Takes an input u8, no output.
 +
|-
 +
| 21 || [7.0.0+] SetAppletGpuTimeSlice || Takes a total of 8-bytes of input, no output.
 
|}
 
|}
   Line 1,118: Line 1,300:  
| 18 || AcquireCallerAppletCaptureBufferEx
 
| 18 || AcquireCallerAppletCaptureBufferEx
 
|-
 
|-
| 20 || [2.0.0+] ClearCaptureBuffer
+
| 20 || [3.0.0+] ClearCaptureBuffer
 
|-
 
|-
| 21 || [2.0.0+] ClearAppletTransitionBuffer
+
| 21 || [3.0.0+] ClearAppletTransitionBuffer
 
|-
 
|-
 
| 22 || [4.0.0+] AcquireLastApplicationCaptureSharedBuffer
 
| 22 || [4.0.0+] AcquireLastApplicationCaptureSharedBuffer
Line 1,151: Line 1,333:  
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 
|-
 
|-
| 1 || RequestLaunchApplicationForDebug ||
+
| 1 || RequestLaunchApplicationForDebug ||  
 +
|-
 +
| 2 || [7.0.0+] GetDebugStorageChannel || No input, returns an output [[#IStorageChannel]].
 +
|-
 +
| 3 || [7.0.0+] CreateStorageForDebug || Takes a total of 8-bytes of input, returns an [[#IStorage]].
 
|}
 
|}
   Line 1,209: Line 1,395:  
|-
 
|-
 
| 40 || [6.0.0+] GetAppletResourceUsageInfo ||
 
| 40 || [6.0.0+] GetAppletResourceUsageInfo ||
 +
|-
 +
| 100 || [7.0.0+] [[#SetCpuBoostModeForApplet]] ||
 
|}
 
|}
    
=== OpenMainApplication ===
 
=== OpenMainApplication ===
 
No input, returns an output [[#IApplicationAccessor]].
 
No input, returns an output [[#IApplicationAccessor]].
 +
 +
=== SetCpuBoostModeForApplet ===
 +
Takes an input u32 '''CpuBoostMode''' (only modes 0 and 1 are valid) and passes it to [[PPC_services#apm:sys|SetCpuBoostMode]].
    
== IStorage ==
 
== IStorage ==
Line 1,267: Line 1,458:  
Returns an [[#IApplicationProxy]]. See [[#appletAE]].
 
Returns an [[#IApplicationProxy]]. See [[#appletAE]].
   −
Takes a [[IPC_Marshalling|reserved]] input u64(official user-processes use hard-coded value 0), a PID, and a process copy-handle(cur-proc handle alias).
+
Takes a [[IPC_Marshalling|reserved]] input u64 (official user-processes use hard-coded value 0), a PID, and a process copy-handle (cur-proc handle alias).
    
On failure, official user-processes will retry using this command in a loop while the retval is 0x19280, with svcSleepThread(10000000) being called first.
 
On failure, official user-processes will retry using this command in a loop while the retval is 0x19280, with svcSleepThread(10000000) being called first.
Line 1,280: Line 1,471:  
| 0 || GetAutoPowerDownEvent
 
| 0 || GetAutoPowerDownEvent
 
|-
 
|-
| 1 || [1.0.0-3.0.2]
+
|rowspan="2"| 1 || [1.0.0-3.0.2]
 +
|-
 +
| [7.0.0+]
 
|-
 
|-
 
| 2 || [1.0.0-3.0.2]
 
| 2 || [1.0.0-3.0.2]
Line 1,290: Line 1,483:  
| 5 || ReportUserIsActive
 
| 5 || ReportUserIsActive
 
|}
 
|}
 +
 +
[3.0.0+] SetHandlingContext now takes an additional 0x10-bytes of input.
    
= omm =
 
= omm =
Line 1,299: Line 1,494:  
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name
+
! Cmd || Name || Notes
 +
|-
 +
| 0 || GetOperationMode ||
 
|-
 
|-
| 0 || GetOperationMode
+
| 1 || GetOperationModeChangeEvent ||  
 
|-
 
|-
| 1 || GetOperationModeChangeEvent
+
| 2 || EnableAudioVisual ||  
 
|-
 
|-
| 2 || EnableAudioVisual
+
| 3 || DisableAudioVisual ||  
 
|-
 
|-
| 3 || DisableAudioVisual
+
| 4 || EnterSleepAndWait ||  
 
|-
 
|-
| 4 || EnterSleepAndWait
+
| 5 || GetCradleStatus ||  
 
|-
 
|-
| 5 || GetCradleStatus
+
| 6 || FadeInDisplay ||  
 
|-
 
|-
| 6 || FadeInDisplay
+
| 7 || FadeOutDisplay ||  
 
|-
 
|-
| 7 || FadeOutDisplay
+
| 8 || [2.0.0+] GetCradleFwVersion ||  
 
|-
 
|-
| 8 || [2.0.0+] GetCradleFwVersion
+
| 9 || [2.0.0+] NotifyCecSettingsChanged ||
 
|-
 
|-
| 9 || [2.0.0+] NotifyCecSettingsChanged
+
| 10 || [3.0.0+] SetOperationModePolicy ||
 
|-
 
|-
| 10 || [3.0.0+] SetOperationModePolicy
+
| 11 || [3.0.0+] GetDefaultDisplayResolution ||
 
|-
 
|-
| 11 || [3.0.0+] GetDefaultDisplayResolution
+
| 12 || [3.0.0+] GetDefaultDisplayResolutionChangeEvent ||
 
|-
 
|-
| 12 || [3.0.0+] GetDefaultDisplayResolutionChangeEvent
+
| 13 || [3.0.0+] UpdateDefaultDisplayResolution ||
 
|-
 
|-
| 13 || [3.0.0+] UpdateDefaultDisplayResolution
+
| 14 || [3.0.0+] ShouldSleepOnBoot ||
 
|-
 
|-
| 14 || [3.0.0+] ShouldSleepOnBoot
+
| 15 || [4.0.0+] NotifyHdcpApplicationExecutionStarted ||
 
|-
 
|-
| 15 || [4.0.0+] NotifyHdcpApplicationExecutionStarted
+
| 16 || [4.0.0+] NotifyHdcpApplicationExecutionFinished ||
 
|-
 
|-
| 16 || [4.0.0+] NotifyHdcpApplicationExecutionFinished
+
| 17 || [4.0.0+] NotifyHdcpApplicationDrawingStarted ||
 
|-
 
|-
| 17 || [4.0.0+] NotifyHdcpApplicationDrawingStarted
+
| 18 || [4.0.0+] NotifyHdcpApplicationDrawingFinished ||
 
|-
 
|-
| 18 || [4.0.0+] NotifyHdcpApplicationDrawingFinished
+
| 19 || [4.0.0+] GetHdcpAuthenticationFailedEvent ||
 
|-
 
|-
| 19 || [4.0.0+] GetHdcpAuthenticationFailedEvent
+
| 20 || [4.0.0+] GetHdcpAuthenticationFailedEmulationEnabled ||
 
|-
 
|-
| 20 || [4.0.0+] GetHdcpAuthenticationFailedEmulationEnabled
+
| 21 || [4.0.0+] SetHdcpAuthenticationFailedEmulation ||
 
|-
 
|-
| 21 || [4.0.0+] SetHdcpAuthenticationFailedEmulation
+
| 22 || [4.0.0+] GetHdcpStateChangeEvent ||
 
|-
 
|-
| 22 || [4.0.0+] GetHdcpStateChangeEvent
+
| 23 || [4.0.0+] GetHdcpState ||
 
|-
 
|-
| 23 || [4.0.0+] GetHdcpState
+
| 24 || [5.0.0+] ShowCardUpdateProcessing ||
 
|-
 
|-
| 24 || [5.0.0+] ShowCardUpdateProcessing
+
| 25 || [5.0.0+] SetApplicationCecSettingsAndNotifyChanged ||
 
|-
 
|-
| 25 || [5.0.0+] SetApplicationCecSettingsAndNotifyChanged
+
| 26 || [7.0.0+] || No input, returns a total of 4-bytes of output.
 
|}
 
|}
   Line 1,385: Line 1,582:  
| 11 || [1.0.0-3.0.2]
 
| 11 || [1.0.0-3.0.2]
 
|}
 
|}
 +
 +
[3.0.0+] Cmd11 now takes a total of 8-bytes of input.
    
= tcap =
 
= tcap =
Line 1,399: Line 1,598:  
| 2 || LoadAndApplySettings
 
| 2 || LoadAndApplySettings
 
|}
 
|}
 +
 +
= 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
 +
|-
 +
| 32 || [7.0.0+] SetShimLibraryVersion || Takes a total of 0x10-bytes of input and a PID, no output.
 +
|-
 +
| 201 || SaveScreenShot ||
 +
|-
 +
| 203 || SaveScreenShotEx0 ||
 +
|-
 +
| 205 || [8.0.0+] SaveScreenShotEx1 ||
 +
|-
 +
| 210 || SaveScreenShotEx2 || Takes a total of 0x50-bytes of input, a type-0x15 input buffer, and a type-0x45 input buffer.  Returns a total of 0x20-bytes of output.
 +
|}
 +
 +
'''SetShimLibraryVersion''' is a wrapper for [[Capture_services|caps:c]] cmd33. Commands '''SaveScreenShot''', '''SaveScreenShotEx0''', '''SaveScreenShotEx1''' and '''SaveScreenShotEx2''' are wrappers for [[Display_services|caps:sc]] cmd210.
 +
 +
== SaveScreenShot ==
 +
Takes two input u32s, an u64 AppletResourceUserId, a PID, and a type-0x45 input buffer. Returns a 0x20-byte struct '''ApplicationAlbumEntry'''.
 +
 +
Official user-processes doesn't use this, instead [[#SaveScreenShotEx0]] is used: ScreenShotAttributeEx0 is all-zero except +0 is set to an input u32.
 +
 +
== SaveScreenShotEx0 ==
 +
Takes an input 0x40-byte struct '''ScreenShotAttributeEx0''', an input u32, an input u64 AppletResourceUserId, a PID, and a type-0x45 input buffer. Returns a 0x20-byte struct '''ApplicationAlbumEntry'''.
    
= Library Applets =
 
= Library Applets =
Line 1,456: Line 1,687:  
| 0x0A
 
| 0x0A
 
| 0100000000001001
 
| 0100000000001001
| "auth"
+
| [[Auth_Applet|"auth"]]
 
|-
 
|-
 
| 0x0B
 
| 0x0B
Line 1,472: Line 1,703:  
| 0x0E
 
| 0x0E
 
| 0100000000001005
 
| 0100000000001005
| "error"
+
| [[Error_Applet|"error"]]
 
|-
 
|-
 
| 0x0F
 
| 0x0F
Line 1,536: Line 1,767:  
|-
 
|-
 
| 0x2
 
| 0x2
| Unknown
+
| No UI
 
|-
 
|-
 
| 0x3
 
| 0x3
| Unknown, see also [[#GetIndirectLayerConsumerHandle]]. Only used by swkbd InlineKeyboard.
+
| Background with indirect display, see also [[#GetIndirectLayerConsumerHandle]]. Only used by swkbd InlineKeyboard.
|-
  −
|}
  −
 
  −
=== ShimKind ===
  −
This is from strings and code in the [[Internet_Browser| web-applets]].
  −
 
  −
This indicates the type of web-applet.
  −
 
  −
{| class="wikitable" border="1"
  −
|-
  −
!  shimKind value
  −
!  Description
  −
|-
  −
| 2
  −
| LoginApplet
  −
|-
  −
| 4
  −
| ShareApplet
  −
|-
  −
| 5
  −
| WebApplet
   
|-
 
|-
| 6
+
| 0x4
| WifiWebAuthApplet
+
| AllForegroundInitiallyHidden. Can be used by [7.0.0+] [[Internet_Browser|WebSession]].
 
|-
 
|-
| 7
  −
| LobbyApplet
   
|}
 
|}
  

Navigation menu