Example #1
0
void apollo_kbd_device::rcv_complete()    // Rx completed receiving byte
{
	receive_register_extract();
	UINT8 data = get_received_char();

	kgetchar(data);
}
Example #2
0
void i8251_device::receive_clock()
{
	/* receive enable? */
	if (BIT(m_command, 2))
	{
		const bool sync = is_receive_register_synchronized();
		if (sync)
		{
			--m_rxc_count;
			if (m_rxc_count)
				return;
		}

		//logerror("I8251\n");
		/* get bit received from other side and update receive register */
		receive_register_update_bit(m_rxd);
		if (is_receive_register_synchronized())
			m_rxc_count = sync ? m_br_factor : (3 * m_br_factor / 2);

		if (is_receive_register_full())
		{
			receive_register_extract();
			receive_character(get_received_char());
		}
	}
}
Example #3
0
void sb16_device::rcv_complete()    // Rx completed receiving byte
{
	receive_register_extract();
	UINT8 data = get_received_char();

	// for UART or MPU, add character to the receive queue
	if (m_uart_midi || m_mpu_midi)
	{
		m_recvring[m_recv_write++] = data;
		if (m_recv_write >= MIDI_RING_SIZE)
		{
			m_recv_write = 0;
		}

		if (m_recv_write != m_recv_read)
		{
			m_rx_waiting++;
		}

		if (m_uart_irq)
		{
			irq_w(1, IRQ_DMA8);
		}

		if (m_mpu_midi)
		{
			irq_w(1, IRQ_MPU);
		}
	}
}
Example #4
0
void graph_link_hle_device::rcv_complete()
{
	receive_register_extract();
	if (m_ready)
	{
		assert(m_empty);

		send_byte(get_received_char());
		m_ready = false;
	}
	else
	{
		m_buffer[m_head] = get_received_char();
		m_head = (m_head + 1) % BUFLEN;
		m_empty = false;
	}
}
Example #5
0
void mc2661_device::rcv_complete()
{
	// TODO
	receive_register_extract();
	m_rhr = get_received_char();
	m_sr |= STATUS_RXRDY;
	m_write_rxrdy(ASSERT_LINE);
}
Example #6
0
//-------------------------------------------------
//  rcv_complete -
//-------------------------------------------------
void z80sio_channel::rcv_complete()
{
	UINT8 data;

	receive_register_extract();
	data = get_received_char();
	LOG(("%" I64FMT "d %s() \"%s \"Channel %c Received Data %02x\n", machine().firstcpu->total_cycles(), FUNCNAME, m_owner->tag().c_str(), 'A' + m_index, data));
	receive_data(data);
}
Example #7
0
//-------------------------------------------------
//  rcv_complete -
//-------------------------------------------------
void z80sio_channel::rcv_complete()
{
	uint8_t data;

	receive_register_extract();
	data = get_received_char();
	LOG("%s() \"%s \"Channel %c Received Data %02x\n", FUNCNAME, m_owner->tag(), 'A' + m_index, data);
	receive_data(data);
}
Example #8
0
void wangpc_keyboard_device::rcv_complete()
{
	receive_register_extract();

	if (LOG) logerror("KB '%s' Receive Data %02x\n", tag(), get_received_char());

	m_maincpu->set_input_line(MCS51_RX_LINE, ASSERT_LINE);
	m_maincpu->set_input_line(MCS51_RX_LINE, CLEAR_LINE);
}
Example #9
0
void lk201_device::rcv_complete()
{
	sci_status |= SCSR_RDRF;
	update_interrupts();
	receive_register_extract();

	int data = get_received_char();
	m_kbd_state = data;
//  printf("\nlk201 got %02x\n", m_kbd_state);
}
Example #10
0
void midiout_device::rcv_complete()    // Rx completed receiving byte
{
	receive_register_extract();
	UINT8 data = get_received_char();

	if (m_midi)
	{
		m_midi->write(data);
	}
}
Example #11
0
void snes_miracle_device::rcv_complete()    // Rx completed receiving byte
{
	receive_register_extract();
	UINT8 rcv = get_received_char();

//  printf("Got %02x -> [%d]\n", rcv, m_recv_write);
	m_recvring[m_recv_write++] = rcv;
	if (m_recv_write >= RECV_RING_SIZE)
	{
		m_recv_write = 0;
	}
}
Example #12
0
void wangpc_keyboard_device::input_callback(UINT8 state)
{
	int bit = (state & RX) ? 1 : 0;

	receive_register_update_bit(bit);

	if (is_receive_register_full())
	{
		m_maincpu->set_input_line(MCS51_RX_LINE, ASSERT_LINE);
		receive_register_extract();

		if (LOG) logerror("Wang PC keyboard receive data %02x\n", get_received_char());
	}
}
Example #13
0
void im6402_device::rcv_complete()
{
	receive_register_extract();
	m_rbr = get_received_char();

	if (LOG) logerror("IM6402 '%s' Receive Data %02x\n", tag().c_str(), m_rbr);

	if (m_dr)
	{
		m_oe = 1;
	}

	set_dr(ASSERT_LINE);
}
Example #14
0
void mc68901_device::rcv_complete()
{
	receive_register_extract();
	if (m_rsr & RSR_BUFFER_FULL)
	{
		m_overrun_pending = true;
	}
	else
	{
		m_receive_buffer = get_received_char();
		m_rsr |= RSR_BUFFER_FULL;
		LOG("Received Character: %02x\n", m_receive_buffer);
	}
	rx_buffer_full();
}
Example #15
0
void px4_state::rcv_complete()
{
	receive_register_extract();
	m_artdir = get_received_char();

	// TODO: verify parity and framing

	// overrun?
	if (m_artsr & ART_RXRDY)
		m_artsr |= ART_OE;

	// set ready and signal interrupt
	m_artsr |= ART_RXRDY;
	m_isr |= INT1_ART;
	gapnit_interrupt();
}
Example #16
0
void jvc_xvd701_device::rcv_complete()
{
	receive_register_extract();

	for (int i = 0; i < sizeof(m_command) - 1; i++)
		m_command[i] = m_command[i + 1];

	m_command[sizeof(m_command) - 1] = get_received_char();

	if (m_command[0] == 0xff &&
		m_command[1] == 0xff &&
		m_command[2] == 0x21 &&
		sum(m_command, sizeof(m_command)) == 0)
	{
		// printf("xvd701");

		//for (int i = 0; i < sizeof(m_command); i++)
		//	printf(" %02x", m_command[i]);

		//printf("\n");

		// FF FF 21 3E 40 70 00 00 00 00 73 DEVICE ON
		// FF FF 21 3E 40 60 00 00 00 00 03 DEVICE OFF
		// FF FF 21 0C 44 60 00 00 00 00 31 STOP
		// FF FF 21 0C 43 75 00 00 00 00 1D PLAY
		// FF FF 21 0C 43 6D 00 00 00 00 25 PAUSE
		// FF FF 21 0C 50 20 00 00 00 00 63 SEEK TO SPECIFIC CHAPTER
		// FF FF 21 0C 50 73 00 00 00 00 12 FF (SEEK TO NEXT CHAPTER)
		// FF FF 21 0C 50 61 00 00 00 00 24 PREV (SEEK TO PREVIOUS CHAPTER)

		m_response[0] = 0xff;
		m_response[1] = 0xfe;
		m_response[2] = 0x7f;
		m_response[3] = 0x7e;
		m_response[4] = 0x7d;
		m_response[5] = 0x7c;
		m_response[6] = 0x7b;
		m_response[7] = 0x7a;
		m_response[8] = 0x79;
		m_response[9] = 0x78;
		m_response[10] = 0x77;
		m_response_index = 0;

		m_timer_response->adjust(attotime::from_msec(100));
	}
}
Example #17
0
void i8251_device::receive_clock()
{
	/* receive enable? */
	if (m_command & (1<<2))
	{
		//logerror("I8251\n");
		/* get bit received from other side and update receive register */
		if(m_in_rxd_func.isnull())
			receive_register_update_bit(get_in_data_bit());
		else
			receive_register_update_bit(m_in_rxd_func());

		if (is_receive_register_full())
		{
			receive_register_extract();
			receive_character(get_received_char());
		}
	}
}
Example #18
0
inline void im6402_device::receive_bit(int state)
{
	if (LOG) logerror("IM6402 '%s' Receive Bit %u\n", tag(), state);

	receive_register_update_bit(state);

	if (is_receive_register_full())
	{
		receive_register_extract();
		m_rbr = get_received_char();

		if (LOG) logerror("IM6402 '%s' Receive Data %02x\n", tag(), m_rbr);

		if (m_dr)
		{
			m_oe = 1;
		}

		set_dr(ASSERT_LINE);
	}
}
Example #19
0
void i8251_device::receive_clock()
{
	m_rxc_count++;

	if (m_rxc_count == m_br_factor)
		m_rxc_count = 0;
	else
		return;

	/* receive enable? */
	if (m_command & (1<<2))
	{
		//logerror("I8251\n");
		/* get bit received from other side and update receive register */
		receive_register_update_bit(m_rxd);

		if (is_receive_register_full())
		{
			receive_register_extract();
			receive_character(get_received_char());
		}
	}
}
Example #20
0
void tms5501_device::rcv_complete()
{
	receive_register_extract();
	m_rb = get_received_char();

	if (is_receive_framing_error())
	{
		m_sta |= STA_FE;
	}
	else
	{
		m_sta &= ~STA_FE;
	}

	if (m_sta & STA_RBL)
	{
		m_sta |= STA_OE;
	}

	m_sta |= (STA_RBL | STA_SR);
	m_sta &= ~(STA_SBD | STA_FBD);

	set_interrupt(IRQ_RB);
}
Example #21
0
void sb_device::rcv_complete()    // Rx completed receiving byte
{
	receive_register_extract();
	UINT8 data = get_received_char();

	// in UART MIDI mode, we set the DMA8 IRQ on receiving a character
	if (m_uart_midi)
	{
		m_recvring[m_recv_write++] = data;
		if (m_recv_write >= MIDI_RING_SIZE)
		{
			m_recv_write = 0;
		}

		if (m_recv_write != m_recv_read)
		{
			m_rx_waiting++;
		}
		if (m_uart_irq)
		{
			irq_w(1, IRQ_DMA8);
		}
	}
}
Example #22
0
inline void im6402_device::receive()
{
	if (m_in_rri_func.isnull())
	{
		receive_register_update_bit(get_in_data_bit());
	}
	else
	{
		receive_register_update_bit(m_in_rri_func());
	}

	if (is_receive_register_full())
	{
		receive_register_extract();
		m_rbr = get_received_char();

		if (m_dr)
		{
			m_oe = 1;
		}

		set_dr(ASSERT_LINE);
	}
}
Example #23
0
void null_modem_device::rcv_complete()
{
	receive_register_extract();
	m_stream->output(get_received_char());
}
Example #24
0
void serial_terminal_device::rcv_complete()
{
	receive_register_extract();
	term_write(get_received_char());
}
Example #25
0
void esqpanel_device::rcv_complete()    // Rx completed receiving byte
{
	receive_register_extract();
	UINT8 data = get_received_char();

//  if (data >= 0xe0) printf("Got %02x from motherboard (second %s)\n", data, m_bCalibSecondByte ? "yes" : "no");

	send_to_display(data);

	if (m_bCalibSecondByte)
	{
//      printf("second byte is %02x\n", data);
		if (data == 0xfd)   // calibration request
		{
//          printf("let's send reply!\n");
			xmit_char(0xff);   // this is the correct response for "calibration OK"
		}
		m_bCalibSecondByte = false;
	}
	else if (m_bButtonLightSecondByte)
	{
		// Lights on the Buttons, on the VFX-SD:
		// Number   Button
		// 0        1-6
		// 1        8
		// 2        6
		// 3        4
		// 4        2
		// 5        Compare
		// 6        1
		// 7        Presets
		// 8        7-12
		// 9        9
		// a        7
		// b        5
		// c        3
		// d        Sounds
		// e        0
		// f        Cart
//      int lightNumber = data & 0x3f;

		// Light states:
		// 0 = Off
		// 2 = On
		// 3 = Blinking
//      int lightState = (data & 0xc0) >> 6;

		// TODO: do something with the button information!
		// printf("Setting light %d to %s\n", lightNumber, lightState == 3 ? "Blink" : lightState == 2 ? "On" : "Off");
		m_bButtonLightSecondByte = false;
	}
	else if (data == 0xfb)   // request calibration
	{
		m_bCalibSecondByte = true;
	}
	else if (data == 0xff)  // button light state command
	{
		m_bButtonLightSecondByte = true;
	}
	else
	{
		// EPS wants a throwaway reply byte for each byte sent to the KPC
		// VFX-SD and SD-1 definitely don't :)
		if (m_eps_mode)
		{
			if (data == 0xe7)
			{
				xmit_char(0x00);   // actual value of response is never checked
			}
			else if (data == 0x71)
			{
				xmit_char(0x00);   // actual value of response is never checked
			}
			else
			{
				xmit_char(data);   // actual value of response is never checked
			}
		}
	}
}
Example #26
0
void x68k_keyboard_device::rcv_complete()
{
	receive_register_extract();
	write(get_received_char());
}
Example #27
0
void pseudo_terminal_device::rcv_complete()
{
		receive_register_extract();
		write(get_received_char());
}
Example #28
0
void serial_printer_device::rcv_complete()
{
	receive_register_extract();
	m_printer->output(get_received_char());
}
Example #29
0
void z80dart_channel::rcv_complete()
{
	receive_register_extract();
	receive_data(get_received_char());
}