Exemple #1
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);
}
Exemple #2
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);
}
Exemple #3
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);
}
Exemple #4
0
void rastan_state::rastan(machine_config &config)
{
	/* basic machine hardware */
	M68000(config, m_maincpu, XTAL(16'000'000)/2);  /* verified on pcb */
	m_maincpu->set_addrmap(AS_PROGRAM, &rastan_state::rastan_map);
	m_maincpu->set_vblank_int("screen", FUNC(rastan_state::irq5_line_hold));

	Z80(config, m_audiocpu, XTAL(16'000'000)/4);    /* verified on pcb */
	m_audiocpu->set_addrmap(AS_PROGRAM, &rastan_state::rastan_s_map);

	config.m_minimum_quantum = attotime::from_hz(600);  /* 10 CPU slices per frame - enough for the sound CPU to read all commands */

	WATCHDOG_TIMER(config, "watchdog");

	/* 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(40*8, 32*8);
	screen.set_visarea(0*8, 40*8-1, 1*8, 31*8-1);
	screen.set_screen_update(FUNC(rastan_state::screen_update_rastan));
	screen.set_palette("palette");

	GFXDECODE(config, "gfxdecode", "palette", gfx_rastan);
	PALETTE(config, "palette").set_format(palette_device::xBGR_555, 2048);

	PC080SN(config, m_pc080sn, 0);
	m_pc080sn->set_gfxdecode_tag("gfxdecode");

	PC090OJ(config, m_pc090oj, 0);
	m_pc090oj->set_gfx_region(1);
	m_pc090oj->set_gfxdecode_tag("gfxdecode");
	m_pc090oj->set_palette_tag("palette");

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

	ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL(16'000'000)/4));  /* verified on pcb */
	ymsnd.irq_handler().set_inputline(m_audiocpu, 0);
	ymsnd.port_write_handler().set(FUNC(rastan_state::rastan_bankswitch_w));
	ymsnd.add_route(0, "mono", 0.50);
	ymsnd.add_route(1, "mono", 0.50);

	MSM5205(config, m_msm, XTAL(384'000)); /* verified on pcb */
	m_msm->vck_legacy_callback().set(FUNC(rastan_state::rastan_msm5205_vck)); /* VCK function */
	m_msm->set_prescaler_selector(msm5205_device::S48_4B);  /* 8 kHz */
	m_msm->add_route(ALL_OUTPUTS, "mono", 0.60);

	LS157(config, m_adpcm_sel, 0);
	m_adpcm_sel->out_callback().set(m_msm, FUNC(msm5205_device::data_w));

	pc060ha_device &ciu(PC060HA(config, "ciu", 0));
	ciu.set_master_tag(m_maincpu);
	ciu.set_slave_tag(m_audiocpu);
}
Exemple #5
0
/* Note: lsasquad clock values are not verified */
void lsasquad_state::lsasquad(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, MASTER_CLOCK / 4);
	m_maincpu->set_addrmap(AS_PROGRAM, &lsasquad_state::lsasquad_map);
	m_maincpu->set_vblank_int("screen", FUNC(lsasquad_state::irq0_line_hold));

	Z80(config, m_audiocpu, MASTER_CLOCK / 8);
	m_audiocpu->set_addrmap(AS_PROGRAM, &lsasquad_state::lsasquad_sound_map);
								/* IRQs are triggered by the YM2203 */
	TAITO68705_MCU(config, m_bmcu, MASTER_CLOCK / 8);


	config.m_minimum_quantum = attotime::from_hz(30000); /* 500 CPU slices per frame - a high value to ensure proper */
							/* synchronization of the CPUs */
							/* main<->sound synchronization depends on this */

	MCFG_MACHINE_START_OVERRIDE(lsasquad_state,lsasquad)
	MCFG_MACHINE_RESET_OVERRIDE(lsasquad_state,lsasquad)

	GENERIC_LATCH_8(config, m_soundlatch);
	m_soundlatch->data_pending_callback().set("soundnmi", FUNC(input_merger_device::in_w<0>));

	INPUT_MERGER_ALL_HIGH(config, "soundnmi").output_handler().set_inputline(m_audiocpu, INPUT_LINE_NMI);

	GENERIC_LATCH_8(config, m_soundlatch2);

	/* 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(32*8, 32*8);
	screen.set_visarea(0, 32*8-1, 2*8, 30*8-1);
	screen.set_screen_update(FUNC(lsasquad_state::screen_update_lsasquad));
	screen.set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_lsasquad);
	PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 512);

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

	YM2149(config, "aysnd", MASTER_CLOCK / 8).add_route(ALL_OUTPUTS, "mono", 0.12);

	ym2203_device &ymsnd(YM2203(config, "ymsnd", MASTER_CLOCK / 8));
	ymsnd.irq_handler().set_inputline(m_audiocpu, 0);
	ymsnd.port_a_write_callback().set(FUNC(lsasquad_state::unk));
	ymsnd.port_b_write_callback().set(FUNC(lsasquad_state::unk));
	ymsnd.add_route(0, "mono", 0.12);
	ymsnd.add_route(1, "mono", 0.12);
	ymsnd.add_route(2, "mono", 0.12);
	ymsnd.add_route(3, "mono", 0.63);
}
Exemple #6
0
void raiden_state::raiden(machine_config &config)
{
	/* basic machine hardware */
	V30(config, m_maincpu, XTAL(20'000'000)/2); /* NEC V30 CPU, 20MHz verified on pcb */
	m_maincpu->set_addrmap(AS_PROGRAM, &raiden_state::main_map);

	V30(config, m_subcpu, XTAL(20'000'000)/2); /* NEC V30 CPU, 20MHz verified on pcb */
	m_subcpu->set_addrmap(AS_PROGRAM, &raiden_state::sub_map);

	z80_device &audiocpu(Z80(config, "audiocpu", XTAL(14'318'181)/4)); /* verified on pcb */
	audiocpu.set_addrmap(AS_PROGRAM, &raiden_state::seibu_sound_map);
	audiocpu.set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb));

	config.m_minimum_quantum = attotime::from_hz(12000);

	/* video hardware */
	BUFFERED_SPRITERAM16(config, m_spriteram);

	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(59.60); // verified on pcb */
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
	screen.set_size(32*8, 32*8);
	screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
	screen.set_screen_update(FUNC(raiden_state::screen_update_raiden));
	screen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising));
	screen.screen_vblank().append(FUNC(raiden_state::vblank_irq));
	screen.set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_raiden);
	PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 2048);

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

	ym3812_device &ymsnd(YM3812(config, "ymsnd", XTAL(14'318'181)/4));
	ymsnd.irq_handler().set("seibu_sound", FUNC(seibu_sound_device::fm_irqhandler));
	ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0);

	okim6295_device &oki(OKIM6295(config, "oki", XTAL(12'000'000)/12, okim6295_device::PIN7_HIGH)); // frequency and pin 7 verified
	oki.add_route(ALL_OUTPUTS, "mono", 1.0);

	SEIBU_SOUND(config, m_seibu_sound, 0);
	m_seibu_sound->int_callback().set_inputline("audiocpu", 0);
	m_seibu_sound->set_rom_tag("audiocpu");
	m_seibu_sound->set_rombank_tag("seibu_bank1");
	m_seibu_sound->ym_read_callback().set("ymsnd", FUNC(ym3812_device::read));
	m_seibu_sound->ym_write_callback().set("ymsnd", FUNC(ym3812_device::write));
}
Exemple #7
0
void firetrap_state::firetrap(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, FIRETRAP_XTAL/2);    // 6 MHz
	m_maincpu->set_addrmap(AS_PROGRAM, &firetrap_state::firetrap_map);
	m_maincpu->set_vblank_int("screen", FUNC(firetrap_state::firetrap_irq));

	M6502(config, m_audiocpu, FIRETRAP_XTAL/8); // 1.5 MHz
	m_audiocpu->set_addrmap(AS_PROGRAM, &firetrap_state::sound_map);
	/* IRQs are caused by the ADPCM chip */
	/* NMIs are caused by the main CPU */

	I8751(config, "mcu", XTAL(8'000'000)).set_disable();

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
//  screen.set_refresh_hz(57.4034); // PCB measurement
//  screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
//  screen.set_size(32*8, 32*8);
//  screen.set_visarea(0*8, 32*8-1, 1*8, 31*8-1);
	// DECO video CRTC, unverified
	screen.set_raw(FIRETRAP_XTAL/2,384,0,256,272,8,248);
	screen.set_screen_update(FUNC(firetrap_state::screen_update_firetrap));
	screen.set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_firetrap);
	PALETTE(config, m_palette, FUNC(firetrap_state::firetrap_palette), 256);

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

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

	ym3526_device &ymsnd(YM3526(config, "ymsnd", FIRETRAP_XTAL/4));    // 3 MHz
	ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0);

	LS157(config, m_adpcm_select, 0);
	m_adpcm_select->out_callback().set("msm", FUNC(msm5205_device::data_w));

	MSM5205(config, m_msm, FIRETRAP_XTAL/32);   // 375 kHz
	m_msm->vck_callback().set(FUNC(firetrap_state::firetrap_adpcm_int));
	m_msm->set_prescaler_selector(msm5205_device::S48_4B);  /* 7.8125kHz */
	m_msm->add_route(ALL_OUTPUTS, "mono", 0.30);
}
Exemple #8
0
void welltris_state::welltris(machine_config &config)
{
	/* basic machine hardware */
	M68000(config, m_maincpu, 20000000/2);  /* 10 MHz */
	m_maincpu->set_addrmap(AS_PROGRAM, &welltris_state::main_map);
	m_maincpu->set_vblank_int("screen", FUNC(welltris_state::irq1_line_hold));

	Z80(config, m_audiocpu, 8000000/2);     /* 4 MHz ??? */
	m_audiocpu->set_addrmap(AS_PROGRAM, &welltris_state::sound_map);
	m_audiocpu->set_addrmap(AS_IO, &welltris_state::sound_port_map); /* IRQs are triggered by the YM2610 */

	/* video hardware */
	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_refresh_hz(60);
	m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
	m_screen->set_size(512, 256);
	m_screen->set_visarea(15, 367-1, 8, 248-1);
	m_screen->set_screen_update(FUNC(welltris_state::screen_update));
	m_screen->set_palette("palette");

	GFXDECODE(config, m_gfxdecode, "palette", gfx_welltris);
	PALETTE(config, "palette").set_format(palette_device::xRGB_555, 2048);

	VSYSTEM_GGA(config, "gga", XTAL(14'318'181) / 2); // divider not verified

	VSYSTEM_SPR2(config, m_spr_old, 0);
	m_spr_old->set_gfx_region(1);
	m_spr_old->set_pritype(-1);
	m_spr_old->set_gfxdecode_tag(m_gfxdecode);

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

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

	ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000));
	ymsnd.irq_handler().set_inputline(m_audiocpu, 0);
	ymsnd.add_route(0, "mono", 0.25);
	ymsnd.add_route(1, "mono", 0.75);
	ymsnd.add_route(2, "mono", 0.75);
}
Exemple #9
0
GFXDECODE_END

/***************************************************************************
                                Machine Drivers
***************************************************************************/

void quizpun2_state::quizpun2_base(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, XTAL(8'000'000) / 2); // 4 MHz
	m_maincpu->set_addrmap(AS_PROGRAM, &quizpun2_state::quizpun2_map);
	m_maincpu->set_addrmap(AS_IO, &quizpun2_state::quizpun2_io_map);
	m_maincpu->set_vblank_int("screen", FUNC(quizpun2_state::irq0_line_hold));

	Z80(config, m_audiocpu, XTAL(8'000'000) / 2); // 4 MHz
	m_audiocpu->set_addrmap(AS_PROGRAM, &quizpun2_state::quizpun2_sound_map);
	m_audiocpu->set_addrmap(AS_IO, &quizpun2_state::quizpun2_sound_io_map);
	m_audiocpu->set_vblank_int("screen", FUNC(quizpun2_state::irq0_line_hold));
	// NMI generated by main CPU

	EEPROM_93C46_16BIT(config, "eeprom");

	/* 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(384, 256);
	screen.set_visarea(0, 384-1, 0, 256-1);
	screen.set_screen_update(FUNC(quizpun2_state::screen_update_quizpun2));
	screen.set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_quizpun2);
	PALETTE(config, m_palette, 0x200).set_format(PALETTE_FORMAT_xRRRRRGGGGGBBBBB);

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

	GENERIC_LATCH_8(config, m_soundlatch);

	ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(8'000'000) / 2)); // 4 MHz
	ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0);
}
Exemple #10
0
void crospang_state::crospang(machine_config &config)
{
	/* basic machine hardware */
	M68000(config, m_maincpu, XTAL(14'318'181)/2); /* 68000P10 @ 7.15909MHz */
	m_maincpu->set_addrmap(AS_PROGRAM, &crospang_state::crospang_map);
	m_maincpu->set_vblank_int("screen", FUNC(crospang_state::irq6_line_hold));

	z80_device &audiocpu(Z80(config, "audiocpu", XTAL(14'318'181)/4)); /* 3.579545MHz */
	audiocpu.set_addrmap(AS_PROGRAM, &crospang_state::crospang_sound_map);
	audiocpu.set_addrmap(AS_IO, &crospang_state::crospang_sound_io_map);

	/* 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(64*8, 64*8);
	screen.set_visarea(0, 40*8-1, 0, 30*8-1);
	screen.set_screen_update(FUNC(crospang_state::screen_update_crospang));
	screen.set_palette("palette");

	PALETTE(config, "palette").set_format(palette_device::xRGB_555, 0x300);
	GFXDECODE(config, m_gfxdecode, "palette", gfx_crospang);

	DECO_SPRITE(config, m_sprgen, 0);
	m_sprgen->set_gfx_region(0);
	m_sprgen->set_is_bootleg(true);
	m_sprgen->set_offsets(5, 7);
	m_sprgen->set_gfxdecode_tag(m_gfxdecode);

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

	GENERIC_LATCH_8(config, m_soundlatch);

	ym3812_device &ymsnd(YM3812(config, "ymsnd", XTAL(14'318'181)/4)); /* 3.579545MHz */
	ymsnd.irq_handler().set_inputline("audiocpu", 0);
	ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0);

	okim6295_device &oki(OKIM6295(config, "oki", XTAL(14'318'181)/16, okim6295_device::PIN7_HIGH)); // 1.789772MHz or 0.894886MHz?? & pin 7 not verified
	oki.add_route(ALL_OUTPUTS, "mono", 1.0);
}
Exemple #11
0
void matmania_state::maniach(machine_config &config)
{
	/* basic machine hardware */
	M6502(config, m_maincpu, 1500000); /* 1.5 MHz ???? */
	m_maincpu->set_addrmap(AS_PROGRAM, &matmania_state::maniach_map);
	m_maincpu->set_vblank_int("screen", FUNC(matmania_state::irq0_line_hold));

	MC6809E(config, m_audiocpu, 1500000);    /* 1.5 MHz ???? (HD68A09EP) */
	m_audiocpu->set_addrmap(AS_PROGRAM, &matmania_state::maniach_sound_map);

	TAITO68705_MCU(config, m_mcu, 1500000*2);  /* (don't know really how fast, but it doesn't need to even be this fast) */

	config.m_minimum_quantum = attotime::from_hz(6000);  /* 100 CPU slice per frame - high interleaving to sync main and mcu */

	/* video hardware */
	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(32*8, 32*8);
	m_screen->set_visarea(0*8, 32*8-1, 1*8, 31*8-1);
	m_screen->set_screen_update(FUNC(matmania_state::screen_update_maniach));
	m_screen->set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_maniach);
	PALETTE(config, m_palette, FUNC(matmania_state::matmania_palette), 64 + 16);

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

	GENERIC_LATCH_8(config, m_soundlatch);

	ym3526_device &ymsnd(YM3526(config, "ymsnd", 3600000));
	ymsnd.irq_handler().set_inputline(m_audiocpu, M6809_FIRQ_LINE);
	ymsnd.add_route(ALL_OUTPUTS, "speaker", 1.0);

	DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.4); // unknown DAC
	voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
	vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
	vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
}
Exemple #12
0
void othunder_state::othunder(machine_config &config)
{
	/* basic machine hardware */
	M68000(config, m_maincpu, 24_MHz_XTAL/2);
	m_maincpu->set_addrmap(AS_PROGRAM, &othunder_state::othunder_map);

	Z80(config, m_audiocpu, 16_MHz_XTAL/2/2);
	m_audiocpu->set_addrmap(AS_PROGRAM, &othunder_state::z80_sound_map);

	EEPROM_93C46_16BIT(config, m_eeprom);

	adc0808_device &adc(ADC0808(config, "adc", 16_MHz_XTAL/2/2/8));
	adc.eoc_callback().set(FUNC(othunder_state::adc_eoc_w));
	adc.in_callback<0>().set_ioport("P1X");
	adc.in_callback<1>().set_ioport("P1Y");
	adc.in_callback<2>().set_ioport("P2X");
	adc.in_callback<3>().set_ioport("P2Y");

	TC0220IOC(config, m_tc0220ioc, 0);
	m_tc0220ioc->read_0_callback().set_ioport("DSWA");
	m_tc0220ioc->read_1_callback().set_ioport("DSWB");
	m_tc0220ioc->read_2_callback().set_ioport("IN0");
	m_tc0220ioc->read_3_callback().set(m_eeprom, FUNC(eeprom_serial_93cxx_device::do_read)).lshift(7);
	m_tc0220ioc->write_3_callback().set(FUNC(othunder_state::eeprom_w));
	m_tc0220ioc->write_4_callback().set(FUNC(othunder_state::coins_w));
	m_tc0220ioc->read_7_callback().set_ioport("IN2");

	/* 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(40*8, 32*8);
	screen.set_visarea(0*8, 40*8-1, 2*8, 32*8-1);
	screen.set_screen_update(FUNC(othunder_state::screen_update));
	screen.set_palette(m_palette);
	screen.screen_vblank().set(FUNC(othunder_state::vblank_w));

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_othunder);
	PALETTE(config, m_palette).set_entries(4096);

	TC0100SCN(config, m_tc0100scn, 0);
	m_tc0100scn->set_gfx_region(1);
	m_tc0100scn->set_tx_region(2);
	m_tc0100scn->set_offsets(4, 0);
	m_tc0100scn->set_gfxdecode_tag(m_gfxdecode);
	m_tc0100scn->set_palette_tag(m_palette);

	TC0110PCR(config, m_tc0110pcr, 0, m_palette);

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

	ym2610_device &ymsnd(YM2610(config, "ymsnd", 16000000/2));
	ymsnd.irq_handler().set_inputline(m_audiocpu, 0);
	ymsnd.add_route(0, "2610.0l", 0.25);
	ymsnd.add_route(0, "2610.0r", 0.25);
	ymsnd.add_route(1, "2610.1l", 1.0);
	ymsnd.add_route(1, "2610.1r", 1.0);
	ymsnd.add_route(2, "2610.2l", 1.0);
	ymsnd.add_route(2, "2610.2r", 1.0);

	FILTER_VOLUME(config, "2610.0l").add_route(ALL_OUTPUTS, "speaker", 1.0);
	FILTER_VOLUME(config, "2610.0r").add_route(ALL_OUTPUTS, "speaker", 1.0);
	FILTER_VOLUME(config, "2610.1l").add_route(ALL_OUTPUTS, "speaker", 1.0);
	FILTER_VOLUME(config, "2610.1r").add_route(ALL_OUTPUTS, "speaker", 1.0);
	FILTER_VOLUME(config, "2610.2l").add_route(ALL_OUTPUTS, "speaker", 1.0);
	FILTER_VOLUME(config, "2610.2r").add_route(ALL_OUTPUTS, "speaker", 1.0);

	TC0140SYT(config, m_tc0140syt, 0);
	m_tc0140syt->set_master_tag(m_maincpu);
	m_tc0140syt->set_slave_tag(m_audiocpu);
}
Exemple #13
0
void sshangha_state::sshangha(machine_config &config)
{
	/* basic machine hardware */
	M68000(config, m_maincpu, 16_MHz_XTAL); /* CPU marked as 16MHz part */
	m_maincpu->set_addrmap(AS_PROGRAM, &sshangha_state::sshangha_map);
	m_maincpu->set_vblank_int("screen", FUNC(sshangha_state::irq6_line_hold));

	Z80(config, m_audiocpu, 16_MHz_XTAL / 4);
	m_audiocpu->set_addrmap(AS_PROGRAM, &sshangha_state::sound_map);


	config.m_minimum_quantum = attotime::from_hz(6000);

	screen_device& screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(60);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(529));
	screen.set_size(40*8, 32*8);
	screen.set_visarea(0*8, 40*8-1, 1*8, 31*8-1);
	screen.set_screen_update(FUNC(sshangha_state::screen_update));

	GFXDECODE(config, "gfxdecode", m_palette, gfx_sshangha);

	PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 0x4000);

	DECO16IC(config, m_tilegen, 0);
	m_tilegen->set_pf1_size(DECO_64x32);
	m_tilegen->set_pf2_size(DECO_64x32);
	m_tilegen->set_pf1_trans_mask(0x0f);
	m_tilegen->set_pf2_trans_mask(0x0f);
	m_tilegen->set_pf1_col_bank(0x30);
	m_tilegen->set_pf2_col_bank(0x20);
	m_tilegen->set_pf1_col_mask(0x0f);
	m_tilegen->set_pf2_col_mask(0x0f);
	m_tilegen->set_bank1_callback(FUNC(sshangha_state::bank_callback), this);
	m_tilegen->set_bank2_callback(FUNC(sshangha_state::bank_callback), this);
	m_tilegen->set_pf12_8x8_bank(0);
	m_tilegen->set_pf12_16x16_bank(1);
	m_tilegen->set_gfxdecode_tag("gfxdecode");

	DECO_SPRITE(config, m_sprgen1, 0);
	m_sprgen1->set_gfx_region(2);
	m_sprgen1->set_gfxdecode_tag("gfxdecode");

	DECO_SPRITE(config, m_sprgen2, 0);
	m_sprgen2->set_gfx_region(3);
	m_sprgen2->set_gfxdecode_tag("gfxdecode");

	DECO146PROT(config, m_deco146, 0);
	m_deco146->port_a_cb().set_ioport("INPUTS");
	m_deco146->port_b_cb().set_ioport("SYSTEM");
	m_deco146->port_c_cb().set_ioport("DSW");

	/* sound hardware */
	SPEAKER(config, "lspeaker").front_left(); // sure it's stereo?
	SPEAKER(config, "rspeaker").front_right();

	ym2203_device &ymsnd(YM2203(config, "ymsnd", 16_MHz_XTAL / 4));
	ymsnd.irq_handler().set_inputline(m_audiocpu, 0);
	ymsnd.add_route(ALL_OUTPUTS, "lspeaker", 0.33);
	ymsnd.add_route(ALL_OUTPUTS, "rspeaker", 0.33);

	okim6295_device &oki(OKIM6295(config, "oki", 16_MHz_XTAL / 8, okim6295_device::PIN7_LOW)); // clock frequency & pin 7 not verified
	oki.add_route(ALL_OUTPUTS, "lspeaker", 0.27);
	oki.add_route(ALL_OUTPUTS, "rspeaker", 0.27);
}
Exemple #14
0
/******************************************************************************/

static const gfx_layout charlayout =
{
	8,8,
	RGN_FRAC(1,2),
	4,
	{ RGN_FRAC(1,2)+8, RGN_FRAC(1,2)+0, 8, 0 },
	{ STEP8(0,1) },
	{ STEP8(0,8*2) },
	16*8
};

static const gfx_layout tile_layout =
{
	16,16,
	RGN_FRAC(1,2),
	4,
	{ RGN_FRAC(1,2)+8, RGN_FRAC(1,2)+0, 8, 0 },
	{ STEP8(16*8*2,1), STEP8(0,1) },
	{ STEP16(0,8*2) },
	64*8
};

static GFXDECODE_START( gfx_funkyjet )
	GFXDECODE_ENTRY( "gfx1", 0, charlayout,  256, 32 )  /* Characters 8x8 */
	GFXDECODE_ENTRY( "gfx1", 0, tile_layout, 256, 32 )  /* Tiles 16x16 */
	GFXDECODE_ENTRY( "gfx2", 0, tile_layout,   0, 16 )  /* Sprites 16x16 */
GFXDECODE_END

/******************************************************************************/

void funkyjet_state::funkyjet(machine_config &config)
{
	/* basic machine hardware */
	M68000(config, m_maincpu, XTAL(28'000'000)/2); /* 28 MHz crystal */
	m_maincpu->set_addrmap(AS_PROGRAM, &funkyjet_state::funkyjet_map);
	m_maincpu->set_vblank_int("screen", FUNC(funkyjet_state::irq6_line_hold));

	H6280(config, m_audiocpu, XTAL(32'220'000)/4); /* Custom chip 45, Audio section crystal is 32.220 MHz */
	m_audiocpu->set_addrmap(AS_PROGRAM, &funkyjet_state::sound_map);
	m_audiocpu->add_route(ALL_OUTPUTS, "lspeaker", 0); // internal sound unused
	m_audiocpu->add_route(ALL_OUTPUTS, "rspeaker", 0);

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(58);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(529));
	screen.set_size(40*8, 32*8);
	screen.set_visarea(0*8, 40*8-1, 1*8, 31*8-1);
	screen.set_screen_update(FUNC(funkyjet_state::screen_update));
	screen.set_palette("palette");

	DECO146PROT(config, m_deco146, 0);
	m_deco146->port_a_cb().set_ioport("INPUTS");
	m_deco146->port_b_cb().set_ioport("SYSTEM");
	m_deco146->port_c_cb().set_ioport("DSW");
	m_deco146->soundlatch_irq_cb().set_inputline(m_audiocpu, 0);
	m_deco146->set_interface_scramble_interleave();

	GFXDECODE(config, "gfxdecode", "palette", gfx_funkyjet);
	PALETTE(config, "palette").set_format(palette_device::xBGR_444, 1024);

	DECO16IC(config, m_deco_tilegen, 0);
	m_deco_tilegen->set_pf1_size(DECO_64x32);
	m_deco_tilegen->set_pf2_size(DECO_64x32);
	m_deco_tilegen->set_pf1_trans_mask(0x0f);
	m_deco_tilegen->set_pf2_trans_mask(0x0f);
	m_deco_tilegen->set_pf1_col_bank(0x00);
	m_deco_tilegen->set_pf2_col_bank(0x10);
	m_deco_tilegen->set_pf1_col_mask(0x0f);
	m_deco_tilegen->set_pf2_col_mask(0x0f);
	m_deco_tilegen->set_pf12_8x8_bank(0);
	m_deco_tilegen->set_pf12_16x16_bank(1);
	m_deco_tilegen->set_gfxdecode_tag("gfxdecode");

	DECO_SPRITE(config, m_sprgen, 0);
	m_sprgen->set_gfx_region(2);
	m_sprgen->set_gfxdecode_tag("gfxdecode");

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

	ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL(32'220'000)/9));
	ymsnd.irq_handler().set_inputline(m_audiocpu, 1); // IRQ2
	ymsnd.add_route(0, "lspeaker", 0.45);
	ymsnd.add_route(1, "rspeaker", 0.45);

	okim6295_device &oki(OKIM6295(config, "oki", XTAL(28'000'000)/28, okim6295_device::PIN7_HIGH));
	oki.add_route(ALL_OUTPUTS, "lspeaker", 0.50);
	oki.add_route(ALL_OUTPUTS, "rspeaker", 0.50);
}
Exemple #15
0
void f1gp_state::f1gp(machine_config &config)
{
	/* basic machine hardware */
	M68000(config, m_maincpu, XTAL(20'000'000)/2); /* verified on pcb */
	m_maincpu->set_addrmap(AS_PROGRAM, &f1gp_state::f1gp_cpu1_map);
	m_maincpu->set_vblank_int("screen", FUNC(f1gp_state::irq1_line_hold));

	m68000_device &sub(M68000(config, "sub", XTAL(20'000'000)/2));    /* verified on pcb */
	sub.set_addrmap(AS_PROGRAM, &f1gp_state::f1gp_cpu2_map);
	sub.set_vblank_int("screen", FUNC(f1gp_state::irq1_line_hold));

	Z80(config, m_audiocpu, XTAL(20'000'000)/4);  /* verified on pcb */
	m_audiocpu->set_addrmap(AS_PROGRAM, &f1gp_state::sound_map);
	m_audiocpu->set_addrmap(AS_IO, &f1gp_state::sound_io_map);

	config.m_minimum_quantum = attotime::from_hz(6000); /* 100 CPU slices per frame */

	ACIA6850(config, m_acia, 0);
	m_acia->irq_handler().set_inputline("sub", M68K_IRQ_3);
	m_acia->txd_handler().set("acia", FUNC(acia6850_device::write_rxd)); // loopback for now

	clock_device &acia_clock(CLOCK(config, "acia_clock", 1000000)); // guessed
	acia_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc));
	acia_clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc));

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(60);
	screen.set_size(64*8, 32*8);
	screen.set_visarea(0*8, 40*8-1, 1*8, 31*8-1);
	screen.set_screen_update(FUNC(f1gp_state::screen_update_f1gp));
	screen.set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_f1gp);
	PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 2048);

	VSYSTEM_GGA(config, "gga", XTAL(14'318'181) / 2); // divider not verified

	VSYSTEM_SPR2(config, m_spr_old[0], 0);
	m_spr_old[0]->set_tile_indirect_cb(FUNC(f1gp2_state::tile_callback<0>), this);
	m_spr_old[0]->set_gfx_region(1);
	m_spr_old[0]->set_pritype(2);
	m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode);

	VSYSTEM_SPR2(config, m_spr_old[1], 0);
	m_spr_old[1]->set_tile_indirect_cb(FUNC(f1gp2_state::tile_callback<1>), this);
	m_spr_old[1]->set_gfx_region(2);
	m_spr_old[1]->set_pritype(2);
	m_spr_old[1]->set_gfxdecode_tag(m_gfxdecode);

	K053936(config, m_k053936, 0);
	m_k053936->set_wrap(1);
	m_k053936->set_offsets(-58, -2);

	/* 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);
	m_soundlatch->set_separate_acknowledge(true);

	ym2610_device &ymsnd(YM2610(config, "ymsnd", XTAL(8'000'000)));
	ymsnd.irq_handler().set_inputline(m_audiocpu, 0);
	ymsnd.add_route(0, "lspeaker", 0.25);
	ymsnd.add_route(0, "rspeaker", 0.25);
	ymsnd.add_route(1, "lspeaker", 1.0);
	ymsnd.add_route(2, "rspeaker", 1.0);
}