Example #1
0
void kr2376_device::device_start()
{
	m_write_strobe.resolve_safe();

	/* set initial values */
	m_ring11 = 0;
	m_ring8 = 0;
	m_modifiers = 0;
	m_strobe = 0;
	m_strobe_old = 0;
	m_parity = 0;
	m_data = 0;
	memset(m_pins, 0x00, sizeof(m_pins));
	change_output_lines();

	/* create the timers */
	m_scan_timer = timer_alloc(TIMER_SCAN_TICK);
	m_scan_timer->adjust(attotime::zero, 0, attotime::from_hz(clock()));

	/* register for state saving */
	save_item(NAME(m_pins));
	save_item(NAME(m_ring11));
	save_item(NAME(m_ring8));
	save_item(NAME(m_modifiers));
	save_item(NAME(m_strobe));
	save_item(NAME(m_strobe_old));
	save_item(NAME(m_parity));
	save_item(NAME(m_data));
}
Example #2
0
void mm74c922_device::device_start()
{
	// resolve callbacks
	m_out_da_func.resolve(m_out_da_cb, *this);
	m_in_x_func[0].resolve(m_in_x1_cb, *this);
	m_in_x_func[1].resolve(m_in_x2_cb, *this);
	m_in_x_func[2].resolve(m_in_x3_cb, *this);
	m_in_x_func[3].resolve(m_in_x4_cb, *this);
	m_in_x_func[4].resolve(m_in_x5_cb, *this);

	// set initial values
	change_output_lines();

	// allocate timers
	m_scan_timer = timer_alloc();
	m_scan_timer->adjust(attotime::zero, 0, attotime::from_hz(50));

	// register for state saving
	save_item(NAME(m_inhibit));
	save_item(NAME(m_x));
	save_item(NAME(m_y));
	save_item(NAME(m_data));
	save_item(NAME(m_da));
	save_item(NAME(m_next_da));
}
Example #3
0
void mm74c922_device::device_start()
{
	// resolve callbacks
	m_write_da.resolve_safe();
	m_read_x1.resolve_safe(0);
	m_read_x2.resolve_safe(0);
	m_read_x3.resolve_safe(0);
	m_read_x4.resolve_safe(0);
	m_read_x5.resolve_safe(0);

	// set initial values
	change_output_lines();

	// allocate timers
	m_scan_timer = timer_alloc();
	m_scan_timer->adjust(attotime::zero, 0, attotime::from_hz(50));

	// register for state saving
	save_item(NAME(m_inhibit));
	save_item(NAME(m_x));
	save_item(NAME(m_y));
	save_item(NAME(m_data));
	save_item(NAME(m_da));
	save_item(NAME(m_next_da));
}
Example #4
0
void cdp1871_device::device_start()
{
	// resolve callbacks
	m_out_da_func.resolve(out_da_cb, *this);
	m_out_rpt_func.resolve(out_rpt_cb, *this);
	m_in_d_func[0].resolve(in_d1_cb, *this);
	m_in_d_func[1].resolve(in_d2_cb, *this);
	m_in_d_func[2].resolve(in_d3_cb, *this);
	m_in_d_func[3].resolve(in_d4_cb, *this);
	m_in_d_func[4].resolve(in_d5_cb, *this);
	m_in_d_func[5].resolve(in_d6_cb, *this);
	m_in_d_func[6].resolve(in_d7_cb, *this);
	m_in_d_func[7].resolve(in_d8_cb, *this);
	m_in_d_func[8].resolve(in_d9_cb, *this);
	m_in_d_func[9].resolve(in_d10_cb, *this);
	m_in_d_func[10].resolve(in_d11_cb, *this);
	m_in_shift_func.resolve(in_shift_cb, *this);
	m_in_control_func.resolve(in_control_cb, *this);
	m_in_alpha_func.resolve(in_alpha_cb, *this);

	// set initial values
	change_output_lines();

	// allocate timers
	m_scan_timer = timer_alloc();
	m_scan_timer->adjust(attotime::zero, 0, attotime::from_hz(clock()));

	// register for state saving
	save_item(NAME(m_inhibit));
	save_item(NAME(m_sense));
	save_item(NAME(m_drive));
	save_item(NAME(m_shift));
	save_item(NAME(m_control));
	save_item(NAME(m_da));
	save_item(NAME(m_next_da));
	save_item(NAME(m_rpt));
	save_item(NAME(m_next_rpt));
}
Example #5
0
void cdp1871_device::device_start()
{
	// resolve callbacks
	m_read_d1.resolve_safe(0xff);
	m_read_d2.resolve_safe(0xff);
	m_read_d3.resolve_safe(0xff);
	m_read_d4.resolve_safe(0xff);
	m_read_d5.resolve_safe(0xff);
	m_read_d6.resolve_safe(0xff);
	m_read_d7.resolve_safe(0xff);
	m_read_d8.resolve_safe(0xff);
	m_read_d9.resolve_safe(0xff);
	m_read_d10.resolve_safe(0xff);
	m_read_d11.resolve_safe(0xff);
	m_write_da.resolve_safe();
	m_write_rpt.resolve_safe();

	// set initial values
	change_output_lines();

	// allocate timers
	m_scan_timer = timer_alloc();
	m_scan_timer->adjust(attotime::zero, 0, attotime::from_hz(clock()));

	// register for state saving
	save_item(NAME(m_inhibit));
	save_item(NAME(m_sense));
	save_item(NAME(m_drive));
	save_item(NAME(m_shift));
	save_item(NAME(m_shift_latch));
	save_item(NAME(m_control));
	save_item(NAME(m_control_latch));
	save_item(NAME(m_alpha));
	save_item(NAME(m_da));
	save_item(NAME(m_next_da));
	save_item(NAME(m_rpt));
	save_item(NAME(m_next_rpt));
}
Example #6
0
void cdp1871_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
	change_output_lines();
	clock_scan_counters();
	detect_keypress();
}