little update to shaolins
This commit is contained in:
parent
8e0769f100
commit
e5a925d9b1
|
@ -360,10 +360,10 @@ static INT32 DrvInit()
|
|||
M6809SetReadHandler(shaolins_read);
|
||||
M6809Close();
|
||||
|
||||
SN76496Init(0, 1536000, 0);
|
||||
SN76489Init(0, 1536000, 0);
|
||||
SN76496SetRoute(0, 1.00, BURN_SND_ROUTE_BOTH);
|
||||
|
||||
SN76496Init(1, 3072000, 1);
|
||||
SN76489Init(1, 3072000, 1);
|
||||
SN76496SetRoute(1, 1.00, BURN_SND_ROUTE_BOTH);
|
||||
|
||||
GenericTilesInit();
|
||||
|
@ -486,6 +486,7 @@ static INT32 DrvFrame()
|
|||
INT32 nInterleave = 256;
|
||||
INT32 nCyclesTotal[1] = { 1536000 / 60 };
|
||||
INT32 nCyclesDone[1] = { 0 };
|
||||
INT32 nSoundBufferPos = 0;
|
||||
|
||||
M6809Open(0);
|
||||
|
||||
|
@ -497,11 +498,25 @@ static INT32 DrvFrame()
|
|||
M6809SetIRQLine(0x20, M6809_IRQSTATUS_AUTO); // 480x/second (8x/frame)
|
||||
|
||||
if (i == 240) M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
|
||||
|
||||
// Render Sound Segment
|
||||
if (pBurnSoundOut) {
|
||||
INT32 nSegmentLength = nBurnSoundLen - nSoundBufferPos;
|
||||
INT16* pSoundBuf = pBurnSoundOut + (nSoundBufferPos << 1);
|
||||
SN76496Update(0, pSoundBuf, nSegmentLength);
|
||||
SN76496Update(1, pSoundBuf, nSegmentLength);
|
||||
nSoundBufferPos += nSegmentLength;
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure the buffer is entirely filled.
|
||||
if (pBurnSoundOut) {
|
||||
SN76496Update(0, pBurnSoundOut, nBurnSoundLen);
|
||||
SN76496Update(1, pBurnSoundOut, nBurnSoundLen);
|
||||
INT32 nSegmentLength = nBurnSoundLen - nSoundBufferPos;
|
||||
INT16* pSoundBuf = pBurnSoundOut + (nSoundBufferPos << 1);
|
||||
if (nSegmentLength) {
|
||||
SN76496Update(0, pSoundBuf, nSegmentLength);
|
||||
SN76496Update(1, pSoundBuf, nSegmentLength);
|
||||
}
|
||||
}
|
||||
|
||||
M6809Close();
|
||||
|
|
Loading…
Reference in New Issue