PCRTC: Fix video modes higher than 480P

This commit is contained in:
Akash 2016-01-20 00:30:19 +05:30
parent 30c4456b85
commit ebb6e34196
1 changed files with 6 additions and 7 deletions

View File

@ -349,22 +349,21 @@ void GSState::ResetHandlers()
GSVector4i GSState::GetDisplayRect(int i)
{
if(i < 0) i = IsEnabled(1) ? 1 : 0;
int height = m_regs->DISP[i].DISPLAY.DH + 1;
int width = m_regs->DISP[i].DISPLAY.DW + 1;
int height = (m_regs->DISP[i].DISPLAY.DH + 1) / (m_regs->DISP[i].DISPLAY.MAGV + 1);
int width = (m_regs->DISP[i].DISPLAY.DW + 1) / (m_regs->DISP[i].DISPLAY.MAGH + 1);
GSVector4i r;
//Some games (such as Pool Paradise) use alternate line reading and provide a massive height which is really half.
if (height > 640)
if (height > 640 && m_regs->SMODE1.CMOD!=0) // Vmode's other than NTSC/PAL need height value over 640.
{
height /= 2;
}
r.left = m_regs->DISP[i].DISPLAY.DX / (m_regs->DISP[i].DISPLAY.MAGH + 1);
r.top = m_regs->DISP[i].DISPLAY.DY / (m_regs->DISP[i].DISPLAY.MAGV + 1);
r.right = r.left + width / (m_regs->DISP[i].DISPLAY.MAGH + 1);
r.bottom = r.top + height / (m_regs->DISP[i].DISPLAY.MAGV + 1);
r.right = r.left + width;
r.bottom = r.top + height;
return r;
}