INPUT_PORTS_END //************************************************************************** // MACHINE DRIVERS //************************************************************************** void nascom_state::nascom(machine_config &config) { // video hardware SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_refresh_hz(50); m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ m_screen->set_size(48 * 8, 16 * 16); m_screen->set_visarea(0, 48 * 8 - 1, 0, 16 * 16 - 1); m_screen->set_screen_update(FUNC(nascom1_state::screen_update_nascom)); m_screen->set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_nascom1); PALETTE(config, m_palette, palette_device::MONOCHROME); // uart AY31015(config, m_hd6402); m_hd6402->set_tx_clock((16_MHz_XTAL / 16) / 256); m_hd6402->set_rx_clock((16_MHz_XTAL / 16) / 256); m_hd6402->read_si_callback().set(FUNC(nascom_state::nascom1_hd6402_si)); m_hd6402->write_so_callback().set(FUNC(nascom_state::nascom1_hd6402_so)); // cassette is connected to the uart CASSETTE(config, m_cassette); m_cassette->set_interface("nascom_cass"); // pio Z80PIO(config, "z80pio", 16_MHz_XTAL / 8); // internal extra ram RAM(config, m_ram).set_default_size("48K").set_extra_options("8K,16K,32K"); // devices snapshot_image_device &snapshot(SNAPSHOT(config, "snapshot", 0)); snapshot.set_handler(snapquick_load_delegate(&SNAPSHOT_LOAD_NAME(nascom_state, nascom1), this), "nas", 0.5); snapshot.set_interface("nascom_snap"); snapshot_image_device &snapchar(SNAPSHOT(config, "snapchar", 0)); snapchar.set_handler(snapquick_load_delegate(&SNAPSHOT_LOAD_NAME(nascom_state, charrom), this), "chr", 0.5); snapchar.set_interface("nascom_char"); }
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"); }
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 ¢_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"); }