From bcf69dfb9d392784ebf0542b01489a62d20fd08f Mon Sep 17 00:00:00 2001 From: beirich Date: Mon, 28 Feb 2011 07:10:19 +0000 Subject: [PATCH] [PCE] fix frameskip to not break some games --- BizHawk.Emulation/Consoles/PC Engine/VDC.Render.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/BizHawk.Emulation/Consoles/PC Engine/VDC.Render.cs b/BizHawk.Emulation/Consoles/PC Engine/VDC.Render.cs index 6113e3cd6f..297e3dae1e 100644 --- a/BizHawk.Emulation/Consoles/PC Engine/VDC.Render.cs +++ b/BizHawk.Emulation/Consoles/PC Engine/VDC.Render.cs @@ -29,11 +29,6 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx private int ActiveLine; private int RCRCount; - // One possible cause of graphics corruption is that I am executing DMAs immediately. - // DMAs are only executed when the system is OUTSIDE of the the active display period. - // So... that could be a thing. - // Although its actually not probably very much of a thing. - public void ExecFrame(bool render) { latchedDisplayStartLine = DisplayStartLine; @@ -88,6 +83,9 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx cpu.Execute(455-hblankCycles); + if (ScanLine == FrameHeight - 1) + UpdateSpriteAttributeTable(); + if (InActiveDisplay == false && DmaRequested) RunDmaForScanline(); @@ -103,9 +101,6 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx { RenderBackgroundScanline(); RenderSpritesScanline(); - - if (ScanLine == FrameHeight - 1) - UpdateSpriteAttributeTable(); } public void UpdateSpriteAttributeTable()