Exemple #1
0
DEVICE_INPUT_DEFAULTS_END


//-------------------------------------------------
//  device_add_mconfig - add device-specific
//  machine configuration
//-------------------------------------------------

void ss50_mpc_device::device_add_mconfig(machine_config &config)
{
	PIA6821(config, m_pia, 0); // actually MC6820
	m_pia->writepa_handler().set("outgate", FUNC(input_merger_device::in_w<0>)).bit(0);
	m_pia->cb2_handler().set(FUNC(ss50_mpc_device::reader_control_w));
	m_pia->readpb_handler().set_ioport("STOP").mask(0x01).lshift(6);
	m_pia->readpb_handler().append(FUNC(ss50_mpc_device::count_r)).lshift(7);
	m_pia->writepb_handler().set(FUNC(ss50_mpc_device::count_select_w)).bit(2);
	m_pia->writepb_handler().append(m_counter, FUNC(ripple_counter_device::reset_w)).bit(0);
	//m_pia->irqa_handler().set(FUNC(ss50_mpc_device::pia_irq_w));
	//m_pia->irqb_handler().set(FUNC(ss50_mpc_device::pia_irq_w));

	rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal"));
	rs232.rxd_handler().set(FUNC(ss50_mpc_device::serial_input_w));
	rs232.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal));

	INPUT_MERGER_ALL_HIGH(config, "outgate").output_handler().set("rs232", FUNC(rs232_port_device::write_txd));

	INPUT_MERGER_ANY_HIGH(config, m_loopback).output_handler().set("outgate", FUNC(input_merger_device::in_w<1>));

	RIPPLE_COUNTER(config, m_counter); // CD4024AE (IC3)
	m_counter->set_stages(7); // only Q5 (÷32) and Q4 (÷16) are actually used
}
Exemple #2
0
void vt100_keyboard_device::device_add_mconfig(machine_config &config)
{
	SPEAKER(config, "mono").front_center();
	BEEP(config, m_speaker, 786); // 7.945us per serial clock = ~125865.324hz, / 160 clocks per char = ~ 786 hz
	m_speaker->add_route(ALL_OUTPUTS, "mono", 0.50);

	AY31015(config, m_uart);
	m_uart->write_so_callback().set(FUNC(vt100_keyboard_device::signal_out_w));

	RIPPLE_COUNTER(config, m_scan_counter); // 2x 74LS93
	m_scan_counter->set_stages(8);
	m_scan_counter->count_out_cb().set(FUNC(vt100_keyboard_device::key_scan_w));
}