neo_pcm2_swap comes with mame as standard. It's the same as the playmore routine with the the illegal games removed. static void neo_pcm2_swap(int value) /* 0=kof2002, 1=matrim */
{
unsigned int addrs[2][2]={
{0x000000,0xA5000}, /* kof2002 */
{0xFFCE20,0x01000}}; /* matrimelee */
unsigned int xordata[2][8]={
{0xF9,0xE0,0x5D,0xF3,0xEA,0x92,0xBE,0xEF}, /* kof2002 */
{0xC4,0x83,0xA8,0x5F,0x21,0x27,0x64,0xAF}}; /* matrim */
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);
}