Display services: Difference between revisions
No edit summary |
|||
(16 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 1 || [[# | | 1 || [[#CaptureRawImageRgba32IntoArray]] | ||
|- | |- | ||
| 2 || [[# | | 2 || [[#CaptureRawImageRgba32IntoArrayWithTimeout]] | ||
|- | |- | ||
| 3 || [5.0.0+] [[# | | 3 || [5.0.0+] [[#AttachSharedBufferToCaptureModule]] | ||
|- | |- | ||
| 5 || [5.0.0+] [[#CaptureRawImageToAttachedSharedBuffer]] | | 5 || [5.0.0+] [[#CaptureRawImageToAttachedSharedBuffer]] | ||
|- | |- | ||
| 210 || [6.0.0+] | | 210 || [6.0.0+] [[#SaveScreenShotEx2ViaAm]] | ||
|- | |- | ||
| [2.0.0-4.1.0] | | 1001 || [2.0.0-4.1.0] [[#RequestTakingScreenShot]] | ||
|- | |- | ||
| [2.0.0-4.1.0] | | 1002 || [2.0.0-4.1.0] [[#RequestTakingScreenShotWithTimeout]] | ||
|- | |- | ||
| [3.0.0-4.1.0] | | 1003 || [3.0.0-4.1.0] [[#RequestTakingScreenShotEx]] | ||
|- | |- | ||
| 1004 || [5.0.0+] [[#RequestTakingScreenShotEx1]] | | 1004 || [5.0.0+] [[#RequestTakingScreenShotEx1]] | ||
Line 35: | Line 35: | ||
|- | |- | ||
| 1012 || [[#NotifyTakingScreenShotFailed]] | | 1012 || [[#NotifyTakingScreenShotFailed]] | ||
|- | |||
| 1100 || [18.0.0+] | |||
|- | |- | ||
| 1101 || [4.0.0+] [[#SetupOverlayMovieThumbnail]] | | 1101 || [4.0.0+] [[#SetupOverlayMovieThumbnail]] | ||
|- | |- | ||
| 1106 || [4.0.0+] | | 1106 || [4.0.0+] [[#CreateProtoMovieMetaDataNv12Ex2]] | ||
|- | |||
| 1107 || [4.0.0+] [[#CreateProtoMovieMetaDataRgbaEx2]] | |||
|- | |||
| 1108 || [18.0.0+] | |||
|- | |||
| 1109 || [19.0.0+] | |||
|- | |||
| 1110 || [19.0.0+] | |||
|- | |||
| 1111 || [19.0.0+] | |||
|- | |||
| 1112 || [19.0.0+] | |||
|- | |- | ||
| | | 1113 || [19.0.0+] | ||
|- | |||
| 1114 || [19.0.0+] | |||
|- | |- | ||
| 1201 || [3.0.0+] [[#OpenRawScreenShotReadStream]] | | 1201 || [3.0.0+] [[#OpenRawScreenShotReadStream]] | ||
Line 48: | Line 64: | ||
| 1203 || [3.0.0+] [[#ReadRawScreenShotReadStream]] | | 1203 || [3.0.0+] [[#ReadRawScreenShotReadStream]] | ||
|- | |- | ||
| 1204 || [9.0.0+] | | 1204 || [9.0.0+] [[#CaptureCrashScreenShot]] | ||
|- | |||
| 9000 || [20.0.0+] | |||
|} | |} | ||
The only caps:sc commands used by [[GRC_services|GRC]] are: 1101, 1106, and 1107. | The only caps:sc commands used by [[GRC_services|GRC]] are: 1101, 1106, and 1107. | ||
== | == CaptureRawImageRgba32IntoArray == | ||
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'''. | 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'''. | ||
Line 66: | Line 84: | ||
Stubbed with [5.0.0+], where it now returns error 0x7FECE. | Stubbed with [5.0.0+], where it now returns error 0x7FECE. | ||
== | == CaptureRawImageRgba32IntoArrayWithTimeout == | ||
Calls the same internal func as [[# | Calls the same internal func as [[#CaptureRawImageRgba32IntoArray]], 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. | ||
== | == AttachSharedBufferToCaptureModule == | ||
Takes a total of 8-bytes of input. No output. | Takes a total of 8-bytes of input. No output. | ||
Line 77: | Line 95: | ||
Takes a total of 0x10-bytes of input. No output. | Takes a total of 0x10-bytes of input. No output. | ||
== | == SaveScreenShotEx2ViaAm == | ||
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. | 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. | ||
Line 101: | Line 119: | ||
[11.0.0+] Now takes an additional 8-bytes of input. | [11.0.0+] Now takes an additional 8-bytes of input. | ||
[19.0.0+] Now takes another additional 8-bytes of input. This takes an input 0x40-byte struct, an u32, an u64, a 0x10-byte struct, two u64s, and two type-0x15 input buffers. | |||
[20.1.0+] Takes an input u32, a 0x40-byte struct, an u32, an u64, a 0x10-byte struct, two u64s, and two type-0x15 input buffers. | |||
== CancelTakingScreenShot == | == CancelTakingScreenShot == | ||
Line 123: | Line 145: | ||
The requirements for the second buffer address/size are the same as the first buffer, except the minimum size is ('''width'''*'''height''')/2. | The requirements for the second buffer address/size are the same as the first buffer, except the minimum size is ('''width'''*'''height''')/2. | ||
== | == CreateProtoMovieMetaDataNv12Ex2 == | ||
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. | 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. | ||
Line 132: | Line 154: | ||
[5.0.0+] Now takes a total of 0x68-bytes of input instead of 0x30. | [5.0.0+] Now takes a total of 0x68-bytes of input instead of 0x30. | ||
== | [19.0.0+] Now takes an additional 0x10-bytes of input. | ||
== CreateProtoMovieMetaDataRgbaEx2 == | |||
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. | 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. | ||
Line 140: | Line 164: | ||
[5.0.0+] Now takes a total of 0x68-bytes of input instead of 0x30. | [5.0.0+] Now takes a total of 0x68-bytes of input instead of 0x30. | ||
[19.0.0+] Now takes an additional 0x10-bytes of input. | |||
== Cmd1108 == | |||
Takes a total of 0x70-bytes of input, three type-0x15 input buffers, a type-0x6 output buffer. Returns a total of 0x18-bytes of output. | |||
[19.0.0+] Now takes an additional 0x10-bytes of input. | |||
== OpenRawScreenShotReadStream == | == OpenRawScreenShotReadStream == | ||
Line 156: | Line 187: | ||
Only usable when the previously loaded value from [[Settings_services|set:sys GetDebugModeFlag]] is set. | Only usable when the previously loaded value from [[Settings_services|set:sys GetDebugModeFlag]] is set. | ||
== | == CaptureCrashScreenShot == | ||
Takes a total of 0x10-bytes of input and a type-0x46 output buffer. Returns a total of 8-bytes of output. | Takes a total of 0x10-bytes of input and a type-0x46 output buffer. Returns a total of 8-bytes of output. | ||
Line 178: | Line 209: | ||
| 204 || [3.0.0+] SaveEditedScreenShotEx0 | | 204 || [3.0.0+] SaveEditedScreenShotEx0 | ||
|- | |- | ||
| 206 || [ | | 206 || [4.0.0+] SaveEditedScreenShotEx1 | ||
|- | |- | ||
| 208 || [5.0.0+] SaveScreenShotOfMovieEx1 | | 208 || [5.0.0+] SaveScreenShotOfMovieEx1 | ||
|- | |||
| 1000 || [13.0.0+] [[#RequestTakingScreenShotForApplet]] | |||
|- | |||
| 2000 || [20.0.0+] | |||
|} | |} | ||
== RequestTakingScreenShotForApplet == | |||
Takes a total of 0x68-bytes of input, two type-0x15 input buffers. Returns a total of 0x20-bytes of output. | |||
[19.0.0+] Now takes an additional 8-bytes of input. | |||
= caps:su = | = caps:su = | ||
Line 224: | Line 264: | ||
== GetHdcpServiceObject == | == GetHdcpServiceObject == | ||
No input | No input. Returns a [[#IHdcpController]]. | ||
= IHdcpController = | = IHdcpController = | ||
This is "nn::hdcp::IHdcpController". | This is "nn::hdcp::detail::IHdcpController". | ||
This was added with [4.0.0+]. | This was added with [4.0.0+]. | ||
Line 251: | Line 291: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || InitializeOld | | 0 || [[#InitializeOld]] | ||
|- | |- | ||
| 1 || FinalizeOld | | 1 || [[#FinalizeOld]] | ||
|- | |- | ||
| 2 || SetAndWaitOld | | 2 || [[#SetAndWaitOld]] | ||
|- | |- | ||
| 3 || GetOld | | 3 || [[#GetOld]] | ||
|- | |- | ||
| 4 || Initialize | | 4 || [[#Initialize]] | ||
|- | |- | ||
| 5 || Finalize | | 5 || [[#Finalize]] | ||
|- | |- | ||
| 6 || SetAndWait | | 6 || [[#SetAndWait]] | ||
|- | |- | ||
| 7 || Get | | 7 || [[#Get]] | ||
|} | |} | ||
== InitializeOld == | |||
Takes an input [[#Module]], an input [[#Priority]] and an input u32 '''EventClearMode'''. No output. | |||
== FinalizeOld == | |||
Takes an input [[#Module]]. No output. | |||
== SetAndWaitOld == | |||
Takes an input [[#Module]] and two input [[#Setting]] '''Min''' and '''Max'''. No output. | |||
== GetOld == | |||
Takes an input [[#Module]]. Returns an output [[#Setting]] '''Current'''. | |||
== Initialize == | |||
Same as [[#InitializeOld]], but returns an output u32 '''RequestId'''. | |||
== Finalize == | |||
Same as [[#FinalizeOld]], but takes an input u32 '''RequestId''' instead of an input [[#Module]]. | |||
== SetAndWait == | |||
Same as [[#SetAndWaitOld]], but takes an input u32 '''RequestId''' instead of an input [[#Module]]. | |||
== Get == | |||
Same as [[#GetOld]], but takes an input u32 '''RequestId''' instead of an input [[#Module]]. | |||
= vi:u = | = vi:u = | ||
Line 314: | Line 378: | ||
|- | |- | ||
| 3 || [[#vi:m|GetDisplayServiceWithProxyNameExchange]] | | 3 || [[#vi:m|GetDisplayServiceWithProxyNameExchange]] | ||
|- | |||
| 100 || [16.0.0+] PrepareFatal | |||
|- | |||
| 101 || [16.0.0+] ShowFatal | |||
|- | |||
| 102 || [16.0.0+] DrawFatalRectangle | |||
|- | |||
| 103 || [16.0.0+] DrawFatalText32 | |||
|} | |} | ||
Line 487: | Line 559: | ||
| 2209 || SetLayerAlpha | | 2209 || SetLayerAlpha | ||
|- | |- | ||
| 2210 || [11.0.0 | | 2210 || [11.0.0-11.0.1] SetLayerPositionAndSize | ||
|- | |- | ||
| 2312 || [1.0.0-6.2.0] CreateStrayLayer | | 2312 || [1.0.0-6.2.0] CreateStrayLayer | ||
Line 559: | Line 631: | ||
| 8258 || [5.0.0+] CancelSharedFrameBuffer | | 8258 || [5.0.0+] CancelSharedFrameBuffer | ||
|- | |- | ||
| 9000 || [11.0.0+] GetDp2hdmiController | | 9000 || [11.0.0+] [[#GetDp2hdmiController]] | ||
|} | |} | ||
Line 584: | Line 656: | ||
| 4 || StartFirmwareUpdateWithSpecifiedImage | | 4 || StartFirmwareUpdateWithSpecifiedImage | ||
|- | |- | ||
| 5 || OverwriteFirmware | | 5 || GetFirmwareUpdateState ([11.0.0-11.0.1] OverwriteFirmware) | ||
|- | |||
| 6 || ResetDevice ([11.0.0-11.0.1] OverwriteFirmwareWithSpecifiedImage) | |||
|- | |- | ||
| | | 7 || [16.0.0-18.1.0] StartBootFirmwareUpdate ([11.0.0-11.0.1] GetFirmwareUpdateState) | ||
|- | |- | ||
| | | 8 || [16.0.0+] StartBootFirmwareUpdateWithSpecifiedImage ([11.0.0-11.0.1] ResetDevice) | ||
|- | |- | ||
| | | 9 || [17.0.0+] GetBootFirmwareVersion | ||
|} | |} | ||
Line 623: | Line 697: | ||
|- | |- | ||
| 2055 || DestroyIndirectConsumerEndPoint | | 2055 || DestroyIndirectConsumerEndPoint | ||
|- | |||
| 2060 || [16.0.0+] CreateWatermarkCompositor | |||
|- | |||
| 2062 || [16.0.0+] SetWatermarkText | |||
|- | |||
| 2063 || [16.0.0+] SetWatermarkLayerStacks | |||
|- | |- | ||
| 2300 || AcquireLayerTexturePresentingEvent | | 2300 || AcquireLayerTexturePresentingEvent | ||
Line 650: | Line 730: | ||
| 4207 || [11.0.0+] ResetDisplayPanel | | 4207 || [11.0.0+] ResetDisplayPanel | ||
|- | |- | ||
| 4208 || [11.0.0+] EnableDisplayFatalError | | 4208 || [11.0.0+] [[#SetDisplayFatalErrorEnabled]] ([11.0.0-11.0.1] EnableDisplayFatalError) | ||
|- | |||
| 4209 || [12.0.0+] IsDisplayPanelOn | |||
|- | |- | ||
| 4300 || [11.0.0+] GetInternalPanelId | | 4300 || [11.0.0+] GetInternalPanelId | ||
Line 679: | Line 761: | ||
|- | |- | ||
| 6012 || [7.0.0+] DisableLayerAutoClearTransitionBuffer | | 6012 || [7.0.0+] DisableLayerAutoClearTransitionBuffer | ||
|- | |||
| 6013 || [13.0.0+] SetLayerOpacity | |||
|- | |||
| 6014 || [16.0.0+] AttachLayerWatermarkCompositor | |||
|- | |||
| 6015 || [16.0.0+] DetachLayerWatermarkCompositor | |||
|- | |- | ||
| 7000 || SetContentVisibility | | 7000 || SetContentVisibility | ||
Line 736: | Line 824: | ||
| 8292 || [4.0.0+] FillDetachedSharedFrameBufferColor | | 8292 || [4.0.0+] FillDetachedSharedFrameBufferColor | ||
|- | |- | ||
| 8293 || [4.0.0+] GetDetachedSharedFrameBufferImage | | 8293 || [4.0.0+] [[#GetDetachedSharedFrameBufferImage]] | ||
|- | |- | ||
| 8294 || [4.0.0+] SetDetachedSharedFrameBufferImage | | 8294 || [4.0.0+] SetDetachedSharedFrameBufferImage | ||
Line 752: | Line 840: | ||
[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. | [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. | ||
=== GetDetachedSharedFrameBufferImage === | |||
Takes a total of 0x10-bytes of input and a type-0x6 output buffer, returns a total of 8-bytes of output. | |||
[15.0.0+] Now takes a total of 0x28-bytes of input and a type-0x6 output buffer, returns a total of 8-bytes of output. | |||
== SetDisplayFatalErrorEnabled == | |||
Takes an input u64, no output. | |||
[12.0.0+] Takes an input bool and u64, no output. | |||
= lbl = | = lbl = | ||
Line 849: | Line 947: | ||
== IsVrModeEnabled == | == IsVrModeEnabled == | ||
No input. Returns an output u8 bool set by the above commands. | No input. Returns an output u8 bool set by the above commands. | ||
= Module = | |||
This is "nn::mmnv::Module". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Value || Name | |||
|- | |||
| 0 || Cpu | |||
|- | |||
| 1 || Gpu | |||
|- | |||
| 2 || Emc | |||
|- | |||
| 3 || SysBus | |||
|- | |||
| 4 || Mselect | |||
|- | |||
| 5 || Nvdec | |||
|- | |||
| 6 || Nvenc | |||
|- | |||
| 7 || Nvjpg | |||
|- | |||
| 8 || Test | |||
|} | |||
= Priority = | |||
This is "nn::mmnv::Priority". This is an u32. | |||
= Setting = | |||
This is "nn::mmnv::Setting". This is an u32. | |||
= DisplayInfo = | = DisplayInfo = | ||
Line 934: | Line 1,064: | ||
Note: if bOverLimit=1 and the default ALS configuration is used, the measurement of fLux should not be considered and the actual max value depends on the type of light. Ranges from 12.5K - 17.5K. | Note: if bOverLimit=1 and the default ALS configuration is used, the measurement of fLux should not be considered and the actual max value depends on the type of light. Ranges from 12.5K - 17.5K. | ||
= Resolution Handling = | = Notes = | ||
== Resolution Handling == | |||
There doesn't seem to be a way to get the actual TV resolution while using the "Default" Display. Official apps just hard-code what resolution to use depending on the current [[AM_services|OperationMode]]. | There doesn't seem to be a way to get the actual TV resolution while using the "Default" Display. Official apps just hard-code what resolution to use depending on the current [[AM_services|OperationMode]]. | ||
= Ambient Light Sensor | == Ambient Light Sensor == | ||
The BH1730 outputs 2 values. Visible light and IR light. This is then calculated through an algorithm that checks for Gain, Measurement time, filter qualities and ouputs lux (max correct measurement of 100K lux). | The BH1730 outputs 2 values. Visible light and IR light. This is then calculated through an algorithm that checks for Gain, Measurement time, filter qualities and ouputs lux (max correct measurement of 100K lux). | ||
The default values are Gain 64x and ITIME of 38 (256 - 218). This allows for a max lux value of 17972 lux when visible light value is maximum and IR light is 0. When both of them are on their limit, the output is 1192 lux. | The default values are Gain 64x and ITIME of 38 (256 - 218). This allows for a max lux value of 17972 lux when visible light value is maximum and IR light is 0. When both of them are on their limit, the output is 1192 lux. |