mirror of
https://github.com/libretro/mame2003-plus-libretro.git
synced 2024-10-06 22:23:27 +00:00
fix namcos54 and polepos sample
This commit is contained in:
parent
994829d390
commit
8297da7659
@ -1852,7 +1852,7 @@ static struct namco_interface namco_interface =
|
||||
static struct namco_52xx_interface namco_52xx_interface =
|
||||
{
|
||||
18432000/12, /* 1.536 MHz */
|
||||
90, /* volume */
|
||||
80, /* volume */
|
||||
REGION_SOUND2, /* memory region */
|
||||
4000, /* Playback frequency - from 555 timer 6M */
|
||||
80, /* High pass filter fc */
|
||||
@ -1865,13 +1865,13 @@ static struct namco_52xx_interface namco_52xx_interface =
|
||||
static struct namco_54xx_interface namco_54xx_interface =
|
||||
{
|
||||
18432000/12, /* 1.536 MHz */
|
||||
90, /* volume */
|
||||
{ RES_K(100), RES_K(47), RES_K(150) }, /* R24, R33, R42 */
|
||||
{ RES_K(22), RES_K(10), RES_K(22) }, /* R23, R34, R41 */
|
||||
{ RES_K(220), RES_K(150), RES_K(470) }, /* R22, R35, R40 */
|
||||
{ RES_K(33), RES_K(33), RES_K(10)}, /* R21, R36, R37 */
|
||||
{ CAP_U(.001), CAP_U(.01), CAP_U(.01) }, /* C31, C29, C27 */
|
||||
{ CAP_U(.001), CAP_U(.01), CAP_U(.01) }, /* C30, C28, C26 */
|
||||
80, /* volume */
|
||||
{ RES_K(150), RES_K(47), RES_K(100) }, /* R42, R33, R24 */
|
||||
{ RES_K(22), RES_K(10), RES_K(22) }, /* R41, R34, R23 */
|
||||
{ RES_K(470), RES_K(150), RES_K(220) }, /* R40, R35, R22 */
|
||||
{ RES_K(10), RES_K(33), RES_K(33)}, /* R37, R36, R21 */
|
||||
{ CAP_U(.01), CAP_U(.01), CAP_U(.001) }, /* C27, C29, C31 */
|
||||
{ CAP_U(.01), CAP_U(.01), CAP_U(.001) }, /* C26, C28, C30 */
|
||||
};
|
||||
|
||||
static const char *bosco_sample_names[] =
|
||||
|
@ -555,9 +555,9 @@ void NAMCO54xxUpdateOne(int num, INT16 **buffers, int length)
|
||||
if (filter54[loop].y0 < -2) filter54[loop].y0 = -2;
|
||||
}
|
||||
|
||||
(buf1)[i] = filter54[0].y0 * (32768/2);
|
||||
(buf2)[i] = filter54[1].y0 * (32768/2);
|
||||
(buf3)[i] = filter54[2].y0 * (32768/2);
|
||||
(buf1)[i] = filter54[0].y0 * (16384/2);
|
||||
(buf2)[i] = filter54[1].y0 * (16384/2);
|
||||
(buf3)[i] = filter54[2].y0 * (16384/2);
|
||||
|
||||
advance();
|
||||
}
|
||||
@ -630,15 +630,16 @@ logerror("%04x: custom 54XX write %02x\n",activecpu_get_pc(),data);
|
||||
/* 0x7n = Screech sound. n = volume (if 0 then no sound) */
|
||||
/* followed by 0x60 command */
|
||||
#if 1
|
||||
if (( data & 0x0f ) == 0)
|
||||
if ( data == 112 )
|
||||
{
|
||||
if (sample_playing(0))
|
||||
sample_stop(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
int freq = (int)( ( 44100.0f / 10.0f ) * (float)(data & 0x0f) ); /* this is wrong, it's a volume and not a freq */
|
||||
|
||||
//int freq = (int)( ( 22050.0f / 10.0f ) * (float)(data & 0x0f) ); /* this is wrong, it's a volume and not a freq */
|
||||
int freq = (int) 22050 + (data - 112)* 750;
|
||||
|
||||
if (!sample_playing(0))
|
||||
sample_start(0, 0, 1);
|
||||
sample_set_freq(0, freq);
|
||||
|
Loading…
Reference in New Issue
Block a user