void peribox_device::device_start(void) { if (VERBOSE>7) LOG("Peribox started\n"); floppy_drive_set_rpm(subdevice(FLOPPY_0), 300.); floppy_drive_set_rpm(subdevice(FLOPPY_1), 300.); floppy_drive_set_rpm(subdevice(FLOPPY_2), 300.); floppy_drive_set_rpm(subdevice(FLOPPY_3), 300.); }
void vp575_device::device_start() { // find devices m_expansion_slot[0] = dynamic_cast<vip_expansion_slot_device *>(subdevice("exp1")); m_expansion_slot[1] = dynamic_cast<vip_expansion_slot_device *>(subdevice("exp2")); m_expansion_slot[2] = dynamic_cast<vip_expansion_slot_device *>(subdevice("exp3")); m_expansion_slot[3] = dynamic_cast<vip_expansion_slot_device *>(subdevice("exp4")); m_expansion_slot[4] = dynamic_cast<vip_expansion_slot_device *>(subdevice("exp5")); }
void coco_fdc_device::dskreg_w(UINT8 data) { UINT8 drive = 0; UINT8 head = 0; if (LOG_FDC) { logerror("fdc_coco_dskreg_w(): %c%c%c%c%c%c%c%c ($%02x)\n", data & 0x80 ? 'H' : 'h', data & 0x40 ? '3' : '.', data & 0x20 ? 'D' : 'S', data & 0x10 ? 'P' : 'p', data & 0x08 ? 'M' : 'm', data & 0x04 ? '2' : '.', data & 0x02 ? '1' : '.', data & 0x01 ? '0' : '.', data); } /* An email from John Kowalski informed me that if the DS3 is * high, and one of the other drive bits is selected (DS0-DS2), then the * second side of DS0, DS1, or DS2 is selected. If multiple bits are * selected in other situations, then both drives are selected, and any * read signals get yucky. */ if (data & 0x04) drive = 2; else if (data & 0x02) drive = 1; else if (data & 0x01) drive = 0; else if (data & 0x40) drive = 3; device_t *floppy[4]; floppy[0] = subdevice(FLOPPY_0); floppy[1] = subdevice(FLOPPY_1); floppy[2] = subdevice(FLOPPY_2); floppy[3] = subdevice(FLOPPY_3); for (int i = 0; i < 4; i++) { floppy_mon_w(floppy[i], i == drive ? CLEAR_LINE : ASSERT_LINE); } head = ((data & 0x40) && (drive != 3)) ? 1 : 0; m_dskreg = data; update_lines(); wd17xx_set_drive(m_wd17xx, drive); wd17xx_set_side(m_wd17xx, head); wd17xx_dden_w(m_wd17xx, !BIT(m_dskreg, 5)); }
void rainbow_state::machine_start() { m_image[0] = subdevice(FLOPPY_0); m_image[1] = subdevice(FLOPPY_1); m_image[2] = subdevice(FLOPPY_2); m_image[3] = subdevice(FLOPPY_3); COLD_BOOT = 1; m_SCREEN_BLANK = false; save_item(NAME(m_z80_private)); save_item(NAME(m_z80_mailbox)); save_item(NAME(m_8088_mailbox)); save_item(NAME(m_zflip)); save_item(NAME(m_kbd_tx_ready)); save_item(NAME(m_kbd_rx_ready)); UINT8 *rom = memregion("maincpu")->base(); #ifdef FORCE_RAINBOW_100_LOGO rom[0xf4174]=0xeb; // jmps RAINBOW100_LOGO__loc_33D rom[0xf4175]=0x08; rom[0xf4000 + 0x364a]= 0x0a; rom[0xf4384]=0xeb; // JMPS => BOOT80 #endif // Enables PORT90_W + PORT91_W via BIOS call (offset +$21 in HIGH ROM) // F8 / FC ROM REGION (CHECK + PATCH) if(rom[0xfc000 + 0x0022] == 0x22 && rom[0xfc000 + 0x0023] == 0x28) { rom[0xf4303]=0x00; // Disable CRC CHECK (F0 / F4 ROM) rom[0xfc000 + 0x0022] =0xfe; // jmp to offset $1922 rom[0xfc000 + 0x0023] =0x18; rom[0xfc000 + 0x1922] =0xe6; // out 90,al rom[0xfc000 + 0x1923] =0x90; rom[0xfc000 + 0x1924] =0x86; // xchg al,ah rom[0xfc000 + 0x1925] =0xc4; rom[0xfc000 + 0x1926] =0xe6; // out 91,al rom[0xfc000 + 0x1927] =0x91; rom[0xfc000 + 0x1928] =0x86; // xchg al,ah rom[0xfc000 + 0x1929] =0xc4; rom[0xfc000 + 0x192a] =0xe9; // jmp (original jump offset $2846) e9 + 19 0f rom[0xfc000 + 0x192b] =0x19; rom[0xfc000 + 0x192c] =0x0f; } }
void isa8_sblaster1_0_device::device_start() { set_isa_device(); // 1.0 always has the SAA1099s for CMS back-compatibility m_isa->install_device(subdevice("saa1099.1"), 0x0220, 0x0221, 0, 0, FUNC(saa1099_16_r), FUNC(saa1099_16_w) ); m_isa->install_device(subdevice("saa1099.2"), 0x0222, 0x0223, 0, 0, FUNC(saa1099_16_r), FUNC(saa1099_16_w) ); m_isa->set_dma_channel(1, this, FALSE); m_dsp.version = 0x0105; sb8_device::device_start(); }
void coco_fdc_device::device_start() { m_owner = dynamic_cast<cococart_slot_device *>(owner()); m_drq = 1; m_disto_msm6242 = subdevice(DISTO_TAG); m_ds1315 = subdevice(CLOUD9_TAG); m_wd17xx = subdevice(WD_TAG); m_dskreg = 0x00; m_intrq = 0; m_msm6242_rtc_address = 0; }
void comx_eb_device::device_start() { m_expansion_slot[0] = dynamic_cast<comx_expansion_slot_device *>(subdevice(SLOT1_TAG)); m_expansion_slot[1] = dynamic_cast<comx_expansion_slot_device *>(subdevice(SLOT2_TAG)); m_expansion_slot[2] = dynamic_cast<comx_expansion_slot_device *>(subdevice(SLOT3_TAG)); m_expansion_slot[3] = dynamic_cast<comx_expansion_slot_device *>(subdevice(SLOT4_TAG)); for (int slot = 0; slot < MAX_EB_SLOTS; slot++) { m_irq[slot] = CLEAR_LINE; } }
void comx_eb_device::device_start() { m_expansion_slot[0] = dynamic_cast<comx_expansion_slot_device *>(subdevice(SLOT1_TAG)); m_expansion_slot[1] = dynamic_cast<comx_expansion_slot_device *>(subdevice(SLOT2_TAG)); m_expansion_slot[2] = dynamic_cast<comx_expansion_slot_device *>(subdevice(SLOT3_TAG)); m_expansion_slot[3] = dynamic_cast<comx_expansion_slot_device *>(subdevice(SLOT4_TAG)); for (auto & elem : m_irq) { elem = CLEAR_LINE; } }
void sc499_device::device_start() { set_isa_device(); LOG1(("start sc499")); m_timer = timer_alloc(0, NULL); m_timer1 = timer_alloc(1, NULL); m_installed = false; device_t *ctape_device = subdevice(SC499_CTAPE_TAG); m_image = dynamic_cast<device_image_interface *> (ctape_device); if (m_image->image_core_file() == NULL) { LOG2(("start sc499: no cartridge tape")); } else { LOG2(("start sc499: cartridge tape image is %s",m_image->filename())); } m_ctape_block_buffer = auto_alloc_array(machine(), UINT8, SC499_CTAPE_BLOCK_SIZE); assert(m_ctape_block_buffer!= NULL); }
DEVICE_INPUT_DEFAULTS_END void genpc_state::pcmda(machine_config &config) { /* basic machine hardware */ I8088(config, m_maincpu, 4772720); m_maincpu->set_addrmap(AS_PROGRAM, &genpc_state::pc8_map); m_maincpu->set_addrmap(AS_IO, &genpc_state::pc8_io); m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); IBM5160_MOTHERBOARD(config, "mb", 0).set_cputag(m_maincpu); ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "mda", false); // FIXME: determine ISA bus clock ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "com", false); ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false); ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "hdc", false); ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, "adlib", false); ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, nullptr, false); /* keyboard */ PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc")); /* internal ram */ RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K"); /* software lists */ SOFTWARE_LIST(config, "disk_list").set_original("ibm5150"); }
void comx_eb_device::device_start() { m_owner_slot = dynamic_cast<comx_expansion_slot_device *>(owner()); m_slot[0] = dynamic_cast<comx_expansion_slot_device *>(subdevice(SLOT1_TAG)); m_slot[1] = dynamic_cast<comx_expansion_slot_device *>(subdevice(SLOT2_TAG)); m_slot[2] = dynamic_cast<comx_expansion_slot_device *>(subdevice(SLOT3_TAG)); m_slot[3] = dynamic_cast<comx_expansion_slot_device *>(subdevice(SLOT4_TAG)); for (int slot = 0; slot < MAX_EB_SLOTS; slot++) { m_int[slot] = CLEAR_LINE; m_ef4[slot] = CLEAR_LINE; } m_rom = memregion("e000")->base(); }
void lc89510_temp_device::device_start() { segacd_dma_callback.bind_relative_to(*owner()); type1_interrupt_callback.bind_relative_to(*owner()); type2_interrupt_callback.bind_relative_to(*owner()); type3_interrupt_callback.bind_relative_to(*owner()); m_cdda = (cdda_device*)subdevice("cdda"); }
void dragon_fdc_device::device_start() { m_owner = dynamic_cast<cococart_slot_device *>(owner()); m_drq = 0; m_wd17xx = subdevice(WD_TAG); m_dskreg = 0x00; m_intrq = 0; m_msm6242_rtc_address = 0; }
void badlands_state::scanline_update(screen_device &screen, int scanline) { address_space &space = subdevice("audiocpu")->memory().space(AS_PROGRAM); /* sound IRQ is on 32V */ if (scanline & 32) m6502_irq_ack_r(space, 0); else if (!(ioport("FE4000")->read() & 0x40)) m6502_irq_gen(*screen.machine().device("audiocpu")); }
void coco_multipak_device::device_start() { // identify slots m_slots[0] = dynamic_cast<cococart_slot_device *>(subdevice(SLOT1_TAG)); m_slots[1] = dynamic_cast<cococart_slot_device *>(subdevice(SLOT2_TAG)); m_slots[2] = dynamic_cast<cococart_slot_device *>(subdevice(SLOT3_TAG)); m_slots[3] = dynamic_cast<cococart_slot_device *>(subdevice(SLOT4_TAG)); m_owner = dynamic_cast<cococart_slot_device *>(owner()); // install $FF7F handler write8_delegate wh = write8_delegate(FUNC(coco_multipak_device::ff7f_write), this); machine().device(MAINCPU_TAG)->memory().space(AS_PROGRAM).install_write_handler(0xFF7F, 0xFF7F, wh); // initial state m_select = 0xFF; // save state save_item(NAME(m_select)); }
void ti_pcode_card_device::device_start() { m_cru_base = 0x1f00; m_grom[0] = static_cast<ti99_grom_device*>(subdevice(PGROM0_TAG)); m_grom[1] = static_cast<ti99_grom_device*>(subdevice(PGROM1_TAG)); m_grom[2] = static_cast<ti99_grom_device*>(subdevice(PGROM2_TAG)); m_grom[3] = static_cast<ti99_grom_device*>(subdevice(PGROM3_TAG)); m_grom[4] = static_cast<ti99_grom_device*>(subdevice(PGROM4_TAG)); m_grom[5] = static_cast<ti99_grom_device*>(subdevice(PGROM5_TAG)); m_grom[6] = static_cast<ti99_grom_device*>(subdevice(PGROM6_TAG)); m_grom[7] = static_cast<ti99_grom_device*>(subdevice(PGROM7_TAG)); m_rom = memregion(PCODE_ROM_TAG)->base(); }
void ti_fdc_device::device_config_complete() { // Seems to be null when doing a "-listslots" if (subdevice("0")!=nullptr) m_floppy[0] = static_cast<floppy_image_device*>(subdevice("0")->subdevices().first()); if (subdevice("1")!=nullptr) m_floppy[1] = static_cast<floppy_image_device*>(subdevice("1")->subdevices().first()); if (subdevice("2")!=nullptr) m_floppy[2] = static_cast<floppy_image_device*>(subdevice("2")->subdevices().first()); }
void sb8_device::device_start() { m_isa->install_device(0x0200, 0x0207, 0, 0, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy"))); m_isa->install_device(0x0226, 0x0227, 0, 0, read8_delegate(FUNC(sb_device::dsp_reset_r), this), write8_delegate(FUNC(sb_device::dsp_reset_w), this)); m_isa->install_device(0x022a, 0x022b, 0, 0, read8_delegate(FUNC(sb_device::dsp_data_r), this), write8_delegate(FUNC(sb_device::dsp_data_w), this) ); m_isa->install_device(0x022c, 0x022d, 0, 0, read8_delegate(FUNC(sb_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_cmd_w), this) ); m_isa->install_device(0x022e, 0x022f, 0, 0, read8_delegate(FUNC(sb_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_rbuf_status_w), this) ); if(m_dsp.version >= 0x0301) { ymf262_device *ymf262 = subdevice<ymf262_device>("ymf262"); m_isa->install_device(0x0388, 0x038b, 0, 0, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); m_isa->install_device(0x0220, 0x0223, 0, 0, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); m_isa->install_device(0x0228, 0x0229, 0, 0, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); } else { m_isa->install_device(subdevice("ym3812"), 0x0388, 0x0389, 0, 0, FUNC(ym3812_16_r), FUNC(ym3812_16_w) ); m_isa->install_device(subdevice("ym3812"), 0x0228, 0x0229, 0, 0, FUNC(ym3812_16_r), FUNC(ym3812_16_w) ); } m_timer = timer_alloc(0, NULL); save_item(NAME(m_dack_out)); save_item(NAME(m_onebyte_midi)); save_item(NAME(m_uart_midi)); save_item(NAME(m_uart_irq)); save_item(NAME(m_mpu_midi)); save_item(NAME(m_rx_waiting)); save_item(NAME(m_tx_waiting)); save_item(NAME(m_recvring)); save_item(NAME(m_xmitring)); save_item(NAME(m_xmit_read)); save_item(NAME(m_xmit_write)); save_item(NAME(m_recv_read)); save_item(NAME(m_recv_write)); save_item(NAME(m_tx_busy)); }
void vic1010_device::device_start() { // find devices m_expansion_slot[0] = dynamic_cast<vic20_expansion_slot_device *>(subdevice("slot1")); m_expansion_slot[1] = dynamic_cast<vic20_expansion_slot_device *>(subdevice("slot2")); m_expansion_slot[2] = dynamic_cast<vic20_expansion_slot_device *>(subdevice("slot3")); m_expansion_slot[3] = dynamic_cast<vic20_expansion_slot_device *>(subdevice("slot4")); m_expansion_slot[4] = dynamic_cast<vic20_expansion_slot_device *>(subdevice("slot5")); m_expansion_slot[5] = dynamic_cast<vic20_expansion_slot_device *>(subdevice("slot6")); }
void nscsi_bus_device::device_config_complete() { char id[3]; for(int i=0; i<16; i++) { sprintf(id, "%d", i); nscsi_connector *conn = downcast<nscsi_connector *>(subdevice(id)); if(conn) { nscsi_device *sdev = conn->get_device(); if(sdev) { int rid = devcnt++; dev[rid].dev = sdev; sdev->connect_to_bus(this, rid, i); } } } }
void at_keyboard_controller_device::device_start() { // find our cpu m_cpu = downcast<upi41_cpu_device *>(subdevice("at_keybc")); // resolve callbacks m_system_reset_cb.resolve_safe(); m_gate_a20_cb.resolve_safe(); m_input_buffer_full_cb.resolve_safe(); m_output_buffer_empty_cb.resolve_safe(); m_keyboard_clock_cb.resolve_safe(); m_keyboard_data_cb.resolve_safe(); // register for save states save_item(NAME(m_clock_signal)); save_item(NAME(m_data_signal)); }
void namco_62xx_device::device_start() { astring tempstring; /* find our CPU */ m_cpu = subdevice("mcu"); assert(m_cpu != NULL); /* resolve our read callbacks */ m_in_func[0].resolve(m_in[0], *this); m_in_func[1].resolve(m_in[1], *this); m_in_func[2].resolve(m_in[2], *this); m_in_func[3].resolve(m_in[3], *this); /* resolve our write callbacks */ m_out_func[0].resolve(m_out[0], *this); m_out_func[1].resolve(m_out[1], *this); }
void ti_pcode_card_device::device_start() { m_grom[0] = downcast<tmc0430_device*>(subdevice(PGROM0_TAG)); m_grom[1] = downcast<tmc0430_device*>(subdevice(PGROM1_TAG)); m_grom[2] = downcast<tmc0430_device*>(subdevice(PGROM2_TAG)); m_grom[3] = downcast<tmc0430_device*>(subdevice(PGROM3_TAG)); m_grom[4] = downcast<tmc0430_device*>(subdevice(PGROM4_TAG)); m_grom[5] = downcast<tmc0430_device*>(subdevice(PGROM5_TAG)); m_grom[6] = downcast<tmc0430_device*>(subdevice(PGROM6_TAG)); m_grom[7] = downcast<tmc0430_device*>(subdevice(PGROM7_TAG)); m_rom = memregion(PCODE_ROM_TAG)->base(); save_item(NAME(m_bank_select)); save_item(NAME(m_active)); save_item(NAME(m_clock_count)); save_item(NAME(m_clockhigh)); save_item(NAME(m_inDsrArea)); save_item(NAME(m_isrom0)); save_item(NAME(m_isrom12)); save_item(NAME(m_isgrom)); save_item(NAME(m_address)); }
void nubus_image_device::device_start() { UINT32 slotspace; UINT32 superslotspace; // set_nubus_device makes m_slot valid set_nubus_device(); install_declaration_rom(this, IMAGE_ROM_REGION); slotspace = get_slotspace(); superslotspace = get_super_slotspace(); // printf("[image %p] slotspace = %x, super = %x\n", this, slotspace, superslotspace); m_nubus->install_device(slotspace, slotspace+3, read32_delegate(FUNC(nubus_image_device::image_r), this), write32_delegate(FUNC(nubus_image_device::image_w), this)); m_nubus->install_device(slotspace+4, slotspace+7, read32_delegate(FUNC(nubus_image_device::image_status_r), this), write32_delegate(FUNC(nubus_image_device::image_status_w), this)); m_nubus->install_device(superslotspace, superslotspace+((256*1024*1024)-1), read32_delegate(FUNC(nubus_image_device::image_super_r), this), write32_delegate(FUNC(nubus_image_device::image_super_w), this)); device_t *device0 = subdevice(IMAGE_DISK0_TAG); m_image = (disk_data *) downcast<messimg_disk_image_device *>(device0)->token(); }
void bsmt2000_device::device_start() { // find our CPU m_cpu = downcast<tms32015_device*>(subdevice("bsmt2000")); // find our direct access m_direct = &space()->direct(); // create the stream; BSMT typically runs at 24MHz and writes to a DAC, so // in theory we should generate a 24MHz stream, but that's certainly overkill // internally at 24MHz the max output sample rate is 32kHz // divided by 128 gives us 6x the max output rate which is plenty for oversampling m_stream = machine().sound().stream_alloc(*this, 0, 2, clock() / 128); // register for save states save_item(NAME(m_register_select)); save_item(NAME(m_write_data)); save_item(NAME(m_rom_address)); save_item(NAME(m_rom_bank)); save_item(NAME(m_left_data)); save_item(NAME(m_right_data)); save_item(NAME(m_write_pending)); }
void foodf_state::update_interrupts() { subdevice("maincpu")->execute().set_input_line(1, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE); subdevice("maincpu")->execute().set_input_line(2, m_video_int_state ? ASSERT_LINE : CLEAR_LINE); subdevice("maincpu")->execute().set_input_line(3, m_scanline_int_state && m_video_int_state ? ASSERT_LINE : CLEAR_LINE); }
void arcadecl_state::scanline_update(screen_device &screen, int scanline) { /* generate 32V signals */ if ((scanline & 32) == 0) scanline_int_gen(*subdevice("maincpu")); }
void vindictr_state::scanline_update(screen_device &screen, int scanline) { UINT16 *base = &m_alpha[((scanline - 8) / 8) * 64 + 42]; int x; /* keep in range */ if (base < m_alpha) base += 0x7c0; else if (base >= &m_alpha[0x7c0]) return; /* update the current parameters */ for (x = 42; x < 64; x++) { UINT16 data = *base++; switch ((data >> 9) & 7) { case 2: /* /PFB */ if (m_playfield_tile_bank != (data & 7)) { screen.update_partial(scanline - 1); m_playfield_tile_bank = data & 7; m_playfield_tilemap->mark_all_dirty(); } break; case 3: /* /PFHSLD */ if (m_playfield_xscroll != (data & 0x1ff)) { screen.update_partial(scanline - 1); m_playfield_tilemap->set_scrollx(0, data); m_playfield_xscroll = data & 0x1ff; } break; case 4: /* /MOHS */ if (atarimo_get_xscroll(0) != (data & 0x1ff)) { screen.update_partial(scanline - 1); atarimo_set_xscroll(0, data & 0x1ff); } break; case 5: /* /PFSPC */ break; case 6: /* /VIRQ */ scanline_int_gen(*subdevice("maincpu")); break; case 7: /* /PFVS */ { /* a new vscroll latches the offset into a counter; we must adjust for this */ int offset = scanline; const rectangle &visible_area = screen.visible_area(); if (offset > visible_area.max_y) offset -= visible_area.max_y + 1; if (m_playfield_yscroll != ((data - offset) & 0x1ff)) { screen.update_partial(scanline - 1); m_playfield_tilemap->set_scrolly(0, data - offset); atarimo_set_yscroll(0, (data - offset) & 0x1ff); } break; } } } }
void rampart_state::update_interrupts() { subdevice("maincpu")->execute().set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE); }
void coco_orch90_device::device_start() { m_left_dac = subdevice("dac_left"); m_right_dac = subdevice("dac_right"); }