From 0c5ccf7156020df3324b88af716a91e81f67ffda Mon Sep 17 00:00:00 2001 From: skidau Date: Mon, 15 Nov 2010 11:32:30 +0000 Subject: [PATCH] Tweaked the VBeam logic enough to fix Endless Ocean 2. This might also fix a few other games that have been black screening on boot recently. Fixes issue 3472. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6423 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/VideoInterface.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Source/Core/Core/Src/HW/VideoInterface.cpp b/Source/Core/Core/Src/HW/VideoInterface.cpp index 2ea6b04795..d3598a7d4b 100644 --- a/Source/Core/Core/Src/HW/VideoInterface.cpp +++ b/Source/Core/Core/Src/HW/VideoInterface.cpp @@ -798,7 +798,8 @@ void Update() { // Progressive NewVBeamPos = s_lineCount + 1; - BeginField(FIELD_PROGRESSIVE); + if (m_VBeamPos == 1) + BeginField(FIELD_PROGRESSIVE); } else if (m_VBeamPos == s_upperFieldBegin) { @@ -830,17 +831,15 @@ void Update() EndField(); } + if (++m_VBeamPos > s_lineCount) + m_VBeamPos = (NewVBeamPos > s_lineCount) ? 1 : NewVBeamPos; + for (int i = 0; i < 4; i++) { - if (m_VBeamPos <= m_InterruptRegister[i].VCT && m_InterruptRegister[i].VCT < NewVBeamPos) + if (m_VBeamPos == m_InterruptRegister[i].VCT) m_InterruptRegister[i].IR_INT = 1; } UpdateInterrupts(); - - if (++m_VBeamPos > s_lineCount) - { - m_VBeamPos = (NewVBeamPos > s_lineCount) ? 1 : NewVBeamPos; - } } } // namespace