MVD Services: Difference between revisions

No edit summary
2670QM (talk | contribs)
 
(35 intermediate revisions by 3 users not shown)
Line 11: Line 11:
!  Available since system version  
!  Available since system version  
!  Description
!  Description
!  Used by [[Internet_Browser|SKATER]]
|-
|-
| 0x00010082
| 0x00010082
|  
| [[8.1.0-0_New3DS]]
| [[MVDSTD:Initialize|Initialize]]
| [[MVDSTD:Initialize|Initialize]]
| Yes
|-
|-
| 0x00020000
| 0x00020000
|  
| [[8.1.0-0_New3DS]]
| [[MVDSTD:Shutdown|Shutdown]]
| [[MVDSTD:Shutdown|Shutdown]]
| Yes
|-
|-
| 0x00030300
| 0x00030300
|  
| [[8.1.0-0_New3DS]]
| [[MVDSTD:CalculateWorkBufSize|CalculateWorkBufSize]]
| [[MVDSTD:CalculateWorkBufSize|CalculateWorkBufSize]]
| Yes
|-
|-
| 0x000400C0
| 0x000400C0
|  
| [[8.1.0-0_New3DS]]
| Unknown. Not used by SKATER.
| [[MVDSTD:CalculateImageSize|CalculateImageSize]]
| No
|-
|-
| 0x00050100
| 0x00050100
|  
| [[8.1.0-0_New3DS]]
| (s8 unk0, s8 unk1, s8 unk2, u32 unk3) SKATER uses hard-coded value 0 for all of these params.
| (s8 unk0, s8 unk1, s8 unk2, u32 unk3) SKATER uses hard-coded value 0 for all of these params. Using different input data for this doesn't seem to affect video-processing output.
| Yes
|-
|-
| 0x00060000
| 0x00060000
|  
| [[8.1.0-0_New3DS]]
| Unknown. Not used by SKATER.
| Unknown.
| No
|-
|-
| 0x00070000
| 0x00070000
|  
| [[8.1.0-0_New3DS]]
| Used during shutdown with video-processing.
| Used during shutdown with video-processing.
| Yes
|-
|-
| 0x00080142
| 0x00080142
|  
| [[8.1.0-0_New3DS]]
| [[MVDSTD:ProcessNALUnit|ProcessNALUnit]]
| [[MVDSTD:ProcessNALUnit|ProcessNALUnit]]
| Yes
|-
|-
| 0x00090042
| 0x00090042
|  
| [[8.1.0-0_New3DS]]
| [[MVDSTD:ControlFrameRendering|ControlFrameRendering]]
| [[MVDSTD:ControlFrameRendering|ControlFrameRendering]]
| Yes
|-
|-
| 0x000A0000
| 0x000A0000
|  
| [[8.1.0-0_New3DS]]
| [[MVDSTD:GetStatus|GetStatus]]
| [[MVDSTD:GetStatus|GetStatus]]
| Yes
|-
|-
| 0x000B0000
| 0x000B0000
|  
| [[8.1.0-0_New3DS]]
| GetStatusOther(unknown what this is used for). Same output size as [[MVDSTD:GetStatus|GetStatus]].
| GetStatusOther(unknown what this is used for). Same output size as [[MVDSTD:GetStatus|GetStatus]].
| No
|-
|-
| 0x000C0100
| 0x000C0100
|  
| [[8.1.0-0_New3DS]]
| (u8 unk0, s8 unk1, u32 unk2, u32 unk3) Unknown. Not used by SKATER.
| (u8 unk0, s8 unk1, u32 unk2, u32 unk3) Unknown.
| No
|-
|-
| 0x000D0000
| 0x000D0000
|  
| [[8.1.0-0_New3DS]]
| Unknown. Not used by SKATER.
| Unknown.
| No
|-
|-
| 0x000E0202
| 0x000E0202
|  
| [[8.1.0-0_New3DS]]
| Unknown. Not used by SKATER. The code for this appears to be similar to [[MVDSTD:ProcessNALUnit|ProcessNALUnit]], this DMAs data from the input buffer as well.
| Unknown. The code for this appears to be similar to [[MVDSTD:ProcessNALUnit|ProcessNALUnit]], this DMAs data from the input buffer as well.
| No
|-
|-
| 0x000F0042
| 0x000F0042
|  
| [[8.1.0-0_New3DS]]
| (s8 unk, val0, handle) Unknown. Not used by SKATER. Presumably the command 0x000E0202 version of [[MVDSTD:ControlFrameRendering]].
| (s8 unk, val0, handle) Unknown. Presumably the command 0x000E0202 version of [[MVDSTD:ControlFrameRendering]].
| No
|-
|-
| 0x00100400
| 0x00100000
|  
| [[8.1.0-0_New3DS]]
| Unknown. Not used by SKATER.
| Unknown. This writes 0x28-bytes of output starting at cmdreply[2].
| No
|-
|-
| 0x00110000
| 0x00110000
|  
| [[8.1.0-0_New3DS]]
| Unknown. Not used by SKATER.
| Unknown.
| No
|-
|-
| 0x001200C0
| 0x001200C0
|  
| [[8.1.0-0_New3DS]]
| (s8 unk0, u32 unk1, u32 unk2) Unknown. Not used by SKATER.
| (s8 unk0, u32 unk1, u32 unk2) Unknown.
| No
|-
|-
| 0x00130000
| 0x00130000
|  
| [[8.1.0-0_New3DS]]
| Unknown. Not used by SKATER.
| Unknown.
| No
|-
|-
| 0x001400C2
| 0x001400C2
|  
| [[8.1.0-0_New3DS]]
| Unknown. Not used by SKATER. The code for this appears to be similar to [[MVDSTD:ProcessNALUnit|ProcessNALUnit]], this DMAs data from the input buffer as well.
| Unknown. The code for this appears to be similar to [[MVDSTD:ProcessNALUnit|ProcessNALUnit]], this DMAs data from the input buffer as well.
| No
|-
|-
| 0x00150042
| 0x00150042
|  
| [[8.1.0-0_New3DS]]
| (s8 unk, val0, handle) Unknown. Not used by SKATER. Presumably the command 0x001400C2 version of [[MVDSTD:ControlFrameRendering]].
| (s8 unk, val0, handle) Unknown. Presumably the command 0x001400C2 version of [[MVDSTD:ControlFrameRendering]].
| No
|-
|-
| 0x00160000
| 0x00160000
|  
| [[8.1.0-0_New3DS]]
| Unknown. Not used by SKATER.
| Unknown.
| No
|-
|-
| 0x00170000
| 0x00170000
|  
| [[8.1.0-0_New3DS]]
| Unknown. Not used by SKATER.
| Unknown.
| No
|-
|-
| 0x00180000
| 0x00180000
|  
| [[8.1.0-0_New3DS]]
| Unknown. Used during initialization regardless of the operation mode(color-conversion/video-processing).
| Unknown. Used during initialization regardless of the operation mode(color-conversion/video-processing).
| Yes
|-
|-
| 0x00190000
| 0x00190000
|  
| [[8.1.0-0_New3DS]]
| Unknown. Used during shutdown regardless of the operation mode(color-conversion/video-processing).
| Unknown. Used during shutdown regardless of the operation mode(color-conversion/video-processing).
| Yes
|-
|-
| 0x001A0000
| 0x001A0000
|  
| [[8.1.0-0_New3DS]]
| Used when doing color-format conversion. This triggers writing to the output buffer specified via config.
| Used when doing color-format conversion. This triggers writing to the output buffer specified via config.
| Yes
|-
|-
| 0x001B0040
| 0x001B0040
|  
| [[8.1.0-0_New3DS]]
| (u8 unknown) Used during video-processing initialization. SKATER uses hard-coded value 1 for this.
| (u8 inval) Used during video-processing initialization. SKATER uses hard-coded value 1 for this. MVD-sysmodule checks that the input value is not 0 or higher than 11. The input value must be one of the following: 1, 6, 9, or 10. Using any of these values instead of 1 results in no data being written to the output buffer with normal video processing, without any errors being thrown.
| Yes
|-
|-
| 0x001C0000
| 0x001C0000
|  
| [[8.1.0-0_New3DS]]
| Used during shutdown with video-processing.
| Used during shutdown with video-processing.
| Yes
|-
|-
| 0x001D0042
| 0x001D0042
|  
| [[8.1.0-0_New3DS]]
| [[MVDSTD:GetConfig|GetConfig]]
| [[MVDSTD:GetConfig|GetConfig]]
| Yes
|-
|-
| 0x001E0044
| 0x001E0044
|  
| [[8.1.0-0_New3DS]]
| [[MVDSTD:SetConfig|SetConfig]]
| [[MVDSTD:SetConfig|SetConfig]]
| Yes
|-
|-
| 0x001F0902
| 0x001F0902
|  
| [[8.1.0-0_New3DS]]
| Unknown. Not used by SKATER. This appears to write data to the specified output buffers via hardware?
| [[MVDSTD:SetupOutputBuffers|SetupOutputBuffers]]
| No
|-
|-
| 0x00200002
| 0x00200002
|  
| [[8.1.0-0_New3DS]]
| (val0, handle) Unknown. Not used by SKATER. This loads data from the table entry which has a field matching an input parameter. This is the table used by command 0x001F0902.
| (val0, handle) Unknown. This loads data from the table entry which has a field matching a certain value. This is the global table used by [[MVDSTD:SetupOutputBuffers|SetupOutputBuffers]].
| No
|-
|-
| 0x00210100
| 0x00210100
|  
| [[8.1.0-0_New3DS]]
| (u32 unk0, u32 unk1, u32 unk2, u32 unk3) Unknown. Not used by SKATER. This initializes table data used by command 0x001F0902.
| [[MVDSTD:OverrideOutputBuffers|OverrideOutputBuffers]]
| No
|}
|}


Line 528: Line 562:
!  Type value
!  Type value
!  Mode
!  Mode
Description
Video processing
!  Color conversion
|-
|-
| 0x00010001
| 0x00010001
| Color conversion
| Color conversion
| yuyv422
| N/A
| YUYV422
|-
|-
| 0x00010002
| 0x00010002
| Video processing
| Video processing
| ?
| H.264, but no output will be written to output buffer with error code 0xD961710A
| N/A
|-
|-
| 0x00010004
| 0x00010004
| Video processing
| Video processing
| ?
| H.264, but no output will be written to output buffer with error code 0xD961710A
| N/A
|-
|-
| 0x00010005
| 0x00010005
| Color conversion
| Color conversion, Video processing
| ?
| H.264, but no output will be written to output buffer with error code 0xD961710A
| YVYU422
|-
|-
| 0x00010006
| 0x00010006
| Color conversion
| Color conversion, Video processing
| ?
| H.264, but no output will be written to output buffer with error code 0xD961710A
| UYVY422
|-
|-
| 0x00010007
| 0x00010007
| Color conversion
| Color conversion, Video processing
| ?
| H.264, but no output will be written to output buffer with error code 0xD961710A
| VYUY422?
|-
|-
| 0x00020000
| 0x00020000
| Color conversion
| Video processing
| ?
| H.264, but no output will be written to output buffer with error code 0xD961710A
| N/A
|-
|-
| 0x00020001
| 0x00020001
| Video processing
| Video processing
| H.264
| H.264
| N/A
|-
|-
| 0x00020002
| 0x00020002
| ?
| Video processing
| ?
| H.264, output will be corrupt a little??
| N/A
|-
|-
| 0x00080000
| 0x00080000
| Video processing
| Video processing
| Same as 0x00020001, except with gray-scale?
| H.264, output will be gray-scale.
| N/A
|-
|-
| 0x00080001
| 0x00080001
| Video processing
| Video processing
| ?
| H.264, but no output will be written to output buffer with error code 0xD961710A
| N/A
|-
|-
| 0x00180001
| 0x00180001
| Video processing
| Video processing
| ?
| H.264, but no output will be written to output buffer with error code 0xD961710A
| N/A
|}
|}


Line 584: Line 631:
!  Type value
!  Type value
!  Description
!  Description
!  Note
|-
|-
| 0x00010001
| 0x00010001
| See the input format type.
| YUYV422
| N/A
|-
|-
| 0x00010005
| 0x00010005
| Unknown. A certain MVD state field must not be set to 0x8170 in order to use this. Some sort of 2-byte format it seems.
| YVYU422
| A certain MVD state field must not be set to 0x8170 in order to use this.
|-
|-
| 0x00010006
| 0x00010006
| Unknown, see 0x00010005 for the usage requirement. Some sort of 2-byte format it seems.
| UYVY422
| see 0x00010005 for the usage requirement.
|-
|-
| 0x00010007
| 0x00010007
| Unknown, see 0x00010005 for the usage requirement. Some sort of 2-byte format it seems.
| VYUY422
| see 0x00010005 for the usage requirement.
|-
|-
| 0x00010008
| 0x00010008
| A certain MVD-module state field must not be set to 0x8170 in order to use this. Whether this can actually be used is determined by another MVD-module state field. Some non-2-byte format it seems.
| YUYV422 with some align?
| A certain MVD-module state field must not be set to 0x8170 in order to use this. Whether this can actually be used is determined by another MVD-module state field. 16bit format.
|-
|-
| 0x00010009
| 0x00010009
| Unknown, see 0x00010008 for the usage requirements. Some non-2-byte format it seems.
| YVYU422 with some align?
| see 0x00010008 for the usage requirements. 16bit format.
|-
|-
| 0x0001000A
| 0x0001000A
| Unknown, see 0x00010008 for the usage requirements. Some non-2-byte format it seems.
| UYVY422 with some align?
| see 0x00010008 for the usage requirements. 16bit format.
|-
|-
| 0x0001000B
| 0x0001000B
| Unknown, see 0x00010008 for the usage requirements. Some non-2-byte format it seems.
| VYUY422 with some align?
| see 0x00010008 for the usage requirements. 16bit format.
|-
|-
| 0x00020001
| 0x00020001
| Some sort of YUV format? 12bit format. The initial output is written to the normal output buffer, then the rest is written to the additional output buffer dedicated to this out-type.
| Some sort of YUV format?  
| 12bit format. The initial output is written to the normal output buffer, then the rest is written to the additional output buffer dedicated to this out-type.
|-
|-
| 0x00040000
| 0x00040000
| Unknown, doesn't write anything to the out-buffer when doing color-conversion.
| Unknown
| Doesn't write anything to the out-buffer when doing color-conversion.
|-
|-
| 0x00040001
| 0x00040001
| RGB555
| ARGB1555?
| N/A
|-
|-
| 0x00040002
| 0x00040002
| BGR565
| RGB565
| N/A
|-
|-
| 0x00040003
| 0x00040003
| Some sort of 2-byte format it seems?
| ABGR1555?
| N/A
|-
|-
| 0x00040004
| 0x00040004
| RGB565
| BGR565
| N/A
|-
|-
| 0x00041000
| 0x00041000
| Unknown, doesn't write anything to the out-buffer when doing color-conversion.
| Unknown
| Doesn't write anything to the out-buffer when doing color-conversion.
|-
|-
| 0x00041001
| 0x00041001
| y400a?
| ARGB32
| N/A
|-
|-
| 0x00041002
| 0x00041002
| y400a?
| ABGR32
| N/A
|}
|}


==MVD Service "l2b:u"==
==MVD Service "l2b:u"==
This one uses the I/O mapped @ 0x10130000.
This one uses the I/O mapped @ 0x10130000.
{| class="wikitable" border="1"
|-
!  Command Header
!  Description
|-
| 0x00010040
| SetInputFormat?
|-
| 0x00020080
| GetInputFormat?
|-
| 0x00030040
| SetOutputFormat
|-
| 0x00040080
| GetOutputFormat
|-
| 0x00050040
| SetTransferEndInterrupt
|-
| 0x00060080
| GetTransferEndInterrupt
|-
| 0x00070080
| GetL2BEndEvent
|-
| 0x00080102
| ?
|-
| 0x00090080
| Waits on a DMA Handle
|-
| 0x000A0102
| MaybeSetRecieving
|-
| 0x000B0080
| isDoneRecieving
|-
| 0x000C0040
| SetInputLineWidth
|-
| 0x000D0080
| GetInputLineWidth
|-
| 0x000E0040
| SetInputLines
|-
| 0x000F0080
| GetInputLines
|-
| 0x00100040
| MaybeSetAlpha
|-
| 0x00110080
| MaybeGetAlpha
|-
| 0x00120040
| StartConversion
|-
| 0x00130040
| StopConversion
|-
| 0x00140080
| isBusyConversion
|-
| 0x00150040
| SetPackageParameter
|-
| 0x00160080
| GetPackageParameter
|-
| 0x00170080
| PingProcess
|}


==MVD Service "l2b2:u"==
==MVD Service "l2b2:u"==
Line 644: Line 783:


==MVD Service "y2r2:u"==
==MVD Service "y2r2:u"==
This one uses the I/O mapped @ 0x10102000.
This is a exact copy of y2r camera service and hence named y2r2.


==MVD Result-codes==
==MVD Result-codes==
Line 663: Line 802:
| 0xE16170C9
| 0xE16170C9
| -1(~0)
| -1(~0)
|
|-
| 0xF96171C8
| -0xFB(~0xFA)
|  
|  
|-
|-
| 0x17000
| 0x17000
|  
| 0x0
| OK
| OK
|-
| 0x17001
| 0x1
| Returned after processing NAL-unit parameter-sets.
|-
|-
| 0x17002
| 0x17002
| 0x2
| Busy. When returned by command 0x00090042 during video processing, SKATER uses the {[[MVDSTD:GetConfig]], [[MVDSTD:SetConfig]], and 0x00090042} commands again(same config as before). The SKATER code for this includes this debug string: "H264 output %lld us corrected to %lld us\n".
|-
| 0x17003
| 0x3
|
|-
| 0x17004
| 0x4
| Returned when not all of the input NAL-unit buffer was processed.
|-
| 0x17005
| 0x5
|
|-
| 0x17006
| 0x6
|
|-
| 0x17007
| 0x7
|
|-
| 0x17038
|
|  
|  
| Busy. When returned by command 0x00090042 during video processing, SKATER uses the {[[MVDSTD:GetConfig]], [[MVDSTD:SetConfig]], and 0x00090042} commands again(same config as before). The SKATER code for this includes this debug string: "H264 output %lld us corrected to %lld us\n".
|}
|}