Try this code:
neogeo.h
look for this:
// neo_run.cpp
add this after:
extern int nNeoPCM2PLAYMOREByteswap;
neo_run.cpp
look for this:
int nNeoSRAMProtection = -1;
add this after (or after pcm2 code by IQ_132)
int nNeoPCM2PLAYMOREByteswap = 0; // PCM2 PLAYMORE chip
Look for this:
if (BurnDrvGetHardwareCode() & HARDWARE_SNK_SWAPV) {
for (int i = 0; i < 0x00200000; i++) {
unsigned char n = YM2610ADPCMAROM[i];
YM2610ADPCMAROM[i] = YM2610ADPCMAROM[0x00200000 + i];
YM2610ADPCMAROM[0x00200000 + i] = n;
}
}
}
add this after (or after the IQ_132 PCM2 SNK 1999 code)
/* Neo-PCM2 PLAYMORE(c) 2002 Sound Chip Emulation */
// some code by Fataku & some by the vconv (from 2ch) - FBA conversion by iq_132
if (nNeoPCM2PLAYMOREByteswap != 0)
{
unsigned int addrs[7][2]={
{0x000000,0xA5000}, //kof2002
{0xFFCE20,0x01000}, //matrimelee
{0xFE2CF6,0x4E001}, //mslug5
{0xFEB2C0,0x0A000}, //samsho5
{0xFFAC28,0xC2000}, //svcchaos
{0x000000,0x00000}, //kof2003
{0xFFB440,0x02000}, //samsh5sp
};
unsigned int xordata[7][8]={
{0xF9,0xE0,0x5D,0xF3,0xEA,0x92,0xBE,0xEF}, //kof2002
{0xC4,0x83,0xA8,0x5F,0x21,0x27,0x64,0xAF}, //matrimelee
{0xC3,0xFD,0x81,0xAC,0x6D,0xE7,0xBF,0x9E}, //mslug5
{0xCB,0x29,0x7D,0x43,0xD2,0x3A,0xC2,0xB4}, //samsho5
{0xC3,0xFD,0x81,0xAC,0x6D,0xE7,0xBF,0x9E}, //svcchaos
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, //kof2003
{0x4B,0xA4,0x63,0x46,0xF0,0x91,0xEA,0x62}, //samsh5sp
};
int value = (nNeoPCM2PLAYMOREByteswap-1);
UINT8 *rom = YM2610ADPCMAROM;
UINT8 *buf = (UINT8*)malloc(0x1000000);
int ofst;
memcpy(buf,rom,0x1000000);
for(int i=0; i<0x1000000; i++)
{
ofst = (i & 0xfefffe) | ((i & 0x010000) >> 16) | ((i & 0x000001) << 16);
ofst ^= addrs[value][1];
rom[ofst] = (buf[((i + addrs[value][0]) & 0xffffff)] ^ xordata[value][(ofst & 0x07)]);
}
free(buf);
}
look for NeoExit() int add after:
nNeoSramProtection = 0;
this:
nNeoPCM2PLAYMOREByteswap = 0; // exit PCM2 PLAYMORE chip
d_neogeo.cpp
According with the driver, give the correct value for each game that uses this chip; for example:
static int kof2002Init()
{
nNeoProtectionxor = 0xec
pNeoInitCallback = kof2002Decrypt;
[B]nNeoPCM2PLAYMOREByteswap = 1;[/B]
return NeoInit();
}
btw, I think "nNeoPCM2PLAYMOREBitswap" would be more appropriate.
btw2, All the code except the main body is a complete rip of Ferchogtx's (Just so everyone knows)