I changed it hehe
/* original code by IQ_132 */
DRIVER_INIT( lans2004 )
{
int i;
UINT8 *src = memory_region( REGION_CPU1 );
UINT16 *rom = (UINT16*)memory_region( REGION_CPU1 );
UINT8 *dst = malloc(0x600000);
UINT8 *snd_rom = memory_region( REGION_SOUND1 );
if (dst) {
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 + 0x0BBB00, src + 0x045B00, 0x001710);
memcpy (dst + 0x02FFF0, src + 0x1A92BE, 0x000010);
memcpy (dst + 0x100000, src + 0x200000, 0x400000);
memcpy (src, dst, 0x600000);
free (dst);
}
for (i = 0xBBB00/2; i < 0xBE000/2; i++) {
if ((((rom[i]&0xFFBF)==0x4EB9) || ((rom[i]&0xFFBF)==0x43B9)) && (rom[i+1]==0x0000)) {
rom[i + 1] = 0x000B;
rom[i + 2] += 0x6000;
}
}
rom[0x2D15C/2] = 0x000B;
rom[0x2D15E/2] = 0xBB00;
rom[0x2D1E4/2] = 0x6002;
rom[0x2EA7E/2] = 0x6002;
rom[0xBBCD0/2] = 0x6002;
rom[0xBBDF2/2] = 0x6002;
rom[0xBBE42/2] = 0x6002;
for (i = 0; i < 0xA00000; i++)
snd_rom[i] = BITSWAP8(snd_rom[i], 0, 1, 5, 4, 3, 2, 6, 7);
kog_sx_decrypt();
kog_cx_decrypt();
init_neogeo();
}