i thought the code was easiest, something like this:
if (nNeoTextROMFixType = 7) {
// thanks to dorriGa and arnoldso for analyze the scramble
unsigned char *rom = NeoTextROM+0x20000;
unsigned char *buf = (unsigned char*)malloc( 0x40000 );
int i, j;
for (i=0;i<0x40000;i++){
j=BITSWAP24(i,23,22,21,20,19,18,17,9,8,10,11,0,5,4,3,2,1,6,7,13,16,12,14,15);
buf[j]=rom[i];
}
memcpy( rom, buf, 0x40000 );
free( buf );
}
and yeah a code for mame too:
static void cthd2k3s1spls(void)
{
// thanks to dorriGa and arnoldso for analyze the scramble
UINT8 *src = (memory_region(REGION_GFX1));
UINT8 *dst = (UINT8*)malloc(0x40000);
int i,j;
for (i=0;i<0x40000;i++){
j=BITSWAP24(i,23,22,21,20,19,18,17,9,8,10,11,0,5,4,3,2,1,6,7,13,16,12,14,15);
dst[j]=src[i];
}
memcpy(src,dst,0x40000);
}