In your kof2003b (bootleg) driver change this:
static void kof2003bWriteBankSwitch(unsigned int sekAddress,unsigned short wordValue,unsigned short valueMask)
{
int address=(sekAddress-0x2fe000)/2,bankaddress;
kof2003b_tbl[address]=(wordValue&valueMask)|(~valueMask&kof2003b_tbl[address]);
if(address!=0xff8 && address!=0xff9 ) return;
bankaddress=(kof2003b_tbl[0xff8]>>8)|(kof2003b_tbl[0xff9]<<8);
*(((unsigned char *)kof2003b_tbl)+0x1ff0)=0xa0;
*(((unsigned char *)kof2003b_tbl)+0x1ff1)&=0xfe;
*(((unsigned char *)kof2003b_tbl)+0x1ff3)&=0x7f;
SekMapMemory(Neo68KROM02+bankaddress,0x200000,0x2fdfff,SM_ROM);
Neo68KROM01[0x58196]=kof2003b_tbl[0xff9]&0xff;
}
to this:
static void kof2003bWriteBankSwitch(unsigned int sekAddress,unsigned short wordValue,unsigned short valueMask)
{
int address=(sekAddress-0x2fe000)/2,bankaddress;
kof2003b_tbl[address]=(wordValue&valueMask)|(~valueMask&kof2003b_tbl[address]);
if(address!=0xff8 && address!=0xff9 ) return;
// Make this universal for kof2003b + kof2003p
if ((!strcmp(BurnDrvText(0), "kof2003p")) || (!strcmp(BurnDrvText(0), "kof2k4ex")) || (!strcmp(BurnDrvText(0), "kf2k3pls"))) {
bankaddress=(kof2003b_tbl[0xff8])|(kof2003b_tbl[0xff9]<<8);
*(((unsigned char *)kof2003b_tbl)+0x1ff0)&=0xfe;
*(((unsigned char *)kof2003b_tbl)+0x1ff3)&=0x7f;
} else {
bankaddress=(kof2003b_tbl[0xff8]>>8)|(kof2003b_tbl[0xff9]<<8);
*(((unsigned char *)kof2003b_tbl)+0x1ff0)=0xa0;
*(((unsigned char *)kof2003b_tbl)+0x1ff1)&=0xfe;
*(((unsigned char *)kof2003b_tbl)+0x1ff3)&=0x7f;
}
SekMapMemory(Neo68KROM02+bankaddress,0x200000,0x2fdfff,SM_ROM);
Neo68KROM01[0x58196]=kof2003b_tbl[0xff9]&0xff;
}
These may or may not match your sets. Just change them to
// The King of Fighters 2003 (ex plus)
static struct BurnRomInfo kof2003pRomDesc[] = {
{"271-p1p.bin", 0x100000, 0xDACF5B2D, 0x10}, // 0 68K code
{"271-p2p.bin", 0x200000, 0x0d0a5861, 0x10}, // 1
{"271-p3p.bin", 0x400000, 0x92ed6ee3, 0x10}, // 2
{"kof2k3_s1.rom", 0x020000, 0xA5D78A9A, 1}, // 3 Text data
// {"271-s1p.bin", 0x020000, 0xD168751D, 1}, // 3 (unibios fix)
{"271-c1d.bin", 0x1000000, 0xC29ACD28, 1}, // 4 Sprite data
{"271-c2d.bin", 0x1000000, 0x328E80B1, 1}, // 5
{"271-c3d.bin", 0x1000000, 0x020A11F1, 1}, // 6
{"271-c4d.bin", 0x1000000, 0x991B5ED2, 1}, // 7
// {"271-c5d.bin", 0x1000000, 0xc2de8b66, 1}, // 8
// {"271-c6d.bin", 0x1000000, 0x3ff750db, 1}, // 9
{"271-m1d.bin", 0x080000, 0x0E86AF8F, 0x10}, // 10 Z80 code
{"271-v1d.bin", 0x1000000, 0x2058EC5E, 2}, // 11 Sound data
};
STDROMPICKEXT(kof2003p, kof2003p, neogeo);
STD_ROM_FN(kof2003p);
static int kof2003pInit()
{
int nRet;
memset(kof2003b_tbl,0,0x2000);
nRet=NeoInit();
if(!nRet)
kof2003bMapHandler();
return nRet;
}
struct BurnDriver BurnDrvkof2003p = {
{"kof2003p", "The King of Fighters 2004 (ex plus)", NULL, "SNK Playmore Corporation", "Neo Geo", "2003", "kof2003", "neogeo"},
BDF_GAME_WORKING | BDF_BOOTLEG | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_NEWBANKSYSTEM,
NULL, kof2003pRomInfo, kof2003pRomName, neogeoInputInfo, neogeoDIPInfo,
kof2003pInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
// The King of Fighters 2004 (ex plus set 2)
static struct BurnRomInfo kof2k4exRomDesc[] = {
{"271-p1p.bin", 0x100000, 0xDACF5B2D, 0x10}, // 0 68K code
{"271h-p2.bin", 0x200000, 0x8c06e880, 0x10}, // 1
{"271h-p3.bin", 0x400000, 0x96842d45, 0x10}, // 2
{"271-s1p.bin", 0x020000, 0xA5D78A9A, 1}, // 3 Text data
// {"271-s1p.bin", 0x020000, 0xD168751D, 1}, // 3 (unibios fix)
{"271-c1d.bin", 0x1000000, 0xC29ACD28, 1}, // 4 Sprite data
{"271-c2d.bin", 0x1000000, 0x328E80B1, 1}, // 5
{"271-c3d.bin", 0x1000000, 0x020A11F1, 1}, // 6
{"271-c4d.bin", 0x1000000, 0x991B5ED2, 1}, // 7
// {"271-c5d.bin", 0x1000000, 0xc2de8b66, 1}, // 8
// {"271-c6d.bin", 0x1000000, 0x3ff750db, 1}, // 9
{"271-m1d.bin", 0x080000, 0x0E86AF8F, 0x10}, // 10 Z80 code
{"271-v1d.bin", 0x1000000, 0x2058EC5E, 2}, // 11 Sound data
};
STDROMPICKEXT(kof2k4ex, kof2k4ex, neogeo);
STD_ROM_FN(kof2k4ex);
static int kof2k4exInit()
{
int nRet;
memset(kof2003b_tbl,0,0x2000);
nRet=NeoInit();
if(!nRet)
kof2003bMapHandler();
return nRet;
}
struct BurnDriver BurnDrvkof2k4ex = {
{"kof2k4ex", "The King of Fighters 2004 (ex plus set 2)", NULL, "SNK Playmore Corporation", "Neo Geo", "2003", "kof2003", "neogeo"},
BDF_GAME_WORKING | BDF_BOOTLEG | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_NEWBANKSYSTEM,
NULL, kof2k4exRomInfo, kof2k4exRomName, neogeoInputInfo, neogeoDIPInfo,
kof2k4exInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};