mirror of
https://github.com/holub/mame
synced 2025-05-21 05:08:54 +03:00
Fixed independent channel volumes in Okim6376 sound chip, used by the games from the Road Hog era of MPU4 [J. Wallace]
This commit is contained in:
parent
f818f699f8
commit
3d5a7dfd54
@ -75,7 +75,7 @@ static const int volume_table[3] =
|
|||||||
|
|
||||||
/* divisor lookup table. When an individual word is selected, it can be assigned one of three different 'rates'.
|
/* divisor lookup table. When an individual word is selected, it can be assigned one of three different 'rates'.
|
||||||
These are implemented as clock divisors, and are looked up in the ROM header. More often than not, this value is 0,
|
These are implemented as clock divisors, and are looked up in the ROM header. More often than not, this value is 0,
|
||||||
relating to a division by 8, or nominally 8KHz sampling (based on the datasheet exampleof a 64KHz clock).*/
|
relating to a division by 8, or nominally 8KHz sampling (based on the datasheet example of a 64KHz clock).*/
|
||||||
static const int divisor_table[3] =
|
static const int divisor_table[3] =
|
||||||
{
|
{
|
||||||
8,
|
8,
|
||||||
@ -219,9 +219,12 @@ static void oki_process(okim6376_state *info, int channel, int command)
|
|||||||
|
|
||||||
/* also reset the ADPCM parameters */
|
/* also reset the ADPCM parameters */
|
||||||
reset_adpcm(voice);
|
reset_adpcm(voice);
|
||||||
/* FIX: no attenuation for now, handle for channel 2 separately */
|
if (channel == 0)
|
||||||
|
{
|
||||||
|
/* We set channel 2's audio separately */
|
||||||
voice->volume = volume_table[0];
|
voice->volume = volume_table[0];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (((info->nar)&&(channel == 0))||(channel == 1))//Store the request, for later processing (channel 2 ignores NAR)
|
if (((info->nar)&&(channel == 0))||(channel == 1))//Store the request, for later processing (channel 2 ignores NAR)
|
||||||
@ -574,6 +577,7 @@ WRITE_LINE_DEVICE_HANDLER( okim6376_st_w )
|
|||||||
{
|
{
|
||||||
|
|
||||||
info->st_pulses ++;
|
info->st_pulses ++;
|
||||||
|
MSM6376LOG(("OKIM6376:'%s' ST pulses %x\n",device->tag(),info->st_pulses));
|
||||||
if (info->st_pulses > 3)
|
if (info->st_pulses > 3)
|
||||||
{
|
{
|
||||||
info->st_pulses = 3; //undocumented behaviour beyond 3 pulses
|
info->st_pulses = 3; //undocumented behaviour beyond 3 pulses
|
||||||
|
Loading…
Reference in New Issue
Block a user