Welcome!

General Emulation => MAME => Topic started by: robber804 on May 29, 2005, 08:16:37 AM

Title: iq_132 and the every 5th bit swap
Post by: robber804 on May 29, 2005, 08:16:37 AM
I havent forgotten.  But i still am not sure how to do what you are asking,   is it for the kf2k2spr bootleg decryption?  after looking at the p rom it looks like it seems to be shifted by -8 starting at 80h

example

kf2k2spr p1 rom at 80h
ff f7 ff f7 ff f7 ff f7 ff f7 ff f7 ff f7 ff f7

kof2002 p1 at 80h
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

also at one time i remember you posting some code for fba on how to do a byte swap on the matrimbl v2 + v4 roms.  could you please post that again?  i think it was lost when the board crashed the last time.

Title: Re: iq_132 and the every 5th bit swap
Post by: iq_132 on May 29, 2005, 10:27:50 AM
Yeah, I'm looking at kf2k2 Super's P protections.  I've gotten a decrypted version now using kf2k2pls as a starting point (there's only 56 different bytes btw).
The only problem is that I know how to encrypt the bytes, but I'm not sure how to decrypt them.  There are bytes that are skipped and ones that aren't and I'm not entirely sure how to go about it.

As for the matrim V swap:

BurnByteswap(YM2610ADPCMAROM+0x400000,0x400000);
BurnByteswap(YM2610ADPCMAROM+0xC00000,0x400000);
Title: Re: iq_132 and the every 5th bit swap
Post by: robber804 on May 29, 2005, 07:16:14 PM
It's may have already been posted somewhere but the s rom seems to use

Code: [Select]
void kf2k1spr_sx_decrypt( void )
{
    UINT8 *rom = memory_region( REGION_GFX1 );
    int rom_size = memory_region_length( REGION_GFX1 );

    for( int i = 0;  i <  rom_size;  i++ ){
        rom[  i  ] = BITSWAP8(  rom [  i  ], 7, 6, 0, 4, 3, 2, 1, 5 );
    }
}
Title: Re: iq_132 and the every 5th bit swap
Post by: JiMMy_PaGe on May 29, 2005, 07:19:35 PM
It's may have already been posted somewhere but the s rom seems to use

Code: [Select]
void kf2k1spr_sx_decrypt( void )
{
    UINT8 *rom = memory_region( REGION_GFX1 );
    int rom_size = memory_region_length( REGION_GFX1 );

    for( int i = 0;  i <  rom_size;  i++ ){
        rom[  i  ] = BITSWAP8(  rom [  i  ], 7, 6, 0, 4, 3, 2, 1, 5 );
    }
}

It uses the same protection as svcsplus s1  :wink: