static void send_to_out_b_func(const device_config *device, const char* message) { pia6821_state *p = get_token(device); /* input pins are high-impedance - we just send them as zeros for backwards compatibility */ UINT8 data = get_out_b_value(device); LOG(("PIA #%s: %s = %02X\n", device->tag, message, data)); if (p->out_b_func.write != NULL) devcb_call_write8(&p->out_b_func, 0, data); else { if (p->out_b_needs_pulled) logerror("PIA #%s: Warning! No port B write handler. Previous value has been lost!\n", device->tag); p->out_b_needs_pulled = TRUE; } }
void pia6821_device::send_to_out_b_func(const char* message) { // input pins are high-impedance - we just send them as zeros for backwards compatibility UINT8 data = get_out_b_value(); LOG(("PIA #%s: %s = %02X\n", tag(), message, data)); if(!m_out_b_func.isnull()) { m_out_b_func(0, data); } else { if(m_out_b_needs_pulled) { logerror("PIA #%s: Warning! No port B write handler. Previous value has been lost!\n", tag()); } m_out_b_needs_pulled = true; } }
UINT8 pia6821_device::b_output() { m_out_b_needs_pulled = false; return get_out_b_value(); }