static void vsync_callback(running_machine &machine) { alg_state *state = machine.driver_data<alg_state>(); /* if we have data available, set a timer to read it */ if (!state->m_serial_timer_active && state->m_laserdisc->data_available_r() == ASSERT_LINE) { state->m_serial_timer->adjust(amiga_get_serial_char_period(machine)); state->m_serial_timer_active = TRUE; } }
static void serial_w(UINT16 data) { /* write to the laserdisc player */ laserdisc_data_w(discinfo, data & 0xff); /* if we have data available, set a timer to read it */ if (!serial_timer_active && laserdisc_line_r(discinfo, LASERDISC_LINE_DATA_AVAIL) == ASSERT_LINE) { timer_adjust(serial_timer, amiga_get_serial_char_period(), 0, 0); serial_timer_active = TRUE; } }
static void vsync_callback(void) { /* only clock the disc every other frame */ laserdisc_vsync(discinfo); /* if we have data available, set a timer to read it */ if (!serial_timer_active && laserdisc_line_r(discinfo, LASERDISC_LINE_DATA_AVAIL) == ASSERT_LINE) { timer_adjust(serial_timer, amiga_get_serial_char_period(), 0, 0); serial_timer_active = TRUE; } }
static void serial_w(running_machine &machine, UINT16 data) { alg_state *state = machine.driver_data<alg_state>(); /* write to the laserdisc player */ state->m_laserdisc->data_w(data & 0xff); /* if we have data available, set a timer to read it */ if (!state->m_serial_timer_active && state->m_laserdisc->data_available_r() == ASSERT_LINE) { state->m_serial_timer->adjust(amiga_get_serial_char_period(machine)); state->m_serial_timer_active = TRUE; } }
static void response_timer(int param) { /* if we still have data to send, do it now */ if (laserdisc_line_r(discinfo, LASERDISC_LINE_DATA_AVAIL) == ASSERT_LINE) { UINT8 data = laserdisc_data_r(discinfo); if (data != 0x0a) mame_printf_debug("Sending serial data = %02X\n", data); amiga_serial_in_w(data); } /* if there's more to come, set another timer */ if (laserdisc_line_r(discinfo, LASERDISC_LINE_DATA_AVAIL) == ASSERT_LINE) timer_adjust(serial_timer, amiga_get_serial_char_period(), 0, 0); else serial_timer_active = FALSE; }