Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implemented field order detection for PAL games. Fixes the shaking of…
… the screen when XFB is enabled with a PAL game.

Fixes issue 6316.
  • Loading branch information
skidau committed Jun 8, 2013
1 parent 196d152 commit 92fdc15
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Source/Core/Core/Src/HW/VideoInterface.cpp
Expand Up @@ -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" };

Expand Down

0 comments on commit 92fdc15

Please sign in to comment.