예제 #1
0
파일: hp98550.cpp 프로젝트: Dagarman/mame
void dio32_98550_device::device_start()
{
	save_item(NAME(m_intreg));
	save_item(NAME(m_ints));

	dio().install_memory(
			0x200000, 0x3fffff,
			read16_delegate(FUNC(dio32_98550_device::vram_r), this),
			write16_delegate(FUNC(dio32_98550_device::vram_w), this));

	dio().install_memory(
			0x560000, 0x56ffff,
			read16_delegate(FUNC(dio32_98550_device::rom_r), this),
			write16_delegate(FUNC(dio32_98550_device::rom_w), this));

	dio().install_memory(
			0x564000, 0x5648ff,
			read16_delegate(FUNC(dio32_98550_device::catseye_r), this),
			write16_delegate(FUNC(dio32_98550_device::catseye_w), this));

	dio().install_memory(
			0x566000, 0x5660ff,
			read16_delegate(FUNC(nereid_device::ctrl_r), &(*m_nereid)),
			write16_delegate(FUNC(nereid_device::ctrl_w), &(*m_nereid)));
}
예제 #2
0
파일: a2232.cpp 프로젝트: broftkd/mame
void a2232_device::autoconfig_base_address(offs_t address)
{
	if (VERBOSE)
		logerror("%s('%s'): autoconfig_base_address received: 0x%06x\n", shortname(), basetag(), address);

	if (VERBOSE)
		logerror("-> installing a2232\n");

	// stop responding to default autoconfig
	m_slot->m_space->unmap_readwrite(0xe80000, 0xe8007f);

	m_slot->m_space->install_readwrite_handler(address, address + 0x3fff,
		read16_delegate(FUNC(a2232_device::shared_ram_r), this),
		write16_delegate(FUNC(a2232_device::shared_ram_w), this), 0xffff);

	m_slot->m_space->install_readwrite_handler(address + 0x4000, address + 0x4001,
		read16_delegate(FUNC(a2232_device::irq_ack_r), this),
		write16_delegate(FUNC(a2232_device::irq_ack_w), this), 0xffff);

	m_slot->m_space->install_readwrite_handler(address + 0x8000, address + 0x8001,
		read16_delegate(FUNC(a2232_device::reset_low_r), this),
		write16_delegate(FUNC(a2232_device::reset_low_w), this), 0xffff);

	m_slot->m_space->install_readwrite_handler(address + 0xa000, address + 0xa001,
		read16_delegate(FUNC(a2232_device::irq_r), this),
		write16_delegate(FUNC(a2232_device::irq_w), this), 0xffff);

	m_slot->m_space->install_readwrite_handler(address + 0xc000, address + 0xc001,
		read16_delegate(FUNC(a2232_device::reset_high_r), this),
		write16_delegate(FUNC(a2232_device::reset_high_w), this), 0xffff);

	// we're done
	m_slot->cfgout_w(0);
}
예제 #3
0
파일: deadang.cpp 프로젝트: PugsyMAME/mame
void deadang_state::init_ghunter()
{
	m_adpcm1->decrypt();
	m_adpcm2->decrypt();

	m_maincpu->space(AS_PROGRAM).install_read_handler(0x80000, 0x80001, read16_delegate(FUNC(deadang_state::ghunter_trackball_low_r),this));
	m_maincpu->space(AS_PROGRAM).install_read_handler(0xb0000, 0xb0001, read16_delegate(FUNC(deadang_state::ghunter_trackball_high_r),this));
}
예제 #4
0
DRIVER_INIT_MEMBER(deadang_state,ghunter)
{
	m_seibu_sound->decrypt("audiocpu", 0x2000);
	m_adpcm1->decrypt("adpcm1");
	m_adpcm2->decrypt("adpcm2");

	m_maincpu->space(AS_PROGRAM).install_read_handler(0x80000, 0x80001, read16_delegate(FUNC(deadang_state::ghunter_trackball_low_r),this));
	m_maincpu->space(AS_PROGRAM).install_read_handler(0xb0000, 0xb0001, read16_delegate(FUNC(deadang_state::ghunter_trackball_high_r),this));
}
예제 #5
0
DRIVER_INIT_MEMBER(pgm_028_025_state,olds)
{
	pgm_basic_init();

	m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xdcb400, 0xdcb403, read16_delegate(FUNC(igs025_device::olds_r), (igs025_device*)m_igs025), write16_delegate(FUNC(igs025_device::olds_w), (igs025_device*)m_igs025));
	m_maincpu->space(AS_PROGRAM).install_read_handler(0x8178f4, 0x8178f5, read16_delegate(FUNC(pgm_028_025_state::olds_prot_swap_r), this));
	m_igs028->m_sharedprotram = m_sharedprotram;
	m_igs025->m_kb_source_data = m_olds_source_data;

}
예제 #6
0
파일: gstriker.c 프로젝트: crazii/mameplus
void gstriker_state::mcu_init(  )
{
	m_dmmy_8f_ret = 0xFFFF;
	m_pending_command = 0;
	m_mcu_data = 0;

	m_maincpu->space(AS_PROGRAM).install_write_handler(0x20008a, 0x20008b, write16_delegate(FUNC(gstriker_state::twrldc94_mcu_w),this));
	m_maincpu->space(AS_PROGRAM).install_read_handler(0x20008a, 0x20008b, read16_delegate(FUNC(gstriker_state::twrldc94_mcu_r),this));

	m_maincpu->space(AS_PROGRAM).install_write_handler(0x20008e, 0x20008f, write16_delegate(FUNC(gstriker_state::twrldc94_prot_reg_w),this));
	m_maincpu->space(AS_PROGRAM).install_read_handler(0x20008e, 0x20008f, read16_delegate(FUNC(gstriker_state::twrldc94_prot_reg_r),this));
}
예제 #7
0
void midtunit_state::init_mk2()
{
	/* common init */
	init_tunit_generic(SOUND_DCS);
	m_video->set_gfx_rom_large(true);

	/* protection */
	m_maincpu->space(AS_PROGRAM).install_write_handler(0x00f20c60, 0x00f20c7f, write16_delegate(FUNC(midtunit_state::mk2_prot_w),this));
	m_maincpu->space(AS_PROGRAM).install_write_handler(0x00f42820, 0x00f4283f, write16_delegate(FUNC(midtunit_state::mk2_prot_w),this));
	m_maincpu->space(AS_PROGRAM).install_read_handler(0x01a190e0, 0x01a190ff, read16_delegate(FUNC(midtunit_state::mk2_prot_r),this));
	m_maincpu->space(AS_PROGRAM).install_read_handler(0x01a191c0, 0x01a191df, read16_delegate(FUNC(midtunit_state::mk2_prot_shift_r),this));
	m_maincpu->space(AS_PROGRAM).install_read_handler(0x01a3d0c0, 0x01a3d0ff, read16_delegate(FUNC(midtunit_state::mk2_prot_r),this));
	m_maincpu->space(AS_PROGRAM).install_read_handler(0x01d9d1e0, 0x01d9d1ff, read16_delegate(FUNC(midtunit_state::mk2_prot_const_r),this));
	m_maincpu->space(AS_PROGRAM).install_read_handler(0x01def920, 0x01def93f, read16_delegate(FUNC(midtunit_state::mk2_prot_const_r),this));
}
예제 #8
0
파일: megadrvb.c 프로젝트: crazii/mameplus
DRIVER_INIT_MEMBER(md_boot_state,srmdb)
{
	UINT8* rom = memregion("maincpu")->base();

	for (int x = 0x00001; x < 0x40000; x += 2)
	{
		rom[x] = BITSWAP8(rom[x] ^ 0xff, 5,1,6,2,4,3,7,0);
	}

	for (int x = 0x40001; x < 0x80000; x += 2)
	{
		rom[x] = BITSWAP8(rom[x] ^ 0x00, 2,6,1,5,0,7,3,4);
	}

	// boot vectors don't seem to be valid, so they are patched...
	rom[0x01] = 0x01;
	rom[0x00] = 0x00;
	rom[0x03] = 0x00;
	rom[0x02] = 0x00;

	rom[0x06] = 0xd2;
	rom[0x07] = 0x00;

	m_maincpu->space(AS_PROGRAM).install_read_handler(0x770070, 0x770075, read16_delegate(FUNC(md_boot_state::srmdb_dsw_r),this));

	DRIVER_INIT_CALL(megadriv);
}
예제 #9
0
파일: atarig42.c 프로젝트: dinkc64/mame
DRIVER_INIT_MEMBER(atarig42_state,guardian)
{
    m_playfield_base = 0x000;

    /* it looks like they jsr to $80000 as some kind of protection */
    /* put an RTS there so we don't die */
    *(UINT16 *)&memregion("maincpu")->base()[0x80000] = 0x4E75;

    address_space &main = m_maincpu->space(AS_PROGRAM);
    m_sloop_base = main.install_readwrite_handler(0x000000, 0x07ffff, read16_delegate(FUNC(atarig42_state::guardians_sloop_data_r),this), write16_delegate(FUNC(atarig42_state::guardians_sloop_data_w),this));
    main.set_direct_update_handler(direct_update_delegate(FUNC(atarig42_state::atarig42_sloop_direct_handler), this));

    /*
    Guardians color MUX

    CRA10=MGEP*!AN.VID7*AN.0*!MO.0          -- if (mopri >= pfpri) && (!alpha) && (mopix != 0)

    CRA9=MGEP*!AN.VID7*AN.0*!MO.0*MVID9     -- if (mopri >= pfpri) && (!alpha) && (mopix != 0) && (mopix & 0x200)
       +!MGEP*!AN.VID7*AN.0*PF.VID9         or if (mopri < pfpri) && (!alpha) && (pfpix & 0x200)
       +!AN.VID7*AN.0*MO.0*PF.VID9          or if (mopix == 0) && (!alpha) && (pfpix & 0x200)

    CRA8=MGEP*!AN.VID7*AN.0*!MO.0*MVID8     -- if (mopri >= pfpri) && (!alpha) && (mopix != 0) && (mopix & 0x100)
       +!MGEP*!AN.VID7*AN.0*PF.VID8         or if (mopri < pfpri) && (!alpha) && (pfpix & 0x100)
       +!AN.VID7*AN.0*MO.0*PF.VID8          or if (mopix == 0) && (!alpha) && (pfpix & 0x100)

    CRMUXB=!AN.VID7*AN.0                    -- if (!alpha)

    CRMUXA=!MGEP                            -- if (mopri < pfpri)
       +MO.0                                or (mopix == 0)
       +AN.VID7                             or (alpha)
       +!AN.0
    */
}
예제 #10
0
파일: midtunit.c 프로젝트: dinkc64/mame
DRIVER_INIT_MEMBER(midtunit_state,mkturbo)
{
	/* protection */
	m_maincpu->space(AS_PROGRAM).install_read_handler(0xfffff400, 0xfffff40f, read16_delegate(FUNC(midtunit_state::mkturbo_prot_r),this));

	DRIVER_INIT_CALL(mktunit);
}
예제 #11
0
파일: fitfight.c 프로젝트: crazii/mameplus
DRIVER_INIT_MEMBER(fitfight_state,histryma)
{
//  UINT16 *mem16 = (UINT16 *)memregion("maincpu")->base();
//  mem16[0x017FDC/2] = 0x4e71; // for now so it boots
	m_maincpu->space(AS_PROGRAM).install_read_handler(0x700000, 0x700001, read16_delegate(FUNC(fitfight_state::histryma_700000_r),this));
	m_bbprot_kludge = 0;
}
예제 #12
0
파일: segapico.c 프로젝트: richard42/mame
SLOT_INTERFACE_END

MACHINE_START_MEMBER(pico_state,pico)
{
    m_io_page = ioport("PAGE");
    m_io_pad = ioport("PAD");
    m_io_penx = ioport("PENX");
    m_io_peny = ioport("PENY");

    m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7fffff, read16_delegate(FUNC(base_md_cart_slot_device::read),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write),(base_md_cart_slot_device*)m_picocart));
    m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa13000, 0xa130ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a13),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write_a13),(base_md_cart_slot_device*)m_picocart));
    m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa15000, 0xa150ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a15),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write_a15),(base_md_cart_slot_device*)m_picocart));
    m_maincpu->space(AS_PROGRAM).install_write_handler(0xa14000, 0xa14003, write16_delegate(FUNC(base_md_cart_slot_device::write_tmss_bank),(base_md_cart_slot_device*)m_picocart));

    m_vdp->stop_timers();
}
예제 #13
0
DRIVER_INIT_MEMBER(coolpool_state,coolpool)
{

	machine().device("dsp")->memory().space(AS_IO).install_read_handler(0x07, 0x07, read16_delegate(FUNC(coolpool_state::coolpool_input_r),this));

	register_state_save(machine());
}
예제 #14
0
파일: megadrvb.c 프로젝트: crazii/mameplus
ROM_END


/*************************************
 *
 *  Game-specific driver inits
 *
 *************************************/

#define ENERGY_CONSOLE_MODE 0

DRIVER_INIT_MEMBER(md_boot_state,aladmdb)
{
	/*
	 * Game does a check @ 1afc00 with work RAM fff57c that makes it play like the original console version (i.e. 8 energy hits instead of 2)
	 */
	#if ENERGY_CONSOLE_MODE
	UINT16 *rom = (UINT16 *)memregion("maincpu")->base();
	rom[0x1afc08/2] = 0x6600;
	#endif

	// 220000 = writes to mcu? 330000 = reads?
	m_maincpu->space(AS_PROGRAM).install_write_handler(0x220000, 0x220001, write16_delegate(FUNC(md_boot_state::aladmdb_w),this));
	m_maincpu->space(AS_PROGRAM).install_read_handler(0x330000, 0x330001, read16_delegate(FUNC(md_boot_state::aladmdb_r),this));

	DRIVER_INIT_CALL(megadrij);
}
예제 #15
0
void kof98_prot_device::install_kof98_protection(cpu_device* maincpu)
{
	/* when 0x20aaaa contains 0x0090 (word) then 0x100 (normally the neogeo header) should return 0x00c200fd worked out using real hw */
	maincpu->space(AS_PROGRAM).install_read_handler(0x00100, 0x00103, read16_delegate(FUNC(kof98_prot_device::kof98_prot_r),this));

	maincpu->space(AS_PROGRAM).install_write_handler(0x20aaaa, 0x20aaab, write16_delegate(FUNC(kof98_prot_device::kof98_prot_w),this));
}
예제 #16
0
void midtunit_state::init_mkturbo()
{
	/* protection */
	m_maincpu->space(AS_PROGRAM).install_read_handler(0xfffff400, 0xfffff40f, read16_delegate(FUNC(midtunit_state::mkturbo_prot_r),this));

	init_mktunit();
}
예제 #17
0
파일: buddha.cpp 프로젝트: PugsyMAME/mame
void buddha_device::autoconfig_base_address(offs_t address)
{
	if (VERBOSE)
		logerror("autoconfig_base_address received: 0x%06x\n", address);

	if (VERBOSE)
		logerror("-> installing buddha\n");

	// stop responding to default autoconfig
	m_slot->m_space->unmap_readwrite(0xe80000, 0xe8007f);

	// buddha registers
	m_slot->m_space->install_device(address, address + 0xfff, *this, &buddha_device::mmio_map);

	// install autoconfig handler to new location
	m_slot->m_space->install_readwrite_handler(address, address + 0x7f,
		read16_delegate(FUNC(amiga_autoconfig::autoconfig_read), static_cast<amiga_autoconfig *>(this)),
		write16_delegate(FUNC(amiga_autoconfig::autoconfig_write), static_cast<amiga_autoconfig *>(this)), 0xffff);

	// install access to the rom space
	m_slot->m_space->install_rom(address + 0x1000, address + 0xffff, memregion("bootrom")->base() + 0x1000);

	// we're done
	m_slot->cfgout_w(0);
}
예제 #18
0
파일: 98035.cpp 프로젝트: goofwear/mame
void hp98035_io_card::device_reset()
{
	hp9845_io_card_device::device_reset();
	install_readwrite_handler(read16_delegate(FUNC(hp98035_io_card::reg_r) , this) , write16_delegate(FUNC(hp98035_io_card::reg_w) , this));

	m_idr_full = false;
	m_idr = 0;
	m_odr = 0;
	m_ibuffer_ptr = 0;
	m_obuffer_len = 0;
	m_obuffer_ptr = 0;
	sts_w(true);
	set_flg(true);

	// Set real time from the real world
	system_time systime;
	machine().base_datetime(systime);
	m_msec = 0;
	m_sec = systime.local_time.second;
	m_min = systime.local_time.minute;
	m_hrs = systime.local_time.hour;
	m_dom = systime.local_time.mday;
	m_mon = systime.local_time.month + 1;

	attotime period(attotime::from_msec(1));
	m_msec_timer->adjust(period , 0 , period);

	half_init();
}
예제 #19
0
void sage2_state::machine_reset()
{
	address_space &program = m_maincpu->space(AS_PROGRAM);
	program.unmap_readwrite(0x000000, 0x07ffff);
	program.install_rom(0x000000, 0x001fff, 0x07e000, m_rom->base());
	program.install_read_handler(0xfe0000, 0xfe3fff, read16_delegate(FUNC(sage2_state::rom_r), this));
	m_maincpu->reset();
}
예제 #20
0
파일: gstriker.c 프로젝트: mbcoguno/mame
DRIVER_INIT_MEMBER(gstriker_state,vgoalsoc)
{
	m_gametype = 3;
	mcu_init();

	m_maincpu->space(AS_PROGRAM).install_write_handler(0x200090, 0x200091, write16_delegate(FUNC(gstriker_state::vbl_toggle_w),this)); // vblank toggle
	m_maincpu->space(AS_PROGRAM).install_read_handler(0x200090, 0x200091, read16_delegate(FUNC(gstriker_state::vbl_toggle_r),this));
}
예제 #21
0
파일: gstriker.cpp 프로젝트: MASHinfo/mame
void gstriker_state::init_vgoalsoc()
{
	m_gametype = VGOAL_SOCCER_MCU;
	mcu_init();

	m_maincpu->space(AS_PROGRAM).install_write_handler(0x200090, 0x200091, write16_delegate(FUNC(gstriker_state::vbl_toggle_w),this)); // vblank toggle
	m_maincpu->space(AS_PROGRAM).install_read_handler(0x200090, 0x200091, read16_delegate(FUNC(gstriker_state::vbl_toggle_r),this));
}
예제 #22
0
파일: hp98544.cpp 프로젝트: system11b/mame
void dio16_98544_device::device_start()
{
	// set_nubus_device makes m_slot valid
	set_dio_device();

	m_rom = device().machine().root_device().memregion(this->subtag(HP98544_ROM_REGION).c_str())->base();

	m_vram.resize(VRAM_SIZE);
	m_dio->install_memory(0x200000, 0x2fffff, read16_delegate(FUNC(dio16_98544_device::vram_r), this),
							write16_delegate(FUNC(dio16_98544_device::vram_w), this));
	m_dio->install_memory(0x560000, 0x563fff, read16_delegate(FUNC(dio16_98544_device::rom_r), this),
							write16_delegate(FUNC(dio16_98544_device::rom_w), this));
	m_dio->install_memory(0x564000, 0x567fff, read16_delegate(FUNC(dio16_98544_device::ctrl_r), this),
							write16_delegate(FUNC(dio16_98544_device::ctrl_w), this));
	m_cursor_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(dio16_98544_device::cursor_callback),this));
	m_cursor_timer->adjust(attotime::from_hz(3));
}
예제 #23
0
void macpds_sedisplay_device::device_start()
{
	set_macpds_device();

	install_rom(this, SEDISPLAY_ROM_REGION, 0xc00000);
	install_rom(this, SEDISPLAY_ROM_REGION, 0xf80000);

	m_vram = std::make_unique<UINT8[]>(VRAM_SIZE);

	static const char bankname[] = { "radpds_ram" };
	m_macpds->install_bank(0xc40000, 0xc40000+VRAM_SIZE-1, 0, 0, bankname, m_vram.get());

	m_macpds->install_device(0x770000, 0x77000f, read16_delegate(FUNC(macpds_sedisplay_device::ramdac_r), this), write16_delegate(FUNC(macpds_sedisplay_device::ramdac_w), this));
	m_macpds->install_device(0xc10000, 0xc2ffff, read16_delegate(FUNC(macpds_sedisplay_device::sedisplay_r), this), write16_delegate(FUNC(macpds_sedisplay_device::sedisplay_w), this));

	m_timer = timer_alloc(0, nullptr);
	m_timer->adjust(m_screen->time_until_pos(879, 0), 0);
}
예제 #24
0
DRIVER_INIT_MEMBER(pgm_arm_type2_state,ddp2)
{
	pgm_basic_init();
	pgm_ddp2_decrypt(machine());
	kov2_latch_init();

	machine().device("prot")->memory().space(AS_PROGRAM).install_read_handler(0x1800300c, 0x1800300f, read32_delegate(FUNC(pgm_arm_type2_state::ddp2_speedup_r),this));
	m_maincpu->space(AS_PROGRAM).install_read_handler(0x80ee54, 0x80ee55, read16_delegate(FUNC(pgm_arm_type2_state::ddp2_main_speedup_r),this));
}
예제 #25
0
파일: unichamp.cpp 프로젝트: MASHinfo/mame
void unichamp_state::machine_start()
{
	if (m_cart->exists()){
		//flip endians in more "this surely exists in MAME" way?
		//NOTE The unichamp roms have the same endianness as intv on disk and in memory
		uint8_t*ptr   = m_cart->get_rom_base();
		size_t size = m_cart->get_rom_size();
		for(size_t i=0;i<size;i+=2){
			uint8_t TEMP = ptr[i];
			ptr[i] = ptr[i+1];
			ptr[i+1] = TEMP;
		}
		m_maincpu->space(AS_PROGRAM).install_read_handler(0x1000, 0x17ff,
					read16_delegate(FUNC(generic_slot_device::read16_rom),(generic_slot_device*)m_cart));
	} else
		m_maincpu->space(AS_PROGRAM).install_read_handler(0x1000, 0x17ff,
					read16_delegate(FUNC(unichamp_state::read_ff), this));
}
예제 #26
0
파일: megadrvb.c 프로젝트: crazii/mameplus
DRIVER_INIT_MEMBER(md_boot_state,topshoot)
{
	m_maincpu->space(AS_PROGRAM).install_read_handler(0x200050, 0x200051, read16_delegate(FUNC(md_boot_state::topshoot_200051_r),this));
	m_maincpu->space(AS_PROGRAM).install_read_port(0x200042, 0x200043, "IN0");
	m_maincpu->space(AS_PROGRAM).install_read_port(0x200044, 0x200045, "IN1");
	m_maincpu->space(AS_PROGRAM).install_read_port(0x200046, 0x200047, "IN2");
	m_maincpu->space(AS_PROGRAM).install_read_port(0x200048, 0x200049, "IN3");

	DRIVER_INIT_CALL(megadriv);
}
예제 #27
0
void pgm_022_025_state::init_killbld()
{
	pgm_basic_init();
	pgm_killbld_decrypt();

	// install and configure protection device(s)
	m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xd40000, 0xd40003, read16_delegate(FUNC(igs025_device::killbld_igs025_prot_r), (igs025_device*)m_igs025), write16_delegate(FUNC(igs025_device::killbld_igs025_prot_w), (igs025_device*)m_igs025));
	m_igs022->m_sharedprotram = m_sharedprotram;
	m_igs025->m_kb_source_data = killbld_source_data;
}
예제 #28
0
DRIVER_INIT_MEMBER(pgm_022_025_state,drgw3)
{
	pgm_basic_init();
	pgm_dw3_decrypt();

	// install and configure protection device(s)
	m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xda5610, 0xda5613, read16_delegate(FUNC(igs025_device::killbld_igs025_prot_r), (igs025_device*)m_igs025), write16_delegate(FUNC(igs025_device::killbld_igs025_prot_w), (igs025_device*)m_igs025));
	m_igs022->m_sharedprotram = m_sharedprotram;
	m_igs025->m_kb_source_data = dw3_source_data;
}
예제 #29
0
파일: buddha.c 프로젝트: Gu1/libretro-mame
void buddha_device::autoconfig_base_address(offs_t address)
{
	if (VERBOSE)
		logerror("%s('%s'): autoconfig_base_address received: 0x%06x\n", shortname(), basetag(), address);

	if (VERBOSE)
		logerror("-> installing buddha\n");

	// stop responding to default autoconfig
	m_slot->m_space->unmap_readwrite(0xe80000, 0xe8007f);

	// install autoconfig handler to new location
	m_slot->m_space->install_readwrite_handler(address, address + 0x7f,
		read16_delegate(FUNC(amiga_autoconfig::autoconfig_read), static_cast<amiga_autoconfig *>(this)),
		write16_delegate(FUNC(amiga_autoconfig::autoconfig_write), static_cast<amiga_autoconfig *>(this)), 0xffff);

	// buddha registers
	m_slot->m_space->install_readwrite_handler(address + 0x7fe, address + 0x7ff,
		read16_delegate(FUNC(buddha_device::speed_r), this),
		write16_delegate(FUNC(buddha_device::speed_w), this), 0xffff);

	m_slot->m_space->install_readwrite_handler(address + 0x800, address + 0x8ff,
		read16_delegate(FUNC(buddha_device::ide_0_cs0_r), this),
		write16_delegate(FUNC(buddha_device::ide_0_cs0_w), this), 0xffff);

	m_slot->m_space->install_readwrite_handler(address + 0x900, address + 0x9ff,
		read16_delegate(FUNC(buddha_device::ide_0_cs1_r), this),
		write16_delegate(FUNC(buddha_device::ide_0_cs1_w), this), 0xffff);

	m_slot->m_space->install_readwrite_handler(address + 0xa00, address + 0xaff,
		read16_delegate(FUNC(buddha_device::ide_0_cs0_r), this),
		write16_delegate(FUNC(buddha_device::ide_0_cs0_w), this), 0xffff);

	m_slot->m_space->install_readwrite_handler(address + 0xb00, address + 0xbff,
		read16_delegate(FUNC(buddha_device::ide_0_cs1_r), this),
		write16_delegate(FUNC(buddha_device::ide_0_cs1_w), this), 0xffff);

	m_slot->m_space->install_read_handler(address + 0xf00, address + 0xf3f,
		read16_delegate(FUNC(buddha_device::ide_0_interrupt_r), this), 0xffff);

	m_slot->m_space->install_read_handler(address + 0xf40, address + 0xf7f,
		read16_delegate(FUNC(buddha_device::ide_1_interrupt_r), this), 0xffff);

	m_slot->m_space->install_write_handler(address + 0xfc0, address + 0xfff,
		write16_delegate(FUNC(buddha_device::ide_interrupt_enable_w), this), 0xffff);

	// install access to the rom space
	m_slot->m_space->install_rom(address + 0x1000, address + 0xffff, memregion("bootrom")->base() + 0x1000);

	// we're done
	m_slot->cfgout_w(0);
}
예제 #30
0
void midtunit_state::init_mktunit()
{
	/* common init */
	init_tunit_generic(SOUND_ADPCM);

	/* protection */
	m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x1b00000, 0x1b6ffff, read16_delegate(FUNC(midtunit_state::mk_prot_r),this), write16_delegate(FUNC(midtunit_state::mk_prot_w),this));

	/* sound chip protection (hidden RAM) */
	m_adpcm_sound->get_cpu()->space(AS_PROGRAM).install_ram(0xfb9c, 0xfbc6);
}