Beispiel #1
0
static CUSTOM_INPUT( laserdisc_command_r )
{
	dlair_state *state = field->port->machine->driver_data<dlair_state>();
	switch (laserdisc_get_type(state->laserdisc))
	{
		case LASERDISC_TYPE_PIONEER_PR7820:
			return (laserdisc_line_r(state->laserdisc, LASERDISC_LINE_READY) == ASSERT_LINE) ? 0 : 1;

		case LASERDISC_TYPE_PIONEER_LDV1000:
			return (laserdisc_line_r(state->laserdisc, LASERDISC_LINE_COMMAND) == ASSERT_LINE) ? 0 : 1;

		case LASERDISC_TYPE_PHILLIPS_22VP932:
			return 0;
	}
	return 0;
}
Beispiel #2
0
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;
}
Beispiel #3
0
static int serial_receive(device_t *device, int channel)
{
	dlair_state *state = device->machine->driver_data<dlair_state>();
	/* if we still have data to send, do it now */
	if (channel == 0 && laserdisc_line_r(state->laserdisc, LASERDISC_LINE_DATA_AVAIL) == ASSERT_LINE)
		return laserdisc_data_r(state->laserdisc);

	return -1;
}
Beispiel #4
0
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;
	}
}
Beispiel #5
0
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;
	}
}