示例#1
0
void keirinou_state::keirinou(machine_config &config)
{
	witch(config);

	m_maincpu->set_addrmap(AS_PROGRAM, &keirinou_state::keirinou_main_map);

	m_subcpu->set_addrmap(AS_PROGRAM, &keirinou_state::keirinou_sub_map);

	PALETTE(config.replace(), m_palette).set_entries(0x200+0x80);
	m_gfxdecode->set_info(gfx_keirinou);

//  MCFG_PALETTE_FORMAT(IIBBGGRR)

	// Keirin Ou does have two individual PPIs (NEC D8255AC-2)
	m_ppi[0]->out_pc_callback().set(FUNC(keirinou_state::write_keirinou_a002));

	ay8910_device &ay1(AY8910(config, "ay1", AY8910_CLOCK));
	ay1.port_a_read_callback().set_ioport("YM_PortA");
	ay1.port_b_read_callback().set_ioport("YM_PortB");
	ay1.add_route(ALL_OUTPUTS, "mono", 0.5);

	ay8910_device &ay2(AY8910(config, "ay2", AY8910_CLOCK));
	ay2.port_a_write_callback().set(FUNC(witch_state::xscroll_w));
	ay2.port_b_write_callback().set(FUNC(witch_state::yscroll_w));
	ay2.add_route(ALL_OUTPUTS, "mono", 0.5);

	config.device_remove("essnd");
	config.device_remove("msm");
	config.device_remove("ym1");
	config.device_remove("ym2");
}
示例#2
0
void popnrun_state::popnrun(machine_config &config)
{
	deadang(config);

	m_maincpu->set_addrmap(AS_PROGRAM, &popnrun_state::popnrun_main_map);

	m_subcpu->set_addrmap(AS_PROGRAM, &popnrun_state::popnrun_sub_map);

	m_audiocpu->set_addrmap(AS_PROGRAM, &popnrun_state::popnrun_sound_map);
	m_audiocpu->set_addrmap(AS_OPCODES, &popnrun_state::sound_decrypted_opcodes_map);

	m_screen->set_screen_update(FUNC(popnrun_state::popnrun_screen_update));

	config.device_remove("watchdog");

	m_gfxdecode->set_info(gfx_popnrun);

	config.device_remove("ym1");
	config.device_remove("ym2");
	config.device_remove("adpcm1");
	config.device_remove("adpcm2");

	m_seibu_sound->ym_read_callback().set("ymsnd", FUNC(ym2151_device::read));
	m_seibu_sound->ym_write_callback().set("ymsnd", FUNC(ym2151_device::write));

	ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL(14'318'181)/4));
	ymsnd.irq_handler().set(m_seibu_sound, FUNC(seibu_sound_device::fm_irqhandler));
	ymsnd.add_route(0, "mono", 0.50);
	ymsnd.add_route(1, "mono", 0.50);
}
示例#3
0
running_machine::running_machine(const machine_config &_config, machine_manager &manager)
	: firstcpu(NULL),
		primary_screen(NULL),
		debug_flags(0),
		romload_data(NULL),
		ui_input_data(NULL),
		debugcpu_data(NULL),
		generic_machine_data(NULL),
		m_config(_config),
		m_system(_config.gamedrv()),
		m_manager(manager),
		m_current_phase(MACHINE_PHASE_PREINIT),
		m_paused(false),
		m_hard_reset_pending(false),
		m_exit_pending(false),
		m_soft_reset_timer(NULL),
		m_rand_seed(0x9d14abd7),
		m_ui_active(_config.options().ui_active()),
		m_basename(_config.gamedrv().name),
		m_sample_rate(_config.options().sample_rate()),
		m_saveload_schedule(SLS_NONE),
		m_saveload_schedule_time(attotime::zero),
		m_saveload_searchpath(NULL),

		m_save(*this),
		m_memory(*this),
		m_ioport(*this),
		m_parameters(*this),
		m_scheduler(*this)
{
	memset(&m_base_time, 0, sizeof(m_base_time));

	// set the machine on all devices
	device_iterator iter(root_device());
	for (device_t *device = iter.first(); device != NULL; device = iter.next())
		device->set_machine(*this);

	// find devices
	for (device_t *device = iter.first(); device != NULL; device = iter.next())
		if (dynamic_cast<cpu_device *>(device) != NULL)
		{
			firstcpu = downcast<cpu_device *>(device);
			break;
		}
	screen_device_iterator screeniter(root_device());
	primary_screen = screeniter.first();

	//MKCHAMP--initialize the cpu for hiscore
	cpu[0] = firstcpu;
	for (cpunum = 1; cpunum < ARRAY_LENGTH(cpu) && cpu[cpunum - 1] != NULL; cpunum++)
		cpu[cpunum] = cpu[cpunum - 1]->next();

	// fetch core options
	if (options().debug())
		debug_flags = (DEBUG_FLAG_ENABLED | DEBUG_FLAG_CALL_HOOK) | (DEBUG_FLAG_OSD_ENABLED);
}
示例#4
0
void lsasquad_state::storming(machine_config &config)
{
	lsasquad(config);

	m_maincpu->set_addrmap(AS_PROGRAM, &lsasquad_state::storming_map);

	config.device_remove("bmcu");

	AY8910(config.replace(), "aysnd", MASTER_CLOCK / 8).add_route(ALL_OUTPUTS, "mono", 0.12); // AY-3-8910A
}
示例#5
0
void spinb_state::jolypark(machine_config &config)
{
	spinb(config);

	MSM6585(config.replace(), m_msm_a, XTAL(640'000));
	m_msm_a->vck_callback().set("ic5a", FUNC(ttl7474_device::clock_w));
	m_msm_a->set_prescaler_selector(msm6585_device::S40);
	m_msm_a->add_route(ALL_OUTPUTS, "msmavol", 1.0);

	MSM6585(config.replace(), m_msm_m, XTAL(640'000));
	m_msm_m->vck_callback().set("ic5m", FUNC(ttl7474_device::clock_w));
	m_msm_m->set_prescaler_selector(msm6585_device::S40);
	m_msm_m->add_route(ALL_OUTPUTS, "msmmvol", 1.0);
}
示例#6
0
文件: c80.cpp 项目: PugsyMAME/mame
void c80_state::c80(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, 2500000); /* U880D */
	m_maincpu->set_addrmap(AS_PROGRAM, &c80_state::c80_mem);
	m_maincpu->set_addrmap(AS_IO, &c80_state::c80_io);
	m_maincpu->set_daisy_config(c80_daisy_chain);

	/* video hardware */
	config.set_default_layout(layout_c80);

	/* devices */
	Z80PIO(config, m_pio1, 2500000);
	m_pio1->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
	m_pio1->in_pa_callback().set(FUNC(c80_state::pio1_pa_r));
	m_pio1->out_pa_callback().set(FUNC(c80_state::pio1_pa_w));
	m_pio1->out_pb_callback().set(FUNC(c80_state::pio1_pb_w));
	m_pio1->out_brdy_callback().set(FUNC(c80_state::pio1_brdy_w));

	z80pio_device& pio2(Z80PIO(config, Z80PIO2_TAG, XTAL(2500000)));
	pio2.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);

	CASSETTE(config, m_cassette);
	m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);

	SPEAKER(config, "mono").front_center();
	WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);

	/* internal ram */
	RAM(config, RAM_TAG).set_default_size("1K");
}
示例#7
0
void sdk85_state::sdk85(machine_config &config)
{
	/* basic machine hardware */
	I8085A(config, m_maincpu, 6.144_MHz_XTAL);
	m_maincpu->set_addrmap(AS_PROGRAM, &sdk85_state::sdk85_mem);
	m_maincpu->set_addrmap(AS_IO, &sdk85_state::sdk85_io);

	I8355(config, "romio", 6.144_MHz_XTAL / 2); // Monitor ROM (A14)

	I8355(config, "expromio", 6.144_MHz_XTAL / 2); // Expansion ROM (A15)

	i8155_device &i8155(I8155(config, "ramio", 6.144_MHz_XTAL / 2)); // Basic RAM (A16)
	i8155.out_to_callback().set_inputline(m_maincpu, I8085_TRAP_LINE);

	I8155(config, "expramio", 6.144_MHz_XTAL / 2); // Expansion RAM (A17)

	/* video hardware */
	config.set_default_layout(layout_sdk85);

	/* Devices */
	i8279_device &kdc(I8279(config, "kdc", 6.144_MHz_XTAL / 2));        // Keyboard/Display Controller (A13)
	kdc.out_irq_callback().set_inputline("maincpu", I8085_RST55_LINE);  // irq
	kdc.out_sl_callback().set(FUNC(sdk85_state::scanlines_w));          // scan SL lines
	kdc.out_disp_callback().set(FUNC(sdk85_state::digit_w));            // display A&B
	kdc.in_rl_callback().set(FUNC(sdk85_state::kbd_r));                 // kbd RL lines
	kdc.in_shift_callback().set_constant(1);                            // Shift key
	kdc.in_ctrl_callback().set_constant(1);
}
示例#8
0
void z80ne_state::z80ne(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, Z80NE_CPU_SPEED_HZ);
	m_maincpu->set_addrmap(AS_PROGRAM, &z80ne_state::z80ne_mem);
	m_maincpu->set_addrmap(AS_IO, &z80ne_state::z80ne_io);

	MCFG_MACHINE_START_OVERRIDE(z80ne_state,z80ne)
	MCFG_MACHINE_RESET_OVERRIDE(z80ne_state,z80ne)

	AY31015(config, m_uart);

	CLOCK(config, m_uart_clock, 4800);
	m_uart_clock->signal_handler().set(FUNC(z80ne_state::lx385_uart_tx_clock_w));
	m_uart_clock->signal_handler().append(m_uart, FUNC(ay31015_device::write_rcp));

	CASSETTE(config, m_cassette1);
	m_cassette1->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
	m_cassette1->set_interface("z80ne_cass");

	CASSETTE(config, m_cassette2);
	m_cassette2->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
	m_cassette2->set_interface("z80ne_cass");

	config.set_default_layout(layout_z80ne);

	/* internal ram */
	RAM(config, m_ram).set_default_size("32K");

	// all known tapes require LX.388 expansion
	//SOFTWARE_LIST(config, "cass_list").set_original("z80ne_cass");
}
示例#9
0
void selz80_state::selz80(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, XTAL(4'000'000)); // it's actually a 5MHz XTAL with a NEC uPD780C-1 cpu
	m_maincpu->set_addrmap(AS_PROGRAM, &selz80_state::selz80_mem);
	m_maincpu->set_addrmap(AS_IO, &selz80_state::selz80_io);
	MCFG_MACHINE_RESET_OVERRIDE(selz80_state, selz80 )

	/* video hardware */
	config.set_default_layout(layout_selz80);

	/* Devices */
	CLOCK(config, m_clock, 153600);
	m_clock->signal_handler().set("uart", FUNC(i8251_device::write_txc));
	m_clock->signal_handler().append("uart", FUNC(i8251_device::write_rxc));

	i8251_device &uart(I8251(config, "uart", 0));
	uart.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd));
	uart.dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr));
	uart.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts));

	rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, nullptr));
	rs232.rxd_handler().set("uart", FUNC(i8251_device::write_rxd));
	rs232.dsr_handler().set("uart", FUNC(i8251_device::write_dsr));
	rs232.cts_handler().set("uart", FUNC(i8251_device::write_cts));

	i8279_device &kbdc(I8279(config, "i8279", 5000000 / 2)); // based on divider
	kbdc.out_sl_callback().set(FUNC(selz80_state::scanlines_w));    // scan SL lines
	kbdc.out_disp_callback().set(FUNC(selz80_state::digit_w));      // display A&B
	kbdc.in_rl_callback().set(FUNC(selz80_state::kbd_r));           // kbd RL lines
	kbdc.in_shift_callback().set_constant(1);                       // Shift key
	kbdc.in_ctrl_callback().set_constant(1);
}
示例#10
0
void software_list_device::display_matches(const machine_config &config, const char *interface, const char *name)
{
	// check if there is at least one software list
	software_list_device_iterator deviter(config.root_device());
	if (deviter.first() != nullptr)
		osd_printf_error("\n\"%s\" approximately matches the following\n"
			"supported software items (best match first):\n\n", name);

	// iterate through lists
	for (software_list_device &swlistdev : deviter)
	{
		// get the top 16 approximate matches for the selected device interface (i.e. only carts for cartslot, etc.)
		const software_info *matches[16] = { nullptr };
		swlistdev.find_approx_matches(name, ARRAY_LENGTH(matches), matches, interface);

		// if we found some, print them
		if (matches[0] != nullptr)
		{
			// different output depending on original system or compatible
			if (swlistdev.list_type() == SOFTWARE_LIST_ORIGINAL_SYSTEM)
				osd_printf_error("* Software list \"%s\" (%s) matches: \n", swlistdev.list_name().c_str(), swlistdev.description());
			else
				osd_printf_error("* Compatible software list \"%s\" (%s) matches: \n", swlistdev.list_name().c_str(), swlistdev.description());

			// print them out
			for (auto &match : matches)
			{
				if (match != nullptr)
					osd_printf_error("%-18s%s\n", match->shortname().c_str(), match->longname().c_str());
			}

			osd_printf_error("\n");
		}
	}
}
示例#11
0
void enmirage_state::mirage(machine_config &config)
{
	MC6809E(config, m_maincpu, 2000000);
	m_maincpu->set_addrmap(AS_PROGRAM, &enmirage_state::mirage_map);

	config.set_default_layout(layout_mirage);

	SPEAKER(config, "lspeaker").front_left();
	SPEAKER(config, "rspeaker").front_right();
	es5503_device &es5503(ES5503(config, "es5503", 7000000));
	es5503.set_channels(2);
	es5503.irq_func().set(FUNC(enmirage_state::mirage_doc_irq));
	es5503.adc_func().set(FUNC(enmirage_state::mirage_adc_read));
	es5503.add_route(0, "lspeaker", 1.0);
	es5503.add_route(1, "rspeaker", 1.0);

	VIA6522(config, m_via, 1000000);
	m_via->writepa_handler().set(FUNC(enmirage_state::mirage_via_write_porta));
	m_via->writepb_handler().set(FUNC(enmirage_state::mirage_via_write_portb));
	m_via->irq_handler().set_inputline(m_maincpu, M6809_IRQ_LINE);

	acia6850_device &acia6850(ACIA6850(config, "acia6850", 0));
	acia6850.irq_handler().set_inputline(m_maincpu, M6809_FIRQ_LINE);

	WD1772(config, m_fdc, 8000000);
	m_fdc->intrq_wr_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
	m_fdc->drq_wr_callback().set_inputline(m_maincpu, M6809_IRQ_LINE);

	FLOPPY_CONNECTOR(config, "wd1772:0", ensoniq_floppies, "35dd", enmirage_state::floppy_formats);
}
示例#12
0
void nes_state::fds(machine_config &config)
{
	famicom(config);

	MCFG_MACHINE_START_OVERRIDE(nes_state, fds)
	MCFG_MACHINE_RESET_OVERRIDE(nes_state, fds)

	config.device_remove("nes_slot");
	NES_DISKSYS(config, "disk", 0);

	config.device_remove("cart_list");
	config.device_remove("cass_list");
	config.device_remove("ade_list");
	config.device_remove("ntb_list");
	config.device_remove("kstudio_list");
	config.device_remove("datach_list");
}
示例#13
0
void sshangha_state::sshanghab(machine_config &config)
{
	sshangha(config);

	m_maincpu->set_addrmap(AS_PROGRAM, &sshangha_state::sshanghab_map);

	config.device_remove("ioprot");
}
示例#14
0
void xain_state::xsleenab(machine_config &config)
{
	xsleena(config);

	m_maincpu->set_addrmap(AS_PROGRAM, &xain_state::bootleg_map);

	config.device_remove("mcu");
}
示例#15
0
/*************************************
 *
 *  Graphics definitions
 *
 *************************************/

static const gfx_layout playfield_layout =
{
	8,8,
	256,
	1,
	{ 0 },
	{ 0, 1, 2, 3, 4, 5, 6, 7 },
	{ 0, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
	8*8
};


static const gfx_layout motion_layout =
{
	16,16,
	64,
	1,
	{ 0 },
	{ 3 + 0x400*8, 2 + 0x400*8, 1 + 0x400*8, 0 + 0x400*8,
		7 + 0x400*8, 6 + 0x400*8, 5 + 0x400*8, 4 + 0x400*8,
		3, 2, 1, 0, 7, 6, 5, 4 },
	{ 0, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
		8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
	16*8
};


static GFXDECODE_START( gfx_subs )
	GFXDECODE_ENTRY( "gfx1", 0, playfield_layout, 0, 2 )    /* playfield graphics */
	GFXDECODE_ENTRY( "gfx2", 0, motion_layout,    0, 2 )    /* motion graphics */
GFXDECODE_END


/*************************************
 *
 *  Machine driver
 *
 *************************************/

void subs_state::subs(machine_config &config)
{
	/* basic machine hardware */
	M6502(config, m_maincpu, 12096000/16);      /* clock input is the "4H" signal */
	m_maincpu->set_addrmap(AS_PROGRAM, &subs_state::main_map);
	m_maincpu->set_periodic_int(FUNC(subs_state::interrupt), attotime::from_hz(4*57));


	/* video hardware */
	GFXDECODE(config, m_gfxdecode, m_palette, gfx_subs);

	PALETTE(config, m_palette, FUNC(subs_state::subs_palette), 4);

	config.set_default_layout(layout_dualhsxs);

	screen_device &lscreen(SCREEN(config, "lscreen", SCREEN_TYPE_RASTER));
	lscreen.set_refresh_hz(57);
	lscreen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
	lscreen.set_size(32*8, 32*8);
	lscreen.set_visarea(0*8, 32*8-1, 0*8, 28*8-1);
	lscreen.set_screen_update(FUNC(subs_state::screen_update_left));
	lscreen.set_palette(m_palette);

	screen_device &rscreen(SCREEN(config, "rscreen", SCREEN_TYPE_RASTER));
	rscreen.set_refresh_hz(57);
	rscreen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
	rscreen.set_size(32*8, 32*8);
	rscreen.set_visarea(0*8, 32*8-1, 0*8, 28*8-1);
	rscreen.set_screen_update(FUNC(subs_state::screen_update_right));
	rscreen.set_palette(m_palette);


	/* sound hardware */
	SPEAKER(config, "lspeaker").front_left();
	SPEAKER(config, "rspeaker").front_right();

	DISCRETE(config, m_discrete, subs_discrete).add_route(0, "lspeaker", 1.0).add_route(1, "rspeaker", 1.0);

	ls259_device &latch(LS259(config, "latch")); // C9
	latch.q_out_cb<0>().set_output("led0").invert(); // START LAMP 1
	latch.q_out_cb<1>().set_output("led1").invert(); // START LAMP 2
	latch.q_out_cb<2>().set(m_discrete, FUNC(discrete_device::write_line<SUBS_SONAR2_EN>));
	latch.q_out_cb<3>().set(m_discrete, FUNC(discrete_device::write_line<SUBS_SONAR1_EN>));
	// Schematics show crash and explode reversed.  But this is proper.
	latch.q_out_cb<4>().set(m_discrete, FUNC(discrete_device::write_line<SUBS_EXPLODE_EN>));
	latch.q_out_cb<5>().set(m_discrete, FUNC(discrete_device::write_line<SUBS_CRASH_EN>));
	latch.q_out_cb<6>().set(FUNC(subs_state::invert1_w));
	latch.q_out_cb<7>().set(FUNC(subs_state::invert2_w));
}
示例#16
0
void tm990189_state::tm990_189(machine_config &config)
{
	/* basic machine hardware */
	TMS9980A(config, m_tms9980a, 8_MHz_XTAL); // clock divided by 4 internally
	m_tms9980a->set_addrmap(AS_PROGRAM, &tm990189_state::tm990_189_memmap);
	m_tms9980a->set_addrmap(AS_IO, &tm990189_state::tm990_189_cru_map);
	m_tms9980a->extop_cb().set(FUNC(tm990189_state::external_operation));

	MCFG_MACHINE_START_OVERRIDE(tm990189_state, tm990_189 )
	MCFG_MACHINE_RESET_OVERRIDE(tm990189_state, tm990_189 )

	/* Video hardware */
	config.set_default_layout(layout_tm990189);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();
	SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50);

	/* Devices */
	CASSETTE(config, "cassette", 0).add_route(ALL_OUTPUTS, "mono", 0.25);

	TMS9901(config, m_tms9901_usr, 8_MHz_XTAL / 4);
	m_tms9901_usr->p_out_cb(0).set(FUNC(tm990189_state::usr9901_led0_w));
	m_tms9901_usr->p_out_cb(1).set(FUNC(tm990189_state::usr9901_led1_w));
	m_tms9901_usr->p_out_cb(2).set(FUNC(tm990189_state::usr9901_led2_w));
	m_tms9901_usr->p_out_cb(3).set(FUNC(tm990189_state::usr9901_led3_w));
	m_tms9901_usr->intlevel_cb().set(FUNC(tm990189_state::usr9901_interrupt_callback));

	TMS9901(config, m_tms9901_sys, 8_MHz_XTAL / 4);
	m_tms9901_sys->read_cb().set(FUNC(tm990189_state::sys9901_r));
	m_tms9901_sys->p_out_cb(0).set(FUNC(tm990189_state::sys9901_digitsel0_w));
	m_tms9901_sys->p_out_cb(1).set(FUNC(tm990189_state::sys9901_digitsel1_w));
	m_tms9901_sys->p_out_cb(2).set(FUNC(tm990189_state::sys9901_digitsel2_w));
	m_tms9901_sys->p_out_cb(3).set(FUNC(tm990189_state::sys9901_digitsel3_w));
	m_tms9901_sys->p_out_cb(4).set(FUNC(tm990189_state::sys9901_segment0_w));
	m_tms9901_sys->p_out_cb(5).set(FUNC(tm990189_state::sys9901_segment1_w));
	m_tms9901_sys->p_out_cb(6).set(FUNC(tm990189_state::sys9901_segment2_w));
	m_tms9901_sys->p_out_cb(7).set(FUNC(tm990189_state::sys9901_segment3_w));
	m_tms9901_sys->p_out_cb(8).set(FUNC(tm990189_state::sys9901_segment4_w));
	m_tms9901_sys->p_out_cb(9).set(FUNC(tm990189_state::sys9901_segment5_w));
	m_tms9901_sys->p_out_cb(10).set(FUNC(tm990189_state::sys9901_segment6_w));
	m_tms9901_sys->p_out_cb(11).set(FUNC(tm990189_state::sys9901_segment7_w));
	m_tms9901_sys->p_out_cb(12).set(FUNC(tm990189_state::sys9901_dsplytrgr_w));
	m_tms9901_sys->p_out_cb(13).set(FUNC(tm990189_state::sys9901_shiftlight_w));
	m_tms9901_sys->p_out_cb(14).set(FUNC(tm990189_state::sys9901_spkrdrive_w));
	m_tms9901_sys->p_out_cb(15).set(FUNC(tm990189_state::sys9901_tapewdata_w));
	m_tms9901_sys->intlevel_cb().set(FUNC(tm990189_state::sys9901_interrupt_callback));

	TMS9902(config, m_tms9902, 8_MHz_XTAL / 4);
	m_tms9902->xmit_cb().set(FUNC(tm990189_state::xmit_callback)); // called when a character is transmitted
	TM990_189_RS232(config, "rs232", 0, m_tms9902);

	timer_device &display_timer(TIMER(config, "display_timer"));
	display_timer.configure_periodic(FUNC(tm990189_state::display_callback), attotime::from_hz(30));
	// Need to delay the timer, or it will spoil the initial LOAD
	// TODO: Fix this, probably inside CPU
	display_timer.set_start_delay(attotime::from_msec(150));
}
示例#17
0
void calorie_state::caloriee(machine_config &config)
{
	calorie(config);
	sega_317_0004_device &maincpu(SEGA_317_0004(config.replace(), m_maincpu, 4000000));         /* 4 MHz */
	maincpu.set_addrmap(AS_PROGRAM, &calorie_state::calorie_map);
	maincpu.set_addrmap(AS_OPCODES, &calorie_state::decrypted_opcodes_map);
	maincpu.set_vblank_int("screen", FUNC(calorie_state::irq0_line_hold));
	maincpu.set_decrypted_tag(m_decrypted_opcodes);
}
示例#18
0
文件: gb.cpp 项目: PugsyMAME/mame
void gb_state::gbpocket(machine_config &config)
{
	gameboy(config);

	/* video hardware */
	m_palette->set_init(FUNC(gb_state::gbp_palette));

	MGB_PPU(config.replace(), m_ppu, m_maincpu);
}
示例#19
0
software_list_device::software_list_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
	: device_t(mconfig, SOFTWARE_LIST, "Software list", tag, owner, clock, "software_list", __FILE__),
	m_list_type(SOFTWARE_LIST_ORIGINAL_SYSTEM),
	m_filter(nullptr),
	m_parsed(false),
	m_file(mconfig.options().hash_path(), OPEN_FLAG_READ),
	m_description("")
{
}
示例#20
0
s32comm_device::s32comm_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) :
	device_t(mconfig, S32COMM, "SYSTEM32 COMMUNICATION BD", tag, owner, clock, "s32comm", __FILE__),
	m_line_rx(OPEN_FLAG_WRITE | OPEN_FLAG_CREATE ),
	m_line_tx(OPEN_FLAG_READ)
{
	// prepare localhost "filename"
	m_localhost[0] = 0;
	strcat(m_localhost, "socket.");
	strcat(m_localhost, mconfig.options().comm_localhost());
	strcat(m_localhost, ":");
	strcat(m_localhost, mconfig.options().comm_localport());

	// prepare remotehost "filename"
	m_remotehost[0] = 0;
	strcat(m_remotehost, "socket.");
	strcat(m_remotehost, mconfig.options().comm_remotehost());
	strcat(m_remotehost, ":");
	strcat(m_remotehost, mconfig.options().comm_remoteport());
}
示例#21
0
void nes_state::famipalc(machine_config &config)
{
	nespalc(config);
	NES_CONTROL_PORT(config.replace(), m_ctrl1, fc_control_port1_devices, "joypad");
	NES_CONTROL_PORT(config.replace(), m_ctrl2, fc_control_port2_devices, "joypad");
	NES_CONTROL_PORT(config, m_exp, fc_expansion_devices, nullptr);
	m_exp->set_brightpixel_callback(FUNC(nes_state::bright_pixel));

	SOFTWARE_LIST(config, "cass_list").set_original("famicom_cass");
}
示例#22
0
m2comm_device::m2comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
	device_t(mconfig, M2COMM, tag, owner, clock)
{
	// prepare localhost "filename"
	m_localhost[0] = 0;
	strcat(m_localhost, "socket.");
	strcat(m_localhost, mconfig.options().comm_localhost());
	strcat(m_localhost, ":");
	strcat(m_localhost, mconfig.options().comm_localport());

	// prepare remotehost "filename"
	m_remotehost[0] = 0;
	strcat(m_remotehost, "socket.");
	strcat(m_remotehost, mconfig.options().comm_remotehost());
	strcat(m_remotehost, ":");
	strcat(m_remotehost, mconfig.options().comm_remoteport());

	m_framesync = mconfig.options().comm_framesync() ? 0x01 : 0x00;
}
示例#23
0
文件: m1comm.c 项目: ccmurray/mame
m1comm_device::m1comm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
	device_t(mconfig, M1COMM, "MODEL-1 COMMUNICATION BD", tag, owner, clock, "m1comm", __FILE__),
	m_commcpu(*this, Z80_TAG),
	m_line_rx(OPEN_FLAG_WRITE | OPEN_FLAG_CREATE ),
	m_line_tx(OPEN_FLAG_READ)
{
	// prepare localhost "filename"
	m_localhost[0] = 0;
	strcat(m_localhost, "socket.");
	strcat(m_localhost, mconfig.options().comm_localhost());
	strcat(m_localhost, ":");
	strcat(m_localhost, mconfig.options().comm_localport());

	// prepare remotehost "filename"
	m_remotehost[0] = 0;
	strcat(m_remotehost, "socket.");
	strcat(m_remotehost, mconfig.options().comm_remotehost());
	strcat(m_remotehost, ":");
	strcat(m_remotehost, mconfig.options().comm_remoteport());
}
示例#24
0
void angelkds_state::spcpostn(machine_config &config)
{
	angelkds(config);

	/* encryption */
	sega_317_0005_device &maincpu(SEGA_317_0005(config.replace(), m_maincpu, XTAL(6'000'000)));
	maincpu.set_addrmap(AS_PROGRAM, &angelkds_state::main_map);
	maincpu.set_addrmap(AS_IO, &angelkds_state::main_portmap);
	maincpu.set_vblank_int("screen", FUNC(angelkds_state::irq0_line_hold));
	maincpu.set_addrmap(AS_OPCODES, &angelkds_state::decrypted_opcodes_map);
	maincpu.set_decrypted_tag(m_decrypted_opcodes);
}
示例#25
0
文件: vtech1.cpp 项目: MASHinfo/mame
MACHINE_CONFIG_END

void vtech1_state::laser200(machine_config &config)
{
	laser110(config);
	MC6847_PAL(config.replace(), m_mc6847, XTAL(4'433'619));
	m_mc6847->fsync_wr_callback().set_inputline(m_maincpu, 0).invert();
	m_mc6847->input_callback().set(FUNC(vtech1_state::mc6847_videoram_r));
	m_mc6847->set_get_fixed_mode(mc6847_pal_device::MODE_GM1);
	// GM2 = GND, GM0 = GND, INTEXT = GND
	// other lines not connected
}
示例#26
0
void crospang_state::pitapat(machine_config &config)
{
	crospang(config);

	// can't be 14'318'181 / 2 as the inputs barely respond and the background graphics glitch badly when the screen fills, doesn't appear to be a vblank bit anywhere to negate this either, P12 reated part
	M68000(config.replace(), m_maincpu, XTAL(14'318'181));
	m_maincpu->set_addrmap(AS_PROGRAM, &crospang_state::pitapat_map);
	m_maincpu->set_vblank_int("screen", FUNC(crospang_state::irq6_line_hold));

	/* basic machine hardware */
	m_maincpu->set_addrmap(AS_PROGRAM, &crospang_state::pitapat_map);
}
示例#27
0
void z80ne_state::z80netb(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, Z80NE_CPU_SPEED_HZ);
	m_maincpu->set_addrmap(AS_PROGRAM, &z80ne_state::z80netb_mem);
	m_maincpu->set_addrmap(AS_IO, &z80ne_state::z80net_io);

	MCFG_MACHINE_START_OVERRIDE(z80ne_state,z80netb)
	MCFG_MACHINE_RESET_OVERRIDE(z80ne_state,z80netb)

	AY31015(config, m_uart);

	CLOCK(config, m_uart_clock, 4800);
	m_uart_clock->signal_handler().set(FUNC(z80ne_state::lx385_uart_tx_clock_w));
	m_uart_clock->signal_handler().append(m_uart, FUNC(ay31015_device::write_rcp));

	CASSETTE(config, m_cassette1);
	m_cassette1->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
	m_cassette1->set_interface("z80ne_cass");

	CASSETTE(config, m_cassette2);
	m_cassette2->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
	m_cassette2->set_interface("z80ne_cass");

	KR2376_ST(config, m_lx387_kr2376, 50000);
	m_lx387_kr2376->x<0>().set_ioport("X0");
	m_lx387_kr2376->x<1>().set_ioport("X1");
	m_lx387_kr2376->x<2>().set_ioport("X2");
	m_lx387_kr2376->x<3>().set_ioport("X3");
	m_lx387_kr2376->x<4>().set_ioport("X4");
	m_lx387_kr2376->x<5>().set_ioport("X5");
	m_lx387_kr2376->x<6>().set_ioport("X6");
	m_lx387_kr2376->x<7>().set_ioport("X7");
	m_lx387_kr2376->shift().set(FUNC(z80ne_state::lx387_shift_r));
	m_lx387_kr2376->control().set(FUNC(z80ne_state::lx387_control_r));

	/* video hardware */
	SCREEN(config, "lx388", SCREEN_TYPE_RASTER);

	MC6847_PAL(config, m_vdg, 4.433619_MHz_XTAL);
	m_vdg->set_screen("lx388");
	m_vdg->input_callback().set(FUNC(z80ne_state::lx388_mc6847_videoram_r));
	// AG = GND, GM2 = GND, GM1 = GND, GM0 = GND, CSS = GND
	// other lines not connected

	config.set_default_layout(layout_z80netb);

	/* internal ram */
	RAM(config, m_ram).set_default_size("32K").set_extra_options("1K");

	SOFTWARE_LIST(config, "cass_list").set_original("z80ne_cass");
}
示例#28
0
文件: s4.cpp 项目: SailorSat/cabmame
void s4_state::s4(machine_config &config)
{
	/* basic machine hardware */
	M6800(config, m_maincpu, 3580000);
	m_maincpu->set_addrmap(AS_PROGRAM, &s4_state::s4_main_map);
	TIMER(config, "irq").configure_periodic(FUNC(s4_state::irq), attotime::from_hz(250));
	MCFG_MACHINE_RESET_OVERRIDE(s4_state, s4)

	/* Video */
	config.set_default_layout(layout_s4);

	/* Sound */
	genpin_audio(config);

	/* Devices */
	PIA6821(config, m_pia22, 0);
	m_pia22->writepa_handler().set(FUNC(s4_state::sol0_w));
	m_pia22->writepb_handler().set(FUNC(s4_state::sol1_w));
	m_pia22->ca2_handler().set(FUNC(s4_state::pia22_ca2_w));
	m_pia22->cb2_handler().set(FUNC(s4_state::pia22_cb2_w));
	m_pia22->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE);
	m_pia22->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);

	PIA6821(config, m_pia24, 0);
	m_pia24->writepa_handler().set(FUNC(s4_state::lamp0_w));
	m_pia24->writepb_handler().set(FUNC(s4_state::lamp1_w));
	m_pia24->ca2_handler().set(FUNC(s4_state::pia24_ca2_w));
	m_pia24->cb2_handler().set(FUNC(s4_state::pia24_cb2_w));
	m_pia24->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE);
	m_pia24->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);

	PIA6821(config, m_pia28, 0);
	m_pia28->readpa_handler().set(FUNC(s4_state::dips_r));
	m_pia28->readca1_handler().set(FUNC(s4_state::pia28_ca1_r));
	m_pia28->readcb1_handler().set(FUNC(s4_state::pia28_cb1_r));
	m_pia28->writepa_handler().set(FUNC(s4_state::dig0_w));
	m_pia28->writepb_handler().set(FUNC(s4_state::dig1_w));
	m_pia28->ca2_handler().set(FUNC(s4_state::pia28_ca2_w));
	m_pia28->cb2_handler().set(FUNC(s4_state::pia28_cb2_w));
	m_pia28->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE);
	m_pia28->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);

	PIA6821(config, m_pia30, 0);
	m_pia30->readpa_handler().set(FUNC(s4_state::switch_r));
	m_pia30->writepb_handler().set(FUNC(s4_state::switch_w));
	m_pia30->ca2_handler().set(FUNC(s4_state::pia30_ca2_w));
	m_pia30->cb2_handler().set(FUNC(s4_state::pia30_cb2_w));
	m_pia30->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE);
	m_pia30->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);

	NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
}
示例#29
0
void by133_state::granny(machine_config &config)
{
	babypac(config);

	MC6809(config.replace(), m_videocpu, XTAL(8'000'000)); // MC68B09P (XTAL value hard to read)
	m_videocpu->set_addrmap(AS_PROGRAM, &by133_state::granny_map);

	TMS9928A(config, m_crtc2, XTAL(10'738'635)).set_screen("screen");
	m_crtc2->set_vram_size(0x4000);
	m_crtc2->int_callback().set_inputline(m_videocpu, M6809_IRQ_LINE);

	subdevice<screen_device>("screen")->set_screen_update(FUNC(by133_state::screen_update_granny));
}
示例#30
0
文件: f1gp.cpp 项目: PugsyMAME/mame
void f1gp2_state::f1gp2(machine_config &config)
{
	f1gp_state::f1gp(config);

	/* basic machine hardware */
	m_maincpu->set_addrmap(AS_PROGRAM, &f1gp2_state::f1gp2_cpu1_map);

	/* video hardware */
	m_gfxdecode->set_info(gfx_f1gp2);

	subdevice<screen_device>("screen")->set_visarea(0*8, 40*8-1, 0*8, 28*8-1);
	subdevice<screen_device>("screen")->set_screen_update(FUNC(f1gp2_state::screen_update));

	config.device_remove("gga");
	config.device_remove("vsystem_spr_old1");
	config.device_remove("vsystem_spr_old2");
	VSYSTEM_SPR(config, m_spr, 0);
	m_spr->set_tile_indirect_cb(FUNC(f1gp2_state::tile_callback<0>), this);
	m_spr->set_gfx_region(1);
	m_spr->set_gfxdecode_tag(m_gfxdecode);

	m_k053936->set_offsets(-48, -21);
}