Jump to content

Kof2004 Hero (kof2003) Hack, Mame Driver


Recommended Posts

src\driver.c

 

DRIVER( kof2003p )	/* 0271 (c) 2003 Playmore Corporation */

 

-----------------------------------------------------------------------------------------------

 

src\drivers\neogeo.c

ROM_START( kof2003p ) /* Bootleg Hack */
       ROM_REGION( 0x700000, REGION_CPU1, 0 ) 
ROM_LOAD16_WORD_SWAP( "271p-p1.bin" , 0x000000, 0x700000, CRC(73474729) SHA1(33655820746d8e107fcdd6a33372eff58325bea5) )

NEO_SFIX_128K( "271p-s1.bin", CRC(a5d78a9a) SHA1(4d5697a52c40b4fbb9602d49221f37fac36d97c6) )

NEO_BIOS_SOUND_512K( "271-m1d.bin", CRC(0e86af8f) SHA1(769102b67bb1a699cfa5674d66cdb46ae633cb65) )

ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
ROM_LOAD( "271-v1d.bin", 0x000000, 0x400000, CRC(d2b8aa5e) SHA1(498f0556c1de56822141f8043f1ce20444f4ed0a) )
ROM_LOAD( "271-v2d.bin", 0x400000, 0x400000, CRC(71956ee2) SHA1(a890941e60db358cf45b58909f4719f4826f3bb1) )
ROM_LOAD( "271-v3d.bin", 0x800000, 0x400000, CRC(ddbbb199) SHA1(0eea4b064bdb8daa03c354fe0a0aa27c4c665bda) )
ROM_LOAD( "271-v4d.bin", 0xc00000, 0x400000, CRC(01b90c4f) SHA1(387164aa1995d8c11ed939b3afbc294d86d2e27f) )

NO_DELTAT_REGION

ROM_REGION( 0x4000000, REGION_GFX3, 0 )
/* decrypted */
ROM_LOAD16_BYTE( "271-c1d.bin", 0x0000000, 0x800000, CRC(e42fc226) SHA1(1cd9364993e141facdcdd53ec2277df7b275d8a7) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "271-c2d.bin", 0x0000001, 0x800000, CRC(1b5e3b58) SHA1(0eb254477a9479541291e43e415310852a0f0bed) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "271-c3d.bin", 0x1000000, 0x800000, CRC(d334fdd9) SHA1(1efe30b4f56a55e25ab518cf6999de797b5e407c) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "271-c4d.bin", 0x1000001, 0x800000, CRC(0d457699) SHA1(ec73d0c9fc7094d0ac6c0986a6e07cde25893e57) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "271-c5d.bin", 0x2000000, 0x800000, CRC(8a91aae4) SHA1(802f4baacf801646be1ef686e105b2e867a6a5df) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "271-c6d.bin", 0x2000001, 0x800000, CRC(9f8674b8) SHA1(65964f40b2227d020023fb436579927e65807dcd) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "271-c7d.bin", 0x3000000, 0x800000, CRC(374ea523) SHA1(613827d72c6181f3e08353750c9af0c4dbad020b) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "271-c8d.bin", 0x3000001, 0x800000, CRC(75211f4d) SHA1(d82f044e816ee539ff131d9c931200c818d34cd0) ) /* Plane 2,3 */
ROM_END

 

data16_t CartRAM[4096];

unsigned char svc_r8(unsigned int offset)
{
unsigned char *cr=(unsigned char *) CartRAM;
offset-=0x2fe000;
return cr[offset^1];
}

void DoBankSw2k3(void)
{
unsigned char *cr=(unsigned char *) CartRAM;
unsigned int
offset=(svc_r8(0x2ffff2)<<16)|(svc_r8(0x2ffff3)<<8)|(svc_r8(0x2ffff0)<<0);
unsigned char prt=svc_r8(0x2ffff3);
unsigned char *mem=(unsigned char *) memory_region(REGION_CPU1);

*((unsigned char *) (cr+((0x2ffff0-0x2fe000)^1)))&=0xfe;
*((unsigned char *) (cr+((0x2ffff1-0x2fe000)^1)))=0xa0;
*((unsigned char *) (cr+((0x2ffff2-0x2fe000)^1)))&=0x7f;
neogeo_set_cpu1_second_bank(offset+0x100000);

mem[0x58197^1]=prt;
}

void DoBankSw2k3alt(void)
{
unsigned char *cr=(unsigned char *) CartRAM;
unsigned int
offset=(svc_r8(0x2ffff2)<<16)|(svc_r8(0x2ffff3)<<8)|(svc_r8(0x2ffff1)<<0);
unsigned char prt=svc_r8(0x2ffff3);
unsigned char *mem=(unsigned char *) memory_region(REGION_CPU1);

*((unsigned char *) (cr+((0x2ffff1-0x2fe000)^1)))&=0xfe;
*((unsigned char *) (cr+((0x2ffff2-0x2fe000)^1)))&=0x7f;
neogeo_set_cpu1_second_bank(offset+0x100000);

mem[0x58197^1]=prt;
}



WRITE16_HANDLER( kof2003_w)
{
data=COMBINE_DATA(&CartRAM[offset]);
if(offset==0x1ff0/2 || offset==0x1ff2/2)
{
DoBankSw2k3();
}
}

WRITE16_HANDLER( kof2k3pl_w)
{
data=COMBINE_DATA(&CartRAM[offset]);
if(offset==0x1ff0/2 || offset==0x1ff2/2)
{
DoBankSw2k3alt();
}
}

READ16_HANDLER( kof2003_r)
{
return CartRAM[offset];
}


DRIVER_INIT( kof2003p )
{
install_mem_read16_handler (0,0x2fe000,0x2fffff, kof2003_r);
install_mem_write16_handler (0,0x2fe000,0x2fffff, kof2k3pl_w);
init_neogeo();
}

 

GAMEB( 2003, kof2003p, kof2003,	neogeo, neogeo, neogeo, kof2003p, ROT0, "Playmore Corporation", "The King of Fighters 2004 Hero (BootLeg / Hack)" )

Edited by James
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...