did you guys tested this code with the system configured as normal bios, mvs system and asia/euro region ? the game don't start nly in this config here... my code:
// The King of Fighters 2002 (bootleg)
static struct BurnRomInfo kof2002bRomDesc[] = {
{"265-p1.bin", 0x100000, 0x9ede7323, 1 | BRF_ESS | BRF_PRG },
{"265b-p2.bin", 0x400000, 0x6dbee4df, 1 | BRF_ESS | BRF_PRG },
{"265b-s1.bin", 0x020000, 0x2255f5bf, 2 | BRF_GRA },
{"265b-c1.bin", 0x800000, 0xf25d3d66, 3 | BRF_GRA },
{"265b-c2.bin", 0x800000, 0xe3e66f1d, 3 | BRF_GRA },
{"265b-c3.bin", 0x800000, 0x8732fa30, 3 | BRF_GRA },
{"265b-c4.bin", 0x800000, 0x0989fd40, 3 | BRF_GRA },
{"265b-c5.bin", 0x800000, 0x60635cd2, 3 | BRF_GRA },
{"265b-c6.bin", 0x800000, 0xbd736824, 3 | BRF_GRA },
{"265b-c7.bin", 0x800000, 0x2da8d8cf, 3 | BRF_GRA },
{"265b-c8.bin", 0x800000, 0x2048404a, 3 | BRF_GRA },
{ "265-m1d.bin", 0x020000, 0x1C661A4B, 4 | BRF_ESS | BRF_PRG },
{"265b-v1d.bin", 0x400000, 0x13D98607, 5 | BRF_SND },
{"265b-v2d.bin", 0x400000, 0x9CF74677, 5 | BRF_SND },
{"265b-v3d.bin", 0x400000, 0x8E9448B5, 5 | BRF_SND },
{"265b-v4d.bin", 0x400000, 0x067271B5, 5 | BRF_SND },
};
STDROMPICKEXT(kof2002b, kof2002b, neogeo);
STD_ROM_FN(kof2002b);
// Code by IQ_132
void kof2002b_gfx_decrypt(unsigned char *src, int size)
{
int i, j;
int t[8][10] =
{
{ 0, 8, 7, 3, 4, 5, 6, 2, 1 },
{ 1, 0, 8, 4, 5, 3, 7, 6, 2 },
{ 2, 1, 0, 3, 4, 5, 8, 7, 6 },
{ 6, 2, 1, 5, 3, 4, 0, 8, 7 },
{ 7, 6, 2, 5, 3, 4, 1, 0, 8 },
{ 0, 1, 2, 3, 4, 5, 6, 7, 8 },
{ 2, 1, 0, 4, 5, 3, 6, 7, 8 },
{ 8, 0, 7, 3, 4, 5, 6, 2, 1 },
};
unsigned char *dst = (unsigned char*)malloc(0x10000);
for (i = 0; i < size; i+=0x10000)
{
memcpy(dst, src+i,0x10000);
for (j = 0; j < 0x200; j++)
{
int n = ((j % 0x40) / 8);
int ofst = BITSWAP16(j, 15, 14, 13, 12, 11, 10, 9, t[n][0], t[n][1], t[n][2],t[n][3], t[n][4], t[n][5], t[n][6], t[n][7], t[n][8]);
memcpy(src+i+ofst*128, dst+j*128, 128);
}
}
free(dst);
}
// Descramble code by bms888
static void kof2002b_px_decrypt()
{
int sec[] = { 0x02, 0x05, 0x06, 0x03, 0x00, 0x07, 0x04, 0x01 };
int i, rom_size = 0x400000;
UINT8 *src = Neo68KROM+0x100000;
UINT8 *dst = (UINT8 *)malloc( rom_size );
memcpy( dst, src, rom_size);
for( i=0; i<8; i++){
memcpy( src+i*0x80000, dst+sec[i]*0x80000, 0x80000);
}
free( dst );
}
static void kof2002b_decrypt()
{
kof2002b_px_decrypt();
kof2002b_gfx_decrypt(NeoSpriteROM, 0x4000000);// Sprite and Text are scrambled/encrypted
kof2002b_gfx_decrypt(NeoTextROM+0x20000, 0x20000);// in the same way every 64kb
}
//
static int kof2002bInit()
{
int nRet;
pNeoInitCallback = kof2002b_decrypt;
nRet = NeoInit();
return nRet;
}
struct BurnDriver BurnDrvkof2002b = {
"kof2002b", "kof2002", "neogeo", "2002",
"The King of Fighters 2002 (bootleg)\0", NULL, "SNK", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO,
NULL, kof2002bRomInfo, kof2002bRomName, neogeoInputInfo, neogeoDIPInfo,
kof2002bInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};