This should work...
// Crouching Tiger Hidden Dragon 2003 (Set 2) (Bootleg)
static struct BurnRomInfo cthd2k3aRomDesc[] = {
{ "5003-p1a.bin", 0x100000, 0x1185fe39, 1 | BRF_ESS | BRF_PRG }, // 0 68K Code
{ "5003-p2a.bin", 0x400000, 0xea71faf7, 1 | BRF_ESS | BRF_PRG }, // 1
{ "5003-s1a.bin", 0x020000, 0x174ccffd, 2 | BRF_GRA }, // 2 Text data
{ "5003-c1a.bin", 0x800000, 0xdc90c563, 3 | BRF_GRA }, // 3 Sprite data
{ "5003-c2a.bin", 0x800000, 0x7b08d331, 3 | BRF_GRA }, // 4
{ "5003-c3.bin", 0x800000, 0xac4aff71, 3 | BRF_GRA }, // 5
{ "5003-c4.bin", 0x800000, 0xafef5d66, 3 | BRF_GRA }, // 6
{ "5003-c5.bin", 0x800000, 0xc7c1ae50, 3 | BRF_GRA }, // 7
{ "5003-c6.bin", 0x800000, 0x613197f9, 3 | BRF_GRA }, // 8
{ "5003-c7a.bin", 0x800000, 0xad2d72b3, 3 | BRF_GRA }, // 9
{ "5003-c8a.bin", 0x800000, 0x8c3fc1b5, 3 | BRF_GRA }, // 10
{ "5003-m1a.bin", 0x020000, 0xa37cc447, 4 | BRF_ESS | BRF_PRG }, // 11 Z80 code
{ "5003-v1.bin", 0x400000, 0x83d49ecf, 5 | BRF_SND }, // 12 Sound data
{ "5003-v2a.bin", 0x400000, 0x2b498449, 5 | BRF_SND }, // 13
{ "5003-v3.bin", 0x400000, 0x2ae38dbe, 5 | BRF_SND }, // 14
{ "5003-v4.bin", 0x400000, 0x26ec4dd9, 5 | BRF_SND }, // 15
};
STDROMPICKEXT(cthd2k3a, cthd2k3a, neogeo);
STD_ROM_FN(cthd2k3a);
void cthd2k3a_px_decrypt()
{
unsigned char nBank[] = {
0x06, 0x02, 0x04, 0x05, 0x01, 0x03, 0x00, 0x07,
0x27, 0x0E, 0x1C, 0x15, 0x1B, 0x17, 0x0A, 0x0F,
0x16, 0x14, 0x23, 0x0B, 0x22, 0x26, 0x08, 0x24,
0x21, 0x13, 0x1A, 0x0C, 0x19, 0x1D, 0x25, 0x10,
0x09, 0x20, 0x18, 0x1F, 0x1E, 0x12, 0x0D, 0x11
};
unsigned char *src = Neo68KROM;
unsigned char *dst = (unsigned char*)malloc(0x500000);
if (dst)
{
memcpy (dst, src, 0x500000);
for (int i = 0; i < 0x500000 / 0x20000; i++)
{
memcpy (src + i * 0x20000, dst + nBank * 0x20000, 0x20000);
}
free (dst);
}
}
static int cthd2k3aInit()
{
pNeoInitCallback = cthd2k3a_px_decrypt;
return NeoInit();
}
struct BurnDriver BurnDrvcthd2k3a = {
"cthd2k3a", "kof2001", "neogeo", "2001",
"Crouching Tiger Hidden Dragon 2003 (Set 2)\0", NULL, "Bootleg", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO,
NULL, cthd2k3aRomInfo, cthd2k3aRomName, neogeoInputInfo, neogeoDIPInfo,
cthd2k3aInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
// Samurai Shodown V / Samurai Spirits Zero (Bootleg)
static struct BurnRomInfo samsho5bRomDesc[] = {
{ "270-p2b.bin", 0x400000, 0x5023067f, 1 | BRF_ESS | BRF_PRG }, // 0 68K Code
{ "270-p1b.bin", 0x400000, 0xb6cbe386, 1 | BRF_ESS | BRF_PRG }, // 1
{ "270-c1.bin", 0x800000, 0x14ffffac, 3 | BRF_GRA }, // 2 Sprite data
{ "270-c2.bin", 0x800000, 0x401f7299, 3 | BRF_GRA }, // 3
{ "270-c3.bin", 0x800000, 0x838f0260, 3 | BRF_GRA }, // 4
{ "270-c4.bin", 0x800000, 0x041560a5, 3 | BRF_GRA }, // 5
{ "270-c5.bin", 0x800000, 0xbd30b52d, 3 | BRF_GRA }, // 6
{ "270-c6.bin", 0x800000, 0x86a69c70, 3 | BRF_GRA }, // 7
{ "270-c7.bin", 0x800000, 0xd28fbc3c, 3 | BRF_GRA }, // 8
{ "270-c8.bin", 0x800000, 0x02c530a6, 3 | BRF_GRA }, // 9
{ "270-m1_decrypted.bin", 0x040000, 0xe94a5e2b, 4 | BRF_ESS | BRF_PRG }, // 10 Z80 code (decrypted)
{ "270-m1.bin", 0x040000, 0xe4a5ab0c, 0 | BRF_PRG | BRF_OPT }, // 11 Z80 code
{ "270-v1.bin", 0x800000, 0x62e434eb, 5 | BRF_SND }, // 12 Sound data
{ "270-v2.bin", 0x800000, 0x180f3c9a, 5 | BRF_SND }, // 13
};
STDROMPICKEXT(samsho5b, samsho5b, neogeo);
STD_ROM_FN(samsho5b);
void samsh5bl_px_decrypt()
{
unsigned char *rom = Neo68KROM;
unsigned char *buf = (unsigned char*)malloc( 0x800000 );
memcpy( buf, rom, 0x800000 );
for(int i = 0; i < 0x800000 / 2; i++){
int ofst = BITSWAP8( (i & 0x000ff), 7, 6, 5, 4, 3, 0, 1, 2 );
ofst += (i & 0xfffff00);
ofst ^= 0x060005;
memcpy( &rom[ i * 2 ], &buf[ ofst * 2 ], 0x02 );
}
memcpy( buf, rom, 0x800000 );
memcpy( &rom[ 0x000000 ], &buf[ 0x700000 ], 0x100000 );
memcpy( &rom[ 0x100000 ], &buf[ 0x000000 ], 0x700000 );
free( buf );
}
static int samsho5bInit()
{
int nRet;
nNeoTextROMSize = 0x080000;
nNeoProtectionXor = 0x0f;
pNeoInitCallback = samsh5bl_px_decrypt;
nRet = NeoInit();
if (nRet == 0) {
PCM2DecryptVInfo Info = { 0x00A000, 0xFEB2C0, { 0xCB, 0x29, 0x7D, 0x43, 0xD2, 0x3A, 0xC2, 0xB4} };
PCM2DecryptV(&Info);
}
return nRet;
}
struct BurnDriver BurnDrvsamsho5b = {
"samsho5b", "samsho5", "neogeo", "2003",
"Samurai Shodown V / Samurai Spirits Zero\0", NULL, "SNK Playmore Corporation", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ENCRYPTED_B,
NULL, samsho5bRomInfo, samsho5bRomName, neogeoInputInfo, neogeoDIPInfo,
samsho5bInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};