Author Topic: The King of Fighters 2002 Magic Plus II (hack)  (Read 12004 times)

Offline iq_132

  • Administrator
  • *****
  • Posts: 3724
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
The King of Fighters 2002 Magic Plus II (hack)
« on: December 03, 2005, 09:06:13 PM »
Code: [Select]
// The King of Fighters 2002 Magic Plus II (hack) (Bootleg)

static struct BurnRomInfo kof2km2RomDesc[] = {
{ "k2k2m2p1.bin",  0x200000, 0x1016806c, 1 | BRF_ESS | BRF_PRG }, //  0 68K code
{ "k2k2m2p2.bin",  0x400000, 0x432fdf53, 1 | BRF_ESS | BRF_PRG }, //  1

{ "k2k2m2s1.bin",  0x020000, 0x446e74c5, 2 | BRF_GRA },   //  2 Text data

{ "265-c1.bin",    0x800000, 0x2B65A656, 3 | BRF_GRA },   //  3 Sprite data
{ "265-c2.bin",    0x800000, 0xADF18983, 3 | BRF_GRA },   //  4
{ "265-c3.bin",    0x800000, 0x875E9Fd7, 3 | BRF_GRA },   //  5
{ "265-c4.bin",    0x800000, 0x2DA13947, 3 | BRF_GRA },   //  6
{ "265-c5.bin",    0x800000, 0x61BD165D, 3 | BRF_GRA },   //  7
{ "265-c6.bin",    0x800000, 0x03FDD1EB, 3 | BRF_GRA },   //  8
{ "265-c7.bin",    0x800000, 0x1A2749D8, 3 | BRF_GRA },   //  9
{ "265-c8.bin",    0x800000, 0xAB0BB549, 3 | BRF_GRA },   //  10

{ "265-m1d.bin",   0x020000, 0x1c661a4b, 4 | BRF_ESS | BRF_PRG }, //  11 Z80 code

{ "265-v1.bin",    0x800000, 0x15E8F3F5, 5 | BRF_SND },   // 12
{ "265-v2.bin",    0x800000, 0xDA41D6F9, 5 | BRF_SND },   // 13
};

STDROMPICKEXT(kof2km2, kof2km2, neogeo);
STD_ROM_FN(kof2km2);

static void kof2k2m2_sx_decrypt()
{
unsigned char* tmp = (unsigned char*)malloc(0x20000);
if (tmp) {
memcpy( tmp, NeoTextROM + 0x20000, 0x20000 );
// descrambling the S1 by dorriGa
for ( int j = 0; j < 0x20000; j += 0x000010 ) {
memcpy( NeoTextROM + 0x20000 + j, tmp + j + 0x000008, 8);
memcpy( NeoTextROM + 0x20000 + j + 0x000008, tmp + j, 8);
}
}
free( tmp );
}

static void kof2km2_px_decrypt()
{
unsigned char *src = Neo68KROM;
unsigned char *dst = (unsigned char*)malloc(0x600000);
if (dst)
{
memcpy (dst + 0x000000, src + 0x1C0000, 0x040000);
memcpy (dst + 0x040000, src + 0x140000, 0x080000);
memcpy (dst + 0x0C0000, src + 0x100000, 0x040000);
memcpy (dst + 0x100000, src + 0x200000, 0x400000);
memcpy (src + 0x000000, dst + 0x000000, 0x600000);
free (dst);
}

kof2k2m2_sx_decrypt();
}

static int kof2km2Init()
{
int nRet;

nNeoProtectionXor = 0xEC;
pNeoInitCallback = kof2km2_px_decrypt;

nRet = NeoInit();

if (nRet == 0) {
PCM2DecryptVInfo Info = { 0x0A5000, 0x000000, { 0xF9, 0xE0, 0x5D, 0xF3, 0xEA, 0x92, 0xBE, 0xEF } };

PCM2DecryptV(&Info);
}

return nRet;
}

struct BurnDriver BurnDrvkof2km2 = {
"kof2km2", "kof2002", "neogeo", "2002",
"The King of Fighters 2002 Magic Plus II (hack)\0", NULL, "SNK Playmore Corporation", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_BOOTLEG | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ENCRYPTED_B,
NULL, kof2km2RomInfo, kof2km2RomName, neogeoInputInfo, neogeoDIPInfo,
kof2km2Init, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};


Offline KOF2112

  • Expert
  • *****
  • Posts: 187
  • Karma: +14/-4
Re: The King of Fighters 2002 Magic Plus II (hack)
« Reply #1 on: February 21, 2006, 09:34:11 AM »
 :redface: :redface:

出错误

++++++++++++++++++++++++++++++++++++++++++++
* FB Alpha Plus! Compiler utility...Ready! *
++++++++++++++++++++++++++++++++++++++++++++
MinGW32-Make
Making normal build...

Generating depend file for src/burner/win32/about.cpp...
Generating depend file for src/burner/win32/resource.rc...
Generating depend file for src/burn/neogeo/d_neogeo.cpp...
Compiling src/burn/neogeo/d_neogeo.cpp...
src/burn/neogeo/d_neogeo.cpp: In function `int kf2k2mp2Init()':
src/burn/neogeo/d_neogeo.cpp:9517: error: `PCM2DecryptVInfo' undeclared (first
   use this function)
src/burn/neogeo/d_neogeo.cpp:9517: error: (Each undeclared identifier is
   reported only once for each function it appears in.)
src/burn/neogeo/d_neogeo.cpp:9517: error: syntax error before `=' token
src/burn/neogeo/d_neogeo.cpp:9517: warning: no return statement in function
   returning non-void
src/burn/neogeo/d_neogeo.cpp: At global scope:
src/burn/neogeo/d_neogeo.cpp:9519: error: `Info' was not declared in this scope
src/burn/neogeo/d_neogeo.cpp:9519: error: ISO C++ forbids declaration of `
   PCM2DecryptV' with no type
src/burn/neogeo/d_neogeo.cpp:9520: error: syntax error before `}' token
MinGW32-Make[1]: *** [d_neogeo.o] Error 1
MinGW32-Make: *** [mingw] Error 2
Press any key to continue . . .

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Re: The King of Fighters 2002 Magic Plus II (hack)
« Reply #2 on: February 21, 2006, 09:38:06 AM »
Use this init instead:
Code: [Select]
static int kof2km2Init()
{
nNeoProtectionXor = 0xEC;
pNeoInitCallback = kof2km2_px_decrypt;
nNeoPCM2PLAYMOREProtection = 1;
return NeoInit();
}
See ya!!!!!! :biggrin:

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline KOF2112

  • Expert
  • *****
  • Posts: 187
  • Karma: +14/-4
Re: The King of Fighters 2002 Magic Plus II (hack)
« Reply #3 on: February 21, 2006, 10:55:43 AM »
thanks !!!  FerchogtX :biggrin: