Example #1
0
void vixen_state::machine_start()
{
	// interrupt callback
	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(vixen_state::vixen_int_ack),this));

	// configure memory banking
	UINT8 *ram = m_ram->pointer();

	membank("bank1")->configure_entry(0, ram);
	membank("bank1")->configure_entry(1, m_rom->base());

	membank("bank2")->configure_entry(0, ram);
	membank("bank2")->configure_entry(1, m_video_ram);

	membank("bank3")->configure_entry(0, m_video_ram);
	membank("bank3")->configure_entry(1, m_rom->base());

	membank("bank4")->configure_entry(0, m_video_ram);

	// register for state saving
	save_item(NAME(m_reset));
	save_item(NAME(m_col));
	save_item(NAME(m_cmd_d0));
	save_item(NAME(m_cmd_d1));
	save_item(NAME(m_fdint));
}
Example #2
0
void prestige_state::machine_start()
{
	UINT8 *ram = m_ram->pointer();
	memset(ram, 0x00, m_ram->size());

	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(prestige_state::prestige_int_ack),this));

	membank("bank1")->configure_entries(0, 64, memregion("maincpu")->base(), 0x4000);
	membank("bank2")->configure_entries(0, 64, memregion("maincpu")->base(), 0x4000);
	membank("bank2")->configure_entries(64, 2, memregion("cart")->base(), 0x4000);
	membank("bank3")->configure_entries(0, 64, memregion("maincpu")->base(), 0x4000);
	membank("bank3")->configure_entries(64, 2, memregion("cart")->base(), 0x4000);
	membank("bank4")->configure_entries(0, 4, ram, 0x2000);
	membank("bank4")->configure_entries(4, 4, memregion("cart")->base(), 0x2000);
	membank("bank5")->configure_entries(0, 4, ram, 0x2000);

	membank("bank1")->set_entry(0);
	membank("bank2")->set_entry(0);
	membank("bank3")->set_entry(0);
	membank("bank4")->set_entry(0);
	membank("bank5")->set_entry(0);

	//pointer to the videoram
	m_vram = ram;
}
Example #3
0
void pc1640_state::machine_start()
{
	// register CPU IRQ callback
	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pc1512_state::pc1512_irq_callback),this));

	// state saving
	save_item(NAME(m_pit1));
	save_item(NAME(m_pit2));
	save_item(NAME(m_status1));
	save_item(NAME(m_status2));
	save_item(NAME(m_port61));
	save_item(NAME(m_nmi_enable));
	save_item(NAME(m_kbd));
	save_item(NAME(m_kb_bits));
	save_item(NAME(m_kbclk));
	save_item(NAME(m_kbdata));
	save_item(NAME(m_mouse_x));
	save_item(NAME(m_mouse_y));
	save_item(NAME(m_dma_page));
	save_item(NAME(m_dma_channel));
	save_item(NAME(m_dreq0));
	save_item(NAME(m_nden));
	save_item(NAME(m_dint));
	save_item(NAME(m_ddrq));
	save_item(NAME(m_neop));
	save_item(NAME(m_ack_int_enable));
	save_item(NAME(m_centronics_ack));
	save_item(NAME(m_centronics_busy));
	save_item(NAME(m_centronics_perror));
	save_item(NAME(m_centronics_select));
	save_item(NAME(m_centronics_fault));
	save_item(NAME(m_printer_data));
	save_item(NAME(m_printer_control));
	save_item(NAME(m_speaker_drive));
}
Example #4
0
SLOT_INTERFACE_END


//**************************************************************************
//  MACHINE INITIALIZATION
//**************************************************************************

//-------------------------------------------------
//  MACHINE_START( victor9k )
//-------------------------------------------------

void victor9k_state::machine_start()
{
	// set interrupt callback
	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(victor9k_state::victor9k_irq_callback),this));

	// set floppy callbacks
	m_floppy0->setup_ready_cb(floppy_image_device::ready_cb(FUNC(victor9k_state::ready0_cb), this));
	m_floppy0->setup_load_cb(floppy_image_device::load_cb(FUNC(victor9k_state::load0_cb), this));
	m_floppy0->setup_unload_cb(floppy_image_device::unload_cb(FUNC(victor9k_state::unload0_cb), this));
	m_floppy1->setup_ready_cb(floppy_image_device::ready_cb(FUNC(victor9k_state::ready1_cb), this));
	m_floppy1->setup_load_cb(floppy_image_device::load_cb(FUNC(victor9k_state::load1_cb), this));
	m_floppy1->setup_unload_cb(floppy_image_device::unload_cb(FUNC(victor9k_state::unload1_cb), this));

	// memory banking
	address_space &program = m_maincpu->space(AS_PROGRAM);
	program.install_ram(0x00000, m_ram->size() - 1, m_ram->pointer());

	m_via5->write_ca1(m_brdy);
	m_via6->write_ca1(m_gcrerr);
}
Example #5
0
void v53_base_device::device_start()
{
    nec_common_device::device_start();

    m_txd_handler.resolve_safe();
    m_rts_handler.resolve_safe();
    m_dtr_handler.resolve_safe();
    m_rxrdy_handler.resolve_safe();
    m_txrdy_handler.resolve_safe();
    m_txempty_handler.resolve_safe();

    m_out0_handler.resolve_safe();
    m_out1_handler.resolve_safe();
    m_out2_handler.resolve_safe();

    m_out_hreq_cb.resolve_safe();
    m_out_eop_cb.resolve_safe();
    m_in_memr_cb.resolve_safe(0);
    m_out_memw_cb.resolve_safe();
    m_in_ior_0_cb.resolve_safe(0);
    m_in_ior_1_cb.resolve_safe(0);
    m_in_ior_2_cb.resolve_safe(0);
    m_in_ior_3_cb.resolve_safe(0);
    m_out_iow_0_cb.resolve_safe();
    m_out_iow_1_cb.resolve_safe();
    m_out_iow_2_cb.resolve_safe();
    m_out_iow_3_cb.resolve_safe();
    m_out_dack_0_cb.resolve_safe();
    m_out_dack_1_cb.resolve_safe();
    m_out_dack_2_cb.resolve_safe();
    m_out_dack_3_cb.resolve_safe();

    static_set_irq_acknowledge_callback(*this, device_irq_acknowledge_delegate(FUNC(pic8259_device::inta_cb), (pic8259_device*)m_v53icu));
}
Example #6
0
void wangpc_state::machine_start()
{
	// register CPU IRQ callback
	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(wangpc_state::wangpc_irq_callback),this));

	// connect serial keyboard
	m_uart->connect(m_kb);

	// connect floppy callbacks
	m_floppy0->setup_load_cb(floppy_image_device::load_cb(FUNC(wangpc_state::on_disk0_load), this));
	m_floppy0->setup_unload_cb(floppy_image_device::unload_cb(FUNC(wangpc_state::on_disk0_unload), this));
	m_floppy1->setup_load_cb(floppy_image_device::load_cb(FUNC(wangpc_state::on_disk1_load), this));
	m_floppy1->setup_unload_cb(floppy_image_device::unload_cb(FUNC(wangpc_state::on_disk1_unload), this));

	m_fdc->setup_intrq_cb(upd765a_device::line_cb(FUNC(wangpc_state::fdc_irq), this));
	m_fdc->setup_drq_cb(upd765a_device::line_cb(FUNC(wangpc_state::fdc_drq), this));

	// state saving
	save_item(NAME(m_dma_page));
	save_item(NAME(m_dack));
	save_item(NAME(m_timer2_irq));
	save_item(NAME(m_acknlg));
	save_item(NAME(m_dav));
	save_item(NAME(m_busy));
	save_item(NAME(m_dma_eop));
	save_item(NAME(m_uart_dr));
	save_item(NAME(m_uart_tbre));
	save_item(NAME(m_fpu_irq));
	save_item(NAME(m_bus_irq2));
	save_item(NAME(m_enable_eop));
	save_item(NAME(m_disable_dreq2));
	save_item(NAME(m_fdc_drq));
	save_item(NAME(m_ds1));
	save_item(NAME(m_ds2));
}
Example #7
0
INPUT_PORTS_END
#endif

void gammagic_state::machine_start()
{
	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(gammagic_state::irq_callback),this));
}
Example #8
0
void poly88_state::machine_reset()
{
	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(poly88_state::poly88_irq_callback),this));
	m_intr = 0;
	m_last_code = 0;

	timer_set(attotime::zero, TIMER_SETUP_MACHINE_STATE);
}
Example #9
0
void msx_cart_sfg_device::device_start()
{
	// Set rom mask
	m_rom_mask = m_region_sfg->bytes() - 1;

	// This should probably moved up in the bus/slot hierarchy for the msx driver
	cpu_device *maincpu = machine().device<cpu_device>("maincpu");
	maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(msx_cart_sfg_device::irq_callback),this));
}
Example #10
0
INPUT_PORTS_END

void magtouch_state::machine_start()
{
	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(magtouch_state::irq_callback),this));

	membank("rombank")->configure_entries(0, 0x80, memregion("game_prg")->base(), 0x8000 );
	membank("rombank")->set_entry(0);
}
Example #11
0
void tmp68301_device::device_reset()
{
	int i;

	for (i = 0; i < 3; i++)
		m_IE[i] = 0;

	machine().firstcpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(tmp68301_device::irq_callback),this));
}
Example #12
0
/*****************************************************************************
 Reset and Driver Init
*****************************************************************************/
void tsispch_state::machine_reset()
{
    // clear fifos (TODO: memset would work better here...)
    int i;
    for (i=0; i<32; i++) m_infifo[i] = 0;
    m_infifo_tail_ptr = m_infifo_head_ptr = 0;
    m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(tsispch_state::irq_callback),this));
    fprintf(stderr,"machine reset\n");
}
Example #13
0
INPUT_PORTS_END

DRIVER_INIT_MEMBER(pcjr_state, pcjr)
{
	m_pc_int_delay_timer = timer_alloc(TIMER_IRQ_DELAY);
	m_pcjr_watchdog = timer_alloc(TIMER_WATCHDOG);
	m_keyb_signal_timer = timer_alloc(TIMER_KB_SIGNAL);
	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pcjr_state::pc_irq_callback),this));
}
Example #14
0
ADDRESS_MAP_END

void queen_state::machine_start()
{
	m_bios_ram = auto_alloc_array(machine(), UINT32, 0x10000/4);
	m_bios_ext_ram = auto_alloc_array(machine(), UINT32, 0x10000/4);

	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(queen_state::irq_callback),this));
	intel82439tx_init();
}
Example #15
0
void dcheese_state::machine_start()
{
	m_bsmt = machine().device("bsmt");

	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(dcheese_state::irq_callback),this));

	save_item(NAME(m_irq_state));
	save_item(NAME(m_soundlatch_full));
	save_item(NAME(m_sound_control));
	save_item(NAME(m_sound_msb_latch));
}
Example #16
0
INPUT_PORTS_END

void pcat_nit_state::machine_start()
{
	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pcat_nit_state::irq_callback),this));

	membank("rombank")->configure_entries(0, 0x80, memregion("game_prg")->base(), 0x8000 );
	membank("rombank")->set_entry(0);

	//microtouch_init(machine(), pcat_nit_microtouch_tx_callback, NULL);
}
Example #17
0
void trs80m16_state::machine_start()
{
	trs80m2_state::machine_start();

	// register CPU IRQ callback
	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(trs80m16_state::trs80m16_irq_callback),this));

	// register for state saving
	save_item(NAME(m_ual));
	save_item(NAME(m_limit));
	save_item(NAME(m_offset));
}
Example #18
0
INPUT_PORTS_END

void funkball_state::machine_start()
{
	m_bios_ram = auto_alloc_array(machine(), UINT8, 0x20000);

	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(funkball_state::irq_callback),this));

	/* defaults, otherwise it won't boot */
	m_unk_ram[0x010/4] = 0x2f8d85ff;
	m_unk_ram[0x018/4] = 0x000018c5;
}
Example #19
0
INPUT_PORTS_END

void pcxt_state::machine_reset()
{
	m_bank = -1;
	m_lastvalue = -1;
	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pcxt_state::irq_callback),this));

	m_pc_spkrdata = 0;
	m_pit_out2 = 0;
	m_wss2_data = 0;
	m_speaker->level_w(0);
}
Example #20
0
void apricot_state::machine_start()
{
	// install shared memory to the main cpu and the iop
	m_cpu->space(AS_PROGRAM).install_ram(0x00000, m_ram->size() - 1, m_ram->pointer());
	m_iop->space(AS_PROGRAM).install_ram(0x00000, m_ram->size() - 1, m_ram->pointer());

	// setup interrupt acknowledge callback for the main cpu
	m_cpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(apricot_state::irq_callback), this));

	// motor on is connected to gnd
	m_floppy0->get_device()->mon_w(0);
	m_floppy1->get_device()->mon_w(0);
}
Example #21
0
void mie_device::device_start()
{
	maple_device::device_start();
	cpu = subdevice<z80_device>("mie");
	timer = timer_alloc(0);
	cpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(mie_device::irq_callback),this));
	jvs = machine().device<mie_jvs_device>(jvs_name);

	save_item(NAME(gpiodir));
	save_item(NAME(gpio_val));
	save_item(NAME(irq_enable));
	save_item(NAME(irq_pending));
	save_item(NAME(maple_irqlevel));
}
Example #22
0
DRIVER_INIT_MEMBER(iq151_state,iq151)
{
    UINT8 *RAM = memregion("maincpu")->base();
    membank("boot")->configure_entry(0, RAM + 0xf800);
    membank("boot")->configure_entry(1, RAM + 0x0000);

    m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(iq151_state::iq151_irq_callback),this));

    // keep machine pointers to slots
    m_carts[0] = machine().device<iq151cart_slot_device>("slot1");
    m_carts[1] = machine().device<iq151cart_slot_device>("slot2");
    m_carts[2] = machine().device<iq151cart_slot_device>("slot3");
    m_carts[3] = machine().device<iq151cart_slot_device>("slot4");
    m_carts[4] = machine().device<iq151cart_slot_device>("slot5");
}
Example #23
0
DRIVER_INIT_MEMBER(apricot_state,apricot)
{
	address_space &prg = m_maincpu->space(AS_PROGRAM);

	UINT8 *ram = m_ram->pointer();
	UINT32 ram_size = m_ram->size();

	prg.unmap_readwrite(0x40000, 0xeffff);
	prg.install_ram(0x00000, ram_size - 1, ram);

	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(apricot_state::apricot_irq_ack),this));

	m_video_mode = 0;
	m_display_on = 1;
}
Example #24
0
MACHINE_START_MEMBER( mc1502_state, mc1502 )
{
	DBG_LOG(0,"init",("machine_start()\n"));

	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(mc1502_state::mc1502_irq_callback),this));
	/*
	       Keyboard polling circuit holds IRQ1 high until a key is
	       pressed, then it starts a timer that pulses IRQ1 low each
	       40ms (check) for 20ms (check) until all keys are released.
	       Last pulse causes BIOS to write a 'break' scancode into port 60h.
	 */
	m_pic8259->ir1_w(1);
	memset(&m_kbd, 0, sizeof(m_kbd));
	m_kbd.keyb_signal_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mc1502_state::keyb_signal_callback),this));
	m_kbd.keyb_signal_timer->adjust( attotime::from_msec(20), 0, attotime::from_msec(20) );
}
Example #25
0
ADDRESS_MAP_END


void xtom3d_state::machine_start()
{
	m_bios_ram = auto_alloc_array(machine(), UINT32, 0x10000/4);
	m_bios_ext1_ram = auto_alloc_array(machine(), UINT32, 0x4000/4);
	m_bios_ext2_ram = auto_alloc_array(machine(), UINT32, 0x4000/4);
	m_bios_ext3_ram = auto_alloc_array(machine(), UINT32, 0x4000/4);
	m_bios_ext4_ram = auto_alloc_array(machine(), UINT32, 0x4000/4);
	m_isa_ram1 = auto_alloc_array(machine(), UINT32, 0x4000/4);
	m_isa_ram2 = auto_alloc_array(machine(), UINT32, 0x4000/4);

	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(xtom3d_state::irq_callback),this));
	intel82439tx_init();
}
Example #26
0
void esq5505_state::machine_reset()
{
	m_rom = (UINT16 *)(void *)memregion("osrom")->base();
	m_ram = (UINT16 *)(void *)memshare("osram")->ptr();
	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(esq5505_state::maincpu_irq_acknowledge_callback),this));

	// Default analog values:
	m_analog_values[0] = 0x7fff; // pitch mod: start in the center
	m_analog_values[1] = 0x0000; // patch select: nothing pressed.
	m_analog_values[2] = 0x0000; // mod wheel: at the bottom, no modulation
	m_analog_values[3] = 0xcccc; // data entry: somewhere in the middle
	m_analog_values[4] = 0xffff; // control voltage / pedal: full on.
	m_analog_values[5] = 0xffff; // Volume control: full on.
	m_analog_values[6] = 0x7fc0; // Battery voltage: something reasonable.
	m_analog_values[7] = 0x5540; // vRef to check battery.
}
Example #27
0
void rastersp_state::machine_start()
{
	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(rastersp_state::irq_callback),this));

	m_nvram8 = auto_alloc_array(machine(), UINT8, NVRAM_SIZE);

	m_palette = auto_alloc_array(machine(), UINT16, 0x8000);

	membank("bank1")->set_base(m_dram);
	membank("bank2")->set_base(&m_dram[0x10000/4]);
	membank("bank3")->set_base(&m_dram[0x300000/4]);

#if USE_SPEEDUP_HACK
	m_dsp->space(AS_PROGRAM).install_read_handler(0x809923, 0x809923, read32_delegate(FUNC(rastersp_state::dsp_speedup_r), this));
	m_dsp->space(AS_PROGRAM).install_write_handler(0x809923, 0x809923, write32_delegate(FUNC(rastersp_state::dsp_speedup_w), this));
#endif
}
Example #28
0
void vidbrain_state::machine_start()
{
	// register IRQ callback
	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(vidbrain_state::vidbrain_int_ack),this));

	// allocate timers
	m_timer_ne555 = timer_alloc(TIMER_JOYSTICK);

	// register for state saving
	save_item(NAME(m_vector));
	save_item(NAME(m_int_enable));
	save_item(NAME(m_ext_int_latch));
	save_item(NAME(m_timer_int_latch));
	save_item(NAME(m_keylatch));
	save_item(NAME(m_joy_enable));
	save_item(NAME(m_sound_clk));
}
Example #29
0
void victor9k_state::machine_start()
{
	// set interrupt callback
	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(victor9k_state::victor9k_irq_callback),this));

	// set floppy callbacks
	m_floppy0->setup_ready_cb(floppy_image_device::ready_cb(FUNC(victor9k_state::ready0_cb), this));
	m_floppy0->setup_load_cb(floppy_image_device::load_cb(FUNC(victor9k_state::load0_cb), this));
	m_floppy0->setup_unload_cb(floppy_image_device::unload_cb(FUNC(victor9k_state::unload0_cb), this));
	m_floppy1->setup_ready_cb(floppy_image_device::ready_cb(FUNC(victor9k_state::ready1_cb), this));
	m_floppy1->setup_load_cb(floppy_image_device::load_cb(FUNC(victor9k_state::load1_cb), this));
	m_floppy1->setup_unload_cb(floppy_image_device::unload_cb(FUNC(victor9k_state::unload1_cb), this));

	// memory banking
	address_space &program = m_maincpu->space(AS_PROGRAM);
	program.install_ram(0x00000, m_ram->size() - 1, m_ram->pointer());
}
Example #30
0
void su2000_state::machine_start()
{
	address_space &space = m_maincpu->space(AS_PROGRAM);

	/* Configure RAM */
	m_pc_ram = auto_alloc_array_clear(machine(), UINT32, PC_RAM_SIZE);

	/* Conventional memory */
	membank("mem_bank")->set_base(m_pc_ram);

	/* HMA */
	offs_t ram_limit = 0x100000 + PC_RAM_SIZE - 0x0a0000;
	space.install_read_bank(0x100000, ram_limit - 1, "hma_bank");
	space.install_write_bank(0x100000, ram_limit - 1, "hma_bank");
	membank("hma_bank")->set_base(m_pc_ram + 0xa0000);

	m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(su2000_state::irq_callback),this));
}