コード例 #1
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);
}
コード例 #2
0
ファイル: gunbustr.cpp プロジェクト: Robbbert/store1
DRIVER_INIT_MEMBER(gunbustr_state,gunbustrj)
{
	DRIVER_INIT_CALL(gunbustr);

	// no coin lockout, perhaps this was a prototype version without proper coin handling?
	m_coin_lockout = false;
}
コード例 #3
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);
}
コード例 #4
0
DRIVER_INIT_MEMBER(md_boot_state,srmdb)
{
	UINT8* rom = machine().root_device().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;

	machine().device("maincpu")->memory().space(AS_PROGRAM).install_legacy_read_handler(0x770070, 0x770075, FUNC(srmdb_dsw_r) );

	megadrive_6buttons_pad = 0;
	DRIVER_INIT_CALL(megadriv);
}
コード例 #5
0
ファイル: megadrvb.c プロジェクト: broftkd/mess-svn
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 *)machine().root_device().memregion("maincpu")->base();
	rom[0x1afc08/2] = 0x6600;
	#endif

	// 220000 = writes to mcu? 330000 = reads?
	machine().device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x220000, 0x220001, FUNC(aladmdb_w));
	machine().device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x330000, 0x330001, FUNC(aladmdb_r));

	megadrive_6buttons_pad = 0;
	DRIVER_INIT_CALL(megadrij);
}
コード例 #6
0
ファイル: igs_m036.cpp プロジェクト: qwijibo/mame
DRIVER_INIT_MEMBER(igs_m036_state, igsm312)
{
	DRIVER_INIT_CALL(igs_m036);

	igs036_decryptor decrypter(m312cn_key);
	decrypter.decrypter_rom(memregion("user1"));
}
コード例 #7
0
DRIVER_INIT_MEMBER( px4_state, px4p )
{
	DRIVER_INIT_CALL(px4);

	// reserve memory for external ram-disk
	m_ramdisk = auto_alloc_array(machine(), UINT8, 0x20000);
}
コード例 #8
0
ファイル: sg1000a.c プロジェクト: mbcoguno/mame
DRIVER_INIT_MEMBER(sg1000a_state,chwrestl)
{
	static const UINT8 convtable[32][4] =
	{
		/*       opcode                   data                     address      */
		/*  A    B    C    D         A    B    C    D                           */
		{ 0x28,0x08,0xa8,0x88 }, { 0x88,0x80,0x08,0x00 },   /* ...0...0...0...0 */
		{ 0x28,0x08,0xa8,0x88 }, { 0x28,0xa8,0x08,0x88 },   /* ...0...0...0...1 */
		{ 0x88,0x80,0x08,0x00 }, { 0x88,0x08,0x80,0x00 },   /* ...0...0...1...0 */
		{ 0x88,0x08,0x80,0x00 }, { 0x28,0xa8,0x08,0x88 },   /* ...0...0...1...1 */
		{ 0x28,0x08,0xa8,0x88 }, { 0x88,0x80,0x08,0x00 },   /* ...0...1...0...0 */
		{ 0x88,0x80,0x08,0x00 }, { 0x88,0x80,0x08,0x00 },   /* ...0...1...0...1 */
		{ 0x88,0x08,0x80,0x00 }, { 0x88,0x08,0x80,0x00 },   /* ...0...1...1...0 */
		{ 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 },   /* ...0...1...1...1 */
		{ 0x80,0xa0,0x00,0x20 }, { 0x28,0x08,0xa8,0x88 },   /* ...1...0...0...0 */
		{ 0x28,0xa8,0x08,0x88 }, { 0x28,0x08,0xa8,0x88 },   /* ...1...0...0...1 */
		{ 0x80,0xa0,0x00,0x20 }, { 0x80,0xa0,0x00,0x20 },   /* ...1...0...1...0 */
		{ 0x28,0xa8,0x08,0x88 }, { 0x80,0xa0,0x00,0x20 },   /* ...1...0...1...1 */
		{ 0xa0,0x80,0xa8,0x88 }, { 0x28,0x08,0xa8,0x88 },   /* ...1...1...0...0 */
		{ 0x80,0xa0,0x00,0x20 }, { 0xa0,0x80,0xa8,0x88 },   /* ...1...1...0...1 */
		{ 0xa0,0x80,0xa8,0x88 }, { 0x80,0xa0,0x00,0x20 },   /* ...1...1...1...0 */
		{ 0xa0,0x80,0xa8,0x88 }, { 0xa0,0x80,0xa8,0x88 }    /* ...1...1...1...1 */
	};

	DRIVER_INIT_CALL(sg1000a);
	sega_decode(memregion("maincpu")->base(), m_decrypted_opcodes, 0x8000, convtable);
}
コード例 #9
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);
}
コード例 #10
0
DRIVER_INIT_MEMBER(pgm_arm_type3_state, theglada)
{
    DRIVER_INIT_CALL(theglad);

    pgm_patch_external_arm_rom_jumptable_theglada(0x82078);

}
コード例 #11
0
ROM_END

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

#define ENERGY_CONSOLE_MODE 0

static DRIVER_INIT( 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 *)machine->region("maincpu")->base();
	rom[0x1afc08/2] = 0x6600;
	#endif

	// 220000 = writes to mcu? 330000 = reads?
	memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x220000, 0x220001, 0, 0, aladmdb_w);
	memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x330000, 0x330001, 0, 0, aladmdb_r);

	megadrive_6buttons_pad = 0;
	DRIVER_INIT_CALL(megadrij);
}
コード例 #12
0
ファイル: igs_m036.cpp プロジェクト: DragonMinded/mame
DRIVER_INIT_MEMBER(igs_m036_state, cjddzsp)
{
	DRIVER_INIT_CALL(igs_m036);

	igs036_decryptor decrypter(cjddzsp_key);
	decrypter.decrypter_rom(memregion("user1"));
}
コード例 #13
0
ファイル: playch10.c プロジェクト: CJBass/mame2013-libretro
DRIVER_INIT_MEMBER(playch10_state,pc_hrz)
{
	/* common init */
	DRIVER_INIT_CALL(playch10);

	/* setup mirroring */
	m_mirroring = PPU_MIRROR_HORZ;
}
コード例 #14
0
	TOURVISION_BIOS
ROM_END


static DRIVER_INIT(tourvision)
{
	DRIVER_INIT_CALL(pce);
}
コード例 #15
0
ファイル: nascom1.cpp プロジェクト: bmunger/mame
DRIVER_INIT_MEMBER( nascom2_state, nascom2 )
{
	DRIVER_INIT_CALL(nascom);

	// setup nasbus
	m_nasbus->set_program_space(&m_maincpu->space(AS_PROGRAM));
	m_nasbus->set_io_space(&m_maincpu->space(AS_IO));
}
コード例 #16
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);
}
コード例 #17
0
ファイル: galaxold.c プロジェクト: antervud/MAMEHub
DRIVER_INIT_MEMBER(galaxold_state,mooncrst)
{
	offs_t i, len = memregion("maincpu")->bytes();
	UINT8 *rom = memregion("maincpu")->base();


	for (i = 0;i < len;i++)
		rom[i] = decode_mooncrst(rom[i],i);

	DRIVER_INIT_CALL(mooncrsu);
}
コード例 #18
0
ファイル: playch10.c プロジェクト: CJBass/mame2013-libretro
DRIVER_INIT_MEMBER(playch10_state,pc_gun)
{
	/* common init */
	DRIVER_INIT_CALL(playch10);

	/* we have no vram, make sure switching games doesn't point to an old allocation */
	m_vram = NULL;

	/* set the control type */
	m_pc10_gun_controller = 1;
}
コード例 #19
0
ファイル: kinstb.c プロジェクト: cdenix/ps3-mame-0125
MACHINE_DRIVER_END

static DRIVER_INIT(kinstb)
{
	INT32 i;
	for(i=0;i<0x400000;i++)
	{
		memory_region(REGION_USER3)[i]=BITSWAP8(memory_region(REGION_USER3)[i],5,0,6,1,7,4,3,2 );
	}
	DRIVER_INIT_CALL(snes_hirom);
}
コード例 #20
0
static DRIVER_INIT(topshoot)
{
	memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x200050, 0x200051, 0, 0, topshoot_200051_r );
	memory_install_read_port(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x200042, 0x200043, 0, 0, "IN0");
	memory_install_read_port(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x200044, 0x200045, 0, 0, "IN1");
	memory_install_read_port(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x200046, 0x200047, 0, 0, "IN2");
	memory_install_read_port(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x200048, 0x200049, 0, 0, "IN3");

	megadrive_6buttons_pad = 0;
	DRIVER_INIT_CALL(megadriv);
}
コード例 #21
0
ファイル: megadrvb.c プロジェクト: broftkd/mess-svn
DRIVER_INIT_MEMBER(md_cons_state,topshoot)
{
	machine().device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x200050, 0x200051, FUNC(topshoot_200051_r) );
	machine().device("maincpu")->memory().space(AS_PROGRAM)->install_read_port(0x200042, 0x200043, "IN0");
	machine().device("maincpu")->memory().space(AS_PROGRAM)->install_read_port(0x200044, 0x200045, "IN1");
	machine().device("maincpu")->memory().space(AS_PROGRAM)->install_read_port(0x200046, 0x200047, "IN2");
	machine().device("maincpu")->memory().space(AS_PROGRAM)->install_read_port(0x200048, 0x200049, "IN3");

	megadrive_6buttons_pad = 0;
	DRIVER_INIT_CALL(megadriv);
}
コード例 #22
0
ファイル: vtech1.cpp プロジェクト: qwijibo/mame
DRIVER_INIT_MEMBER( vtech1_state, vtech1h )
{
	DRIVER_INIT_CALL(vtech1);

	// the SHRG mod replaces the standard videoram chip with an 8k chip
	m_videoram.allocate(0x2000);

	m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0x7000, 0x77ff, "bank4");
	membank("bank4")->configure_entries(0, 4, m_videoram, 0x800);
	membank("bank4")->set_entry(0);
}
コード例 #23
0
ファイル: jchan.c プロジェクト: DarrenBranford/MAME4iOS
ROM_END

static DRIVER_INIT( jchan )
{
	DRIVER_INIT_CALL( decrypt_toybox_rom );
	// install these here, putting them in the memory map causes issues
	memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x403ffe, 0x403fff, 0, 0, main2sub_cmd_w );
	memory_install_write16_handler(cputag_get_address_space(machine, "sub", ADDRESS_SPACE_PROGRAM), 0x400000, 0x400001, 0, 0, sub2main_cmd_w );


	memset(jchan_mcu_com, 0, 4 * sizeof( UINT16 ) );
}
コード例 #24
0
ファイル: ssf2md.c プロジェクト: cdenix/ps3-mame-0125
static DRIVER_INIT( ssf2ghw )
{
	memory_install_write16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xA130F0, 0xA130FF, 0, 0, SMH_NOP); // custom banking is disabled (!)
	memory_install_readwrite16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x400000, 0x5fffff, 0, 0, SMH_BANK5, SMH_UNMAP);

	memory_set_bankptr( 5, memory_region( REGION_CPU1 )+0x400000 );

	memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x770070, 0x770075, 0, 0, ssf2ghw_dsw_r );

	DRIVER_INIT_CALL(megadrij);

}
コード例 #25
0
ファイル: micro3d.c プロジェクト: Paulodx/sdl-mame-wii
static DRIVER_INIT( botss )
{
	UINT16 *rom = (UINT16 *)memory_region(machine, "maincpu");

	rom[0x1fcc0] = 0x4e71; /* Eliminate startup Am29000 timeout */
	rom[0x1fbf0] = 0x4e71; /* Skip AM29k code version detect */
	rom[0x1fC88] = 0x4e71;
	rom[0x23146] = 0x4e71;
	rom[0x17f4f] = 0x6006; /* Skip download objects */
	rom[0x17f5b] = 0x4e71;

	DRIVER_INIT_CALL(micro3d);
}
コード例 #26
0
ファイル: micro3d.c プロジェクト: Paulodx/sdl-mame-wii
static DRIVER_INIT( f15se21 )
{
	UINT16 *rom = (UINT16 *)memory_region(machine, "maincpu");

	rom[0x2a8b3] = 0x6006;
	rom[0x2a8bf] = 0x4e71;
	rom[0x28ad1] = 0x4e71;
	rom[0x28a9e] = 0x4e71;
	rom[0x28abd] = 0x4e71;
	rom[0x28c3b] = 0x4e71;

	DRIVER_INIT_CALL(micro3d);
}
コード例 #27
0
ファイル: vtech1.c プロジェクト: coinhelper/jsmess
DRIVER_INIT_MEMBER(vtech1_state,vtech1h)
{
	address_space &prg = machine().device("maincpu")->memory().space(AS_PROGRAM);

	DRIVER_INIT_CALL(vtech1);

	/* the SHRG mod replaces the standard videoram chip with an 8k chip */
	m_videoram.allocate(0x2000);

	prg.install_readwrite_bank(0x7000, 0x77ff, "bank4");
	membank("bank4")->configure_entries(0, 4, m_videoram, 0x800);
	membank("bank4")->set_entry(0);
}
コード例 #28
0
static DRIVER_INIT( ssf2mdb )
{
	memory_nop_write(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xA130F0, 0xA130FF, 0, 0); // custom banking is disabled (!)
	memory_install_read_bank(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x400000, 0x5fffff, 0, 0, "bank5");
	memory_unmap_write(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x400000, 0x5fffff, 0, 0);

	memory_set_bankptr(machine,  "bank5", machine->region( "maincpu" )->base() + 0x400000 );

	memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x770070, 0x770075, 0, 0, ssf2mdb_dsw_r );

	megadrive_6buttons_pad = 1;
	DRIVER_INIT_CALL(megadrij);
}
コード例 #29
0
ファイル: maygay1b.cpp プロジェクト: gregdickhudl/mame
DRIVER_INIT_MEMBER(maygay1b_state,m1)
{
	DRIVER_INIT_CALL(m1common);

	//AM_RANGE(0x2420, 0x2421) AM_WRITE(latch_ch2_w ) // oki
	// if there is no OKI region disable writes here, the rom might be missing, so alert user

	UINT8 *okirom = memregion( "msm6376" )->base();

	if (!okirom) {
		m_maincpu->space(AS_PROGRAM).install_write_handler(0x2420, 0x2421, write8_delegate(FUNC(maygay1b_state::m1ab_no_oki_w), this));
	}
}
コード例 #30
0
ファイル: megadrvb.c プロジェクト: broftkd/mess-svn
DRIVER_INIT_MEMBER(md_boot_state,ssf2mdb)
{
	machine().device("maincpu")->memory().space(AS_PROGRAM)->nop_write(0xA130F0, 0xA130FF); // custom banking is disabled (!)
	machine().device("maincpu")->memory().space(AS_PROGRAM)->install_read_bank(0x400000, 0x5fffff, "bank5");
	machine().device("maincpu")->memory().space(AS_PROGRAM)->unmap_write(0x400000, 0x5fffff);

	machine().root_device().membank("bank5")->set_base(machine().root_device().memregion( "maincpu" )->base() + 0x400000 );

	machine().device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x770070, 0x770075, FUNC(ssf2mdb_dsw_r) );

	megadrive_6buttons_pad = 1;
	DRIVER_INIT_CALL(megadrij);
}