mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-25 23:25:41 +00:00
GPU: Toggle vblank timer gate for full frame
Regression from event system. Fixes Ridge Racer.
This commit is contained in:
parent
288b680e07
commit
88936463d7
|
@ -446,6 +446,7 @@ void GPU::Execute(TickCount ticks)
|
||||||
if (prev_scanline < m_crtc_state.vertical_display_start &&
|
if (prev_scanline < m_crtc_state.vertical_display_start &&
|
||||||
m_crtc_state.current_scanline >= m_crtc_state.vertical_display_end)
|
m_crtc_state.current_scanline >= m_crtc_state.vertical_display_end)
|
||||||
{
|
{
|
||||||
|
m_timers->SetGate(HBLANK_TIMER_INDEX, false);
|
||||||
m_crtc_state.in_vblank = false;
|
m_crtc_state.in_vblank = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -453,13 +454,9 @@ void GPU::Execute(TickCount ticks)
|
||||||
m_crtc_state.current_scanline >= m_crtc_state.vertical_display_end;
|
m_crtc_state.current_scanline >= m_crtc_state.vertical_display_end;
|
||||||
if (m_crtc_state.in_vblank != new_vblank)
|
if (m_crtc_state.in_vblank != new_vblank)
|
||||||
{
|
{
|
||||||
m_crtc_state.in_vblank = new_vblank;
|
|
||||||
|
|
||||||
if (new_vblank)
|
if (new_vblank)
|
||||||
{
|
{
|
||||||
static u32 x = 0;
|
Log_DebugPrintf("Now in v-blank");
|
||||||
Log_DebugPrintf("Now in v-blank %u ticks %u hblanks", m_system->GetGlobalTickCounter() - x);
|
|
||||||
x = m_system->GetGlobalTickCounter();
|
|
||||||
m_interrupt_controller->InterruptRequest(InterruptController::IRQ::VBLANK);
|
m_interrupt_controller->InterruptRequest(InterruptController::IRQ::VBLANK);
|
||||||
|
|
||||||
// flush any pending draws and "scan out" the image
|
// flush any pending draws and "scan out" the image
|
||||||
|
@ -469,6 +466,7 @@ void GPU::Execute(TickCount ticks)
|
||||||
}
|
}
|
||||||
|
|
||||||
m_timers->SetGate(HBLANK_TIMER_INDEX, new_vblank);
|
m_timers->SetGate(HBLANK_TIMER_INDEX, new_vblank);
|
||||||
|
m_crtc_state.in_vblank = new_vblank;
|
||||||
}
|
}
|
||||||
|
|
||||||
// past the end of vblank?
|
// past the end of vblank?
|
||||||
|
|
Loading…
Reference in a new issue