static INPUT_CHANGED( pen_check ) { UINT8 button = field.machine().root_device().ioport("PENB")->read(); palm_state *state = field.machine().driver_data<palm_state>(); if(button) mc68328_set_penirq_line(state->m_lsi, 1); else mc68328_set_penirq_line(state->m_lsi, 0); }
static INPUT_CHANGED( pen_check ) { UINT8 button = input_port_read(field->port->machine(), "PENB"); device_t *mc68328_device = field->port->machine().device("dragonball"); if(button) { mc68328_set_penirq_line(mc68328_device, 1); } else { mc68328_set_penirq_line(mc68328_device, 0); } }