void ds75161a_device::update_signals() { m_out_ren_func(m_dc ? 1 : m_ren); m_out_ifc_func(m_dc ? 1 : m_ifc); m_out_ndac_func(m_te ? 1 : m_ndac); m_out_nrfd_func(m_te ? 1 : m_nrfd); m_out_dav_func(m_te ? m_dav : 1); m_out_atn_func(m_dc ? 1 : m_atn); m_out_srq_func(m_dc ? m_srq : 1 ); int atn = m_in_atn_func(); if (m_te && atn) m_out_eoi_func(m_eoi); else if (!m_dc && !atn) m_out_eoi_func(m_eoi); else m_out_eoi_func(1); }
inline void ieee488_device::set_signal(device_t *device, int signal, int state) { bool changed = false; if (device == this) { if (m_line[signal] != state) { if (LOG) logerror("%s IEEE488: '%s' %s %u\n", machine().describe_context(), tag(), SIGNAL_NAME[signal], state); m_line[signal] = state; changed = true; } } else { daisy_entry *entry = m_device_list.first(); while (entry) { if (!strcmp(entry->m_device->tag(), device->tag())) { if (entry->m_line[signal] != state) { if (LOG) logerror("%s IEEE488: '%s' %s %u\n", machine().describe_context(), device->tag(), SIGNAL_NAME[signal], state); entry->m_line[signal] = state; changed = true; } } entry = entry->next(); } } if (changed) { switch (signal) { case EOI: m_out_eoi_func(state); break; case DAV: m_out_dav_func(state); break; case NRFD: m_out_nrfd_func(state); break; case NDAC: m_out_ndac_func(state); break; case IFC: m_out_ifc_func(state); break; case SRQ: m_out_srq_func(state); break; case ATN: m_out_atn_func(state); break; case REN: m_out_ren_func(state); break; } daisy_entry *entry = m_device_list.first(); while (entry) { switch (signal) { case EOI: entry->m_interface->ieee488_eoi(state); break; case DAV: entry->m_interface->ieee488_dav(state); break; case NRFD: entry->m_interface->ieee488_nrfd(state); break; case NDAC: entry->m_interface->ieee488_ndac(state); break; case IFC: entry->m_interface->ieee488_ifc(state); break; case SRQ: entry->m_interface->ieee488_srq(state); break; case ATN: entry->m_interface->ieee488_atn(state); break; case REN: entry->m_interface->ieee488_ren(state); break; } entry = entry->next(); } if (LOG) logerror("IEEE488: EOI %u DAV %u NRFD %u NDAC %u IFC %u SRQ %u ATN %u REN %u DIO %02x\n", get_signal(EOI), get_signal(DAV), get_signal(NRFD), get_signal(NDAC), get_signal(IFC), get_signal(SRQ), get_signal(ATN), get_signal(REN), get_data()); } }
void ieee488_stub_device::ieee488_srq(int state) { m_out_srq_func(state); }