Applet Manager services: Difference between revisions

 
(19 intermediate revisions by 3 users not shown)
Line 1,247: Line 1,247:
|-
|-
| 320 || [20.0.0+]
| 320 || [20.0.0+]
|-
| 330 || [20.2.0+]
|-
|-
| 500 || [5.0.0+] [[#StartContinuousRecordingFlushForDebug]]
| 500 || [5.0.0+] [[#StartContinuousRecordingFlushForDebug]]
Line 1,515: Line 1,517:
==== GetLastApplicationExitReason ====
==== GetLastApplicationExitReason ====
No input, returns an output s32.
No input, returns an output s32.
==== Cmd220 ====
Takes an input u8, no output.
The input must be <=1.


==== CreateMovieWriter ====
==== CreateMovieWriter ====
Line 1,520: Line 1,527:


This internally uses the GRC cmd to open an [[GRC_services|IMovieWriter]]. This is therefore not usable on NX since that cmd is stubbed.
This internally uses the GRC cmd to open an [[GRC_services|IMovieWriter]]. This is therefore not usable on NX since that cmd is stubbed.
==== Cmd330 ====
No input, returns 1-byte of output.
On NX this just writes 0 to output and returns 0.


==== StartContinuousRecordingFlushForDebug ====
==== StartContinuousRecordingFlushForDebug ====
Line 2,217: Line 2,229:
|-
|-
| 1000 || [7.0.0+] [[#GetDebugStorageChannel]]
| 1000 || [7.0.0+] [[#GetDebugStorageChannel]]
|-
| 2000 || [S2] [[#GetGraphicsInterface]]
|-
| 2100 || [S2]
|}
|}


Line 2,447: Line 2,463:


The cached value loaded from [[System_Settings|system-setting]] <code>am.debug!dev_function</code> must be set to 0x1 with size 0x1, otherwise an error is returned.
The cached value loaded from [[System_Settings|system-setting]] <code>am.debug!dev_function</code> must be set to 0x1 with size 0x1, otherwise an error is returned.
=== GetGraphicsInterface ===
Unofficial name. This is exclusive to S2.
No input. Returns an output TIPC handle to [[#(S2) GraphicsInterface|GraphicsInterface]].


== IStorageChannel ==
== IStorageChannel ==
Line 3,081: Line 3,102:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Cmd || Name || Notes
! Cmd || Name
|-
|-
| 0 || [[#OpenApplicationProxy]] ||
| 0 || [[#OpenApplicationProxy]]
|}
|}


This is used by all regular-applications, including [[flog]] and "Retail Interactive Display Menu". Only one session can be open for this service at a time.
This is used by all regular-applications, including [[flog]] and "Retail Interactive Display Menu". Only one session can be open for this service at a time.
= (Switch 2) appletOE =
[S2] This is "nn::am::service::IApplicationProxyServiceForNxCompat".
{| class="wikitable" border="1"
|-
! Cmd || Name || Notes
|-
| 0 || [[#OpenApplicationProxy]] ||
|-
| 2000 || [[#OpenCompatApplicationFunctions]] ||  Returns an [[#(Switch 2) INxCompatApplicationFunctions]]
|}


== OpenApplicationProxy ==
== OpenApplicationProxy ==
Returns an [[#IApplicationProxy]]. See [[#appletAE]].
Takes a reserved input u64 (official user-processes use hard-coded value 0), a PID, and a process copy-handle (cur-proc handle alias). Returns an [[#IApplicationProxy]].


Takes a [[IPC_Marshalling|reserved]] input u64 (official user-processes use hard-coded value 0), a PID, and a process copy-handle (cur-proc handle alias).
On failure, official user-processes will retry using this command in a loop while the retval is 0x19280, with svcSleepThread(10000000) being called first.


On failure, official user-processes will retry using this command in a loop while the retval is 0x19280, with svcSleepThread(10000000) being called first.
= idle:sys =
This is "nn::idle::detail::IPolicyManagerSystem"


= (Switch 2) INxCompatApplicationFunctions =
This was moved to [[OMM_services|omm]] with [14.0.0+].
This is "am::service::INvCompatApplicationFunctions".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Cmd || Name || Notes
! Cmd || Name
|-
|-
| 2000 || ||  
| 0 || GetAutoPowerDownEvent
|-
|-
| 2001 || ||  
| 1 || [7.0.0+] IsAutoPowerDownRequested ([1.0.0-3.0.2] )
|-
|-
| 2002 || ||  
| 2 || [1.0.0-3.0.2]
|-
|-
| 2003 || ||  
| 3 || [[#SetHandlingContext]]
|-
|-
| 2004 || ||  
| 4 || LoadAndApplySettings
|-
|-
| 2010 || ||
| 5 || ReportUserIsActive
|-
| 2020 || ||
|-
| 2030 || ||
|-
| 2040 || ||
|-
| 2050 || ||
|-
| 2060 || ||
|}
 
= idle:sys =
This is "nn::idle::detail::IPolicyManagerSystem"
 
This was moved to [[OMM_services|omm]] with [14.0.0+].
 
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 || GetAutoPowerDownEvent
|-
| 1 || [7.0.0+] IsAutoPowerDownRequested ([1.0.0-3.0.2] )
|-
| 2 || [1.0.0-3.0.2]
|-
| 3 || [[#SetHandlingContext]]
|-
| 4 || LoadAndApplySettings
|-
| 5 || ReportUserIsActive
|}
|}


Line 3,394: Line 3,371:
|-
|-
| 2 || [8.0.0+] SetCpuOverclockEnabled
| 2 || [8.0.0+] SetCpuOverclockEnabled
|}
= (S2) adraw:a =
This is "nn::appletdraw::sfif::IAppletRoot". This is exclusive to S2.
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 1 || [[#OpenResourceSession]]
|-
| 2 || [[#OpenAppletSession]]
|}
== OpenResourceSession ==
Unofficial name.
Takes a PID and an u64. Returns a [[#IResourceSession]].
== OpenAppletSession ==
Unofficial name. This is exclusive to S2.
Takes a PID and an u64. Returns a [[#IAppletSession]].
== IResourceSession ==
This is "nn::appletdraw::sfif::IResourceSession".
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 1 ||
|-
| 10 || 
|-
| 11 || 
|}
=== Cmd1 ===
Takes a u64. Returns a u64.
=== Cmd10 ===
Takes a handle, a u64 and an int. Returns a handle.
=== Cmd11 ===
No input/output.
== IAppletSession ==
This is "nn::appletdraw::sfif::IAppletSession".
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 1 ||
|-
| 2 || 
|-
| 3 || 
|-
| 10 || 
|-
| 11 || 
|-
| 12 || 
|-
| 13 || 
|-
| 15 || 
|-
| 16 || 
|-
| 17 || 
|-
| 18 || 
|-
| 19 || 
|-
| 21 || 
|-
| 22 || 
|-
| 23 || 
|-
| 24 || 
|-
| 31 || 
|-
| 8001 || 
|-
| 8004 || 
|}
=== Cmd1 ===
Takes a u64. Returns a u64.
=== Cmd2 ===
Returns a handle.
=== Cmd3 ===
Takes a handle.
=== Cmd10 ===
Takes an int.
=== Cmd11 ===
Takes an int.
=== Cmd12 ===
Takes a u64. Returns an int.
=== Cmd13 ===
Takes an int. Returns an int.
=== Cmd15 ===
Takes an int. Returns an int, an int, an int.
=== Cmd16 ===
Returns an int.
=== Cmd17 ===
Takes an int. Returns an int, a u16.
=== Cmd18 ===
Takes an int. Returns 3x int, a u16.
=== Cmd19 ===
Takes an int. Returns an int, a u16.
=== Cmd21 ===
Takes an int. Returns a struct of size 0x40.
=== Cmd22 ===
Takes a struct of size 0x20. Returns a struct of size 0x40.
=== Cmd23 ===
Returns a struct of size 0xC8.
=== Cmd24 ===
Sends an ipc-buf with size 0xD8.
=== Cmd31 ===
Returns a struct with 0x28, a struct with size 0x10.
=== Cmd8001 ===
Returns a struct with 0x28, a struct with size 0x10.
=== Cmd8004 ===
Takes an int. Returns a u64.
= (S2) appletOE =
This is "nn::am::service::IApplicationProxyServiceForNxCompat".
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 || [[#OpenApplicationProxy]]
|-
| 2000 || [[#OpenCompatApplicationFunctions]]
|}
== OpenCompatApplicationFunctions ==
No input. Returns an [[#INxCompatApplicationFunctions]].
== INxCompatApplicationFunctions ==
This is "nn::am::service::INxCompatApplicationFunctions".
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 2000 || [[#GetGraphicsInterfaceForNxCompat]]
|-
| 2001 ||
|-
| 2002 || 
|-
| 2003 || [[#SetCopyright]]
|-
| 2004 || 
|-
| 2010 || 
|-
| 2020 || [[#Initialize]]
|-
| 2030 || [[#GetVsyncEvent]]
|-
| 2040 || [[#GetVsyncTimestamp]]
|-
| 2050 ||
|-
| 2060 ||
|-
| 2070 || [[#CreateMovieMaker]]
|}
=== GetGraphicsInterfaceForNxCompat ===
Unofficial name.
No input. Returns an output TIPC handle to [[#(S2) GraphicsInterface|GraphicsInterface]].
Same as [[#GetGraphicsInterface]] but for compat mode.
=== SetCopyright ===
Unofficial name.
Takes an input bool. No output.
Called directly after "nn::vi::WriteToCopyrightFramebuffer".
=== Initialize ===
Unofficial name.
No input/output.
Called during init.
=== GetVsyncEvent ===
Unofficial name.
No input. Returns an Event handle.
=== GetVsyncTimestamp ===
Unofficial name.
No input. Returns an output u64.
When event from [[#GetVsyncEvent]] triggers, this returns a timestamp.
= (S2) GraphicsInterface =
Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 4 || [[#InitializeA]]
|-
| 11 || [[#InitializeB]]
|-
| 101 || [[#InitializeC]]
|-
| 111 ||
|-
| 112 ||
|-
| 114 ||
|-
| 115 ||
|-
| 187 ||
|-
| 201 ||
|-
| 301 ||
|-
| 327 ||
|-
| 303 ||
|-
| 311 ||
|-
| 312 ||
|-
| 314 ||
|-
| 315 ||
|-
| 321 ||
|-
| 391 ||
|-
| 401 ||
|-
| 402 ||
|-
| 423 ||
|-
| 434 ||
|-
| 497 ||
|-
| 901 ||
|-
| 902 ||
|-
| 903 ||
|-
| 905 ||
|-
| 911 ||
|-
| 912 ||
|-
| 922 ||
|-
| 961 ||
|-
| 991 ||
|-
| 1001 ||
|-
| 1002 ||
|-
| 1003 ||
|-
| 1101 ||
|-
| 1102 ||
|-
| 1401 || [[#InitializeNvDrv2UserWithTransferMemory]]
|-
| 1402 || [[#InitializeNvDrv2User]]
|-
| 1501 ||
|-
| 1502 ||
|-
| 1601 ||
|-
| 1602 ||
|-
| 1603 ||
|-
| 1611 ||
|-
| 1612 ||
|-
| 1691 ||
|}
== InitializeA ==
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; }.
== InitializeB ==
Unofficial name.
Sends current process handle. No args. Sent directly after cmd4.
== InitializeC ==
Unofficial name.
Sent directly after [[#InitializeB]].
== InitializeNvDrv2UserWithTransferMemory ==
Unofficial name.
Takes a TransferMemory handle, and an input u64 '''TransferMemorySize'''. Returns an [[#INvDrv2User]].
== InitializeNvDrv2User ==
Unofficial name.
No input. Returns an [[#INvDrv2User]].
== INvDrv2User ==
This is "nn::nvdrv::INvDrv2User".
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 || Open
|-
| 1 || Ioctl
|-
| 2 || Close
|-
| 4 || QueryEvent
|-
| 9 || DumpStatus
|-
| 10 || InitializeDevtools
|-
| 11 || Ioctl2
|-
| 12 || Ioctl3
|-
| 13 || SetGraphicsFirmwareMemoryMarginEnabled
|}
|}


Line 3,511: Line 3,869:
| 0x17
| 0x17
| 010000000000100F
| 010000000000100F
| [[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]]
| [[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]] (LibraryAppletOfflineWebApp_0 in Ounce)
|-
|-
| 0x18
| 0x18
Line 3,559: Line 3,917:
| 0x32
| 0x32
| 010000000000100F
| 010000000000100F
| [17.0.0+] [[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]]
| [17.0.0+] LibraryAppletOfflineWebApp_3 ([[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]] in NX)
|-
|-
| 0x33
| 0x33
| 010000000000100F
| 010000000000100F
| [17.0.0+] [[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]]
| [17.0.0+] LibraryAppletOfflineWebSystem ([[Internet_Browser#Offline_Applet|LibraryAppletOfflineWeb (offlineWeb)]] in NX)
|-
|-
| 0x35
| 0x35
| [17.0.0+] 0100000000001010 ([16.0.0-16.1.0] 0100000000001042)
| [17.0.0+] 0100000000001010 ([16.0.0-16.1.0] 0100000000001042)
| [17.0.0+] [[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] ([16.0.0-16.1.0] )
| [17.0.0+] LibraryAppletLhub ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
|-
|-
| 0x36
| 0x36
| [17.0.0+] 0100000000001010 ([16.0.0-16.1.0] 0100000000001042)
| [17.0.0+] 0100000000001010 ([16.0.0-16.1.0] 0100000000001042)
| [17.0.0+] [[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] ([16.0.0-16.1.0] )
| [17.0.0+] LibraryAppletLogin ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
|-
|-
| 0x37
| 0x37
| [17.0.0+] 0100000000001010 ([16.0.0-16.1.0] 0100000000001042)
| [17.0.0+] 0100000000001010 ([16.0.0-16.1.0] 0100000000001042)
| [17.0.0+] [[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] ([16.0.0-16.1.0] )
| [17.0.0+] LibraryAppletShare ([16.0.0-16.1.0] ) ([[Internet_Browser#Whitelisted_Applets|LibraryAppletLoginShare (loginShare)]] in NX)
|-
|-
| 0x38
| 0x38