Implemented field order detection for PAL games. Fixes the shaking of the screen when XFB is enabled with a PAL game.

Fixes issue 6316.
This commit is contained in:
skidau 2013-06-08 14:05:02 +10:00
parent 196d152ad7
commit 92fdc15aa3
1 changed files with 3 additions and 5 deletions

View File

@ -804,11 +804,9 @@ static void BeginField(FieldType field)
u32 fbWidth = m_HorizontalStepping.FieldSteps * 16;
u32 fbHeight = (m_HorizontalStepping.FbSteps / m_HorizontalStepping.FieldSteps) * m_VerticalTimingRegister.ACV;
// TODO: Are the "Bottom Field" and "Top Field" registers actually more
// like "First Field" and "Second Field" registers? There's an important
// difference because NTSC and PAL have opposite field orders.
u32 xfbAddr = (field == FIELD_LOWER) ? GetXFBAddressBottom() : GetXFBAddressTop();
// NTSC and PAL have opposite field orders.
FieldType order = (m_DisplayControlRegister.FMT == 0) ? FIELD_LOWER : FIELD_UPPER;
u32 xfbAddr = (field == order) ? GetXFBAddressBottom() : GetXFBAddressTop();
static const char* const fieldTypeNames[] = { "Progressive", "Upper", "Lower" };