Beispiel #1
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");
}
Beispiel #2
0
void spectrum_state::spectrum_common(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, X1 / 4);        /* This is verified only for the ZX Spectrum. Other clones are reported to have different clocks */
	m_maincpu->set_addrmap(AS_PROGRAM, &spectrum_state::spectrum_mem);
	m_maincpu->set_addrmap(AS_IO, &spectrum_state::spectrum_io);
	m_maincpu->set_addrmap(AS_OPCODES, &spectrum_state::spectrum_fetch);
	m_maincpu->set_vblank_int("screen", FUNC(spectrum_state::spec_interrupt));

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

	MCFG_MACHINE_RESET_OVERRIDE(spectrum_state, spectrum )

	/* video hardware */
	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_raw(X1 / 2, 448, 0, 352, 312, 0, 296);
	m_screen->set_screen_update(FUNC(spectrum_state::screen_update_spectrum));
	m_screen->screen_vblank().set(FUNC(spectrum_state::screen_vblank_spectrum));
	m_screen->set_palette("palette");

	PALETTE(config, "palette", FUNC(spectrum_state::spectrum_palette), 16);
	GFXDECODE(config, "gfxdecode", "palette", gfx_spectrum);

	MCFG_VIDEO_START_OVERRIDE(spectrum_state, spectrum)

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

	/* expansion port */
	SPECTRUM_EXPANSION_SLOT(config, m_exp, spectrum_expansion_devices, "kempjoy");
	m_exp->irq_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
	m_exp->nmi_handler().set_inputline(m_maincpu, INPUT_LINE_NMI);

	/* devices */
	snapshot_image_device &snapshot(SNAPSHOT(config, "snapshot"));
	snapshot.set_handler(snapquick_load_delegate(&SNAPSHOT_LOAD_NAME(spectrum_state, spectrum), this), "ach,frz,plusd,prg,sem,sit,sna,snp,snx,sp,z80,zx");
	quickload_image_device &quickload(QUICKLOAD(config, "quickload"));
	quickload.set_handler(snapquick_load_delegate(&QUICKLOAD_LOAD_NAME(spectrum_state, spectrum), this), "raw,scr", attotime::from_seconds(2)); // The delay prevents the screen from being cleared by the RAM test at boot

	CASSETTE(config, m_cassette);
	m_cassette->set_formats(tzx_cassette_formats);
	m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
	m_cassette->set_interface("spectrum_cass");

	SOFTWARE_LIST(config, "cass_list").set_original("spectrum_cass");
}
Beispiel #3
0
void mekd2_state::mekd2(machine_config &config)
{
	/* basic machine hardware */
	M6800(config, m_maincpu, XTAL_MEKD2 / 2);        /* 614.4 kHz */
	m_maincpu->set_addrmap(AS_PROGRAM, &mekd2_state::mekd2_mem);

	config.set_default_layout(layout_mekd2);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();
	WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);

	CASSETTE(config, m_cass);

	/* Devices */
	PIA6821(config, m_pia_s, 0);
	m_pia_s->readpa_handler().set(FUNC(mekd2_state::mekd2_key_r));
	m_pia_s->readcb1_handler().set(FUNC(mekd2_state::mekd2_key40_r));
	m_pia_s->writepa_handler().set(FUNC(mekd2_state::mekd2_segment_w));
	m_pia_s->writepb_handler().set(FUNC(mekd2_state::mekd2_digit_w));
	m_pia_s->ca2_handler().set(FUNC(mekd2_state::mekd2_nmi_w));
	m_pia_s->irqa_handler().set_inputline("maincpu", INPUT_LINE_NMI);
	m_pia_s->irqb_handler().set_inputline("maincpu", INPUT_LINE_NMI);

	PIA6821(config, m_pia_u, 0);
	m_pia_u->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE);
	m_pia_u->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);

	ACIA6850(config, m_acia, 0);
	m_acia->txd_handler().set(FUNC(mekd2_state::cass_w));

	clock_device &acia_tx_clock(CLOCK(config, "acia_tx_clock", XTAL_MEKD2 / 256)); // 4800Hz
	acia_tx_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc));

	clock_device &acia_rx_clock(CLOCK(config, "acia_rx_clock", 300)); // toggled by cassette circuit
	acia_rx_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_rxc));

	TIMER(config, "mekd2_c").configure_periodic(FUNC(mekd2_state::mekd2_c), attotime::from_hz(4800));
	TIMER(config, "mekd2_p").configure_periodic(FUNC(mekd2_state::mekd2_p), attotime::from_hz(40000));

	QUICKLOAD(config, "quickload").set_handler(snapquick_load_delegate(&QUICKLOAD_LOAD_NAME(mekd2_state, mekd2_quik), this), "d2", attotime::from_seconds(1));
}
Beispiel #4
0
void instruct_state::instruct(machine_config &config)
{
	/* basic machine hardware */
	S2650(config, m_maincpu, XTAL(3'579'545) / 4);
	m_maincpu->set_addrmap(AS_PROGRAM, &instruct_state::mem_map);
	m_maincpu->set_addrmap(AS_IO, &instruct_state::io_map);
	m_maincpu->set_addrmap(AS_DATA, &instruct_state::data_map);
	m_maincpu->set_periodic_int(FUNC(instruct_state::t2l_int), attotime::from_hz(120));
	m_maincpu->sense_handler().set(FUNC(instruct_state::sense_r));
	m_maincpu->flag_handler().set(FUNC(instruct_state::flag_w));

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

	/* quickload */
	quickload_image_device &quickload(QUICKLOAD(config, "quickload"));
	quickload.set_handler(snapquick_load_delegate(&QUICKLOAD_LOAD_NAME(instruct_state, instruct), this), "pgm", attotime::from_seconds(1));

	/* cassette */
	CASSETTE(config, m_cass);
	SPEAKER(config, "mono").front_center();
	WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.25);
}
Beispiel #5
0
void altair_state::altair(machine_config &config)
{
	/* basic machine hardware */
	I8080(config, m_maincpu, 2_MHz_XTAL);
	m_maincpu->set_addrmap(AS_PROGRAM, &altair_state::mem_map);
	m_maincpu->set_addrmap(AS_IO, &altair_state::io_map);

	/* video hardware */
	acia6850_device &acia(ACIA6850(config, "acia", 0));
	acia.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd));
	acia.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts));

	rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal"));
	rs232.rxd_handler().set("acia", FUNC(acia6850_device::write_rxd));
	rs232.dcd_handler().set("acia", FUNC(acia6850_device::write_dcd));
	rs232.cts_handler().set("acia", FUNC(acia6850_device::write_cts));

	clock_device &uart_clock(CLOCK(config, "uart_clock", 153600)); // TODO: this is set using jumpers S3/S2/S1/S0
	uart_clock.signal_handler().set("acia", FUNC(acia6850_device::write_txc));
	uart_clock.signal_handler().append("acia", FUNC(acia6850_device::write_rxc));

	/* quickload */
	QUICKLOAD(config, "quickload", 0).set_handler(snapquick_load_delegate(&QUICKLOAD_LOAD_NAME(altair_state, altair), this), "bin", 0);
}
Beispiel #6
0
void mtx_state::mtx512(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, 4_MHz_XTAL);
	m_maincpu->set_addrmap(AS_PROGRAM, &mtx_state::mtx_mem);
	m_maincpu->set_addrmap(AS_IO, &mtx_state::mtx_io);
	m_maincpu->set_daisy_config(mtx_daisy_chain);

	/* video hardware */
	tms9929a_device &vdp(TMS9929A(config, "tms9929a", 10.6875_MHz_XTAL));
	vdp.set_screen("screen");
	vdp.set_vram_size(0x4000);
	vdp.int_callback().set(FUNC(mtx_state::mtx_tms9929a_interrupt));
	SCREEN(config, "screen", SCREEN_TYPE_RASTER);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();
	SN76489A(config, m_sn, 4_MHz_XTAL).add_route(ALL_OUTPUTS, "mono", 1.00);

	/* devices */
	Z80CTC(config, m_z80ctc, 4_MHz_XTAL);
	m_z80ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
	m_z80ctc->zc_callback<1>().set(FUNC(mtx_state::ctc_trg1_w));
	m_z80ctc->zc_callback<2>().set(FUNC(mtx_state::ctc_trg2_w));

	TIMER(config, "z80ctc_timer").configure_periodic(FUNC(mtx_state::ctc_tick), attotime::from_hz(4_MHz_XTAL/13));

	CENTRONICS(config, m_centronics, centronics_devices, "printer");
	m_centronics->busy_handler().set(FUNC(mtx_state::write_centronics_busy));
	m_centronics->fault_handler().set(FUNC(mtx_state::write_centronics_fault));
	m_centronics->perror_handler().set(FUNC(mtx_state::write_centronics_perror));
	m_centronics->select_handler().set(FUNC(mtx_state::write_centronics_select));

	output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
	m_centronics->set_output_latch(cent_data_out);

	snapshot_image_device &snapshot(SNAPSHOT(config, "snapshot"));
	snapshot.set_handler(snapquick_load_delegate(&SNAPSHOT_LOAD_NAME(mtx_state, mtx), this), "mtx", attotime::from_seconds(1));
	quickload_image_device &quickload(QUICKLOAD(config, "quickload"));
	quickload.set_handler(snapquick_load_delegate(&QUICKLOAD_LOAD_NAME(mtx_state, mtx), this), "run", attotime::from_seconds(1));

	CASSETTE(config, m_cassette);
	m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED);
	m_cassette->set_interface("mtx_cass");

	TIMER(config, "cassette_timer").configure_periodic(FUNC(mtx_state::cassette_tick), attotime::from_hz(44100));

	/* internal ram */
	RAM(config, m_ram).set_default_size("64K").set_extra_options("96K,128K,192K,320K,448K,512K");

	/* rom extension board */
	GENERIC_SOCKET(config, m_extrom, generic_plain_slot, "mtx_rom", "bin,rom");
	m_extrom->set_device_load(device_image_load_delegate(&mtx_state::device_image_load_extrom_load, this));

	/* rs232 board with disk drive bus */
	MTX_EXP_SLOT(config, m_exp, mtx_expansion_devices, nullptr);
	m_exp->set_program_space(m_maincpu, AS_PROGRAM);
	m_exp->set_io_space(m_maincpu, AS_IO);
	m_exp->int_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
	m_exp->nmi_handler().set_inputline(m_maincpu, INPUT_LINE_NMI);
	m_exp->busreq_handler().set_inputline(m_maincpu, Z80_INPUT_LINE_BUSRQ);

	/* cartridge slot */
	GENERIC_CARTSLOT(config, m_rompak, generic_plain_slot, "mtx_cart", "bin,rom");
	m_rompak->set_device_load(device_image_load_delegate(&mtx_state::device_image_load_rompak_load, this));

	/* software lists */
	SOFTWARE_LIST(config, "cass_list").set_original("mtx_cass");
	SOFTWARE_LIST(config, "flop_list").set_original("mtx_flop");
	SOFTWARE_LIST(config, "cart_list").set_original("mtx_cart");
	SOFTWARE_LIST(config, "rom_list").set_original("mtx_rom");
}