diff --git a/src/mame/drivers/neodrvr.c b/src/mame/drivers/neodrvr.c index 0c923f3d1c3..d7df55ede47 100644 --- a/src/mame/drivers/neodrvr.c +++ b/src/mame/drivers/neodrvr.c @@ -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); diff --git a/src/mame/machine/neocrypt.c b/src/mame/machine/neocrypt.c index f5a1303008f..bf4fff68d54 100644 --- a/src/mame/machine/neocrypt.c +++ b/src/mame/machine/neocrypt.c @@ -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