Exemple #1
0
static void send_to_out_a_func(const device_config *device, const char* message)
{
	pia6821_state *p = get_token(device);

	/* input pins are pulled high */
	UINT8 data = get_out_a_value(device);

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

	if (p->out_a_func.write != NULL)
		devcb_call_write8(&p->out_a_func, 0, data);
	else
	{
		if (p->out_a_needs_pulled)
			logerror("PIA #%s: Warning! No port A write handler. Previous value has been lost!\n", device->tag);

		p->out_a_needs_pulled = TRUE;
	}
}
Exemple #2
0
void pia6821_device::send_to_out_a_func(const char* message)
{
	// input pins are pulled high
	UINT8 data = get_out_a_value();

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

	if(!m_out_a_func.isnull())
	{
		m_out_a_func(0, data);
	}
	else
	{
		if(m_out_a_needs_pulled)
		{
			logerror("PIA #%s: Warning! No port A write handler. Previous value has been lost!\n", tag());
		}

		m_out_a_needs_pulled = true;
	}
}
Exemple #3
0
UINT8 pia6821_device::a_output()
{
	m_out_a_needs_pulled = false;

	return get_out_a_value();
}