Example #1
0
inline void am9517a_device::set_dack()
{
	for (int channel = 0; channel < 4; channel++)
	{
		if (channel == 0)
		{
			if ((channel == m_current_channel) && !COMMAND_MEM_TO_MEM)
			{
				m_out_dack_0_cb(COMMAND_DACK_ACTIVE_HIGH);
			}
			else
			{
				m_out_dack_0_cb(!COMMAND_DACK_ACTIVE_HIGH);
			}
		}
		else if (channel == 1)
		{
			if ((channel == m_current_channel) && !COMMAND_MEM_TO_MEM)
			{
				m_out_dack_1_cb(COMMAND_DACK_ACTIVE_HIGH);
			}
			else
			{
				m_out_dack_1_cb(!COMMAND_DACK_ACTIVE_HIGH);
			}
		}
		else if (channel == 2)
		{
			if ((channel == m_current_channel) && !COMMAND_MEM_TO_MEM)
			{
				m_out_dack_2_cb(COMMAND_DACK_ACTIVE_HIGH);
			}
			else
			{
				m_out_dack_2_cb(!COMMAND_DACK_ACTIVE_HIGH);
			}
		}
		else if (channel == 3)
		{
			if ((channel == m_current_channel) && !COMMAND_MEM_TO_MEM)
			{
				m_out_dack_3_cb(COMMAND_DACK_ACTIVE_HIGH);
			}
			else
			{
				m_out_dack_3_cb(!COMMAND_DACK_ACTIVE_HIGH);
			}
		}
	}
}
Example #2
0
inline void i8257_device::set_dack()
{
	m_out_dack_0_cb(m_current_channel != 0);
	m_out_dack_1_cb(m_current_channel != 1);
	m_out_dack_2_cb(m_current_channel != 2);
	m_out_dack_3_cb(m_current_channel != 3);
}