void selz80_state::selz80(machine_config &config) { /* basic machine hardware */ Z80(config, m_maincpu, XTAL(4'000'000)); // it's actually a 5MHz XTAL with a NEC uPD780C-1 cpu m_maincpu->set_addrmap(AS_PROGRAM, &selz80_state::selz80_mem); m_maincpu->set_addrmap(AS_IO, &selz80_state::selz80_io); MCFG_MACHINE_RESET_OVERRIDE(selz80_state, selz80 ) /* video hardware */ config.set_default_layout(layout_selz80); /* Devices */ CLOCK(config, m_clock, 153600); m_clock->signal_handler().set("uart", FUNC(i8251_device::write_txc)); m_clock->signal_handler().append("uart", FUNC(i8251_device::write_rxc)); i8251_device &uart(I8251(config, "uart", 0)); uart.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); uart.dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); uart.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, nullptr)); rs232.rxd_handler().set("uart", FUNC(i8251_device::write_rxd)); rs232.dsr_handler().set("uart", FUNC(i8251_device::write_dsr)); rs232.cts_handler().set("uart", FUNC(i8251_device::write_cts)); i8279_device &kbdc(I8279(config, "i8279", 5000000 / 2)); // based on divider kbdc.out_sl_callback().set(FUNC(selz80_state::scanlines_w)); // scan SL lines kbdc.out_disp_callback().set(FUNC(selz80_state::digit_w)); // display A&B kbdc.in_rl_callback().set(FUNC(selz80_state::kbd_r)); // kbd RL lines kbdc.in_shift_callback().set_constant(1); // Shift key kbdc.in_ctrl_callback().set_constant(1); }
void uts_400_keyboard_device::device_add_mconfig(machine_config &config) { mcs48_cpu_device &kbdc(I8048(config, "kbdc", 4.608_MHz_XTAL)); // SCN8048A // XTAL is marked "4608 / 300-007 / KSS39" kbdc.set_addrmap(AS_IO, &uts_400_keyboard_device::ext_map); kbdc.bus_in_cb().set(FUNC(uts_400_keyboard_device::bus_r)); kbdc.p1_out_cb().set(FUNC(uts_400_keyboard_device::p1_w)); kbdc.p2_out_cb().set(FUNC(uts_400_keyboard_device::p2_w)); kbdc.t1_in_cb().set(FUNC(uts_400_keyboard_device::t1_r)); kbdc.prog_out_cb().set(FUNC(uts_400_keyboard_device::prog_w)); }
void icecold_state::icecold(machine_config &config) { /* basic machine hardware */ MC6809E(config, m_maincpu, XTAL(6'000'000)/4); // 68A09E m_maincpu->set_addrmap(AS_PROGRAM, &icecold_state::icecold_map); pia6821_device &pia0(PIA6821(config, "pia0", 0)); pia0.readpa_handler().set_ioport("JOY"); pia0.readpb_handler().set_ioport("DSW3"); pia0.irqa_handler().set_inputline("maincpu", M6809_IRQ_LINE); pia0.irqb_handler().set_inputline("maincpu", M6809_IRQ_LINE); PIA6821(config, m_pia1, 0); m_pia1->readpa_handler().set(FUNC(icecold_state::ay_r)); m_pia1->writepa_handler().set(FUNC(icecold_state::ay_w)); m_pia1->writepb_handler().set(FUNC(icecold_state::snd_ctrl_w)); m_pia1->irqa_handler().set_inputline("maincpu", M6809_FIRQ_LINE); m_pia1->irqb_handler().set_inputline("maincpu", M6809_FIRQ_LINE); pia6821_device &pia2(PIA6821(config, "pia2", 0)); pia2.irqa_handler().set_inputline("maincpu", M6809_IRQ_LINE); pia2.irqb_handler().set_inputline("maincpu", M6809_IRQ_LINE); i8279_device &kbdc(I8279(config, "i8279", XTAL(6'000'000)/4)); kbdc.out_irq_callback().set("pia0", FUNC(pia6821_device::cb1_w)); // irq kbdc.out_sl_callback().set(FUNC(icecold_state::scanlines_w)); // scan SL lines kbdc.out_disp_callback().set(FUNC(icecold_state::digit_w)); // display A&B kbdc.in_rl_callback().set(FUNC(icecold_state::kbd_r)); // kbd RL lines // 30Hz signal from CH-C of ay0 TIMER(config, "sint_timer", 0).configure_periodic(timer_device::expired_delegate(FUNC(icecold_state::icecold_sint_timer), this), attotime::from_hz(30)); // for update motors position TIMER(config, "motors_timer", 0).configure_periodic(timer_device::expired_delegate(FUNC(icecold_state::icecold_motors_timer), this), attotime::from_msec(50)); // video hardware config.set_default_layout(layout_icecold); // sound hardware SPEAKER(config, "mono").front_center(); AY8910(config, m_ay8910[0], XTAL(6'000'000)/4); m_ay8910[0]->port_a_read_callback().set_ioport("DSW4"); m_ay8910[0]->port_b_write_callback().set(FUNC(icecold_state::ay8910_0_b_w)); m_ay8910[0]->add_route(ALL_OUTPUTS, "mono", 0.25); AY8910(config, m_ay8910[1], XTAL(6'000'000)/4); m_ay8910[1]->port_a_write_callback().set(FUNC(icecold_state::ay8910_1_a_w)); m_ay8910[1]->port_b_write_callback().set(FUNC(icecold_state::ay8910_1_b_w)); m_ay8910[1]->add_route(ALL_OUTPUTS, "mono", 0.25); }
void bebox_state::bebox_peripherals(machine_config &config) { config.m_minimum_quantum = attotime::from_hz(60); PIT8254(config, m_pit8254, 0); m_pit8254->set_clk<0>(4772720/4); /* heartbeat IRQ */ m_pit8254->set_clk<1>(4772720/4); /* dram refresh */ m_pit8254->set_clk<2>(4772720/4); /* pio port c pin 4, and speaker polling */ m_pit8254->out_handler<0>().set(FUNC(bebox_state::bebox_timer0_w)); m_pit8254->out_handler<2>().set("kbdc", FUNC(kbdc8042_device::write_out2)); AM9517A(config, m_dma8237[0], XTAL(14'318'181)/3); m_dma8237[0]->out_hreq_callback().set(FUNC(bebox_state::bebox_dma_hrq_changed)); m_dma8237[0]->out_eop_callback().set(FUNC(bebox_state::bebox_dma8237_out_eop)); m_dma8237[0]->in_memr_callback().set(FUNC(bebox_state::bebox_dma_read_byte)); m_dma8237[0]->out_memw_callback().set(FUNC(bebox_state::bebox_dma_write_byte)); m_dma8237[0]->in_ior_callback<2>().set(FUNC(bebox_state::bebox_dma8237_fdc_dack_r)); m_dma8237[0]->out_iow_callback<2>().set(FUNC(bebox_state::bebox_dma8237_fdc_dack_w)); m_dma8237[0]->out_dack_callback<0>().set(FUNC(bebox_state::pc_dack0_w)); m_dma8237[0]->out_dack_callback<1>().set(FUNC(bebox_state::pc_dack1_w)); m_dma8237[0]->out_dack_callback<2>().set(FUNC(bebox_state::pc_dack2_w)); m_dma8237[0]->out_dack_callback<3>().set(FUNC(bebox_state::pc_dack3_w)); AM9517A(config, m_dma8237[1], XTAL(14'318'181)/3); PIC8259(config, m_pic8259[0], 0); m_pic8259[0]->out_int_callback().set(FUNC(bebox_state::bebox_pic8259_master_set_int_line)); m_pic8259[0]->in_sp_callback().set_constant(1); m_pic8259[0]->read_slave_ack_callback().set(FUNC(bebox_state::get_slave_ack)); PIC8259(config, m_pic8259[1], 0); m_pic8259[1]->out_int_callback().set(FUNC(bebox_state::bebox_pic8259_slave_set_int_line)); m_pic8259[1]->in_sp_callback().set_constant(0); NS16550(config, "ns16550_0", 0); /* TODO: Verify model */ NS16550(config, "ns16550_1", 0); /* TODO: Verify model */ NS16550(config, "ns16550_2", 0); /* TODO: Verify model */ NS16550(config, "ns16550_3", 0); /* TODO: Verify model */ /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(XTAL(25'174'800), 900, 0, 640, 526, 0, 480); screen.set_screen_update("vga", FUNC(cirrus_gd5428_device::screen_update)); cirrus_gd5428_device &vga(CIRRUS_GD5428(config, "vga", 0)); vga.set_screen("screen"); speaker_device &speaker(SPEAKER(config, "mono")); speaker.front_center(); ym3812_device &ym3812(YM3812(config, "ym3812", 3579545)); ym3812.add_route(ALL_OUTPUTS, speaker, 1.0); FUJITSU_29F016A(config, "flash"); scsi_port_device &scsibus(SCSI_PORT(config, "scsi")); scsibus.set_slot_device(1, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_0)); scsibus.set_slot_device(2, "cdrom", SCSICD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_3)); lsi53c810_device &scsictrl(LSI53C810(config, "lsi53c810")); scsictrl.set_irq_callback(FUNC(bebox_state::scsi_irq_callback)); scsictrl.set_dma_callback(FUNC(bebox_state::scsi_dma_callback)); scsictrl.set_fetch_callback(FUNC(bebox_state::scsi_fetch)); scsictrl.set_scsi_port("scsi"); ide_controller_device &idectrl(IDE_CONTROLLER(config, "ide")); idectrl.set_default_ata_devices("hdd", nullptr); idectrl.irq_handler().set(FUNC(bebox_state::bebox_ide_interrupt)); /* pci */ PCI_BUS(config, m_pcibus, 0); m_pcibus->set_busnum(0); pci_connector_device &pcislot0 = add_pci_slot(config, "pcibus:0", 0, "mpc105"); pcislot0.set_option_machine_config("mpc105", mpc105_config); add_pci_slot(config, "pcibus:1", 1, "cirrus"); /*MCFG_PCI_BUS_DEVICE(12, nullptr, scsi53c810_pci_read, scsi53c810_pci_write)*/ SMC37C78(config, m_smc37c78, 24'000'000); m_smc37c78->intrq_wr_callback().set(FUNC(bebox_state::fdc_interrupt)); m_smc37c78->drq_wr_callback().set(m_dma8237[0], FUNC(am9517a_device::dreq2_w)); floppy_connector &fdc(FLOPPY_CONNECTOR(config, "smc37c78:0")); fdc.option_add("35hd", FLOPPY_35_HD); fdc.set_default_option("35hd"); fdc.set_formats(bebox_state::floppy_formats); MC146818(config, "rtc", 32.768_kHz_XTAL); kbdc8042_device &kbdc(KBDC8042(config, "kbdc")); kbdc.set_keyboard_type(kbdc8042_device::KBDC8042_STANDARD); kbdc.system_reset_callback().set_inputline(m_ppc[0], INPUT_LINE_RESET); kbdc.input_buffer_full_callback().set(FUNC(bebox_state::bebox_keyboard_interrupt)); /* internal ram */ RAM(config, m_ram); m_ram->set_default_size("32M"); m_ram->set_extra_options("8M,16M"); }