From 8bd4f6d2bf518008690681d800f3c9ef9eaa8093 Mon Sep 17 00:00:00 2001 From: dinkc64 <12570148+dinkc64@users.noreply.github.com> Date: Mon, 10 Nov 2014 05:50:06 +0000 Subject: [PATCH] gradius 3, correct irq timing, toki, fix comment --- src/burn/drv/konami/d_gradius3.cpp | 11 ++++++----- src/burn/drv/pre90s/d_toki.cpp | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/burn/drv/konami/d_gradius3.cpp b/src/burn/drv/konami/d_gradius3.cpp index 7fa271d56..19a14355f 100644 --- a/src/burn/drv/konami/d_gradius3.cpp +++ b/src/burn/drv/konami/d_gradius3.cpp @@ -755,7 +755,7 @@ static INT32 DrvFrame() INT32 nCycleSegment; INT32 nSoundBufferPos = 0; - INT32 nInterleave = 150; + INT32 nInterleave = 256; INT32 nCyclesTotal[3] = { 10000000 / 60, 10000000 / 60, 3579545 / 60 }; INT32 nCyclesDone[3] = { 0, 0, 0 }; @@ -774,9 +774,9 @@ static INT32 DrvFrame() nCycleSegment = (nCyclesTotal[1] / nInterleave) * (i + 1); nCyclesDone[1] += SekRun(nCycleSegment - SekTotalCycles()); if (interrupt_triggered) SekSetIRQLine(4, SEK_IRQSTATUS_AUTO); - if (i == (nInterleave - 1) && (irqB_mask & 1)) + if (i == 240 && (irqB_mask & 1)) SekSetIRQLine(1, SEK_IRQSTATUS_AUTO); - if (i == ((nInterleave / 2) - 1) && (irqB_mask & 2)) + if (i == 16 && (irqB_mask & 2)) SekSetIRQLine(2, SEK_IRQSTATUS_AUTO); SekClose(); } @@ -788,7 +788,7 @@ static INT32 DrvFrame() INT32 nSegmentLength = nBurnSoundLen / nInterleave; INT16* pSoundBuf = pBurnSoundOut + (nSoundBufferPos << 1); BurnYM2151Render(pSoundBuf, nSegmentLength); - K007232Update(0, pSoundBuf, nSegmentLength); + //K007232Update(0, pSoundBuf, nSegmentLength); nSoundBufferPos += nSegmentLength; } @@ -800,8 +800,9 @@ static INT32 DrvFrame() if (nSegmentLength) { INT16* pSoundBuf = pBurnSoundOut + (nSoundBufferPos << 1); BurnYM2151Render(pSoundBuf, nSegmentLength); - K007232Update(0, pSoundBuf, nSegmentLength); + //K007232Update(0, pSoundBuf, nSegmentLength); } + K007232Update(0, pBurnSoundOut, nBurnSoundLen); } ZetClose(); diff --git a/src/burn/drv/pre90s/d_toki.cpp b/src/burn/drv/pre90s/d_toki.cpp index 56cccf212..07f5a7008 100644 --- a/src/burn/drv/pre90s/d_toki.cpp +++ b/src/burn/drv/pre90s/d_toki.cpp @@ -1236,7 +1236,7 @@ static INT32 DrvFrame() assemble_inputs(0xffff, 0xffff); INT32 nInterleave = 256; - INT32 nCyclesTotal[2] = { (10000000 * 100) / 5961, 3579545 / 60 }; // 59.61 fps, overclock from 10mhz to 12mhz + INT32 nCyclesTotal[2] = { (10000000 * 100) / 5961, 3579545 / 60 }; // 59.61 fps INT32 nCyclesDone[2] = { 0, 0 }; SekOpen(0);