Exemplo n.º 1
0
Arquivo: scsi.c Projeto: Eduardop/mame
void SCSI_PORT_DEVICE::device_start()
{
	const char *deviceName[] =
	{
		SCSI_PORT_DEVICE1,
		SCSI_PORT_DEVICE2,
		SCSI_PORT_DEVICE3,
		SCSI_PORT_DEVICE4,
		SCSI_PORT_DEVICE5,
		SCSI_PORT_DEVICE6,
		SCSI_PORT_DEVICE7
	};

	m_device_count = 0;

	for (int i = 0; i < 7; i++)
	{
		SCSI_PORT_SLOT_device *slot = subdevice<SCSI_PORT_SLOT_device>(deviceName[i]);
		m_slot[i] = slot;

		if (slot != NULL)
			m_device_count = i + 1;
	}

	m_bsy_handler.resolve_safe();
	m_sel_handler.resolve_safe();
	m_cd_handler.resolve_safe();
	m_io_handler.resolve_safe();
	m_msg_handler.resolve_safe();
	m_req_handler.resolve_safe();
	m_ack_handler.resolve_safe();
	m_atn_handler.resolve_safe();
	m_rst_handler.resolve_safe();
	m_data0_handler.resolve_safe();
	m_data1_handler.resolve_safe();
	m_data2_handler.resolve_safe();
	m_data3_handler.resolve_safe();
	m_data4_handler.resolve_safe();
	m_data5_handler.resolve_safe();
	m_data6_handler.resolve_safe();
	m_data7_handler.resolve_safe();

	m_data0_handler(0);
	m_data1_handler(0);
	m_data2_handler(0);
	m_data3_handler(0);
	m_data4_handler(0);
	m_data5_handler(0);
	m_data6_handler(0);
	m_data7_handler(0);
}
Exemplo n.º 2
0
void scsi_port_device::update_data0()
{
	int data0 = m_data0_in;
	for (int i = 0; i < m_device_count; i++)
	{
		data0 |= m_slot[i]->m_data0;
	}

	if (m_data0_out != data0)
	{
		m_data0_out = data0;
		m_data0_handler(data0);

		for (int i = 0; i < m_device_count; i++)
		{
			scsi_port_interface *dev = m_slot[i]->dev();
			if (dev != nullptr)
				dev->input_data0(data0);
		}
	}
}
Exemplo n.º 3
0
void centronics_device::device_start()
{
	m_strobe_handler.resolve_safe();
	m_data0_handler.resolve_safe();
	m_data1_handler.resolve_safe();
	m_data2_handler.resolve_safe();
	m_data3_handler.resolve_safe();
	m_data4_handler.resolve_safe();
	m_data5_handler.resolve_safe();
	m_data6_handler.resolve_safe();
	m_data7_handler.resolve_safe();
	m_ack_handler.resolve_safe();
	m_busy_handler.resolve_safe();
	m_perror_handler.resolve_safe();
	m_select_handler.resolve_safe();
	m_autofd_handler.resolve_safe();
	m_fault_handler.resolve_safe();
	m_init_handler.resolve_safe();
	m_select_in_handler.resolve_safe();

	// pull up
	m_strobe_handler(1);
	m_data0_handler(1);
	m_data1_handler(1);
	m_data2_handler(1);
	m_data3_handler(1);
	m_data4_handler(1);
	m_data5_handler(1);
	m_data6_handler(1);
	m_data7_handler(1);
	m_ack_handler(1);
	m_busy_handler(1);
	m_perror_handler(1);
	m_select_handler(1);
	m_autofd_handler(1);
	m_fault_handler(1);
	m_init_handler(1);
	m_select_in_handler(1);
}
Exemplo n.º 4
0
MACHINE_CONFIG_END

void scsi_port_device::device_start()
{
	const char *deviceName[] =
	{
		SCSI_PORT_DEVICE1,
		SCSI_PORT_DEVICE2,
		SCSI_PORT_DEVICE3,
		SCSI_PORT_DEVICE4,
		SCSI_PORT_DEVICE5,
		SCSI_PORT_DEVICE6,
		SCSI_PORT_DEVICE7
	};

	m_device_count = 0;

	for (int i = 0; i < 7; i++)
	{
		scsi_port_slot_device *slot = subdevice<scsi_port_slot_device>(deviceName[i]);
		m_slot[i] = slot;

		if (slot != nullptr)
			m_device_count = i + 1;
	}

	m_bsy_handler.resolve_safe();
	m_sel_handler.resolve_safe();
	m_cd_handler.resolve_safe();
	m_io_handler.resolve_safe();
	m_msg_handler.resolve_safe();
	m_req_handler.resolve_safe();
	m_ack_handler.resolve_safe();
	m_atn_handler.resolve_safe();
	m_rst_handler.resolve_safe();
	m_data0_handler.resolve_safe();
	m_data1_handler.resolve_safe();
	m_data2_handler.resolve_safe();
	m_data3_handler.resolve_safe();
	m_data4_handler.resolve_safe();
	m_data5_handler.resolve_safe();
	m_data6_handler.resolve_safe();
	m_data7_handler.resolve_safe();

	m_data0_handler(0);
	m_data1_handler(0);
	m_data2_handler(0);
	m_data3_handler(0);
	m_data4_handler(0);
	m_data5_handler(0);
	m_data6_handler(0);
	m_data7_handler(0);

	m_bsy_handler(0);
	m_sel_handler(0);
	m_cd_handler(0);
	m_io_handler(0);
	m_msg_handler(0);
	m_req_handler(0);
	m_ack_handler(0);
	m_atn_handler(0);
	m_rst_handler(0);
}