It should be something like this... I haven't tested this yet, but it should work. // Code by IQ_132
// Thanks to JotaCE, Jimmy_page,
// and Robber804 for some info
static void kf10thepDecrypt()
{
// Fix for FBA program load problems
BurnLoadRom(Neo68KROM + 0x200000, 1, 1);
BurnLoadRom(Neo68KROM + 0x600000, 2, 1);
int i;
unsigned char *src = Neo68KROM;
unsigned char *dst = (unsigned char*)malloc(0x800000);
unsigned int sec[8] = { 0x3, 0x8, 0x7, 0xC, 0x1, 0xA, 0x6, 0xD };
for (i = 0; i < 8; i++)
{
memcpy (dst + i * 0x20000, src + sec[i] * 0x20000, 0x20000);
}
memcpy(dst + 0x0002e0, src + 0x0402e0, 0x06a);
memcpy(dst + 0x0f92bc, src + 0x0492bc, 0xb9e);
for (i = 0xf92bc; i < 0xf9e58; i += 2)
{
if (*((unsigned short*)(dst + i + 0)) == 0x4eb9 || *((unsigned short*)(dst + i + 0)) == 0x4ef9)
{
if (*((unsigned short*)(dst + i + 2)) == 0x0000)
{
*((unsigned short*)(dst + i + 2)) = 0x000F;
}
}
}
dst[0x00342] = 0x0f;
memcpy (dst + 0x100000, src + 0x200000, 0x600000);
memcpy (src, dst, 0x800000);
}