Final Burn Neo > FBN Development

SVC Chaos driver infos.

(1/19) > >>

iq_132:
Here's source code to descramble the bootleg svc C roms:


--- Code: ---// Original MAME code by HalRIN - http://www52.tok2.com/home/foge/
static void svcboot_cx_decrypt()
{
const unsigned char sec[ 0x10 ] = {
0, 1, 0, 1, 2, 3, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5,
};

const unsigned char swap[ 6 ][ 4 ] = {
{ 3, 0, 1, 2 },
{ 2, 3, 0, 1 },
{ 1, 2, 3, 0 },
{ 0, 1, 2, 3 },
{ 3, 2, 1, 0 },
{ 3, 0, 2, 1 },
};

int i;
int fsize = 0x4000000;
UINT8 *src = NeoSpriteROM;
UINT8 *dst = (UINT8*)malloc( fsize );
int ofst;

memcpy( dst, src, fsize );

for( i = 0; i < fsize / 0x80; i++ ){
int tbl = sec[ (i & 0xf00) >> 8 ];

int bit0 = swap[ tbl ][ 0 ];
int bit1 = swap[ tbl ][ 1 ];
int bit2 = swap[ tbl ][ 2 ];
int bit3 = swap[ tbl ][ 3 ];

ofst = BITSWAP08( (i & 0x0000ff), 7, 6, 5, 4, bit3, bit2, bit1, bit0 );
ofst += (i & 0xfffff00);

memcpy( &src[ i * 0x80 ], &dst[ ofst * 0x80 ], 0x80 );
}

free( dst );
}
--- End code ---

I've attached the old (lib) that was used to descramble the bootleg svc C roms.

NJ7:
And here are my drivers for anyone who cares.....LOL :D

Don't PM me about these not being 100% correct, I know they aren't, but it's the best I got right now.....the others are hard to find or not emulated correctly....... ;)


--- Code: ---
// SVC Chaos: SNK Vs. Capcom (bootleg, set 1)


static struct BurnRomInfo svcbootRomDesc[] = {
{"svc-p1.bin", 0x600000, 0x1cc8fb7a, 0x10}, //  0 68K code

{"svc-s1.bin", 0x020000, 0x70b44df1,    1}, //  1 Text data

        {"svc-c1.bin", 0x800000, 0xa7826b89,    1}, //  2 Sprite data
{"svc-c2.bin", 0x800000, 0xed3c2089,    1}, //  3
{"svc-c3.bin", 0x800000, 0x71ed8063,    1}, //  5
{"svc-c4.bin", 0x800000, 0x250bde2d,    1}, //  6
{"svc-c5.bin", 0x800000, 0x9817c082,    1}, //  7
{"svc-c6.bin", 0x800000, 0x2bc0307f,    1}, //  8
{"svc-c7.bin", 0x800000, 0x4358d7b9,    1}, //  9
{"svc-c8.bin", 0x800000, 0x366deee5,    1}, //  10

{"svc-m1.bin", 0x020000, 0x804328c3, 0x10}, // 11 Z80 code

{"svc-v1.bin", 0x400000, 0xbd3a391f, 2}, // 12 Sound data
        {"svc-v2.bin", 0x400000, 0xb5097287, 2}, // 13
        {"svc-v3.bin", 0x400000, 0xaa9849a0, 2}, // 14
        {"svc-v4.bin", 0x400000, 0x33fc0b37, 2}, // 15

};

STDROMPICKEXT(svcboot, svcboot, neogeo);
STD_ROM_FN(svcboot);

static void svcboot_m1Decrypt()
{
        UINT8 *mrom = (UINT8 *)(NeoZ80ROM);
        UINT8 *dst = (UINT8*)malloc(0x20000);
        memcpy( dst+0x00000, mrom+0x10000, 0x10000 );
        memcpy( dst+0x10000, mrom+0x00000, 0x10000 );
        memcpy( mrom, dst, 0x20000 );
        free(dst);
        svcboot_c(); // svcboot C fix
}

static int svcbootInit()
{
        pNeoInitCallback=svcboot_m1Decrypt;
        nTextBankswitch=2;
        nADPCMByteswap = 2;
        return NeoInit();
}

struct BurnDriver BurnDrvsvcboot = {

{"svcboot", "SVC Chaos: SNK Vs. Capcom (bootleg, set 1)", NULL, "Playmore / Capcom", "Neo Geo", "2003", NULL, "neogeo"},
BDF_GAME_WORKING | BDF_LOCKED | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO,
NULL, svcbootRomInfo, svcbootRomName, neogeoInputInfo, neogeoDIPInfo,
svcbootInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};

// SVC Chaos: SNK vs Capcom (bootleg, set 2)

/* ==================================================  =============================== */
/* This version has the blending effect as svcchaos, the text rom is scrambled
   and needs extra handling...     */
/* ==================================================  =============================== */

static struct BurnRomInfo svcbootaRomDesc[] = {
{"svc-p1.bin", 0x600000, 0x1cc8fb7a, 0x10}, //  0 68K code

{"svc-s1a.bin ", 0x080000, 0xad184232,    1}, //  1 Text data

{"svc-c1.bin", 0x800000, 0xa7826b89,    1}, //  2 Sprite data
{"svc-c2.bin", 0x800000, 0xed3c2089,    1}, //  3
{"svc-c3.bin", 0x800000, 0x71ed8063,    1}, //  5
{"svc-c4.bin", 0x800000, 0x250bde2d,    1}, //  6
{"svc-c5.bin", 0x800000, 0x9817c082,    1}, //  7
{"svc-c6.bin", 0x800000, 0x2bc0307f,    1}, //  8
{"svc-c7.bin", 0x800000, 0x4358d7b9,    1}, //  9
{"svc-c8.bin", 0x800000, 0x366deee5,    1}, //  10

{"svc-m1.bin",  0x020000, 0x804328c3, 0x10}, // 11 Z80 code

{"svc-v1.bin", 0x400000, 0xbd3a391f, 2}, // 12 Sound data
        {"svc-v2.bin", 0x400000, 0xb5097287, 2}, // 13
        {"svc-v3.bin", 0x400000, 0xaa9849a0, 2}, // 14
        {"svc-v4.bin", 0x400000, 0x33fc0b37, 2}, // 15
};

STDROMPICKEXT(svcboota, svcboota, neogeo);
STD_ROM_FN(svcboota);

static int svcbootaInit()
{
/* This uses the same function for the m1 as svcboot */
pNeoInitCallback=svcboot_m1Decrypt;
nTextBankswitch=4;
        nADPCMByteswap = 2;
return NeoInit();
}

struct BurnDriver BurnDrvsvcboota = {
{"svcboota", "SVC Chaos: SNK Vs. Capcom (bootleg, set 2)", NULL, "Playmore / Capcom", "Neo Geo", "2003", "svcboot", "neogeo"},
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG | BDF_LOCKED, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ALTERNATE_TEXT,
NULL, svcbootaRomInfo, svcbootaRomName, neogeoInputInfo, neogeoDIPInfo,
svcbootaInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};

// SVC Chaos: SNK Vs. Capcom Plus! (bootleg, set 1)


static struct BurnRomInfo svcplusRomDesc[] = {
{"svc-p1p.bin", 0x600000, 0x7bdc4420, 0x10}, //  0 68K code

{"svc-s1p.bin", 0x020000, 0xaaef740c,    1}, //  1 Text data

        {"svc-c1.bin", 0x800000, 0xa7826b89,    1}, //  2 Sprite data
{"svc-c2.bin", 0x800000, 0xed3c2089,    1}, //  3
{"svc-c3.bin", 0x800000, 0x71ed8063,    1}, //  5
{"svc-c4.bin", 0x800000, 0x250bde2d,    1}, //  6
{"svc-c5.bin", 0x800000, 0x9817c082,    1}, //  7
{"svc-c6.bin", 0x800000, 0x2bc0307f,    1}, //  8
{"svc-c7.bin", 0x800000, 0x4358d7b9,    1}, //  9
{"svc-c8.bin", 0x800000, 0x366deee5,    1}, //  10

{"svc-m1.bin", 0x020000, 0x804328c3, 0x10}, // 11 Z80 code

{"svc-v1.bin", 0x400000, 0xbd3a391f, 2}, // 12 Sound data
        {"svc-v2.bin", 0x400000, 0xb5097287, 2}, // 13
        {"svc-v3.bin", 0x400000, 0xaa9849a0, 2}, // 14
        {"svc-v4.bin", 0x400000, 0x33fc0b37, 2}, // 15

};

STDROMPICKEXT(svcplus, svcplus, neogeo);
STD_ROM_FN(svcplus);

static int svcplusInit()
{
        pNeoInitCallback=svcboot_m1Decrypt;
        nADPCMByteswap = 2;
        return NeoInit();
}

struct BurnDriver BurnDrvsvcplus = {

{"svcplus", "SVC Chaos: SNK Vs. Capcom Plus! (bootleg, set 1)", NULL, "Playmore / Capcom", "Neo Geo", "2003", "svcboot", "neogeo"},
BDF_GAME_WORKING | BDF_LOCKED | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO,
NULL, svcplusRomInfo, svcplusRomName, neogeoInputInfo, neogeoDIPInfo,
svcplusInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};

// SvC Chaos: SNK vs Capcom Plus! (bootleg, set 2)

static struct BurnRomInfo svcplusaRomDesc[] = {
{"svc-p1pl.bin",0x200000, 0x16b44144, 0x10}, //  0 68K code /* alternate code... scrambled and protected */
{"svc-p2pl.bin",0x400000, 0x7231ace2, 0x10}, //  1

{"svc-s1pl.bin",0x020000, 0xca3c735e,    1}, //  2 Text data /* scrambled */

{"svc-c1.bin",  0x800000, 0xa7826b89,    1}, //  3 Sprite data /* bit-swaped */
{"svc-c2.bin",  0x800000, 0xed3c2089,    1}, //  4
{"svc-c3.bin",  0x800000, 0x71ed8063,    1}, //  5
{"svc-c4.bin",  0x800000, 0x250bde2d,    1}, //  6
{"svc-c5.bin",  0x800000, 0x9817c082,    1}, //  7
{"svc-c6.bin",  0x800000, 0x2bc0307f,    1}, //  8
{"svc-c7.bin",  0x800000, 0x4358d7b9,    1}, //  9
{"svc-c8.bin",  0x800000, 0x366deee5,    1}, //  10

{"svc-m1.bin",  0x020000, 0x804328c3, 0x10}, //  11 Z80 code /* scrambled */

/* scrambled, bit-swaped */
{"svc-v1.bin",  0x400000, 0xbd3a391f,    2}, // 12 Sound data
{"svc-v2.bin",  0x400000, 0xb5097287,    2}, // 13
{"svc-v3.bin",  0x400000, 0xaa9849a0,    2}, // 14
{"svc-v4.bin",  0x400000, 0x33fc0b37,    2}, // 15
};

STDROMPICKEXT(svcplusa, svcplusa, neogeo);
STD_ROM_FN(svcplusa);

static void svcplusaDecrypt()
{
/* Descrambling Px by FerchogtX */
unsigned char* prom = Neo68KROM01;
unsigned char* dst = (unsigned char*)malloc(0x600000);

unsigned int sec[]={0x100000,0x200000,0x300000,0x400000,0x500000,0x000000};
if (dst)
{
memcpy( dst, prom, 0x600000 );
for( int i=0; i

iq_132:
Here is the code for these roms (svcsplus) :D


--- Code: --- {"svc-p1p.bin", 0x400000, 0x2601902F, 0x10}, // 0 68K code
{"svc-p2p.bin", 0x400000, 0x0ca13305, 0x10}, // 1

{"svc-s1p.bin", 0x020000, 0x233D6439,    1}, // 2 Text data
--- End code ---

Here's the S decryption code (It's best to use ferchogtx's "NeoTextromfix" code and add this to that):


--- Code: --- // Converted by Jimmy_Page (www.neofighters.com)
srom = NeoTextROM+0x20000;
for (int i=0;i<0x20000;i++)
srom[i]=BITSWAP08(srom[i],7,6,0,4,3,2,1,5);
--- End code ---

Here's the P decryption code.


--- Code: ---// Analyzed by HalRIN - http://www52.tok2.com/home/foge/
static void svcsplus_px_decrypt()
{
int sec[] = {0x06, 0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x07};
int sed[] = {0x000000,0x700000,0x100000,0x200000,0x300000,0x400000,0x500000};

unsigned char *src = Neo68KROM01;
int i,ofst,size = 0x800000;
unsigned char *dst = (unsigned char*)malloc(size);

memcpy( dst, src, size );

for( i = 0; i < size / 2; i++ )
{
ofst = BITSWAP16( (i & 0x007fff), 0x0f, 0x00, 0x08, 0x09, 0x0b, 0x0a, 0x0c, 0x0d,
  0x04, 0x03, 0x01, 0x07, 0x06, 0x02, 0x05, 0x0e );

        ofst += (i & 0x078000);
        ofst += sec[ (i & 0xf80000) >> 19 ] << 19;

        memcpy( &src[ i * 2 ], &dst[ ofst * 2 ], 0x02 );
}

memcpy(dst,src,0x800000);
for(i = 0; i < 7; ++i)
{
memcpy(src+i*0x100000,dst+sed[i],0x100000);
}
free(dst);

*((unsigned short*)(Neo68KROM01 + 0x9E90)) = 0x000F; // Enable S. Plus
*((unsigned short*)(Neo68KROM01 + 0x9E92)) = 0xc9c0;
*((unsigned short*)(Neo68KROM01 + 0xA10C)) = 0x4EB9; // Enable boss icons
*((unsigned short*)(Neo68KROM01 + 0xA10E)) = 0x000E;
*((unsigned short*)(Neo68KROM01 + 0xA110)) = 0x9750;
}
--- End code ---

iq_132:
And here's the P rom decryption code for these P roms (svcplus):


--- Code: --- {"svc-p1p.bin", 0x200000, 0xA194D842, 0x10}, //  0 68K code
{"svc-p2p.bin", 0x200000, 0x50C0E2B7, 0x10}, //  1
{"svc-p3p.bin", 0x200000, 0x58CDC293, 0x10}, //  2
--- End code ---


--- Code: ---// Analyzed by HalRIN - http://www52.tok2.com/home/foge/
static void svcplus_px_decrypt()
{
int sec[] = {0x00, 0x03, 0x02, 0x05, 0x04, 0x01};

unsigned char *src = Neo68KROM01;
int i,ofst,rom_size = 0x600000;
unsigned char *dst = (unsigned char*)malloc( rom_size );

memcpy( dst, src, rom_size );
for( i = 0; i < rom_size / 2; i++ ){
ofst = BITSWAP24( (i & 0xfffff), 0x17, 0x16, 0x15, 0x14, 0x13, 0x00, 0x01, 0x02,
0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08,
0x07, 0x06, 0x05, 0x04, 0x03, 0x10, 0x11, 0x12 );
ofst ^= 0x0f0007;
ofst += (i & 0xff00000);
memcpy( &src[ i * 2 ], &dst[ ofst * 2 ], 0x02 );
}
memcpy( dst, src, rom_size );
for( i = 0; i < 6; i++ ){
memcpy( &src[ i << 20 ], &dst[ sec[ i ] << 20 ], (1 << 20) );
}
free( dst );

*((unsigned short*)(Neo68KROM01 + 0xF8016)) = 0x33c1; // Patch protected address
}
--- End code ---

KaNyErO:
well it seems that the protection algorithm for new bootleg hacks is very similar to the protection used in the pcb games:

for svcsplus (it MUST work for kof2k3up too)
srom=BITSWAP08(srom,7,6,0,4,3,2,1,5);

for kof2k1pla
srom=BITSWAP08(srom,3,2,4,5,1,6,0,7);

for svcnd and kof2k3 PCB (svcchaos pcb too)
srom=BITSWAP08(srom,4,0,7,2,5,1,6,3);

Navigation

[0] Message Index

[#] Next page

Go to full version