mirror of
https://github.com/libretro/mame2003-plus-libretro.git
synced 2024-11-23 08:19:42 +00:00
Fix scross engine sounds missing - dink
This commit is contained in:
parent
90f5941078
commit
c86232158c
@ -397,31 +397,7 @@ static void MultiPCM_reg_w(int chip, int offset, unsigned char data)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: /* sample*/
|
case 1: /* sample*/
|
||||||
break;
|
inum = cptr->registers[vnum][1];
|
||||||
|
|
||||||
case 2: /* pitch LSB*/
|
|
||||||
/* MUST fall through to update pitch also!*/
|
|
||||||
case 3: /* pitch MSB*/
|
|
||||||
/* compute frequency divisor*/
|
|
||||||
pitch = (cptr->registers[vnum][3]<<8) + cptr->registers[vnum][2];
|
|
||||||
pt_abs = (double)abs(pitch);
|
|
||||||
pt_oct = pt_abs>>12;
|
|
||||||
if(pitch < 0)
|
|
||||||
{
|
|
||||||
vptr->ptdelta = cptr->dlttbl[0x1000 - (pt_abs&0xfff)];
|
|
||||||
vptr->ptdelta >>= (pt_oct+1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
vptr->ptdelta = cptr->dlttbl[pt_abs&0xfff];
|
|
||||||
vptr->ptdelta <<= pt_oct;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 4: /* key on/off*/
|
|
||||||
if (data & 0x80)
|
|
||||||
{
|
|
||||||
inum = cptr->registers[vnum][1];
|
|
||||||
|
|
||||||
/* calc decay amount*/
|
/* calc decay amount*/
|
||||||
vptr->relamt = decaytbl[(0x0f - cptr->samples[inum].env[2])];
|
vptr->relamt = decaytbl[(0x0f - cptr->samples[inum].env[2])];
|
||||||
@ -461,8 +437,32 @@ static void MultiPCM_reg_w(int chip, int offset, unsigned char data)
|
|||||||
|
|
||||||
vptr->ptoffset = 0;
|
vptr->ptoffset = 0;
|
||||||
vptr->ptsum = 0;
|
vptr->ptsum = 0;
|
||||||
vptr->active = 1;
|
|
||||||
vptr->relstage = 0;
|
vptr->relstage = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2: /* pitch LSB*/
|
||||||
|
/* MUST fall through to update pitch also!*/
|
||||||
|
case 3: /* pitch MSB*/
|
||||||
|
/* compute frequency divisor*/
|
||||||
|
pitch = (cptr->registers[vnum][3]<<8) + cptr->registers[vnum][2];
|
||||||
|
pt_abs = (double)abs(pitch);
|
||||||
|
pt_oct = pt_abs>>12;
|
||||||
|
if(pitch < 0)
|
||||||
|
{
|
||||||
|
vptr->ptdelta = cptr->dlttbl[0x1000 - (pt_abs&0xfff)];
|
||||||
|
vptr->ptdelta >>= (pt_oct+1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vptr->ptdelta = cptr->dlttbl[pt_abs&0xfff];
|
||||||
|
vptr->ptdelta <<= pt_oct;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4: /* key on/off*/
|
||||||
|
if (data & 0x80)
|
||||||
|
{
|
||||||
|
vptr->active = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user