FLOPPY_FORMATS_END void fdc37c93x_device::device_add_mconfig(machine_config &config) { // floppy disc controller smc37c78_device &fdcdev(SMC37C78(config, floppy_controller_fdcdev, 24'000'000)); fdcdev.intrq_wr_callback().set(FUNC(fdc37c93x_device::irq_floppy_w)); fdcdev.drq_wr_callback().set(FUNC(fdc37c93x_device::drq_floppy_w)); FLOPPY_CONNECTOR(config, "fdc:0", pc_hd_floppies, "35hd", fdc37c93x_device::floppy_formats); FLOPPY_CONNECTOR(config, "fdc:1", pc_hd_floppies, "35hd", fdc37c93x_device::floppy_formats); // parallel port PC_LPT(config, pc_lpt_lptdev); pc_lpt_lptdev->irq_handler().set(FUNC(fdc37c93x_device::irq_parallel_w)); // serial ports NS16450(config, pc_serial1_comdev, XTAL(1'843'200)); // or NS16550 ? pc_serial1_comdev->out_int_callback().set(FUNC(fdc37c93x_device::irq_serial1_w)); pc_serial1_comdev->out_tx_callback().set(FUNC(fdc37c93x_device::txd_serial1_w)); pc_serial1_comdev->out_dtr_callback().set(FUNC(fdc37c93x_device::dtr_serial1_w)); pc_serial1_comdev->out_rts_callback().set(FUNC(fdc37c93x_device::rts_serial1_w)); NS16450(config, pc_serial2_comdev, XTAL(1'843'200)); pc_serial2_comdev->out_int_callback().set(FUNC(fdc37c93x_device::irq_serial2_w)); pc_serial2_comdev->out_tx_callback().set(FUNC(fdc37c93x_device::txd_serial2_w)); pc_serial2_comdev->out_dtr_callback().set(FUNC(fdc37c93x_device::dtr_serial2_w)); pc_serial2_comdev->out_rts_callback().set(FUNC(fdc37c93x_device::rts_serial2_w)); // RTC ds12885_device &rtc(DS12885(config, "rtc")); rtc.irq().set(FUNC(fdc37c93x_device::irq_rtc_w)); rtc.set_century_index(0x32); // keyboard KBDC8042(config, m_kbdc); m_kbdc->set_keyboard_type(kbdc8042_device::KBDC8042_PS2); m_kbdc->input_buffer_full_callback().set(FUNC(fdc37c93x_device::irq_keyboard_w)); m_kbdc->system_reset_callback().set(FUNC(fdc37c93x_device::kbdp20_gp20_reset_w)); m_kbdc->gate_a20_callback().set(FUNC(fdc37c93x_device::kbdp21_gp25_gatea20_w)); }
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"); }