OK,my kfs2k4pl FBA code is here:
// The King of Fighters Special Edition 2004 Plus! (hack)
static struct BurnRomInfo kfs2k4plRomDesc[] = {
{"2k4-p1p.bin",0x200000, 0xed97c684, 0x10}, // 0 68K code (scrambled)
{"2k4-p2p.bin",0x400000, 0xe6c50566, 0x10}, // 1 (is the same as 2k4-p1.bin)
static void kfs2k4pl_px_decrypt()
{
int sec[] = { 0x0D, 0x04, 0x0A, 0x00, 0x0C, 0x05, 0x08, 0x02,
0x0F, 0x06, 0x0B, 0x01, 0x0E, 0x07, 0x09, 0x03 };
int sed[] = { 0x00, 0x05, 0x04, 0x03, 0x02 };
int i, rom_size = 0x200000;
UINT8 *src = Neo68KROM01;
UINT8 *dst = (UINT8 *)malloc(rom_size);
memcpy(dst, src, rom_size);
for( i=0; i<0x10; i++){
memcpy(src+i*0x20000, dst+sec[i]*0x20000, 0x20000);
}
dst = (UINT8 *)malloc(0x600000);
memcpy(dst, src, 0x600000); // last 1MB data same as first 1MB, only repeated data
for( i=0; i<6; i++){
memcpy(src+i*0x100000, dst+sed[i]*0x100000, 0x100000);
}
free( dst );
}