Esempio n. 1
0
static void ym_set_mixing(device_t *device, double left, double right)
{
	xexex_state *state = device->machine().driver_data<xexex_state>();
	flt_volume_set_volume(state->m_filter1l, (71.0 * left) / 55.0);
	flt_volume_set_volume(state->m_filter1r, (71.0 * right) / 55.0);
	flt_volume_set_volume(state->m_filter2l, (71.0 * left) / 55.0);
	flt_volume_set_volume(state->m_filter2r, (71.0 * right) / 55.0);
}
Esempio n. 2
0
static WRITE8_HANDLER( ninjaw_pancontrol )
{
	static const char *const fltname[] = { "2610.1.l", "2610.1.r", "2610.2.l", "2610.2.r" };
	offset = offset&3;
	ninjaw_pandata[offset] = (float)data * (100.f / 255.0f);
	//popmessage(" pan %02x %02x %02x %02x", ninjaw_pandata[0], ninjaw_pandata[1], ninjaw_pandata[2], ninjaw_pandata[3] );
	flt_volume_set_volume(devtag_get_device(space->machine, fltname[offset]), ninjaw_pandata[offset] / 100.0);
}
Esempio n. 3
0
static WRITE8_HANDLER( warriorb_pancontrol )
{
	offset = offset&3;
	ninjaw_pandata[offset] = (data<<1) + data;   /* original volume*3 */

//  popmessage(" pan %02x %02x %02x %02x", ninjaw_pandata[0], ninjaw_pandata[1], ninjaw_pandata[2], ninjaw_pandata[3] );

	flt_volume_set_volume(offset, ninjaw_pandata[offset] / 100.0);
}
Esempio n. 4
0
static WRITE8_HANDLER( othunder_TC0310FAM_w )
{
	/* there are two TC0310FAM, one for CH1 and one for CH2 from the YM2610. The
       PSG output is routed to both chips. */
	static int pan[4];
	int voll,volr;

	pan[offset] = data & 0x1f;

	/* PSG output (single ANALOG OUT pin on the YM2610, but we have three channels
       because we are using the AY-3-8910 emulation. */
	volr = (pan[0] + pan[2]) * 100 / (2 * 0x1f);
	voll = (pan[1] + pan[3]) * 100 / (2 * 0x1f);
	flt_volume_set_volume(0, voll / 100.0);
	flt_volume_set_volume(1, volr / 100.0);

	/* CH1 */
	volr = pan[0] * 100 / 0x1f;
	voll = pan[1] * 100 / 0x1f;
	flt_volume_set_volume(2, voll / 100.0);
	flt_volume_set_volume(3, volr / 100.0);

	/* CH2 */
	volr = pan[2] * 100 / 0x1f;
	voll = pan[3] * 100 / 0x1f;
	flt_volume_set_volume(4, voll / 100.0);
	flt_volume_set_volume(5, volr / 100.0);
}
Esempio n. 5
0
static WRITE8_HANDLER( othunder_TC0310FAM_w )
{
	/* there are two TC0310FAM, one for CH1 and one for CH2 from the YM2610. The
       PSG output is routed to both chips. */
	othunder_state *state = space->machine().driver_data<othunder_state>();
	int voll, volr;

	state->m_pan[offset] = data & 0x1f;

	/* PSG output (single ANALOG OUT pin on the YM2610, but we have three channels
       because we are using the AY-3-8910 emulation. */
	volr = (state->m_pan[0] + state->m_pan[2]) * 100 / (2 * 0x1f);
	voll = (state->m_pan[1] + state->m_pan[3]) * 100 / (2 * 0x1f);
	flt_volume_set_volume(state->m_2610_0l, voll / 100.0);
	flt_volume_set_volume(state->m_2610_0r, volr / 100.0);

	/* CH1 */
	volr = state->m_pan[0] * 100 / 0x1f;
	voll = state->m_pan[1] * 100 / 0x1f;
	flt_volume_set_volume(state->m_2610_1l, voll / 100.0);
	flt_volume_set_volume(state->m_2610_1r, volr / 100.0);

	/* CH2 */
	volr = state->m_pan[2] * 100 / 0x1f;
	voll = state->m_pan[3] * 100 / 0x1f;
	flt_volume_set_volume(state->m_2610_2l, voll / 100.0);
	flt_volume_set_volume(state->m_2610_2r, volr / 100.0);
}
Esempio n. 6
0
static WRITE8_HANDLER( warriorb_pancontrol )
{
	warriorb_state *state = space->machine->driver_data<warriorb_state>();
	device_t *flt = NULL;
	offset &= 3;

	switch (offset)
	{
		case 0: flt = state->_2610_1l; break;
		case 1: flt = state->_2610_1r; break;
		case 2: flt = state->_2610_2l; break;
		case 3: flt = state->_2610_2r; break;
	}

	state->pandata[offset] = (data << 1) + data;   /* original volume*3 */
	//popmessage(" pan %02x %02x %02x %02x", state->pandata[0], state->pandata[1], state->pandata[2], state->pandata[3] );
	flt_volume_set_volume(flt, state->pandata[offset] / 100.0);
}
Esempio n. 7
0
static WRITE8_HANDLER( ninjaw_pancontrol )
{
	ninjaw_state *state = space->machine->driver_data<ninjaw_state>();
	device_t *flt = NULL;
	offset &= 3;

	switch (offset)
	{
		case 0: flt = state->_2610_1l; break;
		case 1: flt = state->_2610_1r; break;
		case 2: flt = state->_2610_2l; break;
		case 3: flt = state->_2610_2r; break;
	}

	state->pandata[offset] = (float)data * (100.f / 255.0f);
	//popmessage(" pan %02x %02x %02x %02x", state->pandata[0], state->pandata[1], state->pandata[2], state->pandata[3] );
	flt_volume_set_volume(flt, state->pandata[offset] / 100.0);
}