Exemplo n.º 1
0
void pia6821_device::control_b_w(UINT8 data)
{
	int temp;

	// bit 7 and 6 are read only
	data &= 0x3f;

	LOG(("PIA #%s: control B write = %02X\n", tag(), data));

	// update the control register
	m_ctl_b = data;

	if (C2_SET_MODE(m_ctl_b))
	{
		// set/reset mode - bit value determines the new output
		temp = C2_SET(m_ctl_b);
	}
	else
	{
		// strobe mode - output is always high unless strobed
		temp = TRUE;
	}

	set_out_cb2(temp);

	// update externals
	update_interrupts();
}
Exemplo n.º 2
0
static void control_b_w(const device_config *device, UINT8 data)
{
	pia6821_state *p = get_token(device);
	int temp;

	/* bit 7 and 6 are read only */
	data &= 0x3f;

	LOG(("PIA #%s: control B write = %02X\n", device->tag, data));

	/* update the control register */
	p->ctl_b = data;

	if (C2_SET_MODE(p->ctl_b))
		/* set/reset mode - bit value determines the new output */
		temp = C2_SET(p->ctl_b);
	else
		/* strobe mode - output is always high unless strobed */
		temp = TRUE;

	set_out_cb2(device, temp);

	/* update externals */
	update_interrupts(device);
}