Jump to content

Recommended Posts

Posted

kof2003a ( Set 2 MVS )

 

Thanks to IQ_132 http://neosource.1emulation.com/forums/index.php?topic=490.0

 

ROM_START( kof2003a ) /* Encrypted Code + Sound + GFX Roms */
ROM_REGION( 0x900000, REGION_CPU1, 0 )
ROM_LOAD32_WORD_SWAP( "271-p1c.bin", 0x000000, 0x400000, CRC(530ecc14) SHA1(812cf7e9902af3f5e9e330b7c05c2171b139ad2b) )
ROM_LOAD32_WORD_SWAP( "271-p2c.bin", 0x000002, 0x400000, CRC(fd568da9) SHA1(46364906a1e81dc251117e91a1a7b43af1373ada) )
ROM_LOAD16_WORD_SWAP( "271-p3c.bin", 0x800000, 0x100000, CRC(aec5b4a9) SHA1(74087f785590eda5898ce146029818f86ced42b6) ) // Encrypted
ROM_LOAD16_WORD_SWAP( "271-p3d.bin", 0x800000, 0x100000, CRC(59d376da) SHA1(3c3ad0b79e8b37e838893a8f7b87e11d7eeee8f2) ) // Decrypted

/* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x80000, REGION_GFX1, 0 ) /* larger char set */ 
ROM_FILL( 0x000000, 0x80000, 0 )
ROM_REGION( 0x20000, REGION_GFX2, 0 )
ROM_LOAD( "sfix.sfx",  0x000000, 0x20000, CRC(354029fc) )

ROM_REGION( 0x080000, REGION_USER4, 0 )
/* The M1 ROM is encrypted, we load it here for reference and replace it with a decrypted version */
ROM_LOAD( "271-m1c.bin", 0x00000, 0x080000, CRC(F5515629) SHA1(7516bf1b0207a3c8d41dc30c478f8d8b1f71304b) )
/* Decrypted */
NEO_BIOS_SOUND_512K( "271-m1c_decrypted.bin", CRC(4374CB5C) SHA1(d245a09fcebc8fe59f4af2de2fc30a0871e56d68) ) // Not 100%

ROM_REGION( 0x1000000, REGION_SOUND1, 0 )
/* Encrypted */
ROM_LOAD( "271-v1c.bin", 0x000000, 0x800000, CRC(ffa3f8c7) SHA1(7cf4a933973ca23b7f87c81151d8659e6ec4bd20) )
ROM_LOAD( "271-v2c.bin", 0x800000, 0x800000, CRC(5382c7d1) SHA1(1bf999705eda80ba1e7b0d6bdd010d9bfb18bd76) )

NO_DELTAT_REGION

ROM_REGION( 0x4000000, REGION_GFX3, 0 )
/* Encrypted */
ROM_LOAD16_BYTE( "271-c1c.bin", 0x0000000, 0x800000, CRC(b1dc25d0) SHA1(50adc3c60d5b4b3abd10a49db2267306c6dbd772) )
ROM_LOAD16_BYTE( "271-c2c.bin", 0x0000001, 0x800000, CRC(d5362437) SHA1(66db36522dc09106388c707252df9fe1c88b4856) )
ROM_LOAD16_BYTE( "271-c3c.bin", 0x1000000, 0x800000, CRC(0a1fbeab) SHA1(9fe30d36ba98d00fda010832ff2f27783dd577c1) )
ROM_LOAD16_BYTE( "271-c4c.bin", 0x1000001, 0x800000, CRC(87b19a0c) SHA1(b72a8e7d9124ce859b5149bb4381ba481c161ea5) )
ROM_LOAD16_BYTE( "271-c5c.bin", 0x2000000, 0x800000, CRC(704ea371) SHA1(e75b80422f0d72eac826f8ffadf79efeccaab124) )
ROM_LOAD16_BYTE( "271-c6c.bin", 0x2000001, 0x800000, CRC(20a1164c) SHA1(c9843b37612a16fc95f6851793b1cfb5d49d811d) )
ROM_LOAD16_BYTE( "271-c7c.bin", 0x3000000, 0x800000, CRC(189aba7f) SHA1(7152195a57ad36b28290810fe87ed8c206262ba9) )
ROM_LOAD16_BYTE( "271-c8c.bin", 0x3000001, 0x800000, CRC(20ec4fdc) SHA1(deb5f7ec5a090e419b9d1a6a74877bee081198e2) )
ROM_END


static void neo_pcm2_swap(int value) /* 0=kof2002, 1=matrim, 2=mslug5, 3=samsho5, 4=svcchaos, 5=kof2003, 6=samsh5sp */
{
unsigned int addrs[7][2]={
 {0x000000,0xA5000},
               {0xFFCE20,0x01000},
               {0xFE2CF6,0x4E001},
               {0xFEB2C0,0x0A000},
               {0xFFAC28,0xC2000},
               {0xFF14EA,0xA7001},
               {0xFFB440,0x02000},
               };
      unsigned int xordata[7][8]={
               {0xF9,0xE0,0x5D,0xF3,0xEA,0x92,0xBE,0xEF},
               {0xC4,0x83,0xA8,0x5F,0x21,0x27,0x64,0xAF},
               {0xC3,0xFD,0x81,0xAC,0x6D,0xE7,0xBF,0x9E},
               {0xCB,0x29,0x7D,0x43,0xD2,0x3A,0xC2,0xB4},
               {0xC3,0xFD,0x81,0xAC,0x6D,0xE7,0xBF,0x9E},
               {0x4B,0xA4,0x63,0x46,0xF0,0x91,0xEA,0x62},
               {0x4B,0xA4,0x63,0x46,0xF0,0x91,0xEA,0x62},
               };
UINT8 *src = memory_region(REGION_SOUND1);
UINT8 *buf = malloc(0x1000000);
int i, j, d;

memcpy(buf,src,0x1000000);
for (i=0;i<0x1000000;i++)
{
 j=BITSWAP24(i,23,22,21,20,19,18,17,0,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,16);
 j=j^addrs[value][1];
 d=((i+addrs[value][0])&0xffffff);
 src[j]=buf[d]^xordata[value][j&0x7];
}
free(buf);
}


void kof2003a_px_decrypt( void )
{
int i,j;
UINT8 *src = memory_region( REGION_CPU1 );
UINT8 *dst = malloc(0x900000);

for(i = 0; i < 0x100000; i++)
 dst[i] = src[i] ^ 0xFF ^ src[ 0x0FFFE0 + (i % 0x20)];

for(i = 0x100000; i < 0x800000; i++)
 dst[i] = src[i] ^ 0xFF ^ src[ 0x7FFFE0 + (i % 0x20)];

for(i = 0x100000; i < 0x800000; i += 4) {
 UINT16 *rom16 = (UINT16*)&dst[i + 1];
 *rom16 = (*rom16&0xF00F) | BITSWAP8((*rom16>>4)&0xFF, 1, 0, 3, 2, 5, 4, 7, 6)<<4;
}

for(i = 0; i < 0x10; i++) {
 j = (i & 0xf0) + BITSWAP8((i & 0x0f), 7, 6, 5, 4, 0, 1, 2, 3);
 memcpy(src + i * 0x10000, dst + j * 0x10000, 0x10000);
}

memcpy(src + 0x100000, src + 0x800000, 0x100000);

for(i = 0x100000; i < 0x800000; i += 0x100) {
 j = (i & 0xf000ff) + ((i & 0x000f00) ^ 0x00800)
	 + (BITSWAP8(((i & 0x0ff000) >> 12), 4, 5, 6, 7, 1, 0, 3, 2) << 12);
 memcpy(src + i + 0x100000, dst + j, 0x100);
}

free(dst);
}



DRIVER_INIT( kof2003a )
{
kof2003a_px_decrypt();
neo_pcm2_swap(5);
neogeo_fix_bank_type = 2;
kof2000_neogeo_gfx_decrypt(0x9d);

init_neogeo();

memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2fe000, 0x2fffff, 0, 0, pvc_prot_r);
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2fe000, 0x2fffff, 0, 0, pvc_prot_w);
}


GAMEB( 2003, kof2003a, kof2003, neogeo, neogeo, neogeo,  kof2003a,   ROT0, "SNK Playmore", "The King of Fighters 2003 (set 2)", 0 )	/* Encrypted Code & GFX */

  • 10 months later...
  • Replies 44
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Hey guys.. excuse me if I'm interfering with your talk.. but what the hell means all those commands??? .... I've always seen those things related to roms encrypt or kinda.... but would you explain it to me in a not very confusing way.. --- although I'm not as stupid as I seem .. lol! ---

Posted

I LOVE YOU JAMES!!!! I might get back in to compiling MAME because of this!

 

And those commands are to decrypt encrypted roms.

Posted

Lol, James' post was almost a year ago!

Posted

WHAT THE EVIL BUMP?!

I'M GONNA KILL RUBIOCROFT!!!

  • 1 month later...
Posted

Neogeo ones? Anything that was on a real cartridge or pcb is in mame, except for the ones that haven't been found yet.

Posted
WHAT THE EVIL BUMP?!

I'M GONNA KILL RUBIOCROFT!!!

 

 

So you do not love me anymore then ? :)

  • 2 weeks later...
  • 2 weeks later...
Posted
I'm new to this, where do you put the hacks at?

 

 

If the emulator supports the hacks then they go in the roms folder .

If your talking about the drivers then you should know that most of the game drivers posted here are now supported in Mame, Just get the lastest version of mame and get the roms for it .

  • 2 months later...
Posted
And because of that, there is no longer a need to have this pinned.

 

Maybe so, But i do not agree :boxed2:

  • 1 month later...

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...