Applet Manager services: Difference between revisions

No edit summary
 
(12 intermediate revisions by 2 users not shown)
Line 28: Line 28:
| 450 || [19.0.0+] [[#GetSystemProcessCommonFunctions]] ||  
| 450 || [19.0.0+] [[#GetSystemProcessCommonFunctions]] ||  
|-
|-
| 460 || [20.0.0+] ||
| 460 || [20.0.0+] || Returns an [[#IAppletAlternativeFunctions]].
|-
|-
| 1000 || [6.0.0+] [[#GetDebugFunctions]] ||  
| 1000 || [6.0.0+] [[#GetDebugFunctions]] ||  
Line 2,467: Line 2,467:
Unofficial name. This is exclusive to S2.
Unofficial name. This is exclusive to S2.


No input. Returns an output TIPC handle to [[#GraphicsInterface]].
No input. Returns an output TIPC handle to [[#(S2) GraphicsInterface|GraphicsInterface]].


== IStorageChannel ==
== IStorageChannel ==
Line 2,900: Line 2,900:
|-
|-
| 30 ||  
| 30 ||  
|}
== IAppletAlternativeFunctions ==
This is "nn::am::service::IAppletAlternativeFunctions".
This was added with [20.0.0+].
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 ||
|-
| 1 ||
|-
| 2 ||
|}
|}


Line 3,374: Line 3,390:


= (S2) adraw:a =
= (S2) adraw:a =
This is "nn::appletdraw::sfif::IAppletRoot". This is exclusive to S2.
This is "nn::appletdraw::sfif::IAppletRoot".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 3,388: Line 3,404:
Unofficial name.  
Unofficial name.  


Takes a PID and an u64. Returns a [[#IResourceSession]].
Takes a PID and an input [[#AppletResourceUserId|AppletResourceUserId]]. Returns a [[#IResourceSession]].


== OpenAppletSession ==
== OpenAppletSession ==
Unofficial name. This is exclusive to S2.
Unofficial name.


Takes a PID and an u64. Returns a [[#IAppletSession]].
Takes a PID and an input [[#AppletResourceUserId|AppletResourceUserId]]. Returns a [[#IAppletSession]].


== IResourceSession ==
== IResourceSession ==
Line 3,402: Line 3,418:
! Cmd || Name
! Cmd || Name
|-
|-
| 1 ||  
| 1 || [[#Ping|Ping]]
|-
|-
| 10 ||   
| 10 ||   
Line 3,409: Line 3,425:
|}
|}


=== Cmd1 ===
=== Ping ===
Takes a u64. Returns a u64.
Unofficial name.
 
Takes an input u64. Returns an output u64.
 
The output u64 should match the input u64. Official software sends the current system tick value.


=== Cmd10 ===
=== Cmd10 ===
Line 3,425: Line 3,445:
! Cmd || Name
! Cmd || Name
|-
|-
| 1 ||  
| 1 || [[#Ping|Ping]]
|-
|-
| 2 ||
| 2 || [[#GetEvent|GetEvent]]
|-
|-
| 3 ||
| 3 || [20.1.1+]
|-
|-
| 10 ||   
| 10 ||   
Line 3,441: Line 3,461:
| 15 ||   
| 15 ||   
|-
|-
| 16 ||
| 16 || [20.1.1+]
|-
|-
| 17 ||
| 17 || [20.1.1+]
|-
|-
| 18 ||
| 18 || [20.1.1+]
|-
|-
| 19 ||
| 19 || [20.1.1+]
|-
|-
| 21 ||   
| 21 ||   
Line 3,453: Line 3,473:
| 22 ||   
| 22 ||   
|-
|-
| 23 ||
| 23 || [20.1.1+]
|-
|-
| 24 ||
| 24 || [20.1.1+]
|-
|-
| 31 ||
| 31 || [[#GetFrameBufferInfo|GetFrameBufferInfo]]
|-
|-
| 8001 ||
| 8001 || [[#GetFrameBufferInfoForDebug|GetFrameBufferInfoForDebug]]
|-
| 8003 || [19.0.0-19.1.0]
|-
|-
| 8004 ||   
| 8004 ||   
|}
|}


=== Cmd1 ===
=== GetEvent ===
Takes a u64. Returns a u64.
Unofficial name.


=== Cmd2 ===
No input. Returns an output Event handle.
Returns a handle.


=== Cmd3 ===
=== Cmd3 ===
Takes a handle.
Takes a handle. No output.


=== Cmd10 ===
=== Cmd10 ===
Takes an int.
Takes an input u32. No output.


=== Cmd11 ===
=== Cmd11 ===
Takes an int.
Takes an input u32. No output.


=== Cmd12 ===
=== Cmd12 ===
Takes a u64. Returns an int.
Takes an input u64. Returns an output u32.


=== Cmd13 ===
=== Cmd13 ===
Takes an int. Returns an int.
Takes an input u32. Returns an output u32.


=== Cmd15 ===
=== Cmd15 ===
Takes an int. Returns an int, an int, an int.
Takes an input u32. Returns three output u32s.


=== Cmd16 ===
=== Cmd16 ===
Returns an int.
No input. Returns an output u32.


=== Cmd17 ===
=== Cmd17 ===
Takes an int. Returns an int, a u16.
Takes an input u32. Returns an output u32 and an output u16.


=== Cmd18 ===
=== Cmd18 ===
Takes an int. Returns 3x int, a u16.
Takes an input u32. Returns three output u32s and an output u16.


=== Cmd19 ===
=== Cmd19 ===
Takes an int. Returns an int, a u16.
Takes an input u32. Returns an output u32 and an output u16.


=== Cmd21 ===
=== Cmd21 ===
Takes an int. Returns a struct of size 0x40.
Takes an input u32. Returns a struct of size 0x40.


=== Cmd22 ===
=== Cmd22 ===
Line 3,507: Line 3,528:


=== Cmd23 ===
=== Cmd23 ===
Returns a struct of size 0xC8.
No input. Returns a struct of size 0xC8.


=== Cmd24 ===
=== Cmd24 ===
Sends an ipc-buf with size 0xD8.
Takes an ipc-buf with size 0xD8. No output.


=== Cmd31 ===
=== GetFrameBufferInfo ===
Returns a struct with 0x28, a struct with size 0x10.
Unofficial name.
 
No input. Returns an [[#(S2)_AdrawFrameBufferInfo|AdrawFrameBufferInfo]].
 
[[#(S2)_AdrawFrameBufferInfo|Id]] is "adrawfb".
 
=== GetFrameBufferInfoForDebug ===
Unofficial name.


=== Cmd8001 ===
No input. Returns an [[#(S2)_AdrawFrameBufferInfo|AdrawFrameBufferInfo]].
Returns a struct with 0x28, a struct with size 0x10.
 
=== Cmd8003 ===
Takes an input u64. Returns a struct with size 0x18.


=== Cmd8004 ===
=== Cmd8004 ===
Takes an int. Returns a u64.
Takes an input u32. Returns an output u64.


= (S2) appletOE =
= (S2) appletOE =
Line 3,571: Line 3,601:
Unofficial name.
Unofficial name.


No input. Returns an output TIPC handle to [[#GraphicsInterface]].
No input. Returns an output TIPC handle to [[#(S2) GraphicsInterface|GraphicsInterface]].


Same as [[#GetGraphicsInterface]] but for compat mode.
Same as [[#GetGraphicsInterface]] but for compat mode.
Line 3,608: Line 3,638:
! Cmd || Name
! Cmd || Name
|-
|-
| 4 || [[#InitializeA]]  
| 1 || [[#InitializeGraphicsWithTransferMemory]]  
|-
|-
| 11 || [[#InitializeB]]
| 4 || [[#InitializeGraphics]]  
|-
|-
| 101 || [[#InitializeC]]
| 11 || [[#SetCurrentProcessHandle]]
|-
| 12 ||
|-
| 101 || [[#StartGraphics]]
|-
|-
| 111 ||  
| 111 ||  
Line 3,627: Line 3,661:
|-
|-
| 301 ||  
| 301 ||  
|-
| 327 ||
|-
|-
| 303 ||  
| 303 ||  
Line 3,641: Line 3,673:
|-
|-
| 321 ||  
| 321 ||  
|-
| 327 ||
|-
|-
| 391 ||  
| 391 ||  
|-
|-
| 401 ||  
| 401 || [[#PrepareGpuManagerSession]]
|-
|-
| 402 ||  
| 402 || [[#StartGpuManagerSession]]
|-
|-
| 423 ||  
| 423 ||  
|-
| 428 || [[#GetImageInfo]]
|-
|-
| 434 ||  
| 434 ||  
|-
|-
| 497 ||  
| 494 ||
|-
| 496 || [[#CreateGpuManagerSessionWithTransferMemory]]
|-
| 497 || [[#CreateGpuManagerSession]]
|-
|-
| 901 ||  
| 901 ||  
Line 3,682: Line 3,722:
| 1102 ||  
| 1102 ||  
|-
|-
| 1401 || [[#InitializeNvDrv2UserWithTransferMemory]]  
| 1301 || [[#InitializeAdraw]]
|-
| 1302 || [[#StartAdraw]]
|-
| 1325 || [[#GetAdrawFrameBufferHandle]]
|-
|-
| 1402 || [[#InitializeNvDrv2User]]  
| 1326 || [[#GetAdrawImageHandle]]
|-
|-
| 1501 ||  
| 1401 || [[#CreateNvDrv2UserSessionWithTransferMemory]]
|-
| 1402 || [[#CreateNvDrv2UserSession]]
|-
| 1411 || [[#GetNvDrv2UserTransferMemoryUsage]]
|-
| 1501 ||
|-
|-
| 1502 ||  
| 1502 ||  
Line 3,703: Line 3,753:
|}
|}


== InitializeA ==
== InitializeGraphicsWithTransferMemory ==
Unofficial name.
Unofficial name.


Sends current process handle, and struct { u64 aruid; u64 always_0x8000000000000005; u64 always_0; u64 always_0; u64 always_0; u64 svc_get_info_31_or_32_output; }.
Takes a TransferMemory handle, an input [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]] and an input u64 '''TransferMemorySize'''. No output.


== InitializeB ==
== InitializeGraphics ==
Unofficial name.
Unofficial name.


Sends current process handle. No args. Sent directly after cmd4.
Takes a Process handle, an input [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]] and five input u64s. No output.


== InitializeC ==
The first u64 appears to be a version ([19.0.0] 0x8000000000000001, [20.1.1] 0x8000000000000005), the last u64 is the output from new [[SVC#InfoType|InfoType]] 31 or 32 and the remaining u64s are all 0.
 
== SetCurrentProcessHandle ==
Unofficial name.
Unofficial name.


Sent directly after [[#InitializeB]].
Takes a Process handle. No output.


== InitializeNvDrv2UserWithTransferMemory ==
Called directly after [[#InitializeGraphicsWithTransferMemory]] or [[#InitializeGraphics]].
 
== StartGraphics ==
Unofficial name.
Unofficial name.


Takes a TransferMemory handle, and an input u64 '''TransferMemorySize'''. Returns an [[#INvDrv2User]].
No input/output.
 
Called directly after [[#SetCurrentProcessHandle]].


== InitializeNvDrv2User ==
== PrepareGpuManagerSession ==
Unofficial name.
Unofficial name.


No input. Returns an [[#INvDrv2User]].
No input/output.
 
Called directly after [[#CreateGpuManagerSessionWithTransferMemory]] or [[#CreateGpuManagerSession]].
 
== StartGpuManagerSession ==
Unofficial name.
 
No input/output.
 
Called directly after [[#PrepareGpuManagerSession]].
 
== GetImageInfo ==
Unofficial name.


== INvDrv2User ==
Takes an input u32 '''ImageHandle'''. Returns an [[#(S2)_ImageInfo|ImageInfo]].
This is "nn::nvdrv::INvDrv2User".


{| class="wikitable" border="1"
== CreateGpuManagerSessionWithTransferMemory ==
|-
Unofficial name.
! Cmd || Name
|-
| 0 || Open
|-
| 1 || Ioctl
|-
| 2 || Close
|-
| 4 || QueryEvent
|-
| 9 || DumpStatus
|-
| 10 || InitializeDevtools
|-
| 11 || Ioctl2
|-
| 12 || Ioctl3
|-
| 13 || SetGraphicsFirmwareMemoryMarginEnabled
|}


= Library Applets =
Takes a TransferMemory handle and two input u64s '''Version''' and '''TransferMemorySize'''. Returns a [[#GpuManagerSession]].
This section documents library applet launching.


Before starting the applet, [[#IStorage]]s are [[#ILibraryAppletCreator|created]] and written, then passed to [[#ILibraryAppletAccessor]] PushInData. The [[#IStorage]] session is closed afterwards. The first [[#IStorage]] is [[#CommonArguments]], followed by any applet-specific [[#IStorage]]s.
[19.0.0] '''Version''' must be 2.


Once the applet finishes running successfully, [[#ILibraryAppletAccessor]] PopOutData can be used to get the applet-specific [[#IStorage]] containing the applet output data.
== CreateGpuManagerSession ==
Unofficial name.


== CommonArguments ==
Takes an input u64 '''Version'''. Returns a [[#GpuManagerSession]].
The first [[#CreateStorage|IStorage]] passed to applets should contain the common library applet arguments. This is populated by <code>nn::la::CommonArgumentsWriter</code> and has the following format.


This struct is 0x20-bytes.
[19.0.0] '''Version''' must be 2.


Official sw handles the first 8-bytes separately, which is a header. With CommonArguments version 0x0, the header is 4-bytes, while starting with version 0x1 it's 8-bytes.
== InitializeAdraw ==
Unofficial name.


{| class="wikitable" border="1"
No input/output.
|-
 
! Offset || Size || Typical Value || Notes
== StartAdraw ==
|-
Unofficial name.
| 0x0 || 4 || 1 || Common Arguments version
 
|-
No input/output.
| 0x4 || 4 || 0x20 || Common Arguments size
 
Called directly after [[#InitializeAdraw]].
 
== GetAdrawFrameBufferHandle ==
Unofficial name.
 
Takes an input u64. Returns an output u32 '''FrameBufferHandle'''.
 
Official software sends the [[#(S2)_AdrawFrameBufferInfo|Id]] obtained with [[#GetFrameBufferInfo|GetFrameBufferInfo]] from [[#(S2)_adraw:a|adraw]].
 
== GetAdrawImageHandle ==
Unofficial name.
 
Takes seven input u64s, two input u16s and two input u32s. Returns an output u32 '''ImageHandle'''.
 
Official software sends 0x100000000 in the first u64, 0 in all remaining u64s, [[#(S2)_AdrawFrameBufferInfo|Width]] and [[#(S2)_AdrawFrameBufferInfo|Height]] in the two u16s, [[#(S2)_AdrawFrameBufferInfo|BlockCount]] int the first u32 and the '''FrameBufferHandle''' from [[#GetAdrawFrameBufferHandle|GetAdrawFrameBufferHandle]] in the last u32.
 
== CreateNvDrv2UserSessionWithTransferMemory ==
Unofficial name.
 
Takes a TransferMemory handle, an input u64 '''TransferMemorySize''' and an input u8. Returns an [[NV_services#(S2)_INvDrv2User|INvDrv2User]].
 
== CreateNvDrv2UserSession ==
Unofficial name.
 
No input. Returns an [[NV_services#(S2)_INvDrv2User|INvDrv2User]].
 
== GetNvDrv2UserTransferMemoryUsage ==
Unofficial name.
 
No input. Returns three u64s '''TotalTransferMemorySize''', '''UsedTransferMemorySize''' and '''MaxTransferMemorySize'''.
 
== GpuManagerSession ==
Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.
 
{| class="wikitable" border="1"
|-
|-
| 0x8 || 4 || || Library applet version (API version)
! Cmd || Name
|-
| 11 || [[#GetEventIdRange]]
|-
| 12 || [[#CreateEvent]]
|-
| 21 || [[#RequestGpuSession]]
|-
| 22 || [[#GetGpuSession]]
|-
| 33 ||
|-
| 41 ||
|-
| 42 ||  
|-
|-
| 0xC || 4 || 0 || Theme color
| 102 ||  
|-
|-
| 0x10 || 1 || 0 || Play startup sound
| 200 ||  
|-
|-
| 0x18 || 8 || N/A || System tick (see [[SVC#svcGetSystemTick|svcGetSystemTick]])
| 201 ||  
|-
|-
| 202 ||
|}
|}


= AppletId =
=== GetEventIdRange ===
This is "nn::applet::AppletId". See also [[:Category:Library Applets]].
Unofficial name.
 
No input. Returns two u32s '''EventIdMin''' and '''EventIdMax'''.
 
=== CreateEvent ===
Unofficial name.
 
Takes an input u32 '''EventId'''. Returns an output Event handle.
 
=== RequestGpuSession ===
Unofficial name.
 
Takes an input u32 '''EventId'''. No output.
 
'''EventId''' must have been previously passed to [[#CreateEvent]] and the returned Event handle will be signalled when the session is ready.
 
=== GetGpuSession ===
Unofficial name.
 
No input. Returns a [[#GpuSession]].
 
Called after [[#RequestGpuSession]] and the Event handle has been signalled.
 
=== GpuSession ===
Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Value
! Cmd || Name
! ProgramId
! Description
|-
|-
| 0x00
| 101 || [[#CreateGpuMemory]]
|  
| None
|-
|-
| 0x01
| 102 || [[#DestroyGpuMemory]]
|  
| Application (not valid for use with LibraryApplets)
|-
|-
| 0x02
| 201 || [19.0.0-19.1.0] MapMemory
| 010000000000100C
| OverlayApplet (overlayDisp)
|-
|-
| 0x03
| 202 || [19.0.0-19.1.0] UnmapMemory
| 0100000000001000
| SystemAppletMenu (qlaunch)
|-
|-
| 0x04
| 203 || [19.0.0-19.1.0] AllocateAddressSpace
| 0100000000001012
| SystemApplication (starter)
|-
|-
| 0x0A
| 204 || [19.0.0-19.1.0] FreeAddressSpace
| 0100000000001001
| [[Auth_Applet|LibraryAppletAuth (auth)]]
|-
|-
| 0x0B
| 205 || [19.0.0-19.1.0] RemapMemory
| 0100000000001002
| [[Cabinet_Applet|LibraryAppletCabinet (cabinet)]]
|-
|-
| 0x0C
| 207 || [19.0.0-19.1.0] ModifyMemoryMapping
| 0100000000001003
| [[Controller_Applet|LibraryAppletController (controller)]]
|-
|-
| 0x0D
| 211 || [20.1.1+] MapMemoryV2
| 0100000000001004
| LibraryAppletDataErase (dataErase)
|-
|-
| 0x0E
| 212 || [20.1.1+] ModifyMemoryMappingV2
| 0100000000001005
| [[Error_Applet|LibraryAppletError (error)]]
|-
|-
| 0x0F
| 213 || [20.1.1+] UnmapMemoryV2
| 0100000000001006
| LibraryAppletNetConnect (netConnect)
|-
|-
| 0x10
| 214 || [20.1.1+] AllocateAddressSpaceV2
| 0100000000001007
| [[Profile_Selector|LibraryAppletPlayerSelect (playerSelect)]]
|-
|-
| 0x11
| 215 || [20.1.1+] FreeAddressSpaceV2
| 0100000000001008
| [[Software_Keyboard|LibraryAppletSwkbd (swkbd)]]
|-
|-
| 0x12
| 216 || [20.1.1+] RemapMemoryV2
| 0100000000001009
|}
| [[MiiEdit_Applet|LibraryAppletMiiEdit (miiEdit)]]
 
|-
==== CreateGpuMemory ====
| 0x13
Unofficial name.
| 010000000000100A
 
| [[Internet_Browser#010000000000100A|LibraryAppletWeb (web)]]
Takes two input u64s '''MemoryAddressStart''' and '''MemoryAddressEnd''' and two u8s. Returns an output u32 '''GpuMemoryHandle'''.
|-
 
| 0x14
The memory region between '''MemoryAddressStart''' and '''MemoryAddressEnd''' must have been passed to [[#SVC|SVC]] 0x80 with attribute 0x20.
| 010000000000100B
 
| [[Internet_Browser#ShopN|LibraryAppletShop (shop)]]
==== DestroyGpuMemory ====
Unofficial name.
 
Takes two input u32s '''GpuMemoryHandle''' and '''EventId'''. No output.
 
The Event handle associated with '''EventId''' will be signalled when the memory is released.
 
= Library Applets =
This section documents library applet launching.
 
Before starting the applet, [[#IStorage]]s are [[#ILibraryAppletCreator|created]] and written, then passed to [[#ILibraryAppletAccessor]] PushInData. The [[#IStorage]] session is closed afterwards. The first [[#IStorage]] is [[#CommonArguments]], followed by any applet-specific [[#IStorage]]s.
 
Once the applet finishes running successfully, [[#ILibraryAppletAccessor]] PopOutData can be used to get the applet-specific [[#IStorage]] containing the applet output data.
 
== CommonArguments ==
The first [[#CreateStorage|IStorage]] passed to applets should contain the common library applet arguments. This is populated by <code>nn::la::CommonArgumentsWriter</code> and has the following format.
 
This struct is 0x20-bytes.
 
Official sw handles the first 8-bytes separately, which is a header. With CommonArguments version 0x0, the header is 4-bytes, while starting with version 0x1 it's 8-bytes.
 
{| class="wikitable" border="1"
|-
|-
| 0x15
! Offset || Size || Typical Value || Notes
| 010000000000100D
| [[Album_Applet|LibraryAppletPhotoViewer (photoViewer)]]
|-
|-
| 0x16
| 0x0 || 4 || 1 || Common Arguments version
| 010000000000100E
| LibraryAppletSet (set)
|-
|-
| 0x17
| 0x4 || 4 || 0x20 || Common Arguments size
| 010000000000100F
| [[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]] (LibraryAppletOfflineWebApp_0 in Ounce)
|-
|-
| 0x18
| 0x8 || 4 || || Library applet version (API version)
| 0100000000001010
| [[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]]
|-
|-
| 0x19
| 0xC || 4 || 0 || Theme color
| 0100000000001011
| [[Internet_Browser#WifiWebAuthApplet|LibraryAppletWifiWebAuth (wifiWebAuth)]]
|-
|-
| 0x1A
| 0x10 || 1 || 0 || Play startup sound
| 0100000000001013
| [[MyPage_Applet|LibraryAppletMyPage (myPage)]]
|-
|-
| 0x1B
| 0x18 || 8 || N/A || System tick (see [[SVC#svcGetSystemTick|svcGetSystemTick]])
| 010000000000101A
| LibraryAppletGift (gift)
|-
|-
| 0x1C
|}
| 010000000000101C
 
| LibraryAppletUserMigration (userMigration)
= AppletId =
This is "nn::applet::AppletId". See also [[:Category:Library Applets]].
 
{| class="wikitable" border="1"
|-
|-
| 0x1D
! Value
| 010000000000101D
! ProgramId
| [9.0.0+] LibraryAppletPreomiaSys (EncounterSys)
! Description
|-
|-
| 0x1E
| 0x00000000
| 0100000000001020
|  
| [9.0.0+] LibraryAppletStory (story)
| None
|-
|-
| 0x1F
| 0x00000001
| 010070000E3C0000
|  
| [9.0.0+] LibraryAppletPreomiaUsr (EncounterUsr)
| Application (not valid for use with LibraryApplets)
|-
|-
| 0x20
| 0x00000002
| 010086000E49C000
| 0x010000000000100C
| [9.0.0+] LibraryAppletPreomiaUsrDummy (EncounterUsrDummy)
| OverlayApplet (overlayDisp)
|-
|-
| 0x21
| 0x00000003
| 0100000000001038
| 0x0100000000001000
| [10.0.0+] LibraryAppletSample (sample)
| SystemAppletMenu (qlaunch)
|-
|-
| 0x22
| 0x00000004
| 0100000000001007
| 0x0100000000001012
| [13.0.0+] LibraryAppletPromoteQualification (playerSelect)
| SystemApplication (starter)
|-
|-
| 0x32
| 0x0000000A
| 010000000000100F
| 0x0100000000001001
| [17.0.0+] LibraryAppletOfflineWebApp_3 ([[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]] in NX)
| [[Auth_Applet|LibraryAppletAuth (auth)]]
|-
|-
| 0x33
| 0x0000000B
| 010000000000100F
| 0x0100000000001002
| [17.0.0+] LibraryAppletOfflineWebSystem ([[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]] in NX)
| [[Cabinet_Applet|LibraryAppletCabinet (cabinet)]]
|-
|-
| 0x35
| 0x0000000C
| [17.0.0+] 0100000000001010 ([16.0.0-16.1.0] 0100000000001042)
| 0x0100000000001003
| [17.0.0+] LibraryAppletLhub ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
| [[Controller_Applet|LibraryAppletController (controller)]]
|-
|-
| 0x36
| 0x0000000D
| [17.0.0+] 0100000000001010 ([16.0.0-16.1.0] 0100000000001042)
| 0x0100000000001004
| [17.0.0+] LibraryAppletLogin ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
| LibraryAppletDataErase (dataErase)
|-
|-
| 0x37
| 0x0000000E
| [17.0.0+] 0100000000001010 ([16.0.0-16.1.0] 0100000000001042)
| 0x0100000000001005
| [17.0.0+] LibraryAppletShare ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
| [[Error_Applet|LibraryAppletError (error)]]
|-
|-
| 0x38
| 0x0000000F
| 0100000000001043
| 0x0100000000001006
| [16.0.0-16.1.0]
| LibraryAppletNetConnect (netConnect)
|-
|-
| 0x50
| 0x00000010
| 0100000000001007
| 0x0100000000001007
| [18.0.0+]
| [[Profile_Selector|LibraryAppletPlayerSelect (playerSelect)]]
|-
|-
| 0x51
| 0x00000011
| 0100000000001007
| 0x0100000000001008
| [18.0.0+]
| [[Software_Keyboard|LibraryAppletSwkbd (swkbd)]]
|-
|-
| 0x64
| 0x00000012
| 0100000000001048
| 0x0100000000001009
| [20.0.0+] [[Splay_Applet|splay]]
| [[MiiEdit_Applet|LibraryAppletMiiEdit (miiEdit)]]
|-
|-
| 0x3E8
| 0x00000013
|  
| 0x010000000000100A
| [10.0.0-16.1.0] DevlopmentTool
| [[Internet_Browser#010000000000100A|LibraryAppletWeb (web)]]
|-
|-
| 0x3F1
| 0x00000014
| 010000000000D619
| 0x010000000000100B
| [10.0.0-16.1.0] CombinationLA
| [[Internet_Browser#ShopN|LibraryAppletShop (shop)]]
|-
|-
| 0x3F2
| 0x00000015
| 010000000000D610
| 0x010000000000100D
| [10.0.0-16.1.0] AeSystemApplet
| [[Album_Applet|LibraryAppletPhotoViewer (photoViewer)]]
|-
|-
| 0x3F3
| 0x00000016
| 010000000000D611
| 0x010000000000100E
| [10.0.0-16.1.0] AeOverlayApplet
| LibraryAppletSet (set)
|-
|-
| 0x3F4
| 0x00000017
| 010000000000D612
| 0x010000000000100F
| [10.0.0-16.1.0] AeStarter
| [[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]] (LibraryAppletOfflineWebApp_0 in Ounce)
|-
|-
| 0x3F5
| 0x00000018
| 010000000000D613
| 0x0100000000001010
| [10.0.0-16.1.0] AeLibraryAppletAlone
| [[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]]
|-
|-
| 0x3F6
| 0x00000019
| 010000000000D614
| 0x0100000000001011
| [10.0.0-16.1.0] AeLibraryApplet1
| [[Internet_Browser#WifiWebAuthApplet|LibraryAppletWifiWebAuth (wifiWebAuth)]]
|-
|-
| 0x3F7
| 0x0000001A
| 010000000000D615
| 0x0100000000001013
| [10.0.0-16.1.0] AeLibraryApplet2
| [[MyPage_Applet|LibraryAppletMyPage (myPage)]]
|-
|-
| 0x3F8
| 0x0000001B
| 010000000000D616
| 0x010000000000101A
| [10.0.0-16.1.0] AeLibraryApplet3
| LibraryAppletGift (gift)
|-
|-
| 0x3F9
| 0x0000001C
| 010000000000D617
| 0x010000000000101C
| [10.0.0-16.1.0] AeLibraryApplet4
| LibraryAppletUserMigration (userMigration)
|-
|-
| 0x3FA
| 0x0000001D
| 010000000000D60A
| 0x010000000000101D
| [10.0.0-16.1.0] AppletISA
| [9.0.0+] LibraryAppletPreomiaSys (EncounterSys)
|-
|-
| 0x3FB
| 0x0000001E
| 010000000000D60B
| 0x0100000000001020
| [10.0.0-16.1.0] AppletIOA
| [9.0.0+] LibraryAppletStory (story)
|-
|-
| 0x3FC
| 0x0000001F
| 010000000000D60C
| 0x010070000E3C0000
| [10.0.0-16.1.0] AppletISTA
| [9.0.0+] LibraryAppletPreomiaUsr (EncounterUsr)
|-
|-
| 0x3FD
| 0x00000020
| 010000000000D60D
| 0x010086000E49C000
| [10.0.0-16.1.0] AppletILA1
| [9.0.0+] LibraryAppletPreomiaUsrDummy (EncounterUsrDummy)
|-
|-
| 0x3FE
| 0x00000021
| 010000000000D60E
| 0x0100000000001038
| [10.0.0-16.1.0] AppletILA2
| [10.0.0+] LibraryAppletSample (sample)
|-
|-
| 0x700000C8
| 0x00000022
| 010000000000D65B
| 0x0100000000001007
| [18.0.0+]  
| [13.0.0+] LibraryAppletPromoteQualification (playerSelect)
|-
|-
| 0x700000C9
| 0x00000032
| 010000000000D65C
| 0x010000000000100F
| [18.0.0+]  
| [17.0.0+] LibraryAppletOfflineWebApp_3 ([[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]] in NX)
|-
|-
| 0x700000DC
| 0x00000033
| 010000000000D619
| 0x010000000000100F
| [17.0.0+] CombinationLA
| [17.0.0+] LibraryAppletOfflineWebSystem ([[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]] in NX)
|-
|-
| 0x700000E6
| 0x00000035
| 010000000000D610
| [17.0.0+] 0x0100000000001010 ([16.0.0-16.1.0] 0x0100000000001042)
| [17.0.0+] AeSystemApplet
| [17.0.0+] LibraryAppletLhub ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
|-
|-
| 0x700000E7
| 0x00000036
| 010000000000D611
| [17.0.0+] 0x0100000000001010 ([16.0.0-16.1.0] 0x0100000000001042)
| [17.0.0+] AeOverlayApplet
| [17.0.0+] LibraryAppletLogin ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
|-
|-
| 0x700000E8
| 0x00000037
| 010000000000D612
| [17.0.0+] 0x0100000000001010 ([16.0.0-16.1.0] 0x0100000000001042)
| [17.0.0+] AeStarter
| [17.0.0+] LibraryAppletShare ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
|-
|-
| 0x700000E9
| 0x00000038
| 010000000000D613
| 0x0100000000001043
| [17.0.0+] AeLibraryAppletAlone
| [16.0.0-16.1.0]
|-
|-
| 0x700000EA
| 0x00000050
| 010000000000D614
| 0x0100000000001007
| [17.0.0+] AeLibraryApplet1
| [18.0.0+]
|-
|-
| 0x700000EB
| 0x00000051
| 010000000000D615
| 0x0100000000001007
| [17.0.0+] AeLibraryApplet2
| [18.0.0+]
|-
|-
| 0x700000EC
| 0x00000064
| 010000000000D616
| 0x0100000000001048
| [17.0.0+] AeLibraryApplet3
| [20.0.0+] [[Splay_Applet|splay]]
|-
|-
| 0x700000ED
| 0x000003E8
| 010000000000D617
|  
| [17.0.0+] AeLibraryApplet4
| [10.0.0-16.1.0] DevlopmentTool
|-
|-
| 0x700000F0
| 0x000003F1
| 010000000000D60A
| 0x010000000000D619
| [17.0.0+] AppletISA
| [10.0.0-16.1.0] CombinationLA
|-
|-
| 0x700000F1
| 0x000003F2
| 010000000000D60B
| 0x010000000000D610
| [17.0.0+] AppletIOA
| [10.0.0-16.1.0] AeSystemApplet
|-
|-
| 0x700000F2
| 0x000003F3
| 010000000000D60C
| 0x010000000000D611
| [17.0.0+] AppletISTA
| [10.0.0-16.1.0] AeOverlayApplet
|-
|-
| 0x700000F3
| 0x000003F4
| 010000000000D60D
| 0x010000000000D612
| [17.0.0+] AppletILA1
| [10.0.0-16.1.0] AeStarter
|-
|-
| 0x700000F4
| 0x000003F5
| 010000000000D60E
| 0x010000000000D613
| [17.0.0+] AppletILA2
| [10.0.0-16.1.0] AeLibraryAppletAlone
|-
|-
| 0x700000FA
| 0x000003F6
| 010000000000D677
| 0x010000000000D614
| [20.1.0+]  
| [10.0.0-16.1.0] AeLibraryApplet1
|}
 
= LibraryAppletMode =
This is "nn::applet::LibraryAppletMode".
 
{| class="wikitable" border="1"
|-
|-
! Value
| 0x000003F7
! Description
| 0x010000000000D615
| [10.0.0-16.1.0] AeLibraryApplet2
|-
|-
| 0x0
| 0x000003F8
| AllForeground
| 0x010000000000D616
| [10.0.0-16.1.0] AeLibraryApplet3
|-
|-
| 0x1
| 0x000003F9
| PartialForeground
| 0x010000000000D617
| [10.0.0-16.1.0] AeLibraryApplet4
|-
|-
| 0x2
| 0x000003FA
| NoUi
| 0x010000000000D60A
| [10.0.0-16.1.0] AppletISA
|-
|-
| 0x3
| 0x000003FB
| PartialForegroundWithIndirectDisplay (see also [[#GetIndirectLayerConsumerHandle]], only used by swkbd [[Software_Keyboard|InlineKeyboard]])
| 0x010000000000D60B
| [10.0.0-16.1.0] AppletIOA
|-
|-
| 0x4
| 0x000003FC
| AllForegroundInitiallyHidden (can be used by [7.0.0+] [[Internet_Browser|WebSession]])
| 0x010000000000D60C
|}
| [10.0.0-16.1.0] AppletISTA
 
= AppletMessage =
This is "nn::am::AppletMessage".
 
{| class="wikitable" border="1"
|-
|-
! Value
| 0x000003FD
! Description
| 0x010000000000D60D
| [10.0.0-16.1.0] AppletILA1
|-
|-
| 0 || None
| 0x000003FE
| 0x010000000000D60E
| [10.0.0-16.1.0] AppletILA2
|-
|-
| 1 || ChangeIntoForeground
| 0x0100000E
|  
| [S2] LibraryAppletError
|-
|-
| 2 || ChangeIntoBackground
| 0x01000010
|  
| [S2] LibraryAppletPlayerSelect
|-
|-
| 4 || Exit
| 0x01010011
|  
| [S2] SwkbdModeless
|-
|-
| 6 || ApplicationExited
| 0x01020011
|  
| [S2] Swkbd
|-
|-
| 7 ||  
| 0x01000013
|  
| [S2] OpenWeb
|-
|-
| 15 || [[#FocusState|FocusStateChanged]]
| 0x01000014
|  
| [S2] LibraryAppletShop
|-
|-
| 16 || [[#SetRestartMessageEnabled|Resume]]
| 0x01000022
|  
| [S2] LibraryAppletPromoteQualification
|-
|-
| 20 || DetectShortPressingHomeButton
| 0x01010025
|  
| [S2] SaveDataBackup
|-
|-
| 21 || DetectLongPressingHomeButton
| 0x01020025
|  
| [S2] SaveDataBackup
|-
|-
| 22 || DetectShortPressingPowerButton
| 0x01000032
|  
| [S2] LibraryAppletOfflineWebApp_3
|-
|-
| 23 || DetectMiddlePressingPowerButton
| 0x01000033
|  
| [S2] LibraryAppletOfflineWebSystem
|-
|-
| 24 || DetectLongPressingPowerButton
| 0x01000035
|  
| [S2] LibraryAppletLhub
|-
|-
| 25 || RequestToPrepareSleep
| 0x01000036
|  
| [S2] LibraryAppletLogin
|-
|-
| 26 || FinishedSleepSequence
| 0x01000037
|  
| [S2] LibraryAppletShare
|-
|-
| 27 || SleepRequiredByHighTemperature
| 0x01000050
|  
| [S2] PlayerSelect
|-
|-
| 28 || SleepRequiredByLowBattery
| 0x01000051
|  
| [S2] PlayerSelect
|-
|-
| 29 || AutoPowerDown
| 0x01000052
|  
| [S2] PlayerSelect
|-
|-
| 30 || [[#OperationMode|OperationModeChanged]]
| 0x700000C8
| 0x010000000000D65B
| [18.0.0+]  
|-
|-
| 31 || [[#PerformanceMode|PerformanceModeChanged]]
| 0x700000C9
| 0x010000000000D65C
| [18.0.0+]  
|-
|-
| 32 || DetectReceivingCecSystemStandby
| 0x700000DC
| 0x010000000000D619
| [17.0.0+] CombinationLA
|-
|-
| 33 || SdCardRemoved
| 0x700000E6
| 0x010000000000D610
| [17.0.0+] AeSystemApplet
|-
|-
| 34 ||  
| 0x700000E7
| 0x010000000000D611
| [17.0.0+] AeOverlayApplet
|-
|-
| 50 || LaunchApplicationRequested
| 0x700000E8
| 0x010000000000D612
| [17.0.0+] AeStarter
|-
|-
| 51 || [[#SetHandlesRequestToDisplay|RequestToDisplay]]
| 0x700000E9
| 0x010000000000D613
| [17.0.0+] AeLibraryAppletAlone
|-
|-
| 55 || ShowApplicationLogo
| 0x700000EA
| 0x010000000000D614
| [17.0.0+] AeLibraryApplet1
|-
|-
| 56 || HideApplicationLogo
| 0x700000EB
| 0x010000000000D615
| [17.0.0+] AeLibraryApplet2
|-
|-
| 57 || ForceHideApplicationLogo
| 0x700000EC
| 0x010000000000D616
| [17.0.0+] AeLibraryApplet3
|-
|-
| 58 ||  
| 0x700000ED
| 0x010000000000D617
| [17.0.0+] AeLibraryApplet4
|-
|-
| 59 ||  
| 0x700000F0
| 0x010000000000D60A
| [17.0.0+] AppletISA
|-
|-
| 60 || FloatingApplicationDetected
| 0x700000F1
| 0x010000000000D60B
| [17.0.0+] AppletIOA
|-
|-
| 61 || [7.0.0+] PerformanceConfigurationChanged
| 0x700000F2
| 0x010000000000D60C
| [17.0.0+] AppletISTA
|-
|-
| 70 ||  
| 0x700000F3
| 0x010000000000D60D
| [17.0.0+] AppletILA1
|-
|-
| 71 ||  
| 0x700000F4
| 0x010000000000D60E
| [17.0.0+] AppletILA2
|-
|-
| 72 ||  
| 0x700000FA
| 0x010000000000D677
| [20.1.0+]
|}
 
= LibraryAppletMode =
This is "nn::applet::LibraryAppletMode".
 
{| class="wikitable" border="1"
|-
|-
| 73 ||
! Value
! Description
|-
|-
| 75 ||  
| 0x0
| AllForeground
|-
|-
| 80 ||  
| 0x1
| PartialForeground
|-
|-
| 81 ||  
| 0x2
| NoUi
|-
|-
| 82 ||  
| 0x3
| PartialForegroundWithIndirectDisplay (see also [[#GetIndirectLayerConsumerHandle]], only used by swkbd [[Software_Keyboard|InlineKeyboard]])
|-
|-
| 83 ||  
| 0x4
| AllForegroundInitiallyHidden (can be used by [7.0.0+] [[Internet_Browser|WebSession]])
|}
 
= AppletMessage =
This is "nn::am::AppletMessage".
 
{| class="wikitable" border="1"
|-
|-
| 85 ||
! Value
! Description
|-
|-
| 86 ||  
| 0 || None
|-
|-
| 90 || [[#SetRequiresCaptureButtonShortPressedMessage|DetectShortPressingCaptureButton]]
| 1 || ChangeIntoForeground
|-
|-
| 92 || [[#SetAlbumImageTakenNotificationEnabled|AlbumScreenShotTaken]]
| 2 || ChangeIntoBackground
|-
|-
| 93 || AlbumRecordingSaved
| 4 || Exit
|-
|-
| 94 ||  
| 6 || ApplicationExited
|-
|-
| 100 ||  
| 7 ||  
|-
|-
| 101 ||  
| 15 || [[#FocusState|FocusStateChanged]]
|-
|-
| 110 || [14.0.0+] DetectShortPressingCaptureButtonForApplet
| 16 || [[#SetRestartMessageEnabled|Resume]]
|-
|-
| 111 || [14.0.0+] DetectLongPressingCaptureButtonForApplet
| 20 || DetectShortPressingHomeButton
|-
|-
| 1000 ||  
| 21 || DetectLongPressingHomeButton
|}
 
= OperationMode =
This is "nn::oe::OperationMode".
 
{| class="wikitable" border="1"
|-
|-
! Value
| 22 || DetectShortPressingPowerButton
! Description
|-
|-
| 0 || Handheld
| 23 || DetectMiddlePressingPowerButton
|-
|-
| 1 || Console
| 24 || DetectLongPressingPowerButton
|}
 
= PerformanceMode =
This is "nn::oe::PerformanceMode".
 
{| class="wikitable" border="1"
|-
|-
! Value
| 25 || RequestToPrepareSleep
! Description
|-
|-
| -1 || Invalid
| 26 || FinishedSleepSequence
|-
|-
| 0 || Normal
| 27 || SleepRequiredByHighTemperature
|-
|-
| 1 || Boost
| 28 || SleepRequiredByLowBattery
|}
 
= FocusState =
This is "nn::oe::FocusState".
 
{| class="wikitable" border="1"
|-
|-
! Value
| 29 || AutoPowerDown
! Description
|-
|-
| 1 || InFocus
| 30 || [[#OperationMode|OperationModeChanged]]
|-
|-
| 2 || OutOfFocus
| 31 || [[#PerformanceMode|PerformanceModeChanged]]
|-
|-
| 3 || Background
| 32 || DetectReceivingCecSystemStandby
|}
 
= CpuBoostMode =
This is "nn::oe::CpuBoostMode".
 
{| class="wikitable" border="1"
|-
|-
! Value
| 33 || SdCardRemoved
! Description
|-
|-
| 0 || Normal
| 34 ||  
|-
|-
| 1 || FastLoad
| 50 || LaunchApplicationRequested
|}
|-
 
| 51 || [[#SetHandlesRequestToDisplay|RequestToDisplay]]
= WindowOriginMode =
This is "nn::oe::WindowOriginMode".
 
{| class="wikitable" border="1"
|-
|-
! Value
| 55 || ShowApplicationLogo
! Description
|-
|-
| 0 || LowerLeft
| 56 || HideApplicationLogo
|-
|-
| 1 || UpperLeft
| 57 || ForceHideApplicationLogo
|}
 
= WirelessPriorityMode =
This is "nn::oe::WirelessPriorityMode".
 
{| class="wikitable" border="1"
|-
|-
! Value
| 58 ||
! Description
|-
|-
| 0 || Default
| 59 ||  
|-
|-
| 1 || OptimizedForWlan
| 60 || FloatingApplicationDetected
|}
 
= TvPowerStateMatchingMode =
This is "nn::oe::TvPowerStateMatchingMode". This is used with [[#SetTvPowerStateMatchingMode]].
 
{| class="wikitable" border="1"
|-
|-
! Value
| 61 || [7.0.0+] PerformanceConfigurationChanged
! Description
|-
|-
| 0 || Unknown
| 70 ||  
|-
|-
| 1 || Unknown
| 71 ||  
|}
 
= SystemButtonType =
This is "nn::am::service::SystemButtonType". This is used with [[#PerformSystemButtonPressingIfInFocus]]/[[#PerformSystemButtonPressing]].
 
{| class="wikitable" border="1"
|-
|-
! Value
| 72 ||
! Description
|-
|-
| 1 || PerformHomeButtonShortPressing
| 73 ||  
|-
|-
| 2 || PerformHomeButtonLongPressing
| 75 ||  
|-
|-
| 3 || Short-pressing with the Power-button. Only available with [[#PerformSystemButtonPressing]].
| 80 ||  
|-
|-
| 4 || Long-pressing with the Power-button. Only available with [[#PerformSystemButtonPressing]].
| 81 ||  
|-
|-
| 5 || Shutdown the system. Only available with [[#PerformSystemButtonPressing]].
| 82 ||  
|-
|-
| 6 || PerformCaptureButtonShortPressing
| 83 ||  
|-
|-
| 7 || PerformCaptureButtonLongPressing
| 85 ||  
|}
 
= LaunchParameterKind =
{| class="wikitable" border="1"
|-
|-
! Value
| 86 ||
! Description
|-
|-
| 1 || UserChannel. Application-specific LaunchParameter.
| 90 || [[#SetRequiresCaptureButtonShortPressedMessage|DetectShortPressingCaptureButton]]
|-
|-
| 2 || account PreselectedUser
| 92 || [[#SetAlbumImageTakenNotificationEnabled|AlbumScreenShotTaken]]
|-
|-
| 3 || Unknown if used by anything?
| 93 || AlbumRecordingSaved
|}
 
= LibraryAppletExitReason =
{| class="wikitable" border="1"
|-
|-
! Value
| 94 ||
! Description
|-
|-
| 0 || Normal
| 100 ||  
|-
|-
| 1 || Canceled
| 101 ||  
|-
| 110 || [14.0.0+] DetectShortPressingCaptureButtonForApplet
|-
|-
| 2 || Abnormal
| 111 || [14.0.0+] DetectLongPressingCaptureButtonForApplet
|-
|-
| 10 || Unexpected
| 1000 ||  
|}
|}


= ProgramSpecifyKind =
= OperationMode =
This is "nn::am::service::ProgramSpecifyKind". This controls the type of the u64 passed to [[#ExecuteProgram]].
This is "nn::oe::OperationMode".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 4,371: Line 4,496:
! Description
! Description
|-
|-
| 0 || u8 ProgramIndex. "ExecuteProgram". [[NS_Services|NS]] handles ProgramIndex by launching ApplicationId+ProgramIndex. After using [[#ExecuteProgram]] with this successfully, official user-processes will enter an infinite loop with sleep-thread value 86400000000000.
| 0 || Handheld
|-
|-
| 1 || [[NCM_services#ApplicationId|ApplicationId]]. "JumpToSubApplicationProgramForDevelopment". Only available when [[Settings_services#GetDebugModeFlag|DebugMode]] is 1.
| 1 || Console
|-
| 2 || u64 = value 0. "RestartProgram"
|}
|}


ProgramIndex values where the title is not installed should not be used: [[qlaunch]] will display an error message and the current title will become "corrupted", however Home Menu will have an option to repair it.
= PerformanceMode =
 
This is "nn::oe::PerformanceMode".
= InputDetectionPolicy =
This is u32 enum "nn::applet::InputDetectionPolicy".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 4,388: Line 4,509:
! Description
! Description
|-
|-
| 0 || Unknown
| -1 || Invalid
|-
| 0 || Normal
|-
|-
| 1 || Unknown
| 1 || Boost
|}
|}


= AppletResourceUserId =
= FocusState =
This is "nn::applet::AppletResourceUserId". Used by a number of non-AM services.
This is "nn::oe::FocusState".
 
= AppletAttribute =
This is "nn::am::AppletAttribute". This struct is 0x80 bytes.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
! Value
! Description
|-
|-
| 0x0 || 0x1 || Flag. When non-zero, two state fields are set to 1.
| 1 || InFocus
|-
|-
| 0x1 || 0x7F || Unused
| 2 || OutOfFocus
|-
| 3 || Background
|}
|}


This is used by [[#OpenLibraryAppletProxy]].
= CpuBoostMode =
This is "nn::oe::CpuBoostMode".
 
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 0 || Normal
|-
| 1 || FastLoad
|}


= AppletProcessLaunchReason =
= WindowOriginMode =
This is "nn::am::service::AppletProcessLaunchReason". This struct is 0x4-bytes.
This is "nn::oe::WindowOriginMode".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
! Value
! Description
|-
|-
| 0x0 || 0x1 || Flag. When non-zero, LibraryApplets then use [[#OpenCallingLibraryApplet]].
| 0 || LowerLeft
|-
|-
| 0x1 || 0x2 || Always 0.
| 1 || UpperLeft
|-
| 0x3 || 0x1 || Always 0.
|}
|}


= LibraryAppletInfo =
= WirelessPriorityMode =
This is "nn::am::service::LibraryAppletInfo". This struct is 0x8-bytes.
This is "nn::oe::WirelessPriorityMode".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
! Value
! Description
|-
|-
| 0x0 || 0x4 || [[#AppletId]]
| 0 || Default
|-
|-
| 0x4 || 0x4 || [[#LibraryAppletMode]]
| 1 || OptimizedForWlan
|}
 
= TvPowerStateMatchingMode =
This is "nn::oe::TvPowerStateMatchingMode". This is used with [[#SetTvPowerStateMatchingMode]].
 
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 0 || Unknown
|-
| 1 || Unknown
|}
 
= SystemButtonType =
This is "nn::am::service::SystemButtonType". This is used with [[#PerformSystemButtonPressingIfInFocus]]/[[#PerformSystemButtonPressing]].
 
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 1 || PerformHomeButtonShortPressing
|-
| 2 || PerformHomeButtonLongPressing
|-
| 3 || Short-pressing with the Power-button. Only available with [[#PerformSystemButtonPressing]].
|-
| 4 || Long-pressing with the Power-button. Only available with [[#PerformSystemButtonPressing]].
|-
| 5 || Shutdown the system. Only available with [[#PerformSystemButtonPressing]].
|-
| 6 || PerformCaptureButtonShortPressing
|-
| 7 || PerformCaptureButtonLongPressing
|}
 
= LaunchParameterKind =
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 1 || UserChannel. Application-specific LaunchParameter.
|-
| 2 || account PreselectedUser
|-
| 3 || Unknown if used by anything?
|}
 
= LibraryAppletExitReason =
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 0 || Normal
|-
| 1 || Canceled
|-
| 2 || Abnormal
|-
| 10 || Unexpected
|}
 
= ProgramSpecifyKind =
This is "nn::am::service::ProgramSpecifyKind". This controls the type of the u64 passed to [[#ExecuteProgram]].
 
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 0 || u8 ProgramIndex. "ExecuteProgram". [[NS_Services|NS]] handles ProgramIndex by launching ApplicationId+ProgramIndex. After using [[#ExecuteProgram]] with this successfully, official user-processes will enter an infinite loop with sleep-thread value 86400000000000.
|-
| 1 || [[NCM_services#ApplicationId|ApplicationId]]. "JumpToSubApplicationProgramForDevelopment". Only available when [[Settings_services#GetDebugModeFlag|DebugMode]] is 1.
|-
| 2 || u64 = value 0. "RestartProgram"
|}
 
ProgramIndex values where the title is not installed should not be used: [[qlaunch]] will display an error message and the current title will become "corrupted", however Home Menu will have an option to repair it.
 
= InputDetectionPolicy =
This is u32 enum "nn::applet::InputDetectionPolicy".
 
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 0 || Unknown
|-
| 1 || Unknown
|}
 
= AppletResourceUserId =
This is "nn::applet::AppletResourceUserId". Used by a number of non-AM services.
 
= AppletAttribute =
This is "nn::am::AppletAttribute". This struct is 0x80 bytes.
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x1 || Flag. When non-zero, two state fields are set to 1.
|-
| 0x1 || 0x7F || Unused
|}
 
This is used by [[#OpenLibraryAppletProxy]].
 
= AppletProcessLaunchReason =
This is "nn::am::service::AppletProcessLaunchReason". This struct is 0x4-bytes.
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x1 || Flag. When non-zero, LibraryApplets then use [[#OpenCallingLibraryApplet]].
|-
| 0x1 || 0x2 || Always 0.
|-
| 0x3 || 0x1 || Always 0.
|}
 
= LibraryAppletInfo =
This is "nn::am::service::LibraryAppletInfo". This struct is 0x8-bytes.
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x4 || [[#AppletId]]
|-
| 0x4 || 0x4 || [[#LibraryAppletMode]]
|}
|}


= AppletKind =
= AppletKind =
This is "nn::am::service::AppletKind". This is 8-bytes.
This is "nn::am::service::AppletKind". This is 8-bytes.
 
 
= AppletIdentityInfo =
= AppletIdentityInfo =
This struct is "nn::am::service::AppletIdentityInfo". This struct is 0x10-bytes.
This struct is "nn::am::service::AppletIdentityInfo". This struct is 0x10-bytes.
 
 
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
! Offset || Size || Description
|-
|-
| 0x0 || 0x4 || [[#AppletId]]
| 0x0 || 0x4 || [[#AppletId]]
|-
|-
| 0x4 || 0x4 || Padding
| 0x4 || 0x4 || Padding
|-
|-
| 0x8 || 0x8 || [[NCM_services#ApplicationId|ApplicationId]]
| 0x8 || 0x8 || [[NCM_services#ApplicationId|ApplicationId]]
|}
 
= ApplicationAttributeForQuest =
This struct is "nn::applet::ApplicationAttributeForQuest".
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x4 || See [[#ApplicationAttribute]].
|-
| 0x4 || 0x4 || See [[#ApplicationAttribute]].
|-
| 0x8 || 0x4 || [7.0.0+] See [[#ApplicationAttribute]].
|}
 
User-processes copy the first 0x8-bytes (0xC-bytes with [[#CreateApplicationWithAttributeAndPushAndRequestToStartForQuest]]/[[#CreateApplicationWithAttributeAndRequestToStartForQuest]]) to a [[#ApplicationAttribute]] with the rest of the struct being cleared, which is then passed to the actual cmd (CreateApplication*ToStartForQuest).
 
= ApplicationAttribute =
This struct is "nn::am::ApplicationAttribute". This struct is 0x20-bytes.
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x4 || Default is 0 for non-Quest. Only used when non-zero: unknown value in seconds.
|-
| 0x4 || 0x4 || Default is 0 for non-Quest. Only used when non-zero: unknown value in seconds.
|-
| 0x8 || 0x4 || float audio volume. Must be in the range of 0.0f-1.0f. The default is 1.0f.
|-
| 0xC || 0x14 || Unused. Default is 0.
|}
 
Internally AM only uses the first 0xC-bytes from ApplicationAttribute, regardless of the cmd.
 
= ApplicationLaunchProperty =
This struct is 0x10-bytes.
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x8 || [[NCM_services#ApplicationId|ApplicationId]]
|-
| 0x8 || 0x4 || Application title-version.
|-
| 0xC || 0x1 || [[Filesystem_services#StorageId|StorageId]] for the Application base title.
|-
| 0xD || 0x1 || [[Filesystem_services#StorageId|StorageId]] for the Application update title.
|-
| 0xE || 0x1 || Unknown.
|-
| 0xF || 0x1 || Padding.
|}
 
= ApplicationLaunchRequestInfo =
This is "nn::applet::ApplicationLaunchRequestInfo". This struct is 0x10-bytes.
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x4 || Unknown. The default is 0x0 with [[#CreateSystemApplication]], 0x3 with [[#CreateApplication]].
|-
| 0x4 || 0x4 || Unknown. The default is 0x0 with [[#CreateSystemApplication]], 0x3 with [[#CreateApplication]].
|-
| 0x8 || 0x8 || Unknown. The default is 0x0.
|}
 
= AppletResourceUsageInfo =
This is "nn::am::service::AppletResourceUsageInfo". This struct is 0x20-bytes.
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x4 || Unknown counter.
|-
| 0x4 || 0x4 || Unknown counter.
|-
| 0x8 || 0x4 || Output from [[NS_Services|NS GetRightsEnvironmentCountForDebug]].
|-
| 0xC || 0x14 || Always zero.
|}
 
= ApplicationLicenseType =
This is "nn::oe::ApplicationLicenseType". This is 1-byte.
 
= LaunchRequiredVersion =
This is "nn::oe::LaunchRequiredVersion". This is a 0x40-byte struct with 1-byte alignment.
 
= ServerEnvironmentType =
This is "nn::oe::ServerEnvironmentType".
 
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 0 || dd
|-
| 1 || lp
|-
| 2 || sd
|-
| 3 || sp
|-
| 4 || dp
|}
|}


= ApplicationAttributeForQuest =
= (S2) AdrawFrameBufferInfo =
This struct is "nn::applet::ApplicationAttributeForQuest".
 
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
! Offset || Size || Description
|-
|-
| 0x0 || 0x4 || See [[#ApplicationAttribute]].
| 0x0 || 0x8 || Id
|-
|-
| 0x4 || 0x4 || See [[#ApplicationAttribute]].
| 0x8 || 0x2 || Width
|-
|-
| 0x8 || 0x4 || [7.0.0+] See [[#ApplicationAttribute]].
| 0xA || 0x2 || Height
|}
 
User-processes copy the first 0x8-bytes (0xC-bytes with [[#CreateApplicationWithAttributeAndPushAndRequestToStartForQuest]]/[[#CreateApplicationWithAttributeAndRequestToStartForQuest]]) to a [[#ApplicationAttribute]] with the rest of the struct being cleared, which is then passed to the actual cmd (CreateApplication*ToStartForQuest).
 
= ApplicationAttribute =
This struct is "nn::am::ApplicationAttribute". This struct is 0x20-bytes.
 
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
| 0xC || 0x4 || BlockCount
|-
|-
| 0x0 || 0x4 || Default is 0 for non-Quest. Only used when non-zero: unknown value in seconds.
| 0x10 || 0x8 ||  
|-
|-
| 0x4 || 0x4 || Default is 0 for non-Quest. Only used when non-zero: unknown value in seconds.
| 0x18 || 0x8 ||  
|-
|-
| 0x8 || 0x4 || float audio volume. Must be in the range of 0.0f-1.0f. The default is 1.0f.
| 0x20 || 0x8 ||  
|-
| 0xC || 0x14 || Unused. Default is 0.
|}
|}


Internally AM only uses the first 0xC-bytes from ApplicationAttribute, regardless of the cmd.
= (S2) ImageInfo =
 
= ApplicationLaunchProperty =
This struct is 0x10-bytes.
 
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
! Offset || Size || Description
|-
|-
| 0x0 || 0x8 || [[NCM_services#ApplicationId|ApplicationId]]
| 0x0 || 0x8 ||  
|-
|-
| 0x8 || 0x4 || Application title-version.
| 0x8 || 0x8 || Address
|-
| 0xC || 0x1 || [[Filesystem_services#StorageId|StorageId]] for the Application base title.
|-
|-
| 0xD || 0x1 || [[Filesystem_services#StorageId|StorageId]] for the Application update title.
| 0x10 || 0x8 ||  
|-
|-
| 0xE || 0x1 || Unknown.
| 0x18 || 0x8 ||  
|-
|-
| 0xF || 0x1 || Padding.
| 0x20 || 0x8 ||  
|}
 
= ApplicationLaunchRequestInfo =
This is "nn::applet::ApplicationLaunchRequestInfo". This struct is 0x10-bytes.
 
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
| 0x28 || 0x8 ||  
|-
|-
| 0x0 || 0x4 || Unknown. The default is 0x0 with [[#CreateSystemApplication]], 0x3 with [[#CreateApplication]].
| 0x30 || 0x8 ||  
|-
|-
| 0x4 || 0x4 || Unknown. The default is 0x0 with [[#CreateSystemApplication]], 0x3 with [[#CreateApplication]].
| 0x38 || 0x4 || Offset
|-
|-
| 0x8 || 0x8 || Unknown. The default is 0x0.
| 0x3C || 0x4 || Size
|}
 
= AppletResourceUsageInfo =
This is "nn::am::service::AppletResourceUsageInfo". This struct is 0x20-bytes.
 
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
| 0x40 || 0x8 ||  
|-
|-
| 0x0 || 0x4 || Unknown counter.
| 0x48 || 0x8 ||  
|-
|-
| 0x4 || 0x4 || Unknown counter.
| 0x50 || 0x8 ||  
|-
|-
| 0x8 || 0x4 || Output from [[NS_Services|NS GetRightsEnvironmentCountForDebug]].
| 0x58 || 0x8 ||  
|-
|-
| 0xC || 0x14 || Always zero.
| 0x60 || 0x8 ||  
|}
 
= ApplicationLicenseType =
This is "nn::oe::ApplicationLicenseType". This is 1-byte.
 
= LaunchRequiredVersion =
This is "nn::oe::LaunchRequiredVersion". This is a 0x40-byte struct with 1-byte alignment.
 
= ServerEnvironmentType =
This is "nn::oe::ServerEnvironmentType".
 
{| class="wikitable" border="1"
|-
|-
! Value
| 0x68 || 0x8 ||
! Description
|-
|-
| 0 || dd
| 0x70 || 0x8 ||  
|-
|-
| 1 || lp
| 0x78 || 0x8 ||  
|-
|-
| 2 || sd
| 0x80 || 0x8 ||  
|-
|-
| 3 || sp
| 0x88 || 0x8 ||  
|-
|-
| 4 || dp
| 0x90 || 0x4 || Flags
|}
|}