示例#1
0
void speglsht_state::speglsht(machine_config &config)
{
	/* basic machine hardware */
	ST0016_CPU(config, m_maincpu, 8000000); /* 8 MHz ? */
	m_maincpu->set_addrmap(AS_PROGRAM, &speglsht_state::st0016_mem);
	m_maincpu->set_addrmap(AS_IO, &speglsht_state::st0016_io);
	m_maincpu->set_vblank_int("screen", FUNC(speglsht_state::irq0_line_hold));

	R3051(config, m_subcpu, 25000000);
	m_subcpu->set_endianness(ENDIANNESS_LITTLE);
	m_subcpu->set_addrmap(AS_PROGRAM, &speglsht_state::speglsht_mem);
	m_subcpu->set_vblank_int("screen", FUNC(speglsht_state::irq4_line_assert));

	config.m_minimum_quantum = attotime::from_hz(6000);
	MCFG_MACHINE_RESET_OVERRIDE(speglsht_state,speglsht)

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(60);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
	screen.set_size(512, 512);
	screen.set_visarea(0, 319, 8, 239-8);
	screen.set_screen_update(FUNC(speglsht_state::screen_update_speglsht));

	GFXDECODE(config, "gfxdecode", m_palette, gfx_speglsht);
	PALETTE(config, m_palette).set_entries(16*16*4+1);

	MCFG_VIDEO_START_OVERRIDE(speglsht_state,speglsht)
}
示例#2
0
文件: apexc.cpp 项目: PugsyMAME/mame
void apexc_state::apexc(machine_config &config)
{
	/* basic machine hardware */
	/* APEXC CPU @ 2.0 kHz (memory word clock frequency) */
	APEXC(config, m_maincpu, 2000);
	m_maincpu->set_addrmap(AS_PROGRAM, &apexc_state::mem);
	m_maincpu->tape_read().set(m_tape_reader, FUNC(apexc_tape_reader_image_device::read));
	m_maincpu->tape_punch().set(FUNC(apexc_state::tape_write));

	/* video hardware does not exist, but we display a control panel and the typewriter output */
	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_refresh_hz(60);
	m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
	m_screen->set_size(256, 192);
	m_screen->set_visarea(0, 256-1, 0, 192-1);
	m_screen->set_palette(m_palette);
	m_screen->set_screen_update(FUNC(apexc_state::screen_update_apexc));

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_apexc);

	PALETTE(config, m_palette, FUNC(apexc_state::apexc_palette), ARRAY_LENGTH(palette_table));

	APEXC_CYLINDER(config, m_cylinder);
	APEXC_TAPE_PUNCHER(config, m_tape_puncher);
	APEXC_TAPE_READER(config, m_tape_reader);
}
示例#3
0
INPUT_PORTS_END


void twins_state::twinsed1(machine_config &config)
{
	/* basic machine hardware */
	V30(config, m_maincpu, 8000000);
	m_maincpu->set_addrmap(AS_PROGRAM, &twins_state::twins_map);
	m_maincpu->set_addrmap(AS_IO, &twins_state::twinsed1_io);

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_raw(8000000, 512, 0, 320, 312, 0, 200); // 15.625 kHz horizontal???
	screen.set_screen_update(FUNC(twins_state::screen_update_twins));
	screen.set_palette(m_palette);
	screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);

	I2C_24C02(config, m_i2cmem);

	PALETTE(config, m_palette).set_entries(0x100);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();

	ay8910_device &aysnd(AY8910(config, "aysnd", 2000000));
	aysnd.port_a_read_callback().set_ioport("P1");
	aysnd.port_b_read_callback().set_ioport("P2");
	aysnd.add_route(ALL_OUTPUTS, "mono", 1.0);
}
示例#4
0
文件: gmaster.cpp 项目: k2-git/mame
void gmaster_state::gmaster(machine_config &config)
{
	upd7810_device &upd(UPD7810(config, m_maincpu, 12_MHz_XTAL/2/*?*/)); // µPD78C11 in the unit
	upd.set_addrmap(AS_PROGRAM, &gmaster_state::gmaster_mem);
	upd.pa_in_cb().set_ioport("JOY");
	upd.pb_in_cb().set(FUNC(gmaster_state::gmaster_portb_r));
	upd.pc_in_cb().set(FUNC(gmaster_state::gmaster_portc_r));
	upd.pd_in_cb().set(FUNC(gmaster_state::gmaster_portd_r));
	upd.pf_in_cb().set(FUNC(gmaster_state::gmaster_portf_r));
	upd.pa_out_cb().set(FUNC(gmaster_state::gmaster_porta_w));
	upd.pb_out_cb().set(FUNC(gmaster_state::gmaster_portb_w));
	upd.pc_out_cb().set(FUNC(gmaster_state::gmaster_portc_w));
	upd.pd_out_cb().set(FUNC(gmaster_state::gmaster_portd_w));
	upd.pf_out_cb().set(FUNC(gmaster_state::gmaster_portf_w));

	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
	screen.set_refresh_hz(60);
	screen.set_size(64, 64);
	screen.set_visarea(0, 64-1-3, 0, 64-1);
	screen.set_screen_update(FUNC(gmaster_state::screen_update_gmaster));
	screen.set_palette("palette");

	PALETTE(config, "palette", FUNC(gmaster_state::gmaster_palette), ARRAY_LENGTH(gmaster_pens));

	SPEAKER(config, "mono").front_center();
	SPEAKER_SOUND(config, m_speaker).add_route(0, "mono", 0.50);

	GENERIC_CARTSLOT(config, m_cart, generic_linear_slot, "gmaster_cart").set_must_be_loaded(true);


	SOFTWARE_LIST(config, "cart_list").set_original("gmaster");
}
示例#5
0
文件: c900.cpp 项目: fesh0r/mame-full
GFXDECODE_END

void c900_state::c900(machine_config &config)
{
	/* basic machine hardware */
	Z8001(config, m_maincpu, 12_MHz_XTAL / 2);
	m_maincpu->set_addrmap(AS_PROGRAM, &c900_state::mem_map);
	m_maincpu->set_addrmap(AS_DATA, &c900_state::data_map);
	m_maincpu->set_addrmap(AS_IO, &c900_state::io_map);
	m_maincpu->set_addrmap(z8001_device::AS_SIO, &c900_state::special_io_map);

	M6508(config, m_fdcpu, 12_MHz_XTAL / 8); // PH1/PH2 = 1.5 MHz
	m_fdcpu->set_addrmap(AS_PROGRAM, &c900_state::fdc_map);

	GFXDECODE(config, "gfxdecode", "palette", gfx_c900);
	PALETTE(config, "palette", palette_device::MONOCHROME);

	z8036_device &cio(Z8036(config, "cio", 12_MHz_XTAL / 16)); // SNDCLK = 750kHz
	cio.pb_wr_cb().set(FUNC(c900_state::sound_pb_w));

	scc8030_device &scc(SCC8030(config, "scc", 12_MHz_XTAL / 2)); // 5'850'000 is the ideal figure
	/* Port B */
	scc.out_txdb_callback().set("rs232", FUNC(rs232_port_device::write_txd));
	scc.out_dtrb_callback().set("rs232", FUNC(rs232_port_device::write_dtr));
	scc.out_rtsb_callback().set("rs232", FUNC(rs232_port_device::write_rts));
	//scc.out_int_callback().set("rs232", FUNC(c900_state::scc_int));

	rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal"));
	rs232.rxd_handler().set("scc", FUNC(scc8030_device::rxb_w));
	rs232.cts_handler().set("scc", FUNC(scc8030_device::ctsb_w));

	SPEAKER(config, "mono").front_center();
	SPEAKER_SOUND(config, m_spkrdev).add_route(ALL_OUTPUTS, "mono", 0.05);
}
示例#6
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");
}
示例#7
0
void ertictac_state::ertictac(machine_config &config)
{
	ARM(config, m_maincpu, XTAL(24'000'000)/3); /* guess, 12MHz 8MHz or 6MHz, what's the correct divider 2, 3 or 4? */
	m_maincpu->set_addrmap(AS_PROGRAM, &ertictac_state::ertictac_map);
	m_maincpu->set_periodic_int(FUNC(ertictac_state::ertictac_podule_irq), attotime::from_hz(60)); // FIXME: timing of this

	I2CMEM(config, "i2cmem", 0).set_page_size(NVRAM_PAGE_SIZE).set_data_size(NVRAM_SIZE);

//  AAKART(config, m_kart, XTAL(24'000'000)/3); // TODO: frequency

	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_raw(XTAL(16'000'000), 1024,0,735, 624/2,0,292); // RiscOS 3 default screen settings
	m_screen->set_screen_update(FUNC(archimedes_state::screen_update));

	PALETTE(config, m_palette).set_entries(0x200);

	SPEAKER(config, "speaker").front_center();
	for (int i = 0; i < 8; i++)
	{
		DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac[i], 0).add_route(0, "speaker", 0.05); // unknown DAC
	}
	voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
	vref.add_route(0, "dac0", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac0", -1.0, DAC_VREF_NEG_INPUT);
	vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
	vref.add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac2", -1.0, DAC_VREF_NEG_INPUT);
	vref.add_route(0, "dac3", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac3", -1.0, DAC_VREF_NEG_INPUT);
	vref.add_route(0, "dac4", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac4", -1.0, DAC_VREF_NEG_INPUT);
	vref.add_route(0, "dac5", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac5", -1.0, DAC_VREF_NEG_INPUT);
	vref.add_route(0, "dac6", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac6", -1.0, DAC_VREF_NEG_INPUT);
	vref.add_route(0, "dac7", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac7", -1.0, DAC_VREF_NEG_INPUT);
}
示例#8
0
GFXDECODE_END


void sprint8_state::sprint8(machine_config &config)
{
	/* basic machine hardware */
	M6800(config, m_maincpu, 11055000 / 11); /* ? */
	m_maincpu->set_addrmap(AS_PROGRAM, &sprint8_state::sprint8_map);

	TIMER(config, "input_timer").configure_periodic(FUNC(sprint8_state::input_callback), attotime::from_hz(60));

	/* video hardware */
	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_refresh_hz(60);
	m_screen->set_size(512, 261);
	m_screen->set_visarea(0, 495, 0, 231);
	m_screen->set_screen_update(FUNC(sprint8_state::screen_update));
	m_screen->screen_vblank().set(FUNC(sprint8_state::screen_vblank));
	m_screen->set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_sprint8);
	PALETTE(config, m_palette, FUNC(sprint8_state::sprint8_palette), 36, 18);

	sprint8_audio(config);
}
示例#9
0
文件: gb.cpp 项目: PugsyMAME/mame
void megaduck_state::megaduck(machine_config &config)
{
	/* basic machine hardware */
	LR35902(config, m_maincpu, XTAL(4'194'304)); /* 4.194304 MHz */
	m_maincpu->set_addrmap(AS_PROGRAM, &megaduck_state::megaduck_map);
	m_maincpu->timer_cb().set(FUNC(gb_state::gb_timer_callback));
	m_maincpu->set_halt_bug(true);

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
	screen.set_refresh_hz(DMG_FRAMES_PER_SECOND);
	screen.set_vblank_time(0);
	screen.set_screen_update("ppu", FUNC(dmg_ppu_device::screen_update));
	screen.set_palette(m_palette);
	screen.set_size(20*8, 18*8);
	screen.set_visarea(0*8, 20*8-1, 0*8, 18*8-1);

	GFXDECODE(config, "gfxdecode", m_palette, gfxdecode_device::empty);
	PALETTE(config, m_palette, FUNC(megaduck_state::megaduck_palette), 4);

	DMG_PPU(config, m_ppu, m_maincpu);

	/* sound hardware */
	SPEAKER(config, "lspeaker").front_left();
	SPEAKER(config, "rspeaker").front_right();
	DMG_APU(config, m_apu, XTAL(4'194'304));
	m_apu->add_route(0, "lspeaker", 0.50);
	m_apu->add_route(1, "rspeaker", 0.50);

	/* cartslot */
	MEGADUCK_CART_SLOT(config, m_cartslot, megaduck_cart, nullptr);
	SOFTWARE_LIST(config, "cart_list").set_original("megaduck");
}
示例#10
0
	// 0x80 eeprom read bit
INPUT_PORTS_END

void timetrv_state::timetrv(machine_config &config)
{
	/* basic machine hardware */
	I80188(config, m_maincpu, 20000000); //???
	m_maincpu->set_addrmap(AS_PROGRAM, &timetrv_state::timetrv_map);
	m_maincpu->set_addrmap(AS_IO, &timetrv_state::timetrv_io);
	// interrupts are generated by internally-driven timers

	EEPROM_2816(config, "eeprom");

	i8255_device &ppi1(I8255(config, "ppi1"));
	ppi1.in_pa_callback().set(FUNC(timetrv_state::test1_r)); //inputs
	ppi1.in_pb_callback().set(FUNC(timetrv_state::test2_r)); //eeprom read bit + inputs

	i8255_device &ppi2(I8255(config, "ppi2"));
	ppi2.in_pa_callback().set(FUNC(timetrv_state::in_r)); //dsw
	ppi2.in_pb_callback().set(FUNC(timetrv_state::in_r)); //dsw
	ppi2.in_pc_callback().set(FUNC(timetrv_state::in_r)); //dsw

	NS16450(config, "uart", 1843200); // P82050 (serial interface for laserdisc)

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(60);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
	screen.set_size(512, 512);
	screen.set_visarea(0*8, 512-1, 0*8, 512-1);
	screen.set_screen_update(FUNC(timetrv_state::screen_update_timetrv));

	PALETTE(config, "palette").set_entries(512);

	/* sound hardware */
}
示例#11
0
GFXDECODE_END

void ti630_state::ti630(machine_config &config)
{
	/* basic machine hardware */
	I80C31(config, m_maincpu, XTAL(10'000'000));
	m_maincpu->set_addrmap(AS_PROGRAM, &ti630_state::i80c31_prg);
	m_maincpu->set_addrmap(AS_IO, &ti630_state::i80c31_io);
	m_maincpu->port_in_cb<1>().set(FUNC(ti630_state::i80c31_p1_r));
	m_maincpu->port_out_cb<1>().set(FUNC(ti630_state::i80c31_p1_w));
	m_maincpu->port_out_cb<3>().set(FUNC(ti630_state::i80c31_p3_w));

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
	screen.set_refresh_hz(50);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
	screen.set_screen_update("hd44780", FUNC(hd44780_device::screen_update));
	screen.set_size(6*16, 9*2);
	screen.set_visarea(0, 6*16-1, 0, 9*2-1);
	screen.set_palette("palette");

	PALETTE(config, "palette", 2).set_init(FUNC(ti630_state::palette_init_ti630));

	GFXDECODE(config, "gfxdecode", "palette", gfx_ti630);

	HD44780(config, m_lcdc, 0);
	m_lcdc->set_lcd_size(2, 16);
}
示例#12
0
void blockout_state::blockout(machine_config &config)
{
	/* basic machine hardware */
	M68000(config, m_maincpu, MAIN_CLOCK);       /* MRH - 8.76 makes gfx/adpcm samples sync better -- but 10 is correct speed*/
	m_maincpu->set_addrmap(AS_PROGRAM, &blockout_state::main_map);
	TIMER(config, "scantimer").configure_scanline(FUNC(blockout_state::blockout_scanline), "screen", 0, 1);

	Z80(config, m_audiocpu, AUDIO_CLOCK);  /* 3.579545 MHz */
	m_audiocpu->set_addrmap(AS_PROGRAM, &blockout_state::audio_map);

	/* video hardware */
	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	/* assume same as ddragon3 with adjusted visible display area */
	m_screen->set_raw(XTAL(28'000'000) / 4, 448, 0, 320, 272, 10, 250);
	m_screen->set_screen_update(FUNC(blockout_state::screen_update));
	m_screen->set_palette(m_palette);

	PALETTE(config, m_palette).set_format(2, &blockout_state::blockout_xBGR_444, 513);

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

	GENERIC_LATCH_8(config, m_soundlatch);
	m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI);

	ym2151_device &ymsnd(YM2151(config, "ymsnd", AUDIO_CLOCK));
	ymsnd.irq_handler().set(FUNC(blockout_state::irq_handler));
	ymsnd.add_route(0, "lspeaker", 0.60);
	ymsnd.add_route(1, "rspeaker", 0.60);

	okim6295_device &oki(OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH));
	oki.add_route(ALL_OUTPUTS, "lspeaker", 0.50);
	oki.add_route(ALL_OUTPUTS, "rspeaker", 0.50);
}
示例#13
0
void konmedal68k_state::kzaurus(machine_config &config)
{
	/* basic machine hardware */
	M68000(config, m_maincpu, XTAL(33'868'800)/4);    // 33.8688 MHz crystal verified on PCB
	m_maincpu->set_addrmap(AS_PROGRAM, &konmedal68k_state::kzaurus_main);
	TIMER(config, "scantimer").configure_scanline(FUNC(konmedal68k_state::scanline), "screen", 0, 1);

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(59.62);  /* verified on pcb */
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
	screen.set_size(64*8, 32*8);
	screen.set_visarea(40, 400-1, 16, 240-1);
	screen.set_screen_update(FUNC(konmedal68k_state::screen_update_konmedal68k));
	screen.set_palette("palette");

	PALETTE(config, "palette").set_format(palette_device::xBGR_888, 8192).enable_shadows();

	K056832(config, m_k056832, 0);
	m_k056832->set_tile_callback(FUNC(konmedal68k_state::tile_callback), this);
	m_k056832->set_config("gfx1", K056832_BPP_4dj, 1, 0);
	m_k056832->set_palette(m_palette);

	K055555(config, m_k055555, 0);

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

	YMZ280B(config, m_ymz, XTAL(33'868'800)/2); // 33.8688 MHz xtal verified on PCB
	m_ymz->add_route(0, "lspeaker", 1.0);
	m_ymz->add_route(1, "rspeaker", 1.0);
}
示例#14
0
void drtomy_state::drtomy(machine_config &config)
{
	/* basic machine hardware */
	M68000(config, m_maincpu, 24000000/2);          /* ? MHz */
	m_maincpu->set_addrmap(AS_PROGRAM, &drtomy_state::drtomy_map);
	m_maincpu->set_vblank_int("screen", FUNC(drtomy_state::irq6_line_hold));


	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(60);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
	screen.set_size(32*16, 32*16);
	screen.set_visarea(0, 320-1, 16, 256-1);
	screen.set_screen_update(FUNC(drtomy_state::screen_update_drtomy));
	screen.set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_drtomy);
	PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 1024);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();

	OKIM6295(config, m_oki, 26000000/16, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.8);
}
示例#15
0
void powerbal_state::magicstk(machine_config &config)
{
	/* basic machine hardware */
	M68000(config, m_maincpu, 12000000);   /* 12 MHz */
	m_maincpu->set_addrmap(AS_PROGRAM, &powerbal_state::magicstk_main_map);
	m_maincpu->set_vblank_int("screen", FUNC(powerbal_state::irq2_line_hold));

	EEPROM_93C46_16BIT(config, "eeprom").default_value(0);

	MCFG_MACHINE_START_OVERRIDE(powerbal_state,powerbal)
	MCFG_MACHINE_RESET_OVERRIDE(powerbal_state,powerbal)

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(61);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
	screen.set_size(128*8, 64*8);
	screen.set_visarea(0*8, 40*8-1, 0*8, 30*8-1);
	screen.set_screen_update(FUNC(powerbal_state::screen_update_powerbal));
	screen.set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_powerbal);
	PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 512);

	MCFG_VIDEO_START_OVERRIDE(powerbal_state,powerbal)

	/* sound hardware */
	SPEAKER(config, "mono").front_center();

	OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH);
	m_oki->add_route(ALL_OUTPUTS, "mono", 1.0);
	m_oki->set_addrmap(0, &powerbal_state::oki_map);
}
示例#16
0
void ettrivia_state::ettrivia(machine_config &config)
{
	Z80(config, m_maincpu, 12000000/4-48000); //should be ok, it gives the 300 interrupts expected
	m_maincpu->set_addrmap(AS_PROGRAM, &ettrivia_state::cpu_map);
	m_maincpu->set_addrmap(AS_IO, &ettrivia_state::io_map);
	m_maincpu->set_vblank_int("screen", FUNC(ettrivia_state::ettrivia_interrupt));

	NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(60);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
	screen.set_size(256, 256);
	screen.set_visarea(0*8, 32*8-1, 0*8, 28*8-1);
	screen.set_screen_update(FUNC(ettrivia_state::screen_update_ettrivia));
	screen.set_palette("palette");

	GFXDECODE(config, m_gfxdecode, "palette", gfx_ettrivia);
	PALETTE(config, "palette", FUNC(ettrivia_state::ettrivia_palette), 256);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();

	AY8912(config, m_ay[0], 1500000).add_route(ALL_OUTPUTS, "mono", 0.25);

	AY8912(config, m_ay[1], 1500000);
	m_ay[1]->port_a_read_callback().set_ioport("IN1");
	m_ay[1]->add_route(ALL_OUTPUTS, "mono", 0.25);

	AY8912(config, m_ay[2], 1500000);
	m_ay[2]->port_a_read_callback().set_ioport("IN0");
	m_ay[2]->add_route(ALL_OUTPUTS, "mono", 0.25);
}
示例#17
0
文件: galeb.cpp 项目: k2-git/mame
INPUT_PORTS_END

/* Machine driver */
void galeb_state::galeb(machine_config &config)
{
	/* basic machine hardware */
	M6502(config, m_maincpu, 1000000);
	m_maincpu->set_addrmap(AS_PROGRAM, &galeb_state::galeb_mem);

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(50);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
	screen.set_size(48*8, 16*8);
	screen.set_visarea(0, 48*8-1, 0, 16*8-1);
	screen.set_screen_update(FUNC(galeb_state::screen_update_galeb));
	screen.set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_galeb);

	PALETTE(config, m_palette, palette_device::MONOCHROME);


	/* audio hardware */
	SPEAKER(config, "speaker").front_center();
	DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.0625); // unknown DAC
	voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
	vref.set_output(5.0);
	vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
}
示例#18
0
文件: sdx.cpp 项目: fesh0r/mame-full
void mtx_sdxcpm_device::device_add_mconfig(machine_config &config)
{
	/* fdc */
	MB8877(config, m_fdc, 8_MHz_XTAL / 8);
	m_fdc->hld_wr_callback().set(FUNC(mtx_sdx_device::motor_w));

	FLOPPY_CONNECTOR(config, "fdc:0", sdx_floppies, "525qd", mtx_sdx_device::floppy_formats).enable_sound(true);
	FLOPPY_CONNECTOR(config, "fdc:1", sdx_floppies, "525qd", mtx_sdx_device::floppy_formats).enable_sound(true);

	/* 80 column video card - required to be installed in MTX internally */
	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
	m_screen->set_refresh_hz(50);
	m_screen->set_size(960, 313);
	m_screen->set_visarea(00, 640 - 1, 0, 240 - 1);
	m_screen->set_screen_update("crtc", FUNC(mc6845_device::screen_update));

	GFXDECODE(config, "gfxdecode", "palette", gfx_mtx_sdx);
	PALETTE(config, "palette", palette_device::RGB_3BIT);

	MC6845(config, m_crtc, 15_MHz_XTAL / 8);
	m_crtc->set_screen("screen");
	m_crtc->set_show_border_area(false);
	m_crtc->set_char_width(8);
	m_crtc->set_update_row_callback(FUNC(mtx_sdxcpm_device::crtc_update_row), this);
}
示例#19
0
文件: tk02.cpp 项目: MoochMcGee/mame
GFXDECODE_END

//-------------------------------------------------
//  device_add_mconfig - add device configuration
//-------------------------------------------------

void tk02_device::device_add_mconfig(machine_config &config)
{
	screen_device &screen(SCREEN(config, "mono", SCREEN_TYPE_RASTER));
	screen.set_color(rgb_t::green());
	screen.set_raw(XTAL(8'000'000) * 2, 1024, 0, 640, 312, 0, 250);
	screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));

	PALETTE(config, m_palette, palette_device::MONOCHROME);

	GFXDECODE(config, "gfxdecode", "palette", gfx_tk02);

	MC6845(config, m_crtc, XTAL(8'000'000) / 4);
	m_crtc->set_screen("mono");
	m_crtc->set_show_border_area(false);
	m_crtc->set_char_width(8);
	m_crtc->set_update_row_callback(FUNC(tk02_device::crtc_update_row), this);
	m_crtc->out_de_callback().set(FUNC(tk02_device::de_w));

	TATUNG_PIPE(config, m_pipe, DERIVED_CLOCK(1, 1), tatung_pipe_cards, nullptr);
}
示例#20
0
void EmuinoSDL::postsetup()
{
    TileLayerInfo layer_info;
    
    // set up the palettes
    for (int i = 0; i < NUM_PALETTES; i++) {
        palettes[i] = SDL_AllocPalette(NUM_PALETTE_ENTRIES);
        
        SDL_Color colors[NUM_PALETTE_ENTRIES];
        SharedRAM.read(PALETTE(i) | 0x8000, colors, NUM_PALETTE_ENTRIES * 4);
        
        for (int z = 0; z < NUM_PALETTE_ENTRIES; z++)
            colors[z].a = 255;
        
        SDL_SetPaletteColors(palettes[i], colors, 0, NUM_PALETTE_ENTRIES);
    }
    
    screenSurface = SDL_CreateRGBSurface(0, 320, 240, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000);
    screenTexture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, 320, 240);
    
    // create the tile textures
    for (int i = 0; i < NUM_TILE_LAYERS; i++) {
        tileMapSurfaces[i] = SDL_CreateRGBSurface(0, 32 * 16, 32 * 16, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000);
        tileMapTextures[i] = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, 32 * 16, 32 * 16);
        SDL_SetTextureBlendMode(tileMapTextures[i], SDL_BLENDMODE_BLEND);
    }
    
    setup = true;
}
示例#21
0
void sliver_state::sliver(machine_config &config)
{
	M68000(config, m_maincpu, 12000000);
	m_maincpu->set_addrmap(AS_PROGRAM, &sliver_state::sliver_map);
	m_maincpu->set_vblank_int("screen", FUNC(sliver_state::irq4_line_hold));

	TIMER(config, "obj_actel").configure_periodic(FUNC(sliver_state::obj_irq_cb), attotime::from_hz(60)); /* unknown clock, causes "obj actel ready error" without this */
	// irq 2 valid but not used?

	I8051(config, m_audiocpu, 8000000);
	m_audiocpu->set_addrmap(AS_PROGRAM, &sliver_state::soundmem_prg);
	m_audiocpu->set_addrmap(AS_IO, &sliver_state::soundmem_io);
	m_audiocpu->port_out_cb<1>().set(FUNC(sliver_state::oki_setbank));

	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_refresh_hz(60);
	m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500));
	m_screen->set_size(64*8, 32*8);
	m_screen->set_visarea(0*8, 384-1-16, 0*8, 240-1);
	m_screen->set_screen_update(FUNC(sliver_state::screen_update));

	PALETTE(config, "palette").set_entries(0x100);
	ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, "palette"));
	ramdac.set_addrmap(0, &sliver_state::ramdac_map);

	SPEAKER(config, "lspeaker").front_left();
	SPEAKER(config, "rspeaker").front_right();

	GENERIC_LATCH_8(config, m_soundlatch);

	okim6295_device &oki(OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH));
	oki.set_addrmap(0, &sliver_state::oki_map);
	oki.add_route(ALL_OUTPUTS, "lspeaker", 0.6);
	oki.add_route(ALL_OUTPUTS, "rspeaker", 0.6);
}
示例#22
0
INPUT_PORTS_END



void spool99_state::spool99(machine_config &config)
{
	Z80(config, m_maincpu, 24000000/8);
	m_maincpu->set_addrmap(AS_PROGRAM, &spool99_state::spool99_map);
	m_maincpu->set_vblank_int("screen", FUNC(spool99_state::irq0_line_hold));

	GFXDECODE(config, m_gfxdecode, "palette", gfx_spool99);

	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(60);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
	screen.set_size(64*8, 32*8);
	screen.set_visarea(7*8, 55*8-1, 1*8, 31*8-1); //384x240,raw guess
	screen.set_screen_update(FUNC(spool99_state::screen_update));
	screen.set_palette("palette");

	PALETTE(config, "palette").set_format(palette_device::xBGR_444, 0x200);

	EEPROM_93C46_16BIT(config, "eeprom");


	SPEAKER(config, "lspeaker").front_left();
	SPEAKER(config, "rspeaker").front_right();

	OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified
	m_oki->add_route(ALL_OUTPUTS, "lspeaker", 0.47);
	m_oki->add_route(ALL_OUTPUTS, "rspeaker", 0.47);
}
示例#23
0
GFXDECODE_END


void subhuntr_state::subhuntr(machine_config &config)
{
	/* basic machine hardware */
	S2650(config, m_maincpu, 14318180/4/2);
	m_maincpu->set_addrmap(AS_PROGRAM, &subhuntr_state::subhuntr_map);
	m_maincpu->set_addrmap(AS_IO, &subhuntr_state::subhuntr_io_map);
	m_maincpu->set_addrmap(AS_DATA, &subhuntr_state::subhuntr_data_map);
	m_maincpu->set_vblank_int("screen", FUNC(subhuntr_state::subhuntr_interrupt));
	m_maincpu->sense_handler().set("screen", FUNC(screen_device::vblank));

	s2636_device &s2636(S2636(config, "s2636", 0));
	s2636.set_offsets(3, -21);
	s2636.add_route(ALL_OUTPUTS, "mono", 0.10);

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_video_attributes(VIDEO_ALWAYS_UPDATE);
	screen.set_refresh_hz(50);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
	screen.set_size(256, 256);
	screen.set_visarea(1*8, 29*8-1, 2*8, 32*8-1);
	screen.set_screen_update(FUNC(subhuntr_state::screen_update_subhuntr));
	screen.set_palette("palette");

	GFXDECODE(config, "gfxdecode", "palette", gfx_subhuntr);
	PALETTE(config, "palette", FUNC(subhuntr_state::subhuntr_palette), 26);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();

	/* discrete sound */
}
示例#24
0
void goupil_g2_state::goupil_g2(machine_config &config)
{
	base(config);
	m_maincpu->set_addrmap(AS_PROGRAM, &goupil_g2_state::mem);

	// "visu 24x80" board
	RAM(config, m_visu24x80_ram);
	m_visu24x80_ram->set_default_size("2K");    // visu24x80 2K ram

	m_screen->set_screen_update("crtc", FUNC(mc6845_device::screen_update));
	m_screen->set_size((80*8), (24*(8+4)));
	m_screen->set_visarea(0, (80*8)-1, 0, (24*(8+4))-1);

	PALETTE(config, m_palette, 3);
	m_palette->set_init("palette", FUNC(palette_device::palette_init_monochrome_highlight));

	mc6845_device &crtc(MC6845(config, "crtc", 14.318181_MHz_XTAL / 8));
	crtc.set_show_border_area(false);
	crtc.set_char_width(8);
	crtc.set_update_row_callback(FUNC(goupil_g2_state::crtc_update_row), this);
	crtc.set_on_update_addr_change_callback(FUNC(goupil_g2_state::crtc_update_addr_changed), this);

	m_via_video->writepa_handler().set_nop();
	m_via_video->writepb_handler().set_nop();
	m_via_video->ca2_handler().set_nop();
}
示例#25
0
void tutankhm_state::tutankhm(machine_config &config)
{
	/* basic machine hardware */
	MC6809E(config, m_maincpu, XTAL(18'432'000)/12);   /* 1.5 MHz ??? */
	m_maincpu->set_addrmap(AS_PROGRAM, &tutankhm_state::main_map);

	ls259_device &mainlatch(LS259(config, "mainlatch")); // C3
	mainlatch.q_out_cb<0>().set(FUNC(tutankhm_state::irq_enable_w));
	mainlatch.q_out_cb<1>().set_nop(); // PAY OUT - not used
	mainlatch.q_out_cb<2>().set(FUNC(tutankhm_state::coin_counter_2_w));
	mainlatch.q_out_cb<3>().set(FUNC(tutankhm_state::coin_counter_1_w));
	mainlatch.q_out_cb<4>().set(FUNC(tutankhm_state::galaxian_stars_enable_w));
	mainlatch.q_out_cb<5>().set("timeplt_audio", FUNC(timeplt_audio_device::mute_w));
	mainlatch.q_out_cb<6>().set(FUNC(tutankhm_state::flip_screen_x_w));
	mainlatch.q_out_cb<7>().set(FUNC(tutankhm_state::flip_screen_y_w));

	WATCHDOG_TIMER(config, "watchdog");

	/* video hardware */
	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_raw(GALAXIAN_PIXEL_CLOCK, GALAXIAN_HTOTAL, GALAXIAN_HBEND, GALAXIAN_HBSTART, GALAXIAN_VTOTAL, GALAXIAN_VBEND, GALAXIAN_VBSTART);
	PALETTE(config, m_palette).set_format(1, tutankhm_state::raw_to_rgb_func, 16);

	m_screen->set_screen_update(FUNC(tutankhm_state::screen_update_tutankhm));
	m_screen->screen_vblank().set(FUNC(tutankhm_state::vblank_irq));

	/* sound hardware */
	TIMEPLT_AUDIO(config, "timeplt_audio");

	/* blinking frequency is determined by 555 counter with Ra=100k, Rb=10k, C=10uF */
	TIMER(config, "stars").configure_periodic(FUNC(tutankhm_state::scramble_stars_blink_timer), PERIOD_OF_555_ASTABLE(100000, 10000, 0.00001));
}
示例#26
0
void korgm1_state::korgm1(machine_config &config)
{
	/* basic machine hardware */
	V30(config, m_maincpu, MAIN_CLOCK); // V50 actually
	m_maincpu->set_addrmap(AS_PROGRAM, &korgm1_state::korgm1_map);
	m_maincpu->set_addrmap(AS_IO, &korgm1_state::korgm1_io);

	CXD1095(config, "pio", 0);

	/* video hardware */
	/* TODO: LCD actually */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(60);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500));
	screen.set_screen_update(FUNC(korgm1_state::screen_update));
	screen.set_size(32*8, 32*8);
	screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1);

	GFXDECODE(config, "gfxdecode", "palette", gfx_korgm1);

	PALETTE(config, "palette").set_entries(8);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();
//  AY8910(config, "aysnd", MAIN_CLOCK/4).add_route(ALL_OUTPUTS, "mono", 0.30);
}
示例#27
0
void wildpkr_state::wildpkr(machine_config &config)
{
	/* basic machine hardware */
	M68000(config, m_maincpu, MAIN_CLOCK);
	m_maincpu->set_addrmap(AS_PROGRAM, &wildpkr_state::wildpkr_map);
	//m_maincpu->set_vblank_int("screen", FUNC(wildpkr_state::irq2_line_hold)); // guess

	MC68681(config, m_duart, SEC_CLOCK);

	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(60);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500));
	screen.set_size(384, 280);
	screen.set_visarea(0, 384-1, 0, 280-1);
	screen.set_screen_update("acrtc", FUNC(hd63484_device::update_screen));
	screen.set_palette("palette");

	HD63484(config, "acrtc", 0).set_addrmap(0, &wildpkr_state::hd63484_map);

	ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, "palette"));
	ramdac.set_addrmap(0, &wildpkr_state::ramdac_map);

	PALETTE(config, "palette", FUNC(wildpkr_state::wildpkr_palette), 256);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();
	AY8930(config, "aysnd", AY_CLOCK).add_route(ALL_OUTPUTS, "mono", 0.50);
}
示例#28
0
void vc4000_state::vc4000(machine_config &config)
{
	/* basic machine hardware */
//  MCFG_DEVICE_ADD("maincpu", S2650, 865000)        /* 3550000/4, 3580000/3, 4430000/3 */
	S2650(config, m_maincpu, 3546875/4);
	m_maincpu->set_addrmap(AS_PROGRAM, &vc4000_state::vc4000_mem);
	m_maincpu->sense_handler().set(FUNC(vc4000_state::vc4000_vsync_r));
	m_maincpu->set_periodic_int(FUNC(vc4000_state::vc4000_video_line), attotime::from_hz(312*53));  // GOLF needs this exact value

	/* video hardware */
	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_refresh_hz(50);
	m_screen->set_size(226, 312);
	m_screen->set_visarea(8, 184, 0, 269);
	m_screen->set_screen_update(FUNC(vc4000_state::screen_update_vc4000));
	m_screen->set_palette("palette");

	PALETTE(config, "palette", FUNC(vc4000_state::vc4000_palette), 8);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();
	VC4000_SND(config, m_custom, 0).add_route(ALL_OUTPUTS, "mono", 0.50);

	/* quickload */
	quickload_image_device &quickload(QUICKLOAD(config, "quickload"));
	quickload.set_handler(snapquick_load_delegate(&QUICKLOAD_LOAD_NAME(vc4000_state, vc4000), this), "pgm,tvc");

	/* cartridge */
	VC4000_CART_SLOT(config, "cartslot", vc4000_cart, nullptr);

	/* software lists */
	SOFTWARE_LIST(config, "cart_list").set_original("vc4000");
}
示例#29
0
void twins_state::twins(machine_config &config)
{
	/* basic machine hardware */
	V30(config, m_maincpu, XTAL(16'000'000)/2); /* verified on pcb */
	m_maincpu->set_addrmap(AS_PROGRAM, &twins_state::twins_map);
	m_maincpu->set_addrmap(AS_IO, &twins_state::twins_io);

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_raw(8000000, 512, 0, 320, 312, 0, 200); // 15.625 kHz horizontal???
	screen.set_screen_update(FUNC(twins_state::screen_update_twins));
	screen.set_palette(m_palette);
	screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);

	PALETTE(config, m_palette).set_entries(256);
	ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette));
	ramdac.set_addrmap(0, &twins_state::ramdac_map);
	ramdac.set_split_read(0);

	I2C_24C02(config, m_i2cmem);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();

	ay8910_device &aysnd(AY8910(config, "aysnd", XTAL(16'000'000)/8)); /* verified on pcb */
	aysnd.port_a_read_callback().set_ioport("P1");
	aysnd.port_b_read_callback().set_ioport("P2");
	aysnd.add_route(ALL_OUTPUTS, "mono", 1.0);
}
示例#30
0
void prehisle_state::prehisle(machine_config &config)
{
	/* basic machine hardware */
	M68000(config, m_maincpu, XTAL(18'000'000)/2);   /* verified on pcb */
	m_maincpu->set_addrmap(AS_PROGRAM, &prehisle_state::prehisle_map);
	m_maincpu->set_vblank_int("screen", FUNC(prehisle_state::irq4_line_hold));

	Z80(config, m_audiocpu, XTAL(4'000'000));    /* verified on pcb */
	m_audiocpu->set_addrmap(AS_PROGRAM, &prehisle_state::prehisle_sound_map);
	m_audiocpu->set_addrmap(AS_IO, &prehisle_state::prehisle_sound_io_map);

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	// the screen parameters are guessed but should be accurate. They
	// give a theoretical refresh rate of 59.1856Hz while the measured
	// rate on a snk68.c with very similar hardware board is 59.16Hz.
	screen.set_raw(XTAL(24'000'000)/4, 384, 0, 256, 264, 16, 240);
	screen.set_screen_update(FUNC(prehisle_state::screen_update));
	screen.set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_prehisle);
	PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 1024);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();

	GENERIC_LATCH_8(config, m_soundlatch);

	ym3812_device &ymsnd(YM3812(config, "ymsnd", XTAL(4'000'000)));  /* verified on pcb */
	ymsnd.irq_handler().set_inputline(m_audiocpu, 0);
	ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0);

	UPD7759(config, m_upd7759);
	m_upd7759->add_route(ALL_OUTPUTS, "mono", 0.90);
}