From 462f307324fa8c8d016579872124b12150c74a9d Mon Sep 17 00:00:00 2001 From: Barry Harris <44396066+barry65536@users.noreply.github.com> Date: Thu, 22 Dec 2011 19:54:11 +0000 Subject: [PATCH] Delay the VBlank IRQ in CPS-2 driver until part way through VBlank period, fixes text in D&D games --- src/burn/drivers/capcom/cps_run.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/burn/drivers/capcom/cps_run.cpp b/src/burn/drivers/capcom/cps_run.cpp index 2f07e22f7..8292ef9cd 100644 --- a/src/burn/drivers/capcom/cps_run.cpp +++ b/src/burn/drivers/capcom/cps_run.cpp @@ -423,8 +423,16 @@ INT32 Cps2Frame() // nCpsCyclesSegment[0] = (nCpsCycles * nVBlank) / 0x0106; // nDone += SekRun(nCpsCyclesSegment[0] - nDone); +#if 0 + // This triggers the VBlank IRQ straight away at display end, + // it causes glitches in the D&D games text (Press Start, Insert Coin, etc) SekSetIRQLine(2, SEK_IRQSTATUS_AUTO); // VBlank SekRun(nCpsCycles - SekTotalCycles()); +#else + // Here we delay the VBlank IRQ until frame-end, or part-way through VBlank + SekRun(nCpsCycles - SekTotalCycles()); + SekSetIRQLine(2, SEK_IRQSTATUS_AUTO); // VBlank +#endif if (pBurnDraw) { CpsDraw();