示例#1
0
文件: scsi.c 项目: 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);
}
示例#2
0
文件: scsi.cpp 项目: RafTacker/mame
void scsi_port_device::update_data4()
{
	int data4 = m_data4_in;
	for (int i = 0; i < m_device_count; i++)
	{
		data4 |= m_slot[i]->m_data4;
	}

	if (m_data4_out != data4)
	{
		m_data4_out = data4;
		m_data4_handler(data4);

		for (int i = 0; i < m_device_count; i++)
		{
			scsi_port_interface *dev = m_slot[i]->dev();
			if (dev != nullptr)
				dev->input_data4(data4);
		}
	}
}
示例#3
0
文件: ctronics.cpp 项目: Enverex/mame
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);
}
示例#4
0
文件: scsi.cpp 项目: RafTacker/mame
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);
}