static WRITE8_HANDLER( paradise_okibank_w ) { if (data & ~0x02) logerror("CPU #0 - PC %04X: unknown oki bank bits %02X\n",activecpu_get_pc(),data); if (sndti_to_sndnum(SOUND_OKIM6295, 1) >= 0) OKIM6295_set_bank_base(1, (data & 0x02) ? 0x40000 : 0); }
static WRITE8_HANDLER( snddata_w ) { int num_ays = (sndti_to_sndnum(SOUND_AY8910, 1) != -1) ? 2 : 1; if ((p2 & 0xf0) == 0xe0) AY8910_control_port_0_w(0,offset); else if ((p2 & 0xf0) == 0xa0) AY8910_write_port_0_w(0,offset); else if (num_ays == 2 && (p1 & 0xe0) == 0x60) AY8910_control_port_1_w(0,offset); else if (num_ays == 2 && (p1 & 0xe0) == 0x40) AY8910_write_port_1_w(0,offset); else /* if ((p2 & 0xf0) != 0x70) */ /* the port address is the data, while the data seems to be control bits */ logerror("%04x: snddata_w ctrl = %02x, p1 = %02x, p2 = %02x, data = %02x\n",activecpu_get_pc(),data,p1,p2,offset); }
void sndti_set_output_gain(sound_type type, int index, int output, float gain) { int sndnum = sndti_to_sndnum(type, index); if (sndnum < 0) { logerror("sndti_set_output_gain called for invalid sound type %d, index %d\n", type, index); return; } if (output >= sound[sndnum].outputs) { logerror("sndti_set_output_gain called for invalid sound output %d (type %d, index %d)\n", output, type, index); return; } stream_set_output_gain(sound[sndnum].output[output].stream, sound[sndnum].output[output].output, gain); }