Ejemplo n.º 1
0
void efo_zsu_device::device_add_mconfig(machine_config &config)
{
	z80_device& soundcpu(Z80(config, "soundcpu", 4000000));
	soundcpu.set_addrmap(AS_PROGRAM, &efo_zsu_device::zsu_map);
	soundcpu.set_addrmap(AS_IO, &efo_zsu_device::zsu_io);
	soundcpu.set_daisy_config(daisy_chain);

	Z80CTC(config, m_ctc0, 4000000);
	m_ctc0->intr_callback().set("soundirq", FUNC(input_merger_device::in_w<0>));
	m_ctc0->zc_callback<0>().set(FUNC(efo_zsu_device::ctc0_z0_w));
	m_ctc0->zc_callback<1>().set(FUNC(efo_zsu_device::ctc0_z1_w));
	m_ctc0->zc_callback<2>().set(FUNC(efo_zsu_device::ctc0_z2_w));

	Z80CTC(config, m_ctc1, 4000000);
	m_ctc1->intr_callback().set("soundirq", FUNC(input_merger_device::in_w<1>));
	m_ctc1->zc_callback<0>().set(FUNC(efo_zsu_device::ctc1_z0_w));
	m_ctc1->zc_callback<1>().set(FUNC(efo_zsu_device::ctc1_z1_w));
	m_ctc1->zc_callback<2>().set(FUNC(efo_zsu_device::ctc1_z2_w));

#if 0 // does nothing useful now
	clock_device &ck1mhz(CLOCK(config, "ck1mhz", 4000000/4);
	ck1mhz.signal_handler().set(m_ctc1, FUNC(z80ctc_device::trg0));
	ck1mhz.signal_handler().append(m_ctc1, FUNC(z80ctc_device::trg1));
	ck1mhz.signal_handler().append(m_ctc1, FUNC(z80ctc_device::trg2));
#endif

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

	INPUT_MERGER_ANY_HIGH(config, "soundirq").output_handler().set_inputline("soundcpu", INPUT_LINE_IRQ0); // 74HC03 NAND gate

	SPEAKER(config, "mono").front_center();

	ay8910_device &aysnd0(AY8910(config, "aysnd0", 4000000/2));
	aysnd0.port_a_write_callback().set_membank("rombank").mask(0x03);
	aysnd0.add_route(ALL_OUTPUTS, "mono", 0.5);

	ay8910_device &aysnd1(AY8910(config, "aysnd1", 4000000/2));
	aysnd1.port_a_write_callback().set(FUNC(efo_zsu_device::ay1_porta_w));
	aysnd1.add_route(ALL_OUTPUTS, "mono", 0.5);

	CD40105(config, m_fifo, 0);
	m_fifo->out_ready_cb().set(FUNC(efo_zsu_device::fifo_dor_w));
	m_fifo->out_cb().set(m_adpcm, FUNC(msm5205_device::data_w));

	MSM5205(config, m_adpcm, 4000000/8).add_route(ALL_OUTPUTS, "mono", 0.50);
}
Ejemplo n.º 2
0
void kncljoe_state::kncljoe(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, XTAL(6'000'000));  /* verified on pcb */
	m_maincpu->set_addrmap(AS_PROGRAM, &kncljoe_state::main_map);
	m_maincpu->set_vblank_int("screen", FUNC(kncljoe_state::irq0_line_hold));

	m6803_cpu_device &soundcpu(M6803(config, "soundcpu", XTAL(3'579'545))); /* verified on pcb */
	soundcpu.set_addrmap(AS_PROGRAM, &kncljoe_state::sound_map);
	soundcpu.in_p1_cb().set(FUNC(kncljoe_state::m6803_port1_r));
	soundcpu.out_p1_cb().set(FUNC(kncljoe_state::m6803_port1_w));
	soundcpu.in_p2_cb().set(FUNC(kncljoe_state::m6803_port2_r));
	soundcpu.out_p2_cb().set(FUNC(kncljoe_state::m6803_port2_w));
	soundcpu.set_periodic_int(FUNC(kncljoe_state::sound_nmi), attotime::from_hz((double)3970)); //measured 3.970 kHz

	/* video hardware */
	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK);
	m_screen->set_refresh_hz(60);
	m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(1500));
	m_screen->set_size(32*8, 32*8);
	m_screen->set_visarea(1*8, 31*8-1, 0*8, 32*8-1);
	m_screen->set_screen_update(FUNC(kncljoe_state::screen_update_kncljoe));
	m_screen->set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_kncljoe);
	PALETTE(config, m_palette, FUNC(kncljoe_state::kncljoe_palette), 16*8+16*8, 128+16);

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

	GENERIC_LATCH_8(config, m_soundlatch);

	AY8910(config, m_ay8910, XTAL(3'579'545)/4); /* verified on pcb */
	m_ay8910->port_a_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read));
	m_ay8910->port_b_write_callback().set(FUNC(kncljoe_state::unused_w));
	m_ay8910->add_route(ALL_OUTPUTS, "mono", 0.30);

	SN76489(config, "sn1", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "mono", 0.30); /* verified on pcb */

	SN76489(config, "sn2", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "mono", 0.30); /* verified on pcb */
}
Ejemplo n.º 3
0
void mephisto_pinball_state::mephisto(machine_config &config)
{
	/* basic machine hardware */
	I8088(config, m_maincpu, XTAL(18'000'000)/3);
	m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_pinball_state::mephisto_map);
	//m_maincpu->set_irq_acknowledge_callback("muart", FUNC(i8256_device::inta_cb));

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

	//i8256_device &muart(I8256(config, "muart", XTAL(18'000'000)/3));
	//muart.irq_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
	//muart.txd_handler().set_inputline("audiocpu", MCS51_RX_LINE);

	I8155(config, "ic20", XTAL(18'000'000)/6);
	//i8155_device &i8155_1(I8155(config, "ic20", XTAL(18'000'000)/6));
	//i8155_1.out_to_callback().set("muart", FUNC(i8256_device::write_txc));

	I8155(config, "ic9", XTAL(18'000'000)/6);
	//i8155_device &i8155_2(I8155(config, "ic9", XTAL(18'000'000)/6));
	//i8155_2.out_to_callback().set(FUNC(mephisto_pinball_state::clk_shift_w));

	i8051_device &soundcpu(I8051(config, "soundcpu", XTAL(12'000'000)));
	soundcpu.set_addrmap(AS_PROGRAM, &mephisto_pinball_state::mephisto_8051_map); // EA tied high for external program ROM
	soundcpu.set_addrmap(AS_IO, &mephisto_pinball_state::mephisto_8051_io);
	soundcpu.port_in_cb<1>().set(FUNC(mephisto_pinball_state::ay8910_read));
	soundcpu.port_out_cb<1>().set(FUNC(mephisto_pinball_state::ay8910_write));
	soundcpu.port_out_cb<3>().set(FUNC(mephisto_pinball_state::t0_t1_w));
	soundcpu.serial_rx_cb().set_constant(0); // from MUART

	SPEAKER(config, "mono").front_center();

	AY8910(config, m_aysnd, XTAL(12'000'000)/8);
	m_aysnd->port_a_write_callback().set(FUNC(mephisto_pinball_state::ay8910_columns_w));
	m_aysnd->port_b_read_callback().set(FUNC(mephisto_pinball_state::ay8910_inputs_r));
	m_aysnd->add_route(ALL_OUTPUTS, "mono", 0.5);

	DAC08(config, "dac", 0).add_route(ALL_OUTPUTS, "mono", 0.5);
	voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
	vref.set_output(5.0);
	vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
	vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
}