Author Topic: King of Fighters 2002 Sound  (Read 5716 times)

Offline NJ7

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-6
  • Member
King of Fighters 2002 Sound
« on: December 16, 2004, 05:28:44 PM »
Music is alright, sound effects are missing, what's wrong with this driver?

Code: [Select]
// The King of Fighters 2002

static struct BurnRomInfo kof2002RomDesc[] = {
{"265-p1.bin", 0x100000, 0x9ede7323, 0x10}, //  0 68K code
{"265-p2.bin", 0x400000, 0x327266b8, 0x10}, //  1

{"265-c1.bin", 0x800000, 0x2b65a656,    1}, //  2 Sprite data
{"265-c2.bin", 0x800000, 0xadf18983,    1}, //  3
{"265-c3.bin", 0x800000, 0x875e9fd7,    1}, //  4
{"265-c4.bin", 0x800000, 0x2da13947,    1}, //  5
{"265-c5.bin", 0x800000, 0x61bd165d,    1}, //  6
{"265-c6.bin", 0x800000, 0x03fdd1eb,    1}, //  7
{"265-c7.bin", 0x800000, 0x1a2749d8,    1}, //  8
{"265-c8.bin", 0x800000, 0xab0bb549,    1}, //  9

{"265-m1d.bin", 0x20000, 0xf6fab859, 0x10}, //  10 Z80 code
//      {"265-m1.bin", 0x20000, 0x85aaa632, 0x10}, //  10 Z80 code

/* This uses Neo-PCM2 PLAYMORE(c) 2002 Chip */
        {"265-v1.bin",  0x800000, 0x15e8f3f5,    2}, //  11 Sound data
        {"265-v2.bin",  0x800000, 0xda41d6f9,    2}, //  12
 
};

STDROMPICKEXT(kof2002, kof2002, neogeo);
STD_ROM_FN(kof2002);

static void kof2002Decrypt() // Converted to FBA code by IQ_132 (bbs.romshare.net)
{
unsigned char* src = Neo68KROM01+0x100000;
unsigned char* dst = (unsigned char*)malloc(0x400000);

int sec[] = {0x100000,0x280000,0x300000,0x180000,0x000000,0x380000,0x200000,0x080000};

if (dst)
{
memcpy(dst,src,0x400000);

for(int i = 0; i < 8; ++i)
{
memcpy(src+i*0x80000,dst+sec[i],0x80000);
}
free(dst);
}
}

static int kof2002Init()
{
nNeoProtectionXor = 0xec;
pNeoInitCallback = kof2002Decrypt;
        nNeoPCM2PLAYMOREByteswap = 1;

return NeoInit();
}

struct BurnDriver BurnDrvkof2002 = {

{"kof2002", "The King of Fighters 2002: Challenge to Ultimate Battle", NULL, "Eolith / Playmore", "Neo Geo", "2002", NULL, "neogeo"},
BDF_GAME_WORKING |BDF_LOCKED, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ENCRYPTED_B,
NULL, kof2002RomInfo, kof2002RomName, neogeoInputInfo, neogeoDIPInfo,
kof2002Init, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};

Offline NJ7

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-6
  • Member
King of Fighters 2002 Sound
« Reply #1 on: December 16, 2004, 05:46:12 PM »
Nevermind, just added the v2 rom twice and it works......