fixed kf2k3pcb decrypt, the checksum (used to generate the key) must be calculated BEFORE the additional bitswap is applied.

This commit is contained in:
davidhay 2008-09-20 20:34:22 +00:00
parent 41e49963f0
commit ff996589e3
2 changed files with 7 additions and 6 deletions

View File

@ -7160,18 +7160,20 @@ static DRIVER_INIT( kf2k3pcb )
kf2k3pcb_gfx_decrypt(machine);
kof2003biosdecode(machine);
/* extra little swap on the m1 */
neogeo_cmc50_m1_decrypt(machine);
/* extra little swap on the m1 - this must be performed AFTER the m1 decrypt
or the m1 checksum (used to generate the key) for decrypting the m1 is
incorrect */
{
int i;
UINT8* rom = memory_region(machine, "audiocrypt");
for (i=0;i<0x80000;i++)
UINT8* rom = memory_region(machine, "audio");
for (i=0;i<0x90000;i++)
{
rom[i] = BITSWAP8(rom[i], 5, 6, 1, 4, 3, 0, 7, 2);
}
}
neogeo_cmc50_m1_decrypt(machine);
kof2000_neogeo_gfx_decrypt(machine, 0x9d);
kf2k3pcb_decrypt_s1data(machine);

View File

@ -1503,8 +1503,7 @@ void neogeo_cmc50_m1_decrypt(running_machine *machine)
UINT16 cs16=generate_cs16(rom,0x10000);
UINT16 key = BITSWAP16(cs16,12,0,2,4,8,15,7,13,10,1,3,6,11,9,14,5)^0xffff;
/* HACK! -- something is wrong in kf2k3pcb, is the m1 bad? */
if (!strcmp(machine->gamedrv->name,"kf2k3pcb")) key = 0x4b64;
//printf("key %04x\n",key);
for (i=0; i<rom_size; i++)
{