Changes

Jump to navigation Jump to search
5,542 bytes added ,  00:48, 27 October 2019
no edit summary
Line 8: Line 8:  
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 
|-
 
|-
| 1 || ||  
+
| 1 || [[#CaptureRawImage]] ||  
 
|-
 
|-
| 2 || ||  
+
| 2 || [[#CaptureRawImageWithTimeout]] ||  
 
|-
 
|-
| 210 || [6.0.0+] || 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.
+
| 3 || [5.0.0+] AttachSharedBuffer || Takes a total of 8-bytes of input, no output.
 
|-
 
|-
| 1001 || ||  
+
| 5 || [5.0.0+] CaptureRawImageToAttachedSharedBuffer || Takes a total of 0x10-bytes of input, no output.
 
|-
 
|-
| 1002 || ||  
+
| 210 || [6.0.0+] ? || 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.
 
|-
 
|-
| 1003 || ||  
+
| [2.0.0-4.1.0] 1001 || RequestTakingScreenShot || Takes a total of 0x10-bytes of input, no output.
 
|-
 
|-
| 1011 || ||  
+
| [2.0.0-4.1.0] 1002 || RequestTakingScreenShotWithTimeout || Takes a total of 0x18-bytes of input, no output.
 
|-
 
|-
| 1012 || ||  
+
| [3.0.0-4.1.0] 1003 || RequestTakingScreenShotEx || Takes a total of 0x58-bytes of input, no output.
 
|-
 
|-
| 1201 || ||  
+
| 1004 || [5.0.0+] RequestTakingScreenShotEx1 || Takes a total of 0x60-bytes of input, no output. [6.0.0+]: In addition, this also takes a type-0x15 input buffer.
 
|-
 
|-
| 1202 || ||  
+
| 1009 || [5.0.0+] CancelTakingScreenShot || Takes a total of 0x10-bytes of input, no output.
 
|-
 
|-
| 1203 || ||  
+
| 1010 || [5.0.0+] SetTakingScreenShotCancelState || Takes a total of 0x10-bytes of input, no output.
 +
|-
 +
| 1011 || NotifyTakingScreenShotRefused || Takes a total of 8-bytes of input, no output.
 +
|-
 +
| 1012 || NotifyTakingScreenShotFailed || Takes a total of 8-bytes of input, no output.
 +
|-
 +
| 1101 || [4.0.0+] [[#SetupOverlayMovieThumbnail]] ||
 +
|-
 +
| 1106 || [4.0.0+] ? ||
 +
|-
 +
| 1107 || [4.0.0+] ? ||
 +
|-
 +
| 1201 || [3.0.0+] OpenRawScreenShotReadStream || Takes a total of 0x10-bytes of input, returns a total of 0x18-bytes of output.
 +
|-
 +
| 1202 || [3.0.0+] CloseRawScreenShotReadStream || No input/output.
 +
|-
 +
| 1203 || [3.0.0+] ReadRawScreenShotReadStream || Takes a total of 8-bytes of input and a type-0x6 output buffer, returns a total of 8-bytes of output.
 +
|-
 +
| 1204 || [9.0.0+] || Takes a total of 0x10-bytes of input and a type-0x46 output buffer, returns a total of 8-bytes of output.
 
|}
 
|}
   −
== Cmd1 ==
+
* cmd210: User-processes use hard-coded size 0x88 for the type-0x15 buffer.
Takes a type-0x46 output buffer, an input u32, two input u64s '''width'''/'''height''', an input s64 '''buffer_count''', and an input s64 '''buffer_index'''.
+
* cmd1106/1107: User-processes use hard-coded sizes 0x400 and 0x404 for the first/second type-0x15 buffers.
 +
* cmd1201/1202/1203: These are only usable when the previously loaded value from [[Settings_services|set:sys GetDebugModeFlag]] is set.
 +
 
 +
The only caps:sc commands used by [[GRC_services|GRC]] are: 1101, 1106, and 1107.
 +
 
 +
[8.0.0+] Cmd210 and cmd1004 now takes an additional type-0x15 input buffer.
 +
 
 +
== CaptureRawImage ==
 +
Takes a type-0x46 output buffer, an input u32 '''layer_stack''', two input u64s '''width'''/'''height''', an input s64 '''buffer_count''', and an input s64 '''buffer_index'''.
    
'''width'''/'''height''' must match 1280/720. '''buffer_index''' must be < '''buffer_count'''. '''buffer_index''' and '''buffer_count''' must not be negative.
 
'''width'''/'''height''' must match 1280/720. '''buffer_index''' must be < '''buffer_count'''. '''buffer_index''' and '''buffer_count''' must not be negative.
Line 44: Line 70:  
Stubbed with [5.0.0+], where it now returns error 0x7FECE.
 
Stubbed with [5.0.0+], where it now returns error 0x7FECE.
   −
== Cmd2 ==
+
== CaptureRawImageWithTimeout ==
Calls the same internal func as cmd1, where the last param is an additional cmd input u64 instead of hard-coded value 0x5f5e100.
+
Calls the same internal func as [[#CaptureRawImage]], where the last param is an additional cmd input u64 instead of hard-coded value 0x5f5e100.
    
Stubbed with [5.0.0+], where it now returns error 0x7FECE.
 
Stubbed with [5.0.0+], where it now returns error 0x7FECE.
 +
 +
== SetupOverlayMovieThumbnail ==
 +
Takes two input u64s '''width'''/'''height''', a 0x18-byte input struct, and two type-0x46 output buffers.
 +
 +
For the input struct, [[GRC_services|GRC]] uses the output from [[Capture_services|caps:c]] cmd2101.
 +
 +
'''width'''/'''height''' must be 1280x720. The first buffer address must be 0x400-byte aligned. The size of the first buffer must be at least '''width'''*'''height''', and must be aligned to 0x20000-bytes.
 +
 +
The requirements for the second buffer address/size are the same as the first buffer, except the minimum size is ('''width'''*'''height''')/2.
 +
 +
== Cmd1106 ==
 +
Takes a 0x40-byte input struct, two input u64s '''width'''/'''height''', a 0x18-byte input struct, two type-0x15 input buffers, a type-0x6 output buffer, and two type-0x46 output buffers, returns 3 output u64s.
 +
 +
'''width'''/'''height''' have same requirements as [[#SetupOverlayMovieThumbnail]]. The size of the type-0x6 buffer must be at least 0x7D000. The requirements for the type-0x46 buffers are the same as [[#SetupOverlayMovieThumbnail]].
 +
 +
[5.0.0+] Now takes a total of 0x68-bytes of input instead of 0x30.
 +
 +
== Cmd1107 ==
 +
Takes a 0x40-byte input struct, two input u64s '''width'''/'''height''', a 0x18-byte input struct, two type-0x15 input buffers, a type-0x6 output buffer, and a type-0x45 input buffer, returns 3 output u64s.
 +
 +
'''width'''/'''height''' have same requirements as [[#SetupOverlayMovieThumbnail]]. The size of the type-0x6 buffer must be at least 0x7D000. The size of the type-0x45 buffer must be at least 0x384000.
 +
 +
[5.0.0+] Now takes a total of 0x68-bytes of input instead of 0x30.
    
= caps:ss =
 
= caps:ss =
Line 56: Line 105:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 201 ||
+
| 201 || SaveScreenShot
 +
|-
 +
| 202 || SaveEditedScreenShot
 
|-
 
|-
| 202 ||
+
| 203 || [3.0.0+] SaveScreenShotEx0
 
|-
 
|-
| 203 ||
+
| 204 || [3.0.0+] SaveEditedScreenShotEx0
 
|-
 
|-
| 204 ||
+
| 206 || [?+]
 +
|-
 +
| 208 || [5.0.0+] SaveScreenShotOfMovieEx1
 
|}
 
|}
    
= caps:su =
 
= caps:su =
 
This is "nn::capsrv::sf::IScreenShotApplicationService".
 
This is "nn::capsrv::sf::IScreenShotApplicationService".
 +
 +
This was added with [3.0.0+]. This was moved to [[Applet_Manager_services|AM]] with [6.0.0+].
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 75: Line 130:  
|-
 
|-
 
| 203 || SaveScreenShotEx0
 
| 203 || SaveScreenShotEx0
|-
  −
| 210 || [6.0.0+] SaveScreenShotEx2
   
|}
 
|}
   Line 86: Line 139:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 ||
+
| 0 || RegisterCallback
 +
|-
 +
| 1 || UnregisterCallback
 +
|-
 +
| 2 || TriggerSystemEvent
 +
|-
 +
| 3 || PerformAction
 +
|-
 +
| 4 || QueryState
 +
|-
 +
| 5 || OnSystemEvent
 
|-
 
|-
| 1 ||
+
| 6 || [2.0.0+] CancelCurrentCall
 +
|-
 +
| 100 || [4.0.0+] GetHdcpServiceObject
 +
|}
 +
 
 +
GetHdcpServiceObject: No input, returns a [[#IHdcpController]].
 +
 
 +
= IHdcpController =
 +
This is "nn::hdcp::IHdcpController".
 +
 
 +
Added with [4.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 2 ||
+
! Cmd || Name
 
|-
 
|-
| 3 ||
+
| 0 || GetHdcpStateTransitionEvent
 
|-
 
|-
| 4 ||
+
| 1 || GetHdcpAuthenticationState
 
|-
 
|-
| 5 ||
+
| 2 || SetCurrentHdcpMode
 
|-
 
|-
| 6 ||
+
| 3 || GetCurrentHdcpMode
 
|}
 
|}
   Line 136: Line 211:  
| 0 || [[#vi:u|GetDisplayService]]
 
| 0 || [[#vi:u|GetDisplayService]]
 
|-
 
|-
 +
| 1 || [9.0.0+] [[#vi:u|GetDisplayServiceWithProxyNameExchange]]
 
|}
 
|}
    
== GetDisplayService ==
 
== GetDisplayService ==
Returns an [[#IApplicationDisplayService]]. Takes an input u32, user-processes use 0 or 1, with 0 for regular-applications normally. 0 = user-service(vi:u), 1 = non-user-service? Returns an error when using value 1 with vi:u(same error listed below for IApplicationDisplayService for unavailable commands).
+
Returns an [[#IApplicationDisplayService]]. Takes an input u32, user-processes use 0 or 1, with 0 for regular-applications normally. 0 = user-service(vi:u), 1 = system/manager service (vi:s/vi:m). Returns an error when using value 1 with vi:u(same error listed below for IApplicationDisplayService for unavailable commands), however passing 1 to vi:s/vi:m results in the IApplicationDisplayService having greater privileges.
 +
 
 +
== GetDisplayServiceWithProxyNameExchange ==
 +
Takes an input u32, and returns an [[#IApplicationDisplayService]].
    
= vi:s =
 
= vi:s =
Line 273: Line 352:     
== GetDisplayResolution ==
 
== GetDisplayResolution ==
Takes an input u64 DisplayId and returns two output u64s: width and height.
+
Takes an input u64 DisplayId and returns two output s64s: width and height. Official sw copies these to s32 output fields.
    
== OpenLayer ==
 
== OpenLayer ==
Line 297: Line 376:     
== GetIndirectLayerImageMap ==
 
== GetIndirectLayerImageMap ==
Takes a PID-descriptor, an type-0x46 buffer, and four u64s: width(s32), height(s32), <output from [[AM_services|AM]] GetIndirectLayerConsumerHandle>, and [[AM_services|AppletResourceUserId]]. Returns two output u64s.
+
Takes a PID-descriptor, an type-0x46 buffer, two s64s width/height, then two u64s: <output from [[AM_services|AM]] GetIndirectLayerConsumerHandle>, and [[AM_services|AppletResourceUserId]]. Returns two output s64s, which are copied to output u64s by official sw.
 +
 
 +
Official sw sets the width/height using input s32s.
    
Calls the same func as [[#GetIndirectLayerImageCropMap]] internally, with the input floats set to 0.0f, then 1.0f for the rest.
 
Calls the same func as [[#GetIndirectLayerImageCropMap]] internally, with the input floats set to 0.0f, then 1.0f for the rest.
Line 305: Line 386:     
== GetIndirectLayerImageRequiredMemoryInfo ==
 
== GetIndirectLayerImageRequiredMemoryInfo ==
Takes two input u64s: width and height. Returns two output u64s. First u64 is the buffer size to use with the ImageMap cmds, second u64 is the buffer address alignment for those cmds.
+
Takes two input s64s: width and height. Returns two output s64s, which are copied to output u64s by official sw. First field is the buffer size to use with the ImageMap cmds, second field is the buffer address alignment for those cmds.
 +
 
 +
Official sw sets the width/height using input s32s.
    
== GetDisplayVsyncEvent ==
 
== GetDisplayVsyncEvent ==
Line 326: Line 409:  
| 1203 || GetDisplayLogicalResolution
 
| 1203 || GetDisplayLogicalResolution
 
|-
 
|-
| 1204 || SetDisplayMagnification
+
| 1204 || [3.0.0+] SetDisplayMagnification
 
|-
 
|-
 
| 2201 || SetLayerPosition
 
| 2201 || SetLayerPosition
Line 340: Line 423:  
| 2209 || SetLayerAlpha
 
| 2209 || SetLayerAlpha
 
|-
 
|-
| [1.0.0-6.2.0] 2312 || CreateStrayLayer
+
| 2312 || [1.0.0-6.2.0] CreateStrayLayer
 
|-
 
|-
 
| 2400 || OpenIndirectLayer
 
| 2400 || OpenIndirectLayer
Line 418: Line 501:  
| 201 || [4.0.0+] FreeProcessHeapBlock
 
| 201 || [4.0.0+] FreeProcessHeapBlock
 
|-
 
|-
| 1102 || GetDisplayResolution
+
| 1102 || [3.0.0+] GetDisplayResolution
 
|-
 
|-
 
| 2010 || CreateManagedLayer
 
| 2010 || CreateManagedLayer
Line 443: Line 526:  
|-
 
|-
 
| 2302 || GetDisplayHotplugEvent
 
| 2302 || GetDisplayHotplugEvent
 +
|-
 +
| 2303 || [5.1.0+] GetDisplayModeChangedEvent
 
|-
 
|-
 
| 2402 || GetDisplayHotplugState
 
| 2402 || GetDisplayHotplugState
Line 479: Line 564:  
|-
 
|-
 
| 6010 || [5.0.0+] GetLayerPresentationAllFencesExpiredEvent
 
| 6010 || [5.0.0+] GetLayerPresentationAllFencesExpiredEvent
 +
|-
 +
| 6011 || [7.0.0+] EnableLayerAutoClearTransitionBuffer
 +
|-
 +
| 6012 || [7.0.0+] DisableLayerAutoClearTransitionBuffer
 
|-
 
|-
 
| 7000 || SetContentVisibility
 
| 7000 || SetContentVisibility
 
|-
 
|-
 
| 8000 || SetConductorLayer
 
| 8000 || SetConductorLayer
 +
|-
 +
| 8001 || [8.0.0+] SetTimestampTracking
 
|-
 
|-
 
| 8100 || SetIndirectProducerFlipOffset
 
| 8100 || SetIndirectProducerFlipOffset
Line 546: Line 637:  
| 8298 || [5.0.0+] ExpandStartupLogoOnSharedFrameBuffer
 
| 8298 || [5.0.0+] ExpandStartupLogoOnSharedFrameBuffer
 
|}
 
|}
 +
 +
[5.0.0+] SetDetachedSharedFrameBufferImage now takes an additional 0x10-bytes of input. CopyDetachedSharedFrameBufferImage now takes an additional 0x18-bytes of input. SetDetachedSharedFrameBufferSubImage now takes an additional 0x10-bytes of input, and the buffer type was changed from 0x5 to 0x45.
    
= DisplayInfo =
 
= DisplayInfo =

Navigation menu