Exemplo n.º 1
0
void crt9007_device::device_config_complete()
{
	// inherit a copy of the static data
	const crt9007_interface *intf = reinterpret_cast<const crt9007_interface *>(static_config());
	if (intf != NULL)
		*static_cast<crt9007_interface *>(this) = *intf;

	// or initialize to defaults if none provided
	else
	{
		memset(&m_out_int_cb, 0, sizeof(m_out_int_cb));
		memset(&m_out_dmar_cb, 0, sizeof(m_out_dmar_cb));
		memset(&m_out_vs_cb, 0, sizeof(m_out_vs_cb));
		memset(&m_out_hs_cb, 0, sizeof(m_out_hs_cb));
		memset(&m_out_vlt_cb, 0, sizeof(m_out_vlt_cb));
		memset(&m_out_curs_cb, 0, sizeof(m_out_curs_cb));
		memset(&m_out_drb_cb, 0, sizeof(m_out_drb_cb));
		memset(&m_out_cblank_cb, 0, sizeof(m_out_cblank_cb));
		memset(&m_out_slg_cb, 0, sizeof(m_out_slg_cb));
		memset(&m_out_sld_cb, 0, sizeof(m_out_sld_cb));
	}
}
Exemplo n.º 2
0
void acia6850_device_config::device_config_complete()
{
	// inherit a copy of the static data
	const acia6850_interface *intf = reinterpret_cast<const acia6850_interface *>(static_config());
	if (intf != NULL)
	{
		*static_cast<acia6850_interface *>(this) = *intf;
	}

	// or initialize to defaults if none provided
	else
	{
		m_tx_clock = 0;
		m_rx_clock = 0;
    	memset(&m_in_rx_func, 0, sizeof(m_in_rx_func));
    	memset(&m_out_tx_func, 0, sizeof(m_out_tx_func));
    	memset(&m_in_cts_func, 0, sizeof(m_in_cts_func));
    	memset(&m_out_rts_func, 0, sizeof(m_out_rts_func));
    	memset(&m_in_dcd_func, 0, sizeof(m_in_dcd_func));
    	memset(&m_out_irq_func, 0, sizeof(m_out_irq_func));
	}
}
Exemplo n.º 3
0
void abc1600bus_slot_device::device_config_complete()
{
	// inherit a copy of the static data
	const abc1600bus_interface *intf = reinterpret_cast<const abc1600bus_interface *>(static_config());
	if (intf != NULL)
	{
		*static_cast<abc1600bus_interface *>(this) = *intf;
	}

	// or initialize to defaults if none provided
	else
	{
		memset(&m_out_int_cb, 0, sizeof(m_out_int_cb));
		memset(&m_out_pren_cb, 0, sizeof(m_out_pren_cb));
		memset(&m_out_trrq_cb, 0, sizeof(m_out_trrq_cb));
		memset(&m_out_nmi_cb, 0, sizeof(m_out_nmi_cb));
		memset(&m_out_xint2_cb, 0, sizeof(m_out_xint2_cb));
		memset(&m_out_xint3_cb, 0, sizeof(m_out_xint3_cb));
		memset(&m_out_xint4_cb, 0, sizeof(m_out_xint4_cb));
		memset(&m_out_xint5_cb, 0, sizeof(m_out_xint5_cb));
	}
}
Exemplo n.º 4
0
void ttl74145_device::device_config_complete()
{
	// inherit a copy of the static data
	const ttl74145_interface *intf = reinterpret_cast<const ttl74145_interface *>(static_config());
	if (intf != NULL)
		*static_cast<ttl74145_interface *>(this) = *intf;

	// or initialize to defaults if none provided
	else
	{
		memset(&m_output_line_0_cb, 0, sizeof(m_output_line_0_cb));
		memset(&m_output_line_1_cb, 0, sizeof(m_output_line_1_cb));
		memset(&m_output_line_2_cb, 0, sizeof(m_output_line_2_cb));
		memset(&m_output_line_3_cb, 0, sizeof(m_output_line_3_cb));
		memset(&m_output_line_4_cb, 0, sizeof(m_output_line_4_cb));
		memset(&m_output_line_5_cb, 0, sizeof(m_output_line_5_cb));
		memset(&m_output_line_6_cb, 0, sizeof(m_output_line_6_cb));
		memset(&m_output_line_7_cb, 0, sizeof(m_output_line_7_cb));
		memset(&m_output_line_8_cb, 0, sizeof(m_output_line_8_cb));
		memset(&m_output_line_9_cb, 0, sizeof(m_output_line_9_cb));
	}
}
Exemplo n.º 5
0
void z80sti_device::device_config_complete()
{
	// inherit a copy of the static data
	const z80sti_interface *intf = reinterpret_cast<const z80sti_interface *>(static_config());
	if (intf != NULL)
		*static_cast<z80sti_interface *>(this) = *intf;

	// or initialize to defaults if none provided
	else
	{
		m_rx_clock = m_tx_clock = 0;
		memset(&m_out_int_cb, 0, sizeof(m_out_int_cb));
		memset(&m_in_gpio_cb, 0, sizeof(m_in_gpio_cb));
		memset(&m_out_gpio_cb, 0, sizeof(m_out_gpio_cb));
		memset(&m_in_si_cb, 0, sizeof(m_in_si_cb));
		memset(&m_out_so_cb, 0, sizeof(m_out_so_cb));
		memset(&m_out_tao_cb, 0, sizeof(m_out_tao_cb));
		memset(&m_out_tbo_cb, 0, sizeof(m_out_tbo_cb));
		memset(&m_out_tco_cb, 0, sizeof(m_out_tco_cb));
		memset(&m_out_tdo_cb, 0, sizeof(m_out_tdo_cb));
	}
}
Exemplo n.º 6
0
void iq151cart_slot_device::device_config_complete()
{
	// inherit a copy of the static data
	const iq151cart_interface *intf = reinterpret_cast<const iq151cart_interface *>(static_config());
	if (intf != NULL)
	{
		*static_cast<iq151cart_interface *>(this) = *intf;
	}

	// or initialize to defaults if none provided
	else
	{
		memset(&m_out_irq0_cb, 0, sizeof(m_out_irq0_cb));
		memset(&m_out_irq1_cb, 0, sizeof(m_out_irq1_cb));
		memset(&m_out_irq2_cb, 0, sizeof(m_out_irq2_cb));
		memset(&m_out_irq3_cb, 0, sizeof(m_out_irq3_cb));
		memset(&m_out_irq4_cb, 0, sizeof(m_out_irq4_cb));
		memset(&m_out_drq_cb, 0, sizeof(m_out_drq_cb));
	}

	// set brief and instance name
	update_names();
}
Exemplo n.º 7
0
void wd11c00_17_device::device_config_complete()
{
	// inherit a copy of the static data
	const wd11c00_17_interface *intf = reinterpret_cast<const wd11c00_17_interface *>(static_config());
	if (intf != NULL)
		*static_cast<wd11c00_17_interface *>(this) = *intf;

	// or initialize to defaults if none provided
	else
	{
		memset(&m_out_irq5_cb, 0, sizeof(m_out_irq5_cb));
		memset(&m_out_drq3_cb, 0, sizeof(m_out_drq3_cb));
		memset(&m_out_mr_cb, 0, sizeof(m_out_mr_cb));
		memset(&m_out_busy_cb, 0, sizeof(m_out_busy_cb));
		memset(&m_out_req_cb, 0, sizeof(m_out_req_cb));
		memset(&m_out_ra3_cb, 0, sizeof(m_out_ra3_cb));
		memset(&m_in_rd322_cb, 0, sizeof(m_in_rd322_cb));
		memset(&m_in_ramcs_cb, 0, sizeof(m_in_ramcs_cb));
		memset(&m_out_ramwr_cb, 0, sizeof(m_out_ramwr_cb));
		memset(&m_in_cs1010_cb, 0, sizeof(m_in_cs1010_cb));
		memset(&m_out_cs1010_cb, 0, sizeof(m_out_cs1010_cb));
	}
}
Exemplo n.º 8
0
void bitbanger_device::device_start(void)
{
	const bitbanger_config *config = (const bitbanger_config *) static_config();

	/* output config */
	m_build_count = 0;
	m_output_timer = timer_alloc(TIMER_OUTPUT);

	/* input config */
	m_input_timer = timer_alloc(TIMER_INPUT);
	m_idle_delay = attotime::from_seconds(1);
	m_input_buffer_size = 0;
	m_input_buffer_cursor = 0;

	/* defaults */
	m_mode = config->m_default_mode;
	m_baud = config->m_default_baud;
	m_tune = config->m_default_tune;
	m_current_baud = attotime::from_hz(baud_value());

	/* callback */
	m_input_callback.resolve(config->m_input_callback, *this);
}
Exemplo n.º 9
0
void am9517a_device::device_config_complete()
{
	// inherit a copy of the static data
	const am9517a_interface *intf = reinterpret_cast<const am9517a_interface *>(static_config());
	if (intf != NULL)
		*static_cast<am9517a_interface *>(this) = *intf;

	// or initialize to defaults if none provided
	else
	{
		memset(&m_out_hreq_cb, 0, sizeof(m_out_hreq_cb));
		memset(&m_out_eop_cb, 0, sizeof(m_out_eop_cb));
		memset(&m_in_memr_cb, 0, sizeof(m_in_memr_cb));
		memset(&m_out_memw_cb, 0, sizeof(m_out_memw_cb));

		for (int i = 0; i < 4; i++)
		{
			memset(&m_in_ior_cb[i], 0, sizeof(m_in_ior_cb[i]));
			memset(&m_out_iow_cb[i], 0, sizeof(m_out_iow_cb[i]));
			memset(&m_out_dack_cb[i], 0, sizeof(m_out_dack_cb[i]));
		}
	}
}
Exemplo n.º 10
0
void via6522_device::device_config_complete()
{
	// inherit a copy of the static data
	const via6522_interface *intf = reinterpret_cast<const via6522_interface *>(static_config());
	if (intf != NULL)
		*static_cast<via6522_interface *>(this) = *intf;

	// or initialize to defaults if none provided
	else
	{
		memset(&m_in_a_cb, 0, sizeof(m_in_a_cb));
		memset(&m_in_b_cb, 0, sizeof(m_in_b_cb));
		memset(&m_in_ca1_cb, 0, sizeof(m_in_ca1_cb));
		memset(&m_in_cb1_cb, 0, sizeof(m_in_cb1_cb));
		memset(&m_in_ca2_cb, 0, sizeof(m_in_ca2_cb));
		memset(&m_in_cb2_cb, 0, sizeof(m_in_cb2_cb));
		memset(&m_out_a_cb, 0, sizeof(m_out_a_cb));
		memset(&m_out_b_cb, 0, sizeof(m_out_b_cb));
		memset(&m_out_ca2_cb, 0, sizeof(m_out_ca2_cb));
		memset(&m_out_cb2_cb, 0, sizeof(m_out_cb2_cb));
		memset(&m_irq_cb, 0, sizeof(m_irq_cb));
	}
}
Exemplo n.º 11
0
void cassette_image_device::device_config_complete()
{
	// inherit a copy of the static data
	const cassette_interface *intf = reinterpret_cast<const cassette_interface *>(static_config());
	if (intf != NULL)
		*static_cast<cassette_interface *>(this) = *intf;

	// or initialize to defaults if none provided
	else
	{
		memset(&m_formats, 0, sizeof(m_formats));
		memset(&m_create_opts, 0, sizeof(m_create_opts));
		memset(&m_default_state, 0, sizeof(m_default_state));
		memset(&m_interface, 0, sizeof(m_interface));
		memset(&m_device_displayinfo, 0, sizeof(m_device_displayinfo));
	}

	m_extension_list[0] = '\0';
	for (int i = 0; m_formats[i]; i++ )
		image_specify_extension( m_extension_list, 256, m_formats[i]->extensions );

	// set brief and instance name
	update_names();
}
Exemplo n.º 12
0
void wangpcbus_device::device_config_complete()
{
	// inherit a copy of the static data
	const wangpcbus_interface *intf = reinterpret_cast<const wangpcbus_interface *>(static_config());
	if (intf != NULL)
	{
		*static_cast<wangpcbus_interface *>(this) = *intf;
	}

	// or initialize to defaults if none provided
	else
	{
		memset(&m_out_irq2_cb, 0, sizeof(m_out_irq2_cb));
		memset(&m_out_irq3_cb, 0, sizeof(m_out_irq3_cb));
		memset(&m_out_irq4_cb, 0, sizeof(m_out_irq4_cb));
		memset(&m_out_irq5_cb, 0, sizeof(m_out_irq5_cb));
		memset(&m_out_irq6_cb, 0, sizeof(m_out_irq6_cb));
		memset(&m_out_irq7_cb, 0, sizeof(m_out_irq7_cb));
		memset(&m_out_drq1_cb, 0, sizeof(m_out_drq1_cb));
		memset(&m_out_drq2_cb, 0, sizeof(m_out_drq2_cb));
		memset(&m_out_drq3_cb, 0, sizeof(m_out_drq3_cb));
		memset(&m_out_ioerror_cb, 0, sizeof(m_out_ioerror_cb));
	}
}
Exemplo n.º 13
0
Arquivo: isa.c Projeto: poliva/mame-rr
void isa8_device::device_config_complete()
{
	// inherit a copy of the static data
	const isa8bus_interface *intf = reinterpret_cast<const isa8bus_interface *>(static_config());
	if (intf != NULL)
	{
		*static_cast<isa8bus_interface *>(this) = *intf;
	}

	// or initialize to defaults if none provided
	else
	{
    	memset(&m_out_irq2_cb, 0, sizeof(m_out_irq2_cb));
    	memset(&m_out_irq3_cb, 0, sizeof(m_out_irq3_cb));
    	memset(&m_out_irq4_cb, 0, sizeof(m_out_irq4_cb));
    	memset(&m_out_irq5_cb, 0, sizeof(m_out_irq5_cb));
    	memset(&m_out_irq6_cb, 0, sizeof(m_out_irq6_cb));
    	memset(&m_out_irq7_cb, 0, sizeof(m_out_irq7_cb));
    	memset(&m_out_drq1_cb, 0, sizeof(m_out_drq1_cb));
    	memset(&m_out_drq2_cb, 0, sizeof(m_out_drq2_cb));
    	memset(&m_out_drq3_cb, 0, sizeof(m_out_drq3_cb));
	}
	m_maincpu = mconfig().devicelist().find(m_cputag);
}
Exemplo n.º 14
0
void z80dart_device_config::device_config_complete()
{
	// inherit a copy of the static data
	const z80dart_interface *intf = reinterpret_cast<const z80dart_interface *>(static_config());
	if (intf != NULL)
		*static_cast<z80dart_interface *>(this) = *intf;

	// or initialize to defaults if none provided
	else
	{
		m_rx_clock_a = m_tx_clock_a = m_rx_tx_clock_b = 0;
		memset(&m_in_rxda_func, 0, sizeof(m_in_rxda_func));
		memset(&m_out_txda_func, 0, sizeof(m_out_txda_func));
		memset(&m_out_dtra_func, 0, sizeof(m_out_dtra_func));
		memset(&m_out_rtsa_func, 0, sizeof(m_out_rtsa_func));
		memset(&m_out_wrdya_func, 0, sizeof(m_out_wrdya_func));
		memset(&m_in_rxdb_func, 0, sizeof(m_in_rxdb_func));
		memset(&m_out_txdb_func, 0, sizeof(m_out_txdb_func));
		memset(&m_out_dtrb_func, 0, sizeof(m_out_dtrb_func));
		memset(&m_out_rtsb_func, 0, sizeof(m_out_rtsb_func));
		memset(&m_out_wrdyb_func, 0, sizeof(m_out_wrdyb_func));
		memset(&m_out_int_func, 0, sizeof(m_out_int_func));
	}
}
Exemplo n.º 15
0
void serial_keyboard_device::device_config_complete()
{
	const serial_keyboard_interface *intf = reinterpret_cast<const serial_keyboard_interface *>(static_config());
	if(intf != NULL)
	{
		*static_cast<serial_keyboard_interface *>(this) = *intf;
	}
	else
	{
		memset(&m_out_tx_cb, 0, sizeof(m_out_tx_cb));
	}
	m_shortname = "serial_keyboard";
}
Exemplo n.º 16
0
void cpc_expansion_slot_device::device_config_complete()
{
	// inherit a copy of the static data
	const cpc_expansion_slot_interface *intf = reinterpret_cast<const cpc_expansion_slot_interface *>(static_config());
	if (intf != NULL)
	{
		*static_cast<cpc_expansion_slot_interface *>(this) = *intf;
	}

	// or initialize to defaults if none provided
	else
	{
		memset(&m_out_irq_cb, 0, sizeof(m_out_irq_cb));
		memset(&m_out_nmi_cb, 0, sizeof(m_out_nmi_cb));
		memset(&m_out_reset_cb, 0, sizeof(m_out_reset_cb));
		memset(&m_out_romdis_cb, 0, sizeof(m_out_romdis_cb));
		memset(&m_out_romen_cb, 0, sizeof(m_out_romen_cb));
	}
}
Exemplo n.º 17
0
void serial_terminal_device::device_config_complete()
{
	const serial_terminal_interface *intf = reinterpret_cast<const serial_terminal_interface *>(static_config());
	if(intf != NULL)
	{
		*static_cast<serial_terminal_interface *>(this) = *intf;
	}
	else
	{
		memset(&m_out_tx_cb, 0, sizeof(m_out_tx_cb));
	}
}
Exemplo n.º 18
0
const char *legacy_floppy_image_device::image_interface() const
{
	return ((floppy_interface *)static_config())->interface;
}
Exemplo n.º 19
0
void kaneko_pandora_device::device_config_complete()
{
	// inherit a copy of the static data
	const kaneko_pandora_interface *intf = reinterpret_cast<const kaneko_pandora_interface *>(static_config());
	if (intf != NULL)
		*static_cast<kaneko_pandora_interface *>(this) = *intf;

	// or initialize to defaults if none provided
	else
	{
		m_screen_tag = "";
		m_gfx_region = 0;
		m_xoffset = 0;
		m_yoffset = 0;
	}
}
Exemplo n.º 20
0
void apricot_keyboard_device::device_config_complete()
{
	// inherit a copy of the static data
	const apricot_keyboard_interface *intf = reinterpret_cast<const apricot_keyboard_interface *>(static_config());
	if (intf != NULL)
		*static_cast<apricot_keyboard_interface *>(this) = *intf;

	// or initialize to defaults if none provided
	else
	{
		memset(&m_out_txd_cb, 0, sizeof(m_out_txd_cb));
	}
}
Exemplo n.º 21
0
void vic10_expansion_slot_device::device_config_complete()
{
	// inherit a copy of the static data
	const vic10_expansion_slot_interface *intf = reinterpret_cast<const vic10_expansion_slot_interface *>(static_config());
	if (intf != NULL)
	{
		*static_cast<vic10_expansion_slot_interface *>(this) = *intf;
	}

	// or initialize to defaults if none provided
	else
	{
		memset(&m_out_irq_cb, 0, sizeof(m_out_irq_cb));
		memset(&m_out_sp_cb, 0, sizeof(m_out_sp_cb));
		memset(&m_out_cnt_cb, 0, sizeof(m_out_cnt_cb));
		memset(&m_out_res_cb, 0, sizeof(m_out_res_cb));
	}

	// set brief and instance name
	update_names();
}
Exemplo n.º 22
0
void ti_sound_system_device::device_start(void)
{
	const ti_sound_config *conf = reinterpret_cast<const ti_sound_config *>(static_config());
	m_console_ready.resolve(conf->ready, *this);
	m_sound_chip = subdevice<sn76496_base_device>(TISOUNDCHIP_TAG);
}
Exemplo n.º 23
0
void luxor_55_21046_device_config::device_config_complete()
{
	// inherit a copy of the static data
	const luxor_55_21046_interface *intf = reinterpret_cast<const luxor_55_21046_interface *>(static_config());
	if (intf != NULL)
		*static_cast<luxor_55_21046_interface *>(this) = *intf;

	// or initialize to defaults if none provided
	else
	{
		fatalerror("Interface not provided!");
	}
	
	m_sw1 = intf->m_sw1;
	m_sw2 = intf->m_sw2;
	m_sw3 = intf->m_sw3;

	m_shortname = "lux21046";
}
Exemplo n.º 24
0
void pc1512_keyboard_device::device_config_complete()
{
	// inherit a copy of the static data
	const pc1512_keyboard_interface *intf = reinterpret_cast<const pc1512_keyboard_interface *>(static_config());
	if (intf != NULL)
		*static_cast<pc1512_keyboard_interface *>(this) = *intf;

	// or initialize to defaults if none provided
	else
	{
		memset(&m_out_data_cb, 0, sizeof(m_out_data_cb));
		memset(&m_out_clock_cb, 0, sizeof(m_out_clock_cb));
	}

	m_shortname = "pc1512kb";
}
Exemplo n.º 25
0
void ti99_datamux_device::device_reset(void)
{
	const datamux_config *conf = reinterpret_cast<const datamux_config *>(static_config());

	const dmux_device_list_entry *list = conf->devlist;

	m_cpu = machine().device("maincpu");
	// m_space = &m_cpu->memory().space(AS_PROGRAM);

	m_devices.reset(); // clear the list
	m_use32k = (ioport("RAM")->read()==1);

	// better use a region?
	if (m_ram16b==nullptr)
	{
		m_ram16b = make_unique_clear<UINT16[]>(32768/2);
	}

	// Now building the list of active devices at this databus multiplex.
	// We allow for turning off devices according to configuration switch settings.
	// In particular, the HSGPL card cannot function unless the console GROMs are
	// removed.
	if ( list != nullptr )
	{
		bool done = false;
		for (int i=0; !done; i++)
		{
			if (list[i].name == nullptr)
			{
				done = true;
			}
			else
			{
				UINT32 set;
				bool active_device = true;
				if (list[i].setting!=nullptr)
				{
					set = ioport(list[i].setting)->read();
					active_device = ((set & list[i].set)==list[i].set) && ((set & list[i].unset)==0);
				}
				if (active_device)
				{
					device_t *dev = machine().device(list[i].name);
					if (dev != nullptr)
					{
						auto ad = new attached_device(dev, list[i]);
						m_devices.append(*ad);
						if (TRACE_SETUP) logerror("datamux: Device %s mounted at index %d.\n", list[i].name, i);
					}
					else
					{
						if (TRACE_SETUP) logerror("datamux: Device %s not found.\n", list[i].name);
					}
				}
				else
				{
					if (TRACE_SETUP) logerror("datamux: Device %s not mounted due to configuration setting %s.\n", list[i].name, list[i].setting);
				}
			}
		}
	}
	if (TRACE_SETUP) logerror("datamux: Device count = %d\n", m_devices.count());

	m_sysready = ASSERT_LINE;
	m_muxready = ASSERT_LINE;
	ready_join();

	m_waitcount = 0;
	m_latch = 0;

	m_read_mode = true;
}
Exemplo n.º 26
0
void cbm2_user_port_device::device_config_complete()
{
	// inherit a copy of the static data
	const cbm2_user_port_interface *intf = reinterpret_cast<const cbm2_user_port_interface *>(static_config());
	if (intf != NULL)
	{
		*static_cast<cbm2_user_port_interface *>(this) = *intf;
	}

	// or initialize to defaults if none provided
	else
	{
		memset(&m_out_irq_cb, 0, sizeof(m_out_irq_cb));
		memset(&m_out_sp_cb, 0, sizeof(m_out_sp_cb));
		memset(&m_out_cnt_cb, 0, sizeof(m_out_cnt_cb));
		memset(&m_out_flag_cb, 0, sizeof(m_out_flag_cb));
	}
}
Exemplo n.º 27
0
void ieee488_stub_device::device_config_complete()
{
	// inherit a copy of the static data
	const ieee488_stub_interface *intf = reinterpret_cast<const ieee488_stub_interface *>(static_config());
	if (intf != NULL)
		*static_cast<ieee488_stub_interface *>(this) = *intf;

	// or initialize to defaults if none provided
	else
	{
		memset(&m_out_eoi_cb, 0, sizeof(m_out_eoi_cb));
		memset(&m_out_dav_cb, 0, sizeof(m_out_dav_cb));
		memset(&m_out_nrfd_cb, 0, sizeof(m_out_nrfd_cb));
		memset(&m_out_ndac_cb, 0, sizeof(m_out_ndac_cb));
		memset(&m_out_ifc_cb, 0, sizeof(m_out_ifc_cb));
		memset(&m_out_srq_cb, 0, sizeof(m_out_srq_cb));
		memset(&m_out_atn_cb, 0, sizeof(m_out_atn_cb));
		memset(&m_out_ren_cb, 0, sizeof(m_out_ren_cb));
	}
}