diff options
| author | magumagu <magumagu9@gmail.com> | 2014-05-02 22:56:02 -0700 |
|---|---|---|
| committer | magumagu <magumagu9@gmail.com> | 2014-05-05 11:01:14 -0700 |
| commit | 2db2f3dce9df8aa28a7f102acb38563078bf5daa (patch) | |
| tree | 172e28b500733eb988046026f218ef7d6ad4c81a /Source | |
| parent | 2f92b82b296629f9154f94f5d7541c0d61245807 (diff) | |
VideoInterface: accurate XFB width and height.
What we call "fbWidth" here is really the stride, but I'll fix that in a
followup.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/HW/VideoInterface.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/Core/Core/HW/VideoInterface.cpp b/Source/Core/Core/HW/VideoInterface.cpp index 2cff0a4373..547a20ddb5 100644 --- a/Source/Core/Core/HW/VideoInterface.cpp +++ b/Source/Core/Core/HW/VideoInterface.cpp @@ -505,8 +505,18 @@ unsigned int GetTicksPerFrame() static void BeginField(FieldType field) { - u32 fbWidth = m_HorizontalStepping.FieldSteps * 16; - u32 fbHeight = (m_HorizontalStepping.FbSteps / m_HorizontalStepping.FieldSteps) * m_VerticalTimingRegister.ACV; + // TODO: the stride and height shouldn't depend on whether the FieldType is + // "progressive". We're actually telling the video backend to draw unspecified + // junk. Due to the way XFB copies work, the unspecified junk is usually + // the contents of the other field, so it looks okay in most cases, but we + // shouldn't depend on that; a good example of where our output is wrong is + // the title screen teaser videos in Metroid Prime. + // + // What should actually happen is that we should pass on the correct width, + // stride, and height to the video backend, and it should deinterlace the + // output when appropriate. + u32 fbWidth = m_HorizontalStepping.FbSteps * (field == FIELD_PROGRESSIVE ? 16 : 8); + u32 fbHeight = m_VerticalTimingRegister.ACV * (field == FIELD_PROGRESSIVE ? 1 : 2); u32 xfbAddr; // NTSC and PAL have opposite field orders. |
