From 2782a51ce06bb745d54658a0fb77f88ad61c508e Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Sat, 9 Jun 2012 14:33:22 +0000 Subject: [PATCH] -hopefully fixed strange white lines in picture --- source/gui/video.cpp | 7 ++++++- source/loader/videopatch.c | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/source/gui/video.cpp b/source/gui/video.cpp index d6ed425d..11e33ae8 100644 --- a/source/gui/video.cpp +++ b/source/gui/video.cpp @@ -104,6 +104,8 @@ void CVideo::setAA(u8 aa, bool alpha, int width, int height) } } +extern GXRModeObj TVPal574IntDfScale; + void CVideo::init(void) { VIDEO_Init(); @@ -113,8 +115,11 @@ void CVideo::init(void) u32 type = CONF_GetVideo(); m_rmode->viWidth = m_wide ? 700 : 672; - if(m_rmode == &TVPal576IntDfScale || m_rmode == &TVPal576ProgScale) + if(m_rmode == &TVPal576IntDfScale) + { + m_rmode = &TVPal574IntDfScale; //We may get some problems otherwise m_50hz = true; + } else m_50hz = false; diff --git a/source/loader/videopatch.c b/source/loader/videopatch.c index 769bbd42..b4278a14 100644 --- a/source/loader/videopatch.c +++ b/source/loader/videopatch.c @@ -113,6 +113,39 @@ GXRModeObj TVPal528ProgUnknown = }; +GXRModeObj TVPal574IntDfScale = +{ + VI_TVMODE_PAL_INT, // viDisplayMode + 640, // fbWidth + 480, // efbHeight + 574, // xfbHeight + (VI_MAX_WIDTH_PAL - 640)/2, // viXOrigin + (VI_MAX_HEIGHT_PAL - 574)/2, // viYOrigin + 640, // viWidth + 574, // viHeight + VI_XFBMODE_DF, // xFBmode + GX_FALSE, // field_rendering + GX_FALSE, // aa + + // sample points arranged in increasing Y order + { + {6,6},{6,6},{6,6}, // pix 0, 3 sample points, 1/12 units, 4 bits each + {6,6},{6,6},{6,6}, // pix 1 + {6,6},{6,6},{6,6}, // pix 2 + {6,6},{6,6},{6,6} // pix 3 + }, + // vertical filter[7], 1/64 units, 6 bits each + { + 8, // line n-1 + 8, // line n-1 + 10, // line n + 12, // line n + 10, // line n + 8, // line n+1 + 8 // line n+1 + } +}; + static const GXRModeObj *g_vidmodes[] = { &TVNtsc480Int, &TVNtsc480IntDf, @@ -179,7 +212,7 @@ static GXRModeObj* PAL2NTSC[]={ &TVPal524IntAa, &TVNtsc480IntAa, &TVPal528Int, &TVNtsc480IntAa, &TVPal528IntDf, &TVNtsc480IntDf, - &TVPal576IntDfScale, &TVNtsc480IntDf, + &TVPal574IntDfScale, &TVNtsc480IntDf, &TVEurgb60Hz240Ds, &TVNtsc240Ds, &TVEurgb60Hz240DsAa, &TVNtsc240DsAa, &TVEurgb60Hz240Int, &TVNtsc240Int,