many people seem to be having the problem that they do not have svc/kof2003/samsh5/samsh5sp added to their v decrypt code
This will cause crashes
just replace the following function
Static void neo_pcm2_swap(...
with this
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);
}