<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://switchbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=StuntHacks</id>
	<title>Nintendo Switch Brew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://switchbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=StuntHacks"/>
	<link rel="alternate" type="text/html" href="https://switchbrew.org/wiki/Special:Contributions/StuntHacks"/>
	<updated>2026-05-10T21:49:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Error_Applet&amp;diff=6317</id>
		<title>Error Applet</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Error_Applet&amp;diff=6317"/>
		<updated>2019-02-26T21:50:12Z</updated>

		<summary type="html">&lt;p&gt;StuntHacks: Added information about error logging&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the applet presented when a title displays an error message.&lt;br /&gt;
See [[AM_services#Library_Applets]]. The error applet expects two [[AM_services#IStorage|IStorage]] inputs and no output.&lt;br /&gt;
&lt;br /&gt;
All errors displayed by this applet get logged and can be viewed under &#039;Settings&#039; &amp;gt; &#039;Support&#039; &amp;gt; &#039;Error History&#039;.&lt;br /&gt;
&lt;br /&gt;
== ErrorConfig ==&lt;br /&gt;
&lt;br /&gt;
This has size 0x1018 and contains the error code, a short description of the error and a more detailed description of the error, displayed when the user clicks on &amp;quot;Details&amp;quot;. Typically, all unused values can be set to zero. The first byte should be set to 1 if a custom error message is to be displayed. Otherwise, a default error message will be shown.&lt;br /&gt;
&lt;br /&gt;
The error code is stored at offsets 0x8, containing the first part of the code, and 0xC, containing the second part of the code. Those values are expected to be u32&#039;s.&lt;br /&gt;
&lt;br /&gt;
The short description of the error is stored as a char* at offset 0x18, the long description of the error is stored as a char* at offset 0x818.&lt;br /&gt;
&lt;br /&gt;
== Usage == &lt;br /&gt;
User-processes should push a common arguments struct as well as the typical ErrorConfig struct. Since the error applet doesn&#039;t have any output, user-processes can then directly join the applet and wait for it to finish.&lt;br /&gt;
&lt;br /&gt;
[[Category:Library Applets]]&lt;/div&gt;</summary>
		<author><name>StuntHacks</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Error_Applet&amp;diff=6316</id>
		<title>Error Applet</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Error_Applet&amp;diff=6316"/>
		<updated>2019-02-26T21:43:54Z</updated>

		<summary type="html">&lt;p&gt;StuntHacks: Fixed a typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the applet presented when a title displays an error message.&lt;br /&gt;
See [[AM_services#Library_Applets]]. The error applet expects two [[AM_services#IStorage|IStorage]] inputs and no output.&lt;br /&gt;
&lt;br /&gt;
== ErrorConfig ==&lt;br /&gt;
&lt;br /&gt;
This has size 0x1018 and contains the error code, a short description of the error and a more detailed description of the error, displayed when the user clicks on &amp;quot;Details&amp;quot;. Typically, all unused values can be set to zero. The first byte should be set to 1 if a custom error message is to be displayed. Otherwise, a default error message will be shown.&lt;br /&gt;
&lt;br /&gt;
The error code is stored at offsets 0x8, containing the first part of the code, and 0xC, containing the second part of the code. Those values are expected to be u32&#039;s.&lt;br /&gt;
&lt;br /&gt;
The short description of the error is stored as a char* at offset 0x18, the long description of the error is stored as a char* at offset 0x818.&lt;br /&gt;
&lt;br /&gt;
== Usage == &lt;br /&gt;
User-processes should push a common arguments struct as well as the typical ErrorConfig struct. Since the error applet doesn&#039;t have any output, user-processes can then directly join the applet and wait for it to finish.&lt;br /&gt;
&lt;br /&gt;
[[Category:Library Applets]]&lt;/div&gt;</summary>
		<author><name>StuntHacks</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Error_Applet&amp;diff=6315</id>
		<title>Error Applet</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Error_Applet&amp;diff=6315"/>
		<updated>2019-02-26T09:25:51Z</updated>

		<summary type="html">&lt;p&gt;StuntHacks: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the applet presented when a title displays an error message.&lt;br /&gt;
See [[AM_services#Library_Applets]]. The error applet expects two [[AM_services#IStorage|IStorage]] inputs and no output.&lt;br /&gt;
&lt;br /&gt;
== ErrorConfig ==&lt;br /&gt;
&lt;br /&gt;
This has size 0x1018 and contains the error code, a short description of the error and a more detailed description of the error, displayed when the user clicks on &amp;quot;Details&amp;quot;. Typically, all unused values can be set to zero. The first byte should be set to 1 if a custom error message is to be displayed. Otherwise, a default error message will be shown.&lt;br /&gt;
&lt;br /&gt;
The error code is stored at offsets 0x8, containing the first part of the code, and 0xC, containing the second part of the code. Those values are expected to be u64&#039;s.&lt;br /&gt;
&lt;br /&gt;
The short description of the error is stored as a char* at offset 0x18, the long description of the error is stored as a char* at offset 0x818.&lt;br /&gt;
&lt;br /&gt;
== Usage == &lt;br /&gt;
User-processes should push a common arguments struct as well as the typical ErrorConfig struct. Since the error applet doesn&#039;t have any output, user-processes can then directly join the applet and wait for it to finish.&lt;br /&gt;
&lt;br /&gt;
[[Category:Library Applets]]&lt;/div&gt;</summary>
		<author><name>StuntHacks</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Applet_Manager_services&amp;diff=6313</id>
		<title>Applet Manager services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Applet_Manager_services&amp;diff=6313"/>
		<updated>2019-02-26T07:58:37Z</updated>

		<summary type="html">&lt;p&gt;StuntHacks: Link error applet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;AM (Applet Manager) provides services for interacting with system applets while abstracting several aspects of power and operation management.&lt;br /&gt;
&lt;br /&gt;
Contains multiple raw images, with at least the following: &amp;quot;NN_OMM_CHARGING_BIN_{begin|end}&amp;quot;(charging icon), low-battery icon, and the Nintendo Switch logo displayed during system boot.&lt;br /&gt;
&lt;br /&gt;
= appletAE =&lt;br /&gt;
This is &amp;quot;nn::am::service::IAllSystemAppletProxiesService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 100 || OpenSystemAppletProxy || Returns an [[#ISystemAppletProxy]].&lt;br /&gt;
|-&lt;br /&gt;
| 200 || OpenLibraryAppletProxyOld ([1.0.0-2.3.0] OpenLibraryAppletProxy) || Returns an [[#ILibraryAppletProxy]].&lt;br /&gt;
|-&lt;br /&gt;
| 201 || [3.0.0+] [[#OpenLibraryAppletProxy]] || Returns an [[#ILibraryAppletProxy]].&lt;br /&gt;
|-&lt;br /&gt;
| 300 || OpenOverlayAppletProxy || Returns an [[#IOverlayAppletProxy]].&lt;br /&gt;
|-&lt;br /&gt;
| 350 || OpenSystemApplicationProxy || Returns an [[#IApplicationProxy]].&lt;br /&gt;
|-&lt;br /&gt;
| 400 || CreateSelfLibraryAppletCreatorForDevelop || Returns an [[#ILibraryAppletCreator]].&lt;br /&gt;
|-&lt;br /&gt;
| 410 || [6.0.0+] GetSystemAppletControllerForDebug || Returns an [[#ISystemAppletControllerForDebug]].&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || [6.0.0+] GetDebugFunctions || Returns an [[#IDebugFunctions]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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&#039;t seem to usable from processes which aren&#039;t actual applets (such as sysmodules), at least for applet-types which aren&#039;t already in use.&lt;br /&gt;
&lt;br /&gt;
This service is used by all system non-regular-applications.&lt;br /&gt;
&lt;br /&gt;
The 01000000000010XX system [[Title_list|titles]] use the following applet types(above Open{type}Proxy commands):&lt;br /&gt;
* &amp;quot;qlaunch&amp;quot;: SystemApplet&lt;br /&gt;
* &amp;quot;overlay&amp;quot;: OverlayApplet&lt;br /&gt;
* &amp;quot;starter&amp;quot;: SystemApplication&lt;br /&gt;
* &amp;quot;maintenance&amp;quot;: SystemApplet&lt;br /&gt;
* All others: LibraryApplet&lt;br /&gt;
&lt;br /&gt;
== OpenLibraryAppletProxy ==&lt;br /&gt;
Returns an [[#ILibraryAppletProxy]].&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;&#039;AppletAttribute&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Official user-processes use the same retry loop with this as the other Open*Proxy commands.&lt;br /&gt;
&lt;br /&gt;
== ISystemAppletProxy ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetCommonStateGetter || Returns an [[#ICommonStateGetter]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetSelfController || Returns an [[#ISelfController]].&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetWindowController || Returns an [[#IWindowController]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetAudioController || Returns an [[#IAudioController]].&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetDisplayController || Returns an [[#IDisplayController]].&lt;br /&gt;
|-&lt;br /&gt;
| 10 || GetProcessWindingController || Returns an [[#IProcessWindingController]].&lt;br /&gt;
|-&lt;br /&gt;
| 11 || GetLibraryAppletCreator || Returns an [[#ILibraryAppletCreator]].&lt;br /&gt;
|-&lt;br /&gt;
| 20 || GetHomeMenuFunctions || Returns an [[#IHomeMenuFunctions]].&lt;br /&gt;
|-&lt;br /&gt;
| 21 || GetGlobalStateController || Returns an [[#IGlobalStateController]].&lt;br /&gt;
|-&lt;br /&gt;
| 22 || GetApplicationCreator || Returns an [[#IApplicationCreator]].&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [7.0.0+] GetAppletCommonFunctions || Returns an [[#IAppletCommonFunctions]].&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IHomeMenuFunctions ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 10 || RequestToGetForeground || &lt;br /&gt;
|-&lt;br /&gt;
| 11 || LockForeground ||&lt;br /&gt;
|-&lt;br /&gt;
| 12 || UnlockForeground || &lt;br /&gt;
|-&lt;br /&gt;
| 20 || [[#PopFromGeneralChannel]] || &lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#GetPopFromGeneralChannelEvent]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [[#GetHomeButtonWriterLockAccessor]] || &lt;br /&gt;
|-&lt;br /&gt;
| 31 || [2.0.0+] [[#GetWriterLockAccessorEx]] || &lt;br /&gt;
|-&lt;br /&gt;
| 100 || [6.0.0+] PopRequestLaunchApplicationForDebug ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== PopFromGeneralChannel ====&lt;br /&gt;
No input, returns an output [[#IStorage]].&lt;br /&gt;
&lt;br /&gt;
==== GetPopFromGeneralChannelEvent ====&lt;br /&gt;
No input, returns an output handle.&lt;br /&gt;
&lt;br /&gt;
==== GetHomeButtonWriterLockAccessor ====&lt;br /&gt;
No input, returns an output [[#ILockAccessor]].&lt;br /&gt;
&lt;br /&gt;
==== GetWriterLockAccessorEx ====&lt;br /&gt;
Takes an input u32, returns an output [[#ILockAccessor]].&lt;br /&gt;
&lt;br /&gt;
==== ILockAccessor ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 1 || TryLock&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Unlock&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#GetEvent]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== GetEvent =====&lt;br /&gt;
No input, returns an output handle.&lt;br /&gt;
&lt;br /&gt;
=== IGlobalStateController ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || RequestToEnterSleep || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || EnterSleep || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || StartSleepSequence || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || StartShutdownSequence || &lt;br /&gt;
|-&lt;br /&gt;
| 4 || StartRebootSequence || &lt;br /&gt;
|-&lt;br /&gt;
| 9 || [7.0.0+] [[#IsAutoPowerDownRequested]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 10 || LoadAndApplyIdlePolicySettings || &lt;br /&gt;
|-&lt;br /&gt;
| 11 || [2.0.0+] NotifyCecSettingsChanged || &lt;br /&gt;
|-&lt;br /&gt;
| 12 || [2.0.0+] SetDefaultHomeButtonLongPressTime || &lt;br /&gt;
|-&lt;br /&gt;
| 13 || [2.0.0+] UpdateDefaultDisplayResolution || &lt;br /&gt;
|-&lt;br /&gt;
| 14 || [2.0.0+] [[#ShouldSleepOnBoot]] || &lt;br /&gt;
|-&lt;br /&gt;
| 15 || [4.0.0+] GetHdcpAuthenticationFailedEvent || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== IsAutoPowerDownRequested ====&lt;br /&gt;
No input, returns an output u8 bool.&lt;br /&gt;
&lt;br /&gt;
==== ShouldSleepOnBoot ====&lt;br /&gt;
No input, returns an output u8 bool.&lt;br /&gt;
&lt;br /&gt;
=== IApplicationCreator ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#CreateApplication]] || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#PopLaunchRequestedApplication]] || &lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#CreateSystemApplication]] || &lt;br /&gt;
|-&lt;br /&gt;
| 100 || [[#PopFloatingApplicationForDevelopment]] || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== CreateApplication ====&lt;br /&gt;
Takes an input u64 &amp;lt;code&amp;gt;nn::ncm::ApplicationId&amp;lt;/code&amp;gt;(titleID), returns an [[#IApplicationAccessor]].&lt;br /&gt;
&lt;br /&gt;
==== PopLaunchRequestedApplication ====&lt;br /&gt;
No input, returns an [[#IApplicationAccessor]].&lt;br /&gt;
&lt;br /&gt;
==== CreateSystemApplication ====&lt;br /&gt;
Takes an input u64 &amp;lt;code&amp;gt;nn::ncm::SystemApplicationId&amp;lt;/code&amp;gt;, returns an [[#IApplicationAccessor]].&lt;br /&gt;
&lt;br /&gt;
==== PopFloatingApplicationForDevelopment ====&lt;br /&gt;
No input, returns an [[#IApplicationAccessor]].&lt;br /&gt;
&lt;br /&gt;
==== IApplicationAccessor ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetAppletStateChangedEvent]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#IsCompleted]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Start ||&lt;br /&gt;
|-&lt;br /&gt;
| 20 || RequestExit || &lt;br /&gt;
|-&lt;br /&gt;
| 25 || Terminate || &lt;br /&gt;
|-&lt;br /&gt;
| 30 || GetResult || &lt;br /&gt;
|-&lt;br /&gt;
| 101 || RequestForApplicationToGetForeground || &lt;br /&gt;
|-&lt;br /&gt;
| 110 || TerminateAllLibraryApplets || &lt;br /&gt;
|-&lt;br /&gt;
| 111 || AreAnyLibraryAppletsLeft || &lt;br /&gt;
|-&lt;br /&gt;
| 112 || [[#GetCurrentLibraryApplet]] || &lt;br /&gt;
|-&lt;br /&gt;
| 120 || GetApplicationId || &lt;br /&gt;
|-&lt;br /&gt;
| 121 || [[#PushLaunchParameter]] || &lt;br /&gt;
|-&lt;br /&gt;
| 122 || GetApplicationControlProperty || &lt;br /&gt;
|-&lt;br /&gt;
| 123 || [2.0.0+] GetApplicationLaunchProperty || &lt;br /&gt;
|-&lt;br /&gt;
| 124 || [6.0.0+] GetApplicationLaunchRequestInfo || &lt;br /&gt;
|-&lt;br /&gt;
| 130 || [6.0.0+] SetUsers || &lt;br /&gt;
|-&lt;br /&gt;
| 131 || [6.0.0+] CheckRightsEnvironmentAvailable || &lt;br /&gt;
|-&lt;br /&gt;
| 132 || [6.0.0+] GetNsRightsEnvironmentHandle || &lt;br /&gt;
|-&lt;br /&gt;
| 140 || [6.0.0+] GetDesirableUids || &lt;br /&gt;
|-&lt;br /&gt;
| 150 || [6.0.0+] ReportApplicationExitTimeout || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Commands &amp;lt;=30 are inherited from [[#IAppletAccessor]].&lt;br /&gt;
&lt;br /&gt;
===== GetCurrentLibraryApplet =====&lt;br /&gt;
No input, returns an output [[#IAppletAccessor]].&lt;br /&gt;
&lt;br /&gt;
===== PushLaunchParameter =====&lt;br /&gt;
Takes an input u32 and an input [[#IStorage]], no output.&lt;br /&gt;
&lt;br /&gt;
===== IAppletAccessor =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetAppletStateChangedEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#IsCompleted]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#Start]]&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [[#RequestExit]]&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [[#Terminate]]&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [[#GetResult]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== GetAppletStateChangedEvent ====&lt;br /&gt;
No input, returns an output event handle with autoclear=false.&lt;br /&gt;
&lt;br /&gt;
==== IsCompleted ====&lt;br /&gt;
No input, returns an output u8 bool.&lt;br /&gt;
&lt;br /&gt;
==== Start ====&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
==== RequestExit ====&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
==== Terminate ====&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
==== GetResult====&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
== IAppletCommonFunctions ==&lt;br /&gt;
Added with [[7.0.0]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 10 || ReadThemeStorage || Takes an input u64 &#039;&#039;&#039;offset&#039;&#039;&#039; and a type-0x22 output buffer, returns an output u64 &#039;&#039;&#039;actual_transfer_size&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 11 || WriteThemeStorage || Takes an input u64 &#039;&#039;&#039;offset&#039;&#039;&#039; and a type-0x21 input buffer, no output.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These commands copy data from/to a state buffer and the user specified buffer. The size of the state buffer is 0x400-bytes.&lt;br /&gt;
&lt;br /&gt;
== ILibraryAppletProxy ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetCommonStateGetter || Returns an [[#ICommonStateGetter]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetSelfController || Returns an [[#ISelfController]].&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetWindowController || Returns an [[#IWindowController]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetAudioController || Returns an [[#IAudioController]].&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetDisplayController || Returns an [[#IDisplayController]].&lt;br /&gt;
|-&lt;br /&gt;
| 10 || GetProcessWindingController || Returns an [[#IProcessWindingController]].&lt;br /&gt;
|-&lt;br /&gt;
| 11 || GetLibraryAppletCreator || Returns an [[#ILibraryAppletCreator]].&lt;br /&gt;
|-&lt;br /&gt;
| 20 || OpenLibraryAppletSelfAccessor || Returns an [[#ILibraryAppletSelfAccessor]].&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [7.0.0+] GetAppletCommonFunctions || No input, returns an [[#IAppletCommonFunctions]].&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ILibraryAppletSelfAccessor ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#PopInData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#PushOutData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#PopInteractiveInData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#PushInteractiveOutData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#GetPopInDataEvent]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [[#GetPopInteractiveInDataEvent]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#ExitProcessAndReturn]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#GetLibraryAppletInfo]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetMainAppletIdentityInfo ||&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [[#CanUseApplicationCore]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 14 || GetCallerAppletIdentityInfo ||&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [2.0.0+] GetMainAppletApplicationControlProperty ||&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [2.0.0+] [[#GetMainAppletStorageId]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [2.0.0+] GetCallerAppletIdentityInfoStack ||&lt;br /&gt;
|-&lt;br /&gt;
| 18 || [4.0.0+] GetNextReturnDestinationAppletIdentityInfo ||&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [4.0.0+] GetDesirableKeyboardLayout ||&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [[#PopExtraStorage]] || &lt;br /&gt;
|-&lt;br /&gt;
| 25 || [[#GetPopExtraStorageEvent]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [[#UnpopInData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 31 || [[#UnpopExtraStorage]] || &lt;br /&gt;
|-&lt;br /&gt;
| 40 || [2.0.0+] GetIndirectLayerProducerHandle ||&lt;br /&gt;
|-&lt;br /&gt;
| 50 || [2.0.0+] ReportVisibleError ||&lt;br /&gt;
|-&lt;br /&gt;
| 51 || [4.0.0+] ReportVisibleErrorWithErrorContext ||&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [4.0.0+] [[#GetMainAppletApplicationDesiredLanguage]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 80 || [6.0.0+] RequestExitToSelf ||&lt;br /&gt;
|-&lt;br /&gt;
| 90 || [5.0.0+] CreateApplicationAndPushAndRequestToLaunch ||&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [4.0.0+] [[#CreateGameMovieTrimmer]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 101 || [6.0.0+] ReserveResourceForMovieOperation ||&lt;br /&gt;
|-&lt;br /&gt;
| 102 || [6.0.0+] UnreserveResourceForMovieOperation ||&lt;br /&gt;
|-&lt;br /&gt;
| 110 || [6.0.0+] GetMainAppletAvailableUsers ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== PopInData ====&lt;br /&gt;
No input, returns an output [[#IStorage]].&lt;br /&gt;
&lt;br /&gt;
==== PushOutData ====&lt;br /&gt;
Takes an input [[#IStorage]], no output.&lt;br /&gt;
&lt;br /&gt;
==== PopInteractiveInData ====&lt;br /&gt;
No input, returns an output [[#IStorage]].&lt;br /&gt;
&lt;br /&gt;
==== PushInteractiveOutData ====&lt;br /&gt;
Takes an input [[#IStorage]], no output.&lt;br /&gt;
&lt;br /&gt;
==== GetPopInDataEvent ====&lt;br /&gt;
No input, returns an output handle.&lt;br /&gt;
&lt;br /&gt;
==== GetPopInteractiveInDataEvent ====&lt;br /&gt;
No input, returns an output handle.&lt;br /&gt;
&lt;br /&gt;
==== GetMainAppletStorageId ====&lt;br /&gt;
No input, returns an output u8 storageId.&lt;br /&gt;
&lt;br /&gt;
==== ExitProcessAndReturn ====&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
Exits the LibraryApplet and returns to running the title which launched this LibraryApplet ([[qlaunch]] for example).&lt;br /&gt;
&lt;br /&gt;
==== GetLibraryAppletInfo ====&lt;br /&gt;
No input. Returns an output [[#LibraryAppletInfo]].&lt;br /&gt;
&lt;br /&gt;
==== CanUseApplicationCore ====&lt;br /&gt;
No input, returns an output u8 bool.&lt;br /&gt;
&lt;br /&gt;
==== PopExtraStorage ====&lt;br /&gt;
No input, returns an output [[#IStorage]].&lt;br /&gt;
&lt;br /&gt;
==== GetPopExtraStorageEvent ====&lt;br /&gt;
No input, returns an output handle.&lt;br /&gt;
&lt;br /&gt;
==== UnpopInData ====&lt;br /&gt;
Takes an input [[#IStorage]], no output.&lt;br /&gt;
&lt;br /&gt;
==== UnpopExtraStorage ====&lt;br /&gt;
Takes an input [[#IStorage]], no output.&lt;br /&gt;
&lt;br /&gt;
==== GetMainAppletApplicationDesiredLanguage ====&lt;br /&gt;
No input, returns an output [[Settings_services#LanguageCode|LanguageCode]].&lt;br /&gt;
&lt;br /&gt;
==== CreateGameMovieTrimmer ====&lt;br /&gt;
Takes an input u64 and handle, returns a GRC [[GRC_services#IGameMovieTrimmer|IGameMovieTrimmer]].&lt;br /&gt;
&lt;br /&gt;
== IOverlayAppletProxy ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetCommonStateGetter || Returns an [[#ICommonStateGetter]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetSelfController || Returns an [[#ISelfController]].&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetWindowController || Returns an [[#IWindowController]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetAudioController || Returns an [[#IAudioController]].&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetDisplayController || Returns an [[#IDisplayController]].&lt;br /&gt;
|-&lt;br /&gt;
| 10 || GetProcessWindingController || Returns an [[#IProcessWindingController]].&lt;br /&gt;
|-&lt;br /&gt;
| 11 || GetLibraryAppletCreator || Returns an [[#ILibraryAppletCreator]].&lt;br /&gt;
|-&lt;br /&gt;
| 20 || GetOverlayFunctions || Returns an [[#IOverlayFunctions]].&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [7.0.0+] GetAppletCommonFunctions || No input, returns an [[#IAppletCommonFunctions]].&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IOverlayFunctions ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || BeginToWatchShortHomeButtonMessage&lt;br /&gt;
|-&lt;br /&gt;
| 1 || EndToWatchShortHomeButtonMessage&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetApplicationIdForLogo&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetGpuTimeSliceBoost&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [2.0.0+] SetAutoSleepTimeAndDimmingTimeEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [2.0.0+] TerminateApplicationAndSetReason&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [2.0.0+] SetScreenShotPermissionGlobally&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [6.0.0+] StartShutdownSequenceForOverlay&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [6.0.0+] StartRebootSequenceForOverlay&lt;br /&gt;
|-&lt;br /&gt;
| 90 || [7.0.0+] SetRequiresGpuResourceUse&lt;br /&gt;
|-&lt;br /&gt;
| 101 || [6.0.0+] BeginToObserveHidInputForDevelop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== SetRequiresGpuResourceUse ====&lt;br /&gt;
Takes an input u8, no output.&lt;br /&gt;
&lt;br /&gt;
== IApplicationProxy ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetCommonStateGetter || Returns an [[#ICommonStateGetter]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetSelfController || Returns an [[#ISelfController]].&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetWindowController || Returns an [[#IWindowController]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetAudioController || Returns an [[#IAudioController]].&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetDisplayController || Returns an [[#IDisplayController]].&lt;br /&gt;
|-&lt;br /&gt;
| 10 || GetProcessWindingController || Returns an [[#IProcessWindingController]].&lt;br /&gt;
|-&lt;br /&gt;
| 11 || GetLibraryAppletCreator || Returns an [[#ILibraryAppletCreator]].&lt;br /&gt;
|-&lt;br /&gt;
| 20 || GetApplicationFunctions || Returns an [[#IApplicationFunctions]].&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || GetDebugFunctions || Returns an [[#IDebugFunctions]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IApplicationFunctions ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#PopLaunchParameter]] || &lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#CreateApplicationAndPushAndRequestToStart]] || &lt;br /&gt;
|-&lt;br /&gt;
| 11 || [3.0.0+] [[#CreateApplicationAndPushAndRequestToStartForQuest]] || &lt;br /&gt;
|-&lt;br /&gt;
| 12 || [4.0.0+] [[#CreateApplicationAndRequestToStart]] || &lt;br /&gt;
|-&lt;br /&gt;
| 13 || [4.0.0+] [[#CreateApplicationAndRequestToStartForQuest]] || &lt;br /&gt;
|-&lt;br /&gt;
| 14 || [7.0.0+] CreateApplicationWithAttributeAndPushAndRequestToStartForQuest || Takes a total of 8-bytes and a type-0x15 input buffer, return an output [[#IStorage]].&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [7.0.0+] CreateApplicationWithAttributeAndRequestToStartForQuest || Takes a total of 8-bytes and a type-0x15 input buffer, no output.&lt;br /&gt;
|-&lt;br /&gt;
| 20 || EnsureSaveData ||&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#GetDesiredLanguage]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [[#SetTerminateResult]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 23 || GetDisplayVersion ||&lt;br /&gt;
|-&lt;br /&gt;
| 24 || [2.0.0+] GetLaunchStorageInfoForDebug ||&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [2.0.0+] ExtendSaveData ||&lt;br /&gt;
|-&lt;br /&gt;
| 26 || [2.0.0+] GetSaveDataSize ||&lt;br /&gt;
|-&lt;br /&gt;
| 27 || [5.0.0+] CreateCacheStorage ||&lt;br /&gt;
|-&lt;br /&gt;
| 30 || BeginBlockingHomeButtonShortAndLongPressed ||&lt;br /&gt;
|-&lt;br /&gt;
| 31 || [[#EndBlockingHomeButtonShortAndLongPressed]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [[#BeginBlockingHomeButton]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 33 || [[#EndBlockingHomeButton]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 40 || [[#NotifyRunning]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 50 || [2.0.0+] GetPseudoDeviceId ||&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [2.0.0+] [[#SetMediaPlaybackStateForApplication]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 65 || [3.0.0+] [[#IsGamePlayRecordingSupported]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 66 || [3.0.0+] [[#InitializeGamePlayRecording]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 67 || [3.0.0+] [[#SetGamePlayRecordingState]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 68 || [4.0.0+] [[#RequestFlushGamePlayingMovieForDebug]] || &lt;br /&gt;
|-&lt;br /&gt;
| 70 || [3.0.0+] [[#RequestToShutdown]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 71 || [3.0.0+] [[#RequestToReboot]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 80 || [4.0.0+] [[#ExitAndRequestToShowThanksMessage]] || &lt;br /&gt;
|-&lt;br /&gt;
| 90 || [4.0.0+] [[#EnableApplicationCrashReport]] || &lt;br /&gt;
|-&lt;br /&gt;
| 100 || [5.0.0+] InitializeApplicationCopyrightFrameBuffer || &lt;br /&gt;
|-&lt;br /&gt;
| 101 || [5.0.0+] SetApplicationCopyrightImage || &lt;br /&gt;
|-&lt;br /&gt;
| 102 || [5.0.0+] [[#SetApplicationCopyrightVisibility]] || &lt;br /&gt;
|-&lt;br /&gt;
| 110 || [5.0.0+] [[#QueryApplicationPlayStatistics]] || &lt;br /&gt;
|-&lt;br /&gt;
| 111 || [6.0.0+] QueryApplicationPlayStatisticsByUid || &lt;br /&gt;
|-&lt;br /&gt;
| 120 || [5.0.0+] ExecuteProgram || &lt;br /&gt;
|-&lt;br /&gt;
| 121 || [5.0.0+] [[#ClearUserChannel]] || &lt;br /&gt;
|-&lt;br /&gt;
| 122 || [5.0.0+] UnpopToUserChannel || &lt;br /&gt;
|-&lt;br /&gt;
| 123 || [6.0.0+] GetPreviousProgramIndex || &lt;br /&gt;
|-&lt;br /&gt;
| 124 || [6.0.0+] EnableApplicationAllThreadDumpOnCrash || &lt;br /&gt;
|-&lt;br /&gt;
| 500 || [5.0.0+] StartContinuousRecordingFlushForDebug || &lt;br /&gt;
|-&lt;br /&gt;
| 1000 || [5.0.0+] [[#CreateMovieMaker]] || &lt;br /&gt;
|-&lt;br /&gt;
| 1001 || [5.0.0+] [[#PrepareForJit]] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The BOTW game uses this GamePlayRecording functionality from the main-nso &amp;quot;nninitStartup&amp;quot; function, with size 0x6000000(96MiB). The official GamePlayRecording-enable code does the following(this will panic on any failure):&lt;br /&gt;
* [[SVC|Creates]] TransferMemory using the input buffer and size, with permissions=0.&lt;br /&gt;
* Uses [[#InitializeGamePlayRecording]] with the TransferMemory.&lt;br /&gt;
* Closes the TransferMemory handle, + TransferMemory cleanup.&lt;br /&gt;
* Uses [[#SetGamePlayRecordingState]] with value 0x1.&lt;br /&gt;
This GamePlayRecording functionality presumably enables the video-recording usable starting with [[4.0.0]].&lt;br /&gt;
&lt;br /&gt;
==== PopLaunchParameter ====&lt;br /&gt;
Takes an input u32 [[#LaunchParameterKind]], returns an output [[#IStorage]].&lt;br /&gt;
&lt;br /&gt;
Pops a LaunchParameter [[#IStorage]], the storage will be removed from sysmodule state during this.&lt;br /&gt;
&lt;br /&gt;
==== CreateApplicationAndPushAndRequestToStart ====&lt;br /&gt;
Takes an input u64 titleID and an input [[#IStorage]], no output. titleID=0 can be used to relaunch the current application.&lt;br /&gt;
&lt;br /&gt;
==== CreateApplicationAndPushAndRequestToStartForQuest ====&lt;br /&gt;
Takes 2 input u32s (loaded from struct ApplicationAttributeForQuest), an input u64 titleID, and an input [[#IStorage]], no output.&lt;br /&gt;
&lt;br /&gt;
==== CreateApplicationAndRequestToStart ====&lt;br /&gt;
Takes an input u64 titleID, no output.&lt;br /&gt;
&lt;br /&gt;
Same as [[#CreateApplicationAndPushAndRequestToStart]] except without the input storage, official sw uses this when no input storage is specified.&lt;br /&gt;
&lt;br /&gt;
==== CreateApplicationAndRequestToStartForQuest ====&lt;br /&gt;
Takes 2 input u32s (loaded from struct ApplicationAttributeForQuest) and an input u64 titleID, no output.&lt;br /&gt;
&lt;br /&gt;
Same as [[#CreateApplicationAndPushAndRequestToStartForQuest]] except without the input storage, official sw uses this when no input storage is specified.&lt;br /&gt;
&lt;br /&gt;
==== GetDesiredLanguage ====&lt;br /&gt;
No input, returns an output [[Settings_services#LanguageCode|LanguageCode]].&lt;br /&gt;
&lt;br /&gt;
==== SetTerminateResult ====&lt;br /&gt;
Takes an input u32 &#039;&#039;&#039;Result&#039;&#039;&#039;, no output.&lt;br /&gt;
&lt;br /&gt;
For example, in some cases official apps use this with [[Error_codes|error]] 0x2A2 then uses svcBreak.&lt;br /&gt;
&lt;br /&gt;
==== EndBlockingHomeButtonShortAndLongPressed ====&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
==== BeginBlockingHomeButton ====&lt;br /&gt;
Takes an input s64 nanoseconds, no output. The input nanoseconds can be zero.&lt;br /&gt;
&lt;br /&gt;
==== EndBlockingHomeButton ====&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
==== NotifyRunning ====&lt;br /&gt;
Takes no input. Returns an output u8 bool, which is ignored by official user-processes.&lt;br /&gt;
&lt;br /&gt;
==== SetMediaPlaybackStateForApplication ====&lt;br /&gt;
Takes an input u8 bool, no output.&lt;br /&gt;
&lt;br /&gt;
==== IsGamePlayRecordingSupported ====&lt;br /&gt;
No input, returns an output u8 bool.&lt;br /&gt;
&lt;br /&gt;
==== InitializeGamePlayRecording ====&lt;br /&gt;
Takes a TransferMemory handle and an u64 for the size of the TransferMemory. The size must match 0x6000000 otherwise an error is returned.&lt;br /&gt;
&lt;br /&gt;
==== SetGamePlayRecordingState ====&lt;br /&gt;
Takes an input u32. 0 = disable/pause, 1 = enable/restart.&lt;br /&gt;
&lt;br /&gt;
==== RequestFlushGamePlayingMovieForDebug ====&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
==== RequestToShutdown ====&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
==== RequestToReboot ====&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
==== ExitAndRequestToShowThanksMessage ====&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
Used to exit the application and return to the kiosk menu. Official sw uses [[#UnlockExit]] immediately before this.&lt;br /&gt;
&lt;br /&gt;
==== EnableApplicationCrashReport ====&lt;br /&gt;
Takes an input u8 bool, no output.&lt;br /&gt;
&lt;br /&gt;
==== SetApplicationCopyrightVisibility ====&lt;br /&gt;
Takes an input u8 bool, no output.&lt;br /&gt;
&lt;br /&gt;
==== QueryApplicationPlayStatistics ====&lt;br /&gt;
Takes a type-0x6 output buffer containing an array of ApplicationPlayStatistics and a type-0x5 input buffer containing an array of u64 titleIDs. Returns an output s32 (actual total output entries?).&lt;br /&gt;
&lt;br /&gt;
The number of entries in each array is the same. ApplicationPlayStatistics is a 8-byte struct.&lt;br /&gt;
&lt;br /&gt;
==== ClearUserChannel ====&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
==== CreateMovieMaker ====&lt;br /&gt;
Takes an input u64 and handle, returns an [[#IMovieMaker]].&lt;br /&gt;
&lt;br /&gt;
==== PrepareForJit ====&lt;br /&gt;
Takes no input. Launches title 010000000000003B (currently not present on retail systems) if some context variable is set.&lt;br /&gt;
&lt;br /&gt;
=== IMovieMaker ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetGrcMovieMaker]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetLayerHandle]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== GetGrcMovieMaker ====&lt;br /&gt;
No input, returns a GRC [[GRC_services|IMovieMaker]].&lt;br /&gt;
&lt;br /&gt;
==== GetLayerHandle ====&lt;br /&gt;
No input, returns an output u64.&lt;br /&gt;
&lt;br /&gt;
== ILibraryAppletCreator ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#CreateLibraryApplet]] || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#TerminateAllLibraryApplets]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#AreAnyLibraryAppletsLeft]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#CreateStorage]] || &lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#CreateTransferMemoryStorage]] || &lt;br /&gt;
|-&lt;br /&gt;
| 12 || [2.0.0+] [[#CreateHandleStorage]] || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CreateLibraryApplet ===&lt;br /&gt;
Takes 2 input u32s [[#AppletId]] and [[#LibraryAppletMode]], returns an [[#ILibraryAppletAccessor]].&lt;br /&gt;
&lt;br /&gt;
=== TerminateAllLibraryApplets ===&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
=== AreAnyLibraryAppletsLeft ===&lt;br /&gt;
No input, returns an output u8 bool.&lt;br /&gt;
&lt;br /&gt;
=== CreateStorage ===&lt;br /&gt;
Takes an input s64 for the storage size, returns an [[#IStorage]].&lt;br /&gt;
&lt;br /&gt;
This allocates a buffer with the specified size which can then be accessed via [[#IStorageAccessor]].&lt;br /&gt;
&lt;br /&gt;
=== CreateTransferMemoryStorage ===&lt;br /&gt;
Takes an input TransferMemory copy-handle, an input u8 bool, and an s64 size, returns an [[#IStorage]].&lt;br /&gt;
&lt;br /&gt;
The user-process creates the TransferMemory with permissions=0.&lt;br /&gt;
&lt;br /&gt;
The TransferMemory is mapped, which can then be accessed via [[#IStorageAccessor]]. The input bool controls whether writing to the storage is allowed: [[#Write]] will throw an error if this flag is not set.&lt;br /&gt;
&lt;br /&gt;
=== CreateHandleStorage ===&lt;br /&gt;
Takes an input copy-handle and an input s64, returns an [[#IStorage]]. In some cases the s64 must not have the negative bit set.&lt;br /&gt;
&lt;br /&gt;
The input can be arbitrary, however official sw is only (?) known to use this for TransferMemory (with s64=size).&lt;br /&gt;
&lt;br /&gt;
=== ILibraryAppletAccessor ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetAppletStateChangedEvent]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#IsCompleted]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#Start]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [[#RequestExit]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [[#Terminate]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [[#GetResult]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 50 || [[#SetOutOfFocusApplicationSuspendingEnabled]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [[#PushInData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 101 || [[#PopOutData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 102 || [[#PushExtraStorage]] || &lt;br /&gt;
|-&lt;br /&gt;
| 103 || [[#PushInteractiveInData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 104 || [[#PopInteractiveOutData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 105 || [[#GetPopOutDataEvent]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 106 || [[#GetPopInteractiveOutDataEvent]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 110 || [[#NeedsToExitProcess]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 120 || [[#GetLibraryAppletInfo]] || &lt;br /&gt;
|-&lt;br /&gt;
| 150 || [[#RequestForAppletToGetForeground]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 160 || [2.0.0+] [[#GetIndirectLayerConsumerHandle]] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Commands &amp;lt;=30 are inherited from [[#IAppletAccessor]]. GetLibraryAppletInfo is identical to the [[#ILibraryAppletSelfAccessor]] cmd.&lt;br /&gt;
&lt;br /&gt;
==== SetOutOfFocusApplicationSuspendingEnabled ====&lt;br /&gt;
Takes an input u8 bool, no output.&lt;br /&gt;
&lt;br /&gt;
==== PushInData ====&lt;br /&gt;
Takes an input [[#IStorage]], no output.&lt;br /&gt;
&lt;br /&gt;
==== PopOutData ====&lt;br /&gt;
No input, returns an output [[#IStorage]].&lt;br /&gt;
&lt;br /&gt;
==== PushExtraStorage ====&lt;br /&gt;
Takes an input [[#IStorage]], no output.&lt;br /&gt;
&lt;br /&gt;
==== PushInteractiveInData ====&lt;br /&gt;
Takes an input [[#IStorage]], no output.&lt;br /&gt;
&lt;br /&gt;
==== PopInteractiveOutData ====&lt;br /&gt;
No input, returns an output [[#IStorage]].&lt;br /&gt;
&lt;br /&gt;
==== GetPopOutDataEvent ====&lt;br /&gt;
No input, returns an output handle.&lt;br /&gt;
&lt;br /&gt;
==== GetPopInteractiveOutDataEvent ====&lt;br /&gt;
No input, returns an output event handle with autoclear=false.&lt;br /&gt;
&lt;br /&gt;
==== NeedsToExitProcess ====&lt;br /&gt;
No input, returns an output u8 bool.&lt;br /&gt;
&lt;br /&gt;
==== RequestForAppletToGetForeground ====&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
==== GetIndirectLayerConsumerHandle ====&lt;br /&gt;
Takes an input PID and an input u64 AppletResourceUserId, returns an output u64 IndirectLayerConsumerHandle.&lt;br /&gt;
&lt;br /&gt;
Official sw uses this during LibraryApplet creation when [[#LibraryAppletMode]] is 0x3.&lt;br /&gt;
&lt;br /&gt;
== ICommonStateGetter ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetEventHandle]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#ReceiveMessage]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#GetThisAppletKind]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 3 || AllowToEnterSleep ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DisallowToEnterSleep ||&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#GetOperationMode]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [[#GetPerformanceMode]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#GetCradleStatus]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [[#GetBootMode]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#GetCurrentFocusState]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 10 || RequestToAcquireSleepLock ||&lt;br /&gt;
|-&lt;br /&gt;
| 11 || ReleaseSleepLock ||&lt;br /&gt;
|-&lt;br /&gt;
| 12 || ReleaseSleepLockTransiently ||&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [[#GetAcquiredSleepLockEvent]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [[#PushToGeneralChannel]] || &lt;br /&gt;
|-&lt;br /&gt;
| 30 || [[#GetHomeButtonReaderLockAccessor]] || &lt;br /&gt;
|-&lt;br /&gt;
| 31 || [2.0.0+] [[#GetReaderLockAccessorEx]] || &lt;br /&gt;
|-&lt;br /&gt;
| 32 || [7.0.0+] GetWriterLockAccessorEx || Takes a total of 4-bytes of input, returns an output [[#ILockAccessor]].&lt;br /&gt;
|-&lt;br /&gt;
| 40 || [2.0.0+] GetCradleFwVersion ||&lt;br /&gt;
|-&lt;br /&gt;
| 50 || [3.0.0+] [[#IsVrModeEnabled]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 51 || [3.0.0+] [[#SetVrModeEnabled]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 52 || [4.0.0+] SetLcdBacklighOffEnabled ||&lt;br /&gt;
|-&lt;br /&gt;
| 53 || [7.0.0+] BeginVrModeEx || No input/output.&lt;br /&gt;
|-&lt;br /&gt;
| 54 || [7.0.0+] EndVrModeEx || No input/output.&lt;br /&gt;
|-&lt;br /&gt;
| 55 || [3.0.0+] [[#IsInControllerFirmwareUpdateSection]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [3.0.0+] GetDefaultDisplayResolution ||&lt;br /&gt;
|-&lt;br /&gt;
| 61 || [3.0.0+] [[#GetDefaultDisplayResolutionChangeEvent]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 62 || [4.0.0+] GetHdcpAuthenticationState || &lt;br /&gt;
|-&lt;br /&gt;
| 63 || [4.0.0+] GetHdcpAuthenticationStateChangeEvent ||&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [5.0.0+] SetTvPowerStateMatchingMode ||&lt;br /&gt;
|-&lt;br /&gt;
| 65 || [6.0.0+] GetApplicationIdByContentActionName ||&lt;br /&gt;
|-&lt;br /&gt;
| 66 || [6.0.0+] SetCpuBoostMode ||&lt;br /&gt;
|-&lt;br /&gt;
| 80 || [6.0.0+] PerformSystemButtonPressingIfInFocus ||&lt;br /&gt;
|-&lt;br /&gt;
| 90 || [7.0.0+] SetPerformanceConfigurationChangedNotification || Takes an input u8, no output.&lt;br /&gt;
|-&lt;br /&gt;
| 91 || [7.0.0+] GetCurrentPerformanceConfiguration || No input, returns a total of 4-bytes of output.&lt;br /&gt;
|-&lt;br /&gt;
| 200 || [7.0.0+] GetOperationModeSystemInfo || No input, returns a total of 4-bytes of output.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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]]).&lt;br /&gt;
&lt;br /&gt;
=== GetEventHandle ===&lt;br /&gt;
No input. Returns an output event handle. This is signalled when a message is available with [[#ReceiveMessage]].&lt;br /&gt;
&lt;br /&gt;
=== ReceiveMessage ===&lt;br /&gt;
No input. Returns an output u32. Error 0x680 indicates no message is available.&lt;br /&gt;
&lt;br /&gt;
=== GetThisAppletKind ===&lt;br /&gt;
No input, returns an output [[#AppletKind]].&lt;br /&gt;
&lt;br /&gt;
=== GetOperationMode ===&lt;br /&gt;
No input. Returns an output u8 for the current [[#OperationMode]].&lt;br /&gt;
&lt;br /&gt;
=== GetPerformanceMode ===&lt;br /&gt;
No input. Returns an output u32 for the current PerformanceMode.&lt;br /&gt;
&lt;br /&gt;
=== GetCradleStatus ===&lt;br /&gt;
No input, returns an output u8.&lt;br /&gt;
&lt;br /&gt;
=== GetBootMode ===&lt;br /&gt;
No input, returns an output u8.&lt;br /&gt;
&lt;br /&gt;
=== GetCurrentFocusState ===&lt;br /&gt;
No input. Returns an output u8:&lt;br /&gt;
&lt;br /&gt;
* 1: In focus.&lt;br /&gt;
* 2/3: Out of focus(running in &amp;quot;background&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== GetAcquiredSleepLockEvent ===&lt;br /&gt;
No input, returns an output handle.&lt;br /&gt;
&lt;br /&gt;
=== PushToGeneralChannel ===&lt;br /&gt;
Takes an input [[#IStorage]], no output.&lt;br /&gt;
&lt;br /&gt;
This is not usable under an Application, however it is usable under a LibraryApplet.&lt;br /&gt;
&lt;br /&gt;
Used for sending requests to [[qlaunch]]. sdk-nso creates a 0x10-byte storage which is sent to this. The following are the functions which use this, with the data written to the storage:&lt;br /&gt;
* &amp;lt;code&amp;gt;RequestHomeMenu&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;5341 4d53 0100 0000 0200 0000 0100 0000&amp;lt;/code&amp;gt; Returns to the main Home Menu, equivalent to pressing the HOME button.&lt;br /&gt;
* &amp;lt;code&amp;gt;RequestJumpToSystemUpdate&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;5341 4d53 0100 0000 0b00 0000 0100 0000&amp;lt;/code&amp;gt; Equivalent to entering &amp;quot;System Update&amp;quot; under System Settings. When leaving this, it returns to the main Home Menu.&lt;br /&gt;
&lt;br /&gt;
=== GetHomeButtonReaderLockAccessor ===&lt;br /&gt;
No input, returns an output [[#ILockAccessor]].&lt;br /&gt;
&lt;br /&gt;
=== GetReaderLockAccessorEx ===&lt;br /&gt;
Takes an input u32, returns an output [[#ILockAccessor]].&lt;br /&gt;
&lt;br /&gt;
=== IsVrModeEnabled ===&lt;br /&gt;
No input, returns an output u8 bool.&lt;br /&gt;
&lt;br /&gt;
=== SetVrModeEnabled ===&lt;br /&gt;
Takes an input u8 bool flag. No output.&lt;br /&gt;
&lt;br /&gt;
Updates internal AM state fields. If the new state doesn&#039;t match the previous state, this uses the [[Backlight_services]] {Disable/Enable}VrMode command depending on whether flag={disable/enable}.&lt;br /&gt;
&lt;br /&gt;
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 &#039;close&#039; button. When this button is pressed, the console resets the vrMode to false.&lt;br /&gt;
&lt;br /&gt;
=== IsInControllerFirmwareUpdateSection ===&lt;br /&gt;
No input, returns an output u8 bool.&lt;br /&gt;
&lt;br /&gt;
=== GetDefaultDisplayResolutionChangeEvent ===&lt;br /&gt;
No input, returns an output handle.&lt;br /&gt;
&lt;br /&gt;
== ISelfController ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Exit]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#LockExit]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#UnlockExit]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [2.0.0+] [[#EnterFatalSection]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [2.0.0+] [[#LeaveFatalSection]]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#GetLibraryAppletLaunchableEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#SetScreenShotPermission]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#SetOperationModeChangedNotification]]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#SetPerformanceModeChangedNotification]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [[#SetFocusHandlingMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 14 || SetRestartMessageEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [2.0.0+] [[#SetScreenShotAppletIdentityInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [2.0.0+] [[#SetOutOfFocusSuspendingEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [3.0.0+] SetControllerFirmwareUpdateSection&lt;br /&gt;
|-&lt;br /&gt;
| 18 || [3.0.0+] SetRequiresCaptureButtonShortPressedMessage&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [3.0.0+] [[#SetScreenShotImageOrientation]]&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [4.0.0+] SetDesirableKeyboardLayout&lt;br /&gt;
|-&lt;br /&gt;
| 40 || [[#CreateManagedDisplayLayer]]&lt;br /&gt;
|-&lt;br /&gt;
| 41 || [4.0.0+] IsSystemBufferSharingEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 42 || [4.0.0+] GetSystemSharedLayerHandle&lt;br /&gt;
|-&lt;br /&gt;
| 43 || [6.0.0+] GetSystemSharedBufferHandle&lt;br /&gt;
|-&lt;br /&gt;
| 50 || SetHandlesRequestToDisplay&lt;br /&gt;
|-&lt;br /&gt;
| 51 || ApproveToDisplay&lt;br /&gt;
|-&lt;br /&gt;
| 60 || OverrideAutoSleepTimeAndDimmingTime&lt;br /&gt;
|-&lt;br /&gt;
| 61 || [[#SetMediaPlaybackState]]&lt;br /&gt;
|-&lt;br /&gt;
| 62 || SetIdleTimeDetectionExtension&lt;br /&gt;
|-&lt;br /&gt;
| 63 || GetIdleTimeDetectionExtension&lt;br /&gt;
|-&lt;br /&gt;
| 64 || SetInputDetectionSourceSet&lt;br /&gt;
|-&lt;br /&gt;
| 65 || [2.0.0+] ReportUserIsActive&lt;br /&gt;
|-&lt;br /&gt;
| 66 || [3.0.0+] GetCurrentIlluminance&lt;br /&gt;
|-&lt;br /&gt;
| 67 || [3.0.0+] [[#IsIlluminanceAvailable]]&lt;br /&gt;
|-&lt;br /&gt;
| 68 || [4.0.0+] SetAutoSleepDisabled&lt;br /&gt;
|-&lt;br /&gt;
| 69 || [4.0.0+] IsAutoSleepDisabled&lt;br /&gt;
|-&lt;br /&gt;
| 70 || [5.0.0+] ReportMultimediaError&lt;br /&gt;
|-&lt;br /&gt;
| 71 || [6.0.0+] GetCurrentIlluminanceEx&lt;br /&gt;
|-&lt;br /&gt;
| 80 || [5.0.0+] SetWirelessPriorityMode&lt;br /&gt;
|-&lt;br /&gt;
| 90 || [6.0.0+] GetAccumulatedSuspendedTickValue&lt;br /&gt;
|-&lt;br /&gt;
| 91 || [6.0.0+] GetAccumulatedSuspendedTickChangedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [7.0.0+] [[#SetAlbumImageTakenNotificationEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || [7.0.0+] [[#GetDebugStorageChannel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Exit ===&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
=== LockExit ===&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
Locks exit process of pressing X to close in HOME Menu for an application or HOME button for an applet. When locked, it will show the &amp;quot;waiting for software to be closed dialog&amp;quot; until UnlockExit is called or a 15 seconds timeout (when the latter occurs, the process is force-terminated).&lt;br /&gt;
&lt;br /&gt;
=== UnlockExit ===&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
Unlocks exit process, if LockExit was previously used.&lt;br /&gt;
&lt;br /&gt;
=== EnterFatalSection ===&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
=== LeaveFatalSection ===&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
=== GetLibraryAppletLaunchableEvent ===&lt;br /&gt;
No input, returns an output event handle with autoclear=false.&lt;br /&gt;
&lt;br /&gt;
=== SetScreenShotPermission ===&lt;br /&gt;
Takes an input s32. No output.&lt;br /&gt;
&lt;br /&gt;
Controls whether screenshot-capture is allowed. 0 = disable, 1 = enable, 2 = unknown.&lt;br /&gt;
&lt;br /&gt;
=== SetOperationModeChangedNotification ===&lt;br /&gt;
Takes an input u8 bool flag. No output.&lt;br /&gt;
&lt;br /&gt;
=== SetPerformanceModeChangedNotification ===&lt;br /&gt;
Takes an input u8 bool flag. No output.&lt;br /&gt;
&lt;br /&gt;
=== SetFocusHandlingMode ===&lt;br /&gt;
Takes 3 input u8s with each field located immediately after the previous u8, these are bool flags. No output.&lt;br /&gt;
&lt;br /&gt;
=== SetScreenShotAppletIdentityInfo ===&lt;br /&gt;
Takes an input 0x10-byte struct AppletIdentityInfo. No output.&lt;br /&gt;
&lt;br /&gt;
=== SetOutOfFocusSuspendingEnabled ===&lt;br /&gt;
Takes an input u8(bool flag). No output.&lt;br /&gt;
&lt;br /&gt;
=== SetScreenShotImageOrientation ===&lt;br /&gt;
Takes an input s32. No output.&lt;br /&gt;
&lt;br /&gt;
=== CreateManagedDisplayLayer ===&lt;br /&gt;
Returns an output u64 LayerId which is then used by the user-process with [[Display_services#OpenLayer]].&lt;br /&gt;
&lt;br /&gt;
=== SetMediaPlaybackState ===&lt;br /&gt;
Takes an input u8 bool, no output.&lt;br /&gt;
&lt;br /&gt;
=== IsIlluminanceAvailable ===&lt;br /&gt;
No input, returns an output u8 bool.&lt;br /&gt;
&lt;br /&gt;
=== SetAlbumImageTakenNotificationEnabled ===&lt;br /&gt;
Takes an input u8, no output.&lt;br /&gt;
&lt;br /&gt;
=== GetDebugStorageChannel ===&lt;br /&gt;
Returns an output [[#IStorageChannel]].&lt;br /&gt;
&lt;br /&gt;
== IStorageChannel ==&lt;br /&gt;
Added with [[7.0.0]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Push || No input, returns an output [[#IStorage]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Unpop || No input, returns an output [[#IStorage]].&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Pop || No input, returns an output [[#IStorage]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetPopEventHandle || No input, returns an output handle.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Clear || No input/output.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IWindowController ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#CreateWindow]] || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetAppletResourceUserId]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [6.0.0+] GetAppletResourceUserIdOfCallerApplet ||&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#AcquireForegroundRights]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 11 || ReleaseForegroundRights ||&lt;br /&gt;
|-&lt;br /&gt;
| 12 || RejectToChangeIntoBackground ||&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [7.0.0+] SetAppletWindowVisibility || Takes an input u8, no output.&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [7.0.0+] SetAppletGpuTimeSlice || Takes a total of 8-bytes of input, no output.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CreateWindow ===&lt;br /&gt;
Takes an input u32, returns an output [[#IWindow]].&lt;br /&gt;
&lt;br /&gt;
=== GetAppletResourceUserId ===&lt;br /&gt;
Returns an output u64: [[#AppletResourceUserId]].&lt;br /&gt;
&lt;br /&gt;
=== AcquireForegroundRights ===&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
== IAudioController ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SetExpectedMasterVolume&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetMainAppletExpectedMasterVolume&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetLibraryAppletExpectedMasterVolume&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ChangeMainAppletMasterVolume&lt;br /&gt;
|-&lt;br /&gt;
| 4 || SetTransparentVolumeRate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
GetMainAppletExpectedMasterVolume/SetExpectedMasterVolume are used for saving/restoring state for LibraryApplet launching, with SetExpectedMasterVolume being used with new state prior to launching a LibraryApplet. With official sw these applet funcs are used directly in the main-codebin.&lt;br /&gt;
&lt;br /&gt;
== IDisplayController ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetLastForegroundCaptureImage&lt;br /&gt;
|-&lt;br /&gt;
| 1 || UpdateLastForegroundCaptureImage&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetLastApplicationCaptureImage&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetCallerAppletCaptureImage&lt;br /&gt;
|-&lt;br /&gt;
| 4 || UpdateCallerAppletCaptureImage&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetLastForegroundCaptureImageEx&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetLastApplicationCaptureImageEx&lt;br /&gt;
|-&lt;br /&gt;
| 7 || GetCallerAppletCaptureImageEx&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [2.0.0+] TakeScreenShotOfOwnLayer&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [5.0.0+] CopyBetweenCaptureBuffers&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#AcquireLastApplicationCaptureBuffer]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || ReleaseLastApplicationCaptureBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#AcquireLastForegroundCaptureBuffer]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || ReleaseLastForegroundCaptureBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [[#AcquireCallerAppletCaptureBuffer]]&lt;br /&gt;
|-&lt;br /&gt;
| 15 || ReleaseCallerAppletCaptureBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 16 || AcquireLastApplicationCaptureBufferEx&lt;br /&gt;
|-&lt;br /&gt;
| 17 || AcquireLastForegroundCaptureBufferEx&lt;br /&gt;
|-&lt;br /&gt;
| 18 || AcquireCallerAppletCaptureBufferEx&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [2.0.0+] ClearCaptureBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [2.0.0+] ClearAppletTransitionBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [4.0.0+] AcquireLastApplicationCaptureSharedBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [4.0.0+] ReleaseLastApplicationCaptureSharedBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 24 || [4.0.0+] AcquireLastForegroundCaptureSharedBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [4.0.0+] ReleaseLastForegroundCaptureSharedBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 26 || [4.0.0+] AcquireCallerAppletCaptureSharedBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 27 || [4.0.0+] ReleaseCallerAppletCaptureSharedBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 28 || [6.0.0+] TakeScreenShotOfOwnLayerEx&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AcquireLastApplicationCaptureBuffer ===&lt;br /&gt;
No input, returns an output handle.&lt;br /&gt;
&lt;br /&gt;
=== AcquireLastForegroundCaptureBuffer ===&lt;br /&gt;
No input, returns an output handle.&lt;br /&gt;
&lt;br /&gt;
=== AcquireCallerAppletCaptureBuffer ===&lt;br /&gt;
No input, returns an output handle.&lt;br /&gt;
&lt;br /&gt;
== ISystemAppletControllerForDebug ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 1 || RequestLaunchApplicationForDebug || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || [7.0.0+] GetDebugStorageChannel || No input, returns an output [[#IStorageChannel]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [7.0.0+] CreateStorageForDebug || Takes a total of 8-bytes of input, returns an [[#IStorage]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IProcessWindingController ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetLaunchReason]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#OpenCallingLibraryApplet]] || &lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#PushContext]] || &lt;br /&gt;
|-&lt;br /&gt;
| 22 || [[#PopContext]] || &lt;br /&gt;
|-&lt;br /&gt;
| 23 || CancelWindingReservation ||&lt;br /&gt;
|-&lt;br /&gt;
| 30 || WindAndDoReserved ||&lt;br /&gt;
|-&lt;br /&gt;
| 40 || [[#ReserveToStartAndWaitAndUnwindThis]] || &lt;br /&gt;
|-&lt;br /&gt;
| 41 || [4.0.0+] ReserveToStartAndWait ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GetLaunchReason ===&lt;br /&gt;
No input. Returns an u32 AppletProcessLaunchReason.&lt;br /&gt;
&lt;br /&gt;
Used by LibraryApplets.&lt;br /&gt;
&lt;br /&gt;
=== OpenCallingLibraryApplet ===&lt;br /&gt;
No input, returns an output [[#ILibraryAppletAccessor]].&lt;br /&gt;
&lt;br /&gt;
=== PushContext ===&lt;br /&gt;
Takes an input [[#IStorage]], no output.&lt;br /&gt;
&lt;br /&gt;
=== PopContext ===&lt;br /&gt;
No input, returns an output [[#IStorage]].&lt;br /&gt;
&lt;br /&gt;
=== ReserveToStartAndWaitAndUnwindThis ===&lt;br /&gt;
Takes an input [[#ILibraryAppletAccessor]], no output.&lt;br /&gt;
&lt;br /&gt;
== IDebugFunctions ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || NotifyMessageToHomeMenuForDebug ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#OpenMainApplication]] || &lt;br /&gt;
|-&lt;br /&gt;
| 10 || EmulateButtonEvent ||&lt;br /&gt;
|-&lt;br /&gt;
| 20 || InvalidateTransitionLayer ||&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [6.0.0+] RequestLaunchApplicationWithUserAndArgumentForDebug ||&lt;br /&gt;
|-&lt;br /&gt;
| 40 || [6.0.0+] GetAppletResourceUsageInfo ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== OpenMainApplication ===&lt;br /&gt;
No input, returns an output [[#IApplicationAccessor]].&lt;br /&gt;
&lt;br /&gt;
== IStorage ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Open || No input. Returns an [[#IStorageAccessor]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [2.0.0+] OpenTransferStorage || No input. Returns an [[#ITransferStorageAccessor]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Open can only be used when the IStorage was created by [[#CreateStorage]] or [[#CreateTransferMemoryStorage]]. OpenTransferStorage can only be used when the IStorage was created by [[#CreateHandleStorage]].&lt;br /&gt;
&lt;br /&gt;
Only 1 *Accessor session can be open for each IStorage at a time.&lt;br /&gt;
&lt;br /&gt;
== IStorageAccessor ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetSize || No input. Returns an s64.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Write || Takes an input s64 and a type-0x21 input buffer.&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Read || Takes an input s64 and a type-0x22 output buffer.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ITransferStorageAccessor ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetSize || No input. Returns an output s64.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetHandle || No input. Returns an output s64 and handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These commands return the data originally from [[#CreateHandleStorage]] input, both return the same s64.&lt;br /&gt;
&lt;br /&gt;
= appletOE =&lt;br /&gt;
This is &amp;quot;nn::am::service::IApplicationProxyService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#OpenApplicationProxy]] || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is used by all regular-applications, including [[flog]] and &amp;quot;Retail Interactive Display Menu&amp;quot;. Only one session can be open for this service at a time.&lt;br /&gt;
&lt;br /&gt;
== OpenApplicationProxy ==&lt;br /&gt;
Returns an [[#IApplicationProxy]]. See [[#appletAE]].&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
On failure, official user-processes will retry using this command in a loop while the retval is 0x19280, with svcSleepThread(10000000) being called first.&lt;br /&gt;
&lt;br /&gt;
= idle:sys =&lt;br /&gt;
This is &amp;quot;nn::idle::detail::IPolicyManagerSystem&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetAutoPowerDownEvent&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;| 1 || [1.0.0-3.0.2]&lt;br /&gt;
|-&lt;br /&gt;
| [7.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [1.0.0-3.0.2]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetHandlingContext&lt;br /&gt;
|-&lt;br /&gt;
| 4 || LoadAndApplySettings&lt;br /&gt;
|-&lt;br /&gt;
| 5 || ReportUserIsActive&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= omm =&lt;br /&gt;
This is &amp;quot;nn::omm::detail::IOperationModeManager&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Operation Mode Manager (OMM) is a service responsible for arbitrating the operation changes between docked and handheld modes.&lt;br /&gt;
Besides [[PTM_services]], this is the only service that interacts with the [[Dock]] through [[USB_services|usb:pd*]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetOperationMode || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetOperationModeChangeEvent || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || EnableAudioVisual || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || DisableAudioVisual || &lt;br /&gt;
|-&lt;br /&gt;
| 4 || EnterSleepAndWait || &lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetCradleStatus || &lt;br /&gt;
|-&lt;br /&gt;
| 6 || FadeInDisplay || &lt;br /&gt;
|-&lt;br /&gt;
| 7 || FadeOutDisplay || &lt;br /&gt;
|-&lt;br /&gt;
| 8 || [2.0.0+] GetCradleFwVersion || &lt;br /&gt;
|-&lt;br /&gt;
| 9 || [2.0.0+] NotifyCecSettingsChanged || &lt;br /&gt;
|-&lt;br /&gt;
| 10 || [3.0.0+] SetOperationModePolicy || &lt;br /&gt;
|-&lt;br /&gt;
| 11 || [3.0.0+] GetDefaultDisplayResolution || &lt;br /&gt;
|-&lt;br /&gt;
| 12 || [3.0.0+] GetDefaultDisplayResolutionChangeEvent || &lt;br /&gt;
|-&lt;br /&gt;
| 13 || [3.0.0+] UpdateDefaultDisplayResolution || &lt;br /&gt;
|-&lt;br /&gt;
| 14 || [3.0.0+] ShouldSleepOnBoot || &lt;br /&gt;
|-&lt;br /&gt;
| 15 || [4.0.0+] NotifyHdcpApplicationExecutionStarted || &lt;br /&gt;
|-&lt;br /&gt;
| 16 || [4.0.0+] NotifyHdcpApplicationExecutionFinished || &lt;br /&gt;
|-&lt;br /&gt;
| 17 || [4.0.0+] NotifyHdcpApplicationDrawingStarted || &lt;br /&gt;
|-&lt;br /&gt;
| 18 || [4.0.0+] NotifyHdcpApplicationDrawingFinished || &lt;br /&gt;
|-&lt;br /&gt;
| 19 || [4.0.0+] GetHdcpAuthenticationFailedEvent || &lt;br /&gt;
|-&lt;br /&gt;
| 20 || [4.0.0+] GetHdcpAuthenticationFailedEmulationEnabled || &lt;br /&gt;
|-&lt;br /&gt;
| 21 || [4.0.0+] SetHdcpAuthenticationFailedEmulation || &lt;br /&gt;
|-&lt;br /&gt;
| 22 || [4.0.0+] GetHdcpStateChangeEvent || &lt;br /&gt;
|-&lt;br /&gt;
| 23 || [4.0.0+] GetHdcpState || &lt;br /&gt;
|-&lt;br /&gt;
| 24 || [5.0.0+] ShowCardUpdateProcessing || &lt;br /&gt;
|-&lt;br /&gt;
| 25 || [5.0.0+] SetApplicationCecSettingsAndNotifyChanged || &lt;br /&gt;
|-&lt;br /&gt;
| 26 || [7.0.0+] || No input, returns a total of 4-bytes of output.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= spsm =&lt;br /&gt;
This is &amp;quot;nn::spsm::detail::IPowerStateInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetState&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SleepSystemAndWaitAwake&lt;br /&gt;
|-&lt;br /&gt;
| 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetNotificationMessageEventHandle&lt;br /&gt;
|-&lt;br /&gt;
| 5 || &lt;br /&gt;
|-&lt;br /&gt;
| 6 || &lt;br /&gt;
|-&lt;br /&gt;
| 7 || &lt;br /&gt;
|-&lt;br /&gt;
| 8 || AnalyzePerformanceLogForLastSleepWakeSequence&lt;br /&gt;
|-&lt;br /&gt;
| 9 || ChangeHomeButtonLongPressingTime&lt;br /&gt;
|-&lt;br /&gt;
| 10 || &lt;br /&gt;
|-&lt;br /&gt;
| 11 || [1.0.0-3.0.2]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= tcap =&lt;br /&gt;
This is &amp;quot;nn::tcap::server::IManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetContinuousHighSkinTemperatureEvent&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SetOperationMode&lt;br /&gt;
|-&lt;br /&gt;
| 2 || LoadAndApplySettings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= caps:su =&lt;br /&gt;
This is &amp;quot;nn::capsrv::sf::IScreenShotApplicationService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [[6.0.0]].&lt;br /&gt;
&lt;br /&gt;
This can be used by applications to save screenshots.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [7.0.0+] SetShimLibraryVersion || Takes a total of 0x10-bytes of input and a PID, no output.&lt;br /&gt;
|-&lt;br /&gt;
| 201 || SaveScreenShot || &lt;br /&gt;
|-&lt;br /&gt;
| 203 || SaveScreenShotEx0 || &lt;br /&gt;
|-&lt;br /&gt;
| 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.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Cmd32 is a wrapper for [[Capture_services|caps:c]] cmd33. Commands 201, 203, and 210 are wrappers for [[Display_services|caps:sc]] cmd210.&lt;br /&gt;
&lt;br /&gt;
== SaveScreenShot ==&lt;br /&gt;
Takes two input u32s, an u64 AppletResourceUserId, a PID, and a type-0x45 input buffer. Returns a 0x20-byte struct &#039;&#039;&#039;ApplicationAlbumEntry&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Official user-processes doesn&#039;t use this, instead [[#SaveScreenShotEx0]] is used: ScreenShotAttributeEx0 is all-zero except +0 is set to an input u32.&lt;br /&gt;
&lt;br /&gt;
== SaveScreenShotEx0 ==&lt;br /&gt;
Takes an input 0x40-byte struct &#039;&#039;&#039;ScreenShotAttributeEx0&#039;&#039;&#039;, an input u32, an input u64 AppletResourceUserId, a PID, and a type-0x45 input buffer. Returns a 0x20-byte struct &#039;&#039;&#039;ApplicationAlbumEntry&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Library Applets =&lt;br /&gt;
This section documents library applet launching.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once the applet finishes running successfully, [[#ILibraryAppletAccessor]] PopOutData can be used to get the applet-specific [[#IStorage]] containing the applet output data.&lt;br /&gt;
&lt;br /&gt;
== CommonArguments ==&lt;br /&gt;
The first [[#CreateStorage|IStorage]] passed to applets should contain the common library applet arguments. This is populated by &amp;lt;code&amp;gt;nn::la::CommonArgumentsWriter&amp;lt;/code&amp;gt; and has the following format.&lt;br /&gt;
&lt;br /&gt;
This struct is 0x20-bytes.&lt;br /&gt;
&lt;br /&gt;
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&#039;s 8-bytes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Typical Value || Notes &lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 4 || 1 || Common Arguments version&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || 4 || 0x20 || Common Arguments size&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 4 || || Library applet version (API version)&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 4 || 0 || Theme color&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 1 || 0 || Play startup sound&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 8 || N/A || System tick (see [[SVC#svcGetSystemTick|svcGetSystemTick]])&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Enums =&lt;br /&gt;
=== AppletId ===&lt;br /&gt;
See also [[:Category:Library Applets]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  ID&lt;br /&gt;
!  Title-id&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 010000000000100C&lt;br /&gt;
| &amp;quot;overlayDisp&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x03&lt;br /&gt;
| 0100000000001000&lt;br /&gt;
| &amp;quot;qlaunch&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0100000000001012&lt;br /&gt;
| &amp;quot;starter&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A&lt;br /&gt;
| 0100000000001001&lt;br /&gt;
| &amp;quot;auth&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B&lt;br /&gt;
| 0100000000001002&lt;br /&gt;
| &amp;quot;cabinet&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0100000000001003&lt;br /&gt;
| &amp;quot;controller&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D&lt;br /&gt;
| 0100000000001004&lt;br /&gt;
| &amp;quot;dataErase&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E&lt;br /&gt;
| 0100000000001005&lt;br /&gt;
| [[Error_Applet|Error applet]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F&lt;br /&gt;
| 0100000000001006&lt;br /&gt;
| &amp;quot;netConnect&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0100000000001007&lt;br /&gt;
| [[Profile_Selector|Profile-Selector]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11&lt;br /&gt;
| 0100000000001008&lt;br /&gt;
| [[Software_Keyboard|Software-Keyboard]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12&lt;br /&gt;
| 0100000000001009&lt;br /&gt;
| &amp;quot;miiEdit&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x13&lt;br /&gt;
| 010000000000100A&lt;br /&gt;
| &amp;quot;LibAppletWeb&amp;quot; [[Internet_Browser#010000000000100A|WebApplet]] applet&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 010000000000100B&lt;br /&gt;
| &amp;quot;LibAppletShop&amp;quot; [[Internet_Browser#ShopN|ShopN]] applet&lt;br /&gt;
|-&lt;br /&gt;
| 0x15&lt;br /&gt;
| 010000000000100D&lt;br /&gt;
| &amp;quot;photoViewer&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x16&lt;br /&gt;
| 010000000000100E&lt;br /&gt;
| &amp;quot;set&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0x17&lt;br /&gt;
| 010000000000100F&lt;br /&gt;
| &amp;quot;LibAppletOff&amp;quot; [[Internet_Browser#Offline_Applet|Offline]] applet&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0100000000001010&lt;br /&gt;
| &amp;quot;LibAppletLns&amp;quot; [[Internet_Browser#Whitelisted_Applets|Whitelisted]] applet&lt;br /&gt;
|-&lt;br /&gt;
| 0x19&lt;br /&gt;
| 0100000000001011&lt;br /&gt;
| &amp;quot;LibAppletAuth&amp;quot; [[Internet_Browser#WifiWebAuthApplet|WifiWebAuth]] applet&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A&lt;br /&gt;
| 0100000000001013&lt;br /&gt;
| &amp;quot;myPage&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LibraryAppletMode ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  ID&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| AllForeground&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| Background&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| Unknown, see also [[#GetIndirectLayerConsumerHandle]]. Only used by swkbd InlineKeyboard.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NotificationMessage ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  ID&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || Exit requested&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || [[#GetCurrentFocusState|FocusState]] changed&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E || OperationMode changed&lt;br /&gt;
|-&lt;br /&gt;
| 0x1F || PerformanceMode changed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== OperationMode ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Handheld&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Docked&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LaunchParameterKind ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Application-specific LaunchParameter&lt;br /&gt;
|-&lt;br /&gt;
| 2 || account PreselectedUser&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Unknown if used by anything?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LibraryAppletExitReason ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Normal&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Canceled&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Abnormal&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Unexpected&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= AppletResourceUserId =&lt;br /&gt;
This u64 is officially called &amp;quot;nn::applet::AppletResourceUserId&amp;quot;. Used by a number of non-AM services.&lt;br /&gt;
&lt;br /&gt;
= LibraryAppletInfo =&lt;br /&gt;
This struct is 8-bytes: +0 u32 is [[#AppletId]], +4 u32 is [[#LibraryAppletMode]].&lt;br /&gt;
&lt;br /&gt;
= AppletKind =&lt;br /&gt;
This is 8-bytes.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>StuntHacks</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Error_Applet&amp;diff=6311</id>
		<title>Error Applet</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Error_Applet&amp;diff=6311"/>
		<updated>2019-02-26T07:48:34Z</updated>

		<summary type="html">&lt;p&gt;StuntHacks: Fixed a typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the applet presented when a title displays an error message.&lt;br /&gt;
See [[AM_services#Library_Applets]]. The error applet expects two [[AM_services#IStorage|IStorage]] inputs and no output.&lt;br /&gt;
&lt;br /&gt;
== ErrorConfig ==&lt;br /&gt;
&lt;br /&gt;
This has size 0x1018 and contains the error code, a short description of the error and a more detailed description of the error, displayed when the user clicks on &amp;quot;Details&amp;quot;. Typically, all unused values can be set to zero. The first should be set to 1 if a custom error message is to be displayed. Otherwise, a default error message will be shown.&lt;br /&gt;
&lt;br /&gt;
The error code is stored at offsets 0x8, containing the first part of the code, and 0xC, containing the second part of the code. Those values are expected to be u64&#039;s.&lt;br /&gt;
&lt;br /&gt;
The short description of the error is stored as a char* at offset 0x18, the long description of the error is stored as a char* at offset 0x818.&lt;br /&gt;
&lt;br /&gt;
== Usage == &lt;br /&gt;
User-processes should push a common arguments struct as well as the typical ErrorConfig struct. Since the error applet doesn&#039;t have any output, user-processes can then directly join the applet and wait for it to finish.&lt;br /&gt;
&lt;br /&gt;
[[Category:Library Applets]]&lt;/div&gt;</summary>
		<author><name>StuntHacks</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Error_Applet&amp;diff=6310</id>
		<title>Error Applet</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Error_Applet&amp;diff=6310"/>
		<updated>2019-02-26T07:47:38Z</updated>

		<summary type="html">&lt;p&gt;StuntHacks: Removed a mistakenly added argument&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the applet presented when a title displays an error message.&lt;br /&gt;
See [[AM_services#Library_Applets]]. The error applet expects three [[AM_services#IStorage|IStorage]] inputs and no output.&lt;br /&gt;
&lt;br /&gt;
== ErrorConfig ==&lt;br /&gt;
&lt;br /&gt;
This has size 0x1018 and contains the error code, a short description of the error and a more detailed description of the error, displayed when the user clicks on &amp;quot;Details&amp;quot;. Typically, all unused values can be set to zero. The first should be set to 1 if a custom error message is to be displayed. Otherwise, a default error message will be shown.&lt;br /&gt;
&lt;br /&gt;
The error code is stored at offsets 0x8, containing the first part of the code, and 0xC, containing the second part of the code. Those values are expected to be u64&#039;s.&lt;br /&gt;
&lt;br /&gt;
The short description of the error is stored as a char* at offset 0x18, the long description of the error is stored as a char* at offset 0x818.&lt;br /&gt;
&lt;br /&gt;
== Usage == &lt;br /&gt;
User-processes should push a common arguments struct as well as the typical ErrorConfig struct. Since the error applet doesn&#039;t have any output, user-processes can then directly join the applet and wait for it to finish.&lt;br /&gt;
&lt;br /&gt;
[[Category:Library Applets]]&lt;/div&gt;</summary>
		<author><name>StuntHacks</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Error_Applet&amp;diff=6309</id>
		<title>Error Applet</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Error_Applet&amp;diff=6309"/>
		<updated>2019-02-26T07:43:26Z</updated>

		<summary type="html">&lt;p&gt;StuntHacks: Created page with &amp;quot;This is the applet presented when a title displays an error message. See AM_services#Library_Applets. The error applet expects three IStorage inpu...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the applet presented when a title displays an error message.&lt;br /&gt;
See [[AM_services#Library_Applets]]. The error applet expects three [[AM_services#IStorage|IStorage]] inputs and no output.&lt;br /&gt;
&lt;br /&gt;
== UnknownArg ==&lt;br /&gt;
The first argument is expected to be a u64 with the value 0x21C00000014LL. The purpose of this argument is currently unknown, as is whether or not different values affect the error applet. So far, it seems that it doesn&#039;t matter as long as this argument is a u64 and is passed to the applet.&lt;br /&gt;
&lt;br /&gt;
== ErrorConfig ==&lt;br /&gt;
&lt;br /&gt;
This has size 0x1018 and contains the error code, a short description of the error and a more detailed description of the error, displayed when the user clicks on &amp;quot;Details&amp;quot;. Typically, all unused values can be set to zero. The first should be set to 1 if a custom error message is to be displayed. Otherwise, a default error message will be shown.&lt;br /&gt;
&lt;br /&gt;
The error code is stored at offsets 0x8, containing the first part of the code, and 0xC, containing the second part of the code. Those values are expected to be u64&#039;s.&lt;br /&gt;
&lt;br /&gt;
The short description of the error is stored as a char* at offset 0x18, the long description of the error is stored as a char* at offset 0x818.&lt;br /&gt;
&lt;br /&gt;
== Usage == &lt;br /&gt;
User-processes should push a common arguments struct as well as the UnknownArgument and the typical ErrorConfig struct. Since the error applet doesn&#039;t have any output, user-processes can then directly join the applet and wait for it to finish.&lt;br /&gt;
&lt;br /&gt;
[[Category:Library Applets]]&lt;/div&gt;</summary>
		<author><name>StuntHacks</name></author>
	</entry>
</feed>