Welcome!

Final Burn Neo => FBN Development => Topic started by: FerchogtX on January 11, 2005, 11:08:19 PM

Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: FerchogtX on January 11, 2005, 11:08:19 PM
Maye this can help you to add this games, they use it's original lyouts, at least the normal version does, i'm not sire about the plus bootleg, Thanks to KanyEr0 for the infos...
Code: [Select]
// The King of Fighters Special Edition 2004 (hack)
// ================================================================================
/* Hack of The KIng of Fighters 2002 like cthd2003, but this cart only have a litle
   disorder in the 68K... p1 is p2 and is scrambled and p2 and p3 are the 1st and
   2nd chunks of p1 respectivectly, only 4 C-ROMs, s1, v-ROMs, m1 and p-ROMs have
   changed, the others come from kof2k2nd set... not really a good hack BTW */
// ================================================================================
static struct BurnRomInfo kofse2k4RomDesc[] = {
{"2k4-p2.bin", 0x080000, 0x21a84084, 0x10}, //  0 68K code
{"2k4-p3.bin", 0x080000, 0xfebb484e, 0x10}, //  1
{"2k4-p1.bin", 0x400000, 0xe6c50566, 0x10}, //  2

{"2k4-s1.bin", 0x020000, 0xa3c9b2d8,    1}, //  3 Text data

{"2k4-c1.bin", 0x800000, 0x7a050288,    1}, //  4 Sprite data
{"2k4-c2.bin", 0x800000, 0xe924afcf,    1}, //  5
{"2k4-c3.bin", 0x800000, 0x959fad0b,    1}, //  6  (Same as kof2k2nd)
{"2k4-c4.bin", 0x800000, 0xefe6a468,    1}, //  7  (Same as kof2k2nd)
{"2k4-c5.bin", 0x800000, 0x74bba7c6,    1}, //  8  (Same as kof2k2nd)
{"2k4-c6.bin", 0x800000, 0xe20d2216,    1}, //  9  (Same as kof2k2nd)
{"2k4-c7.bin", 0x800000, 0xfa705b2b,    1}, //  10 Text data removed
{"2k4-c8.bin", 0x800000, 0x2c912ff9,    1}, //  11 Text data removed

{"2k4-m1.bin", 0x020000, 0x5a47d9ad, 0x10}, //  12 Z80 code

{"2k4-v1.bin", 0x800000, 0xb887d287,    2}, //  13 Sound data
{"2k4-v2.bin", 0x800000, 0x8ad2edbd,    2}, //  14 (seems that the original is watermarked...)
};

STDROMPICKEXT(kofse2k4, kofse2k4, neogeo);
STD_ROM_FN(kofse2k4);

static void kofse2k4Decrypt()
{
// Original code by IQ_132 (http://neosource.1emu.net/)
unsigned char* src = Neo68KROM01+0x100000;
unsigned char* dst = (unsigned char*)malloc(0x400000);
int sec[] = {0x300000,0x200000,0x100000,0x000000};
if (dst)
{
memcpy(dst,src,0x400000);
for(int i=0; i<4; ++i) {
memcpy(src+i*0x100000,dst+sec[i],0x100000);
}
free(dst);
}
}

static int kofse2k4Init()
{
pNeoInitCallback = kofse2k4Decrypt;
nADPCMByteswap = 5;
return NeoInit();
}

struct BurnDriver BurnDrvkofse2k4 = {
{"kofse2k4", "The King of Fighters Special Edition 2004 (hack)", "Hack of kof2002", "Dragon Co.", "Neo Geo", "2004", "kof2002", "neogeo"},
BDF_GAME_WORKING | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO,
NULL, kofse2k4RomInfo, kofse2k4RomName, neogeoInputInfo, neogeoDIPInfo,
kofse2k4Init, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};

// The King of Fighters Special Edition 2004 Plus! (hack)

static struct BurnRomInfo kfs2k4plRomDesc[] = {
{"2k4-p1p.bin",0x200000, 0xed97c684, 0x10}, //  0 68K code (scrambled)
{"2k4-p2p.bin",0x400000, 0xe6c50566, 0x10}, //  1 (is the same as 2k4-p1.bin)

{"2k4-s1p.bin",0x020000, 0xcc0ab564,    1}, //  2 Text data (scrambled)

{"2k4-c1.bin", 0x800000, 0x7a050288,    1}, //  3 Sprite data
{"2k4-c2.bin", 0x800000, 0xe924afcf,    1}, //  4
{"2k4-c3.bin", 0x800000, 0x959fad0b,    1}, //  5
{"2k4-c4.bin", 0x800000, 0xefe6a468,    1}, //  6
{"2k4-c5.bin", 0x800000, 0x74bba7c6,    1}, //  7
{"2k4-c6.bin", 0x800000, 0xe20d2216,    1}, //  8
{"2k4-c7.bin", 0x800000, 0xfa705b2b,    1}, //  9
{"2k4-c8.bin", 0x800000, 0x2c912ff9,    1}, //  10

{"2k4-m1.bin", 0x020000, 0x5a47d9ad, 0x10}, //  11 Z80 code

{"2k4-v1.bin", 0x800000, 0xb887d287,    2}, //  12 Sound data
{"2k4-v2.bin", 0x800000, 0x8ad2edbd,    2}, //  13
};

STDROMPICKEXT(kfs2k4pl, kfs2k4pl, neogeo);
STD_ROM_FN(kfs2k4pl);

static void kfs2k4plDecrypt()
{
// Thanks to KanyEr0 for the info, init by FerchogtX
unsigned char *src = Neo68KROM01;
unsigned char *dst = (unsigned char*)malloc(0x600000);
/* P1-ROM is scrambled in 128 chunks, so we load them
  in the correct places, the second MB isn't loaded
  because has only repeated data */
memcpy( dst+0x000000, src+0x1A0000, 0x020000 ); // 128 KB
memcpy( dst+0x020000, src+0x080000, 0x020000 ); // 128 KB
memcpy( dst+0x040000, src+0x140000, 0x020000 ); // 128 KB
memcpy( dst+0x060000, src+0x000000, 0x020000 ); // 128 KB
memcpy( dst+0x080000, src+0x180000, 0x020000 ); // 128 KB
memcpy( dst+0x0A0000, src+0x0A0000, 0x020000 ); // 128 KB
memcpy( dst+0x0C0000, src+0x100000, 0x020000 ); // 128 KB
memcpy( dst+0x0E0000, src+0x040000, 0x020000 ); // 128 KB
/* Now we descramble P2-ROM and load it after the
  1st MB of P1-ROM, is the same as kofse2k4's P1-ROM */
memcpy( dst+0x100000, src+0x500000, 0x100000 ); // 1 MB
memcpy( dst+0x200000, src+0x400000, 0x100000 ); // 1 MB
memcpy( dst+0x300000, src+0x300000, 0x100000 ); // 1 MB
memcpy( dst+0x400000, src+0x200000, 0x100000 ); // 1 MB
/* Finally, the whole ROM is copied in memory with
  the correct data */
memcpy( src, dst, 0x600000 ); // last MB is dummy data
free(dst);
}

static int kfs2k4plInit()
{
pNeoInitCallback = kfs2k4plDecrypt;
nADPCMByteswap = 7;
nNeoTextROMFixType = 3;
return NeoInit();
}

struct BurnDriver BurnDrvkfs2k4pl = {
{"kfs2k4pl", "The King of Fighters Special Edition 2004 Plus! (hack)", "Hack of kofse2k4", "Dragon Co.", "Neo Geo", "2004", "kofse2k4", "neogeo"},
BDF_GAME_WORKING | BDF_BOOTLEG | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO,
NULL, kfs2k4plRomInfo, kfs2k4plRomName, neogeoInputInfo, neogeoDIPInfo,
kfs2k4plInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
in neogeo.h add this:
Code: [Select]
extern int nADPCMByteswap;in neo_run.cpp look for this:
Code: [Select]
int nNeoSRAMProtection = -1;add this after:
Code: [Select]
int nADPCMByteswap = 0; // Simple byteswap for svcboot and clones/matrim and clonesnow look for this:
Code: [Select]
if (BurnDrvGetHardwareCode() & HARDWARE_SNK_SWAPV) {
for (int i = 0; i < 0x00200000; i++) {
unsigned char n = YM2610ADPCMAROM[i];
YM2610ADPCMAROM[i] = YM2610ADPCMAROM[0x00200000 + i];
YM2610ADPCMAROM[0x00200000 + i] = n;
}
}
}
or look for any IQ_132 PCM2 codes and add this after:
Code: [Select]
// This is for kofse2k4
if (nADPCMByteswap == 5) {
// load the roms in the correct order
BurnLoadRom(YM2610ADPCMAROM+0x000000, 14, 1); // V2->V1
BurnLoadRom(YM2610ADPCMAROM+0x800000, 13, 1); // V1->V2
}
// This is for kfs2k4pl
if (nADPCMByteswap == 7) {
// load the roms in the correct order
BurnLoadRom(YM2610ADPCMAROM+0x000000, 13, 1); // V2->V1
BurnLoadRom(YM2610ADPCMAROM+0x800000, 12, 1); // V1->V2
}
in neoexit() function add this:
Code: [Select]
nADPCMByteswap  = 0;for NeoTextROMFixType refer to the according thread in the forum
See ya!!!!! :D
P.D. The roms can be found in a chinisse forum called PPX BBS... i don't know if i can post the url here so, search by yourself
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: James33 on January 12, 2005, 04:20:07 AM
Dam I know the forum But i cannot read it :( So it looks like I have to wait longer .
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: JiMMy_PaGe on January 12, 2005, 07:59:33 AM
Good work ferchogtx ! :D :D
BTW, i tried to create a code for it too, but when i saw alot equal 128kb chunks i give it out lol, thanks for the code bro  ;)
See ya  :cool:
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: JiMMy_PaGe on January 12, 2005, 09:22:06 AM
Here's a small modification i made on iq's code, to run the p1 on the first part:
Code: [Select]
{"2k4-p1.bin", 0x400000, 0xe6c50566, 0x10}, //  0 68K code
        {"2k4-p2.bin", 0x080000, 0x21a84084, 0x10}, //  1
{"2k4-p3.bin", 0x080000, 0xfebb484e, 0x10}, //  2


Code: [Select]
static void kofse2k4Decrypt()
/* Converted to FBA code by IQ_132 (bbs.romshare.net)
 Small modification by JiMMy_PaGe (www.neofighters.com.br)*/
{
unsigned char* src = Neo68KROM01;
unsigned char* dst = (unsigned char*)malloc(0x500000);

int sec[] = {0x400000,0x300000,0x200000,0x100000,0x000000};
if (dst)
{
memcpy(dst,src,0x500000);

for(int i = 0; i < 5; ++i)
{
memcpy(src+i*0x100000,dst+sec[i],0x100000);
}
free(dst);
}
}
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: bms888 on January 12, 2005, 11:51:22 PM
Good,everybody!

It's my nADPCMByteswap code,maybe small, just 1 - 4, not  1 - 7,^_^.

Code: [Select]

// This is for matrimbl and clones
if (nADPCMByteswap == 1) {
/* Here only 2 sample ROMs have byteswap,
so we divide the function in two processes */
unsigned char* rom = YM2610ADPCMAROM;

BurnByteswap(rom+0x400000, 0x400000); // V2
BurnByteswap(rom+0xC00000, 0x400000); // V4
}

// This is for svcboot/svcplus/svcplusa/svcsplus and clones
if (nADPCMByteswap == 2) {
// load the roms in the correct order
int sec[] = { 0x01, 0x00, 0x03, 0x02 }; // part 2->1->4->3

int i, rom_size = 0x1000000;
unsigned char* rom = YM2610ADPCMAROM;
unsigned char* buf = (unsigned char*)malloc( rom_size );

memcpy( buf, rom, rom_size);
for( i=0; i<4; i++){
memcpy( rom+i*0x400000, buf+sec[i]*0x400000, 0x400000);
}
BurnByteswap(rom, rom_size);

free( buf );
}

// This is for kofsp2k4 & kfs2k4pl
if (nADPCMByteswap == 3) {
// load the roms in the correct order
unsigned char* rom = YM2610ADPCMAROM;
unsigned char* buf = (unsigned char*)malloc( 0x1000000 );

memcpy(buf+0x000000, rom+0x800000, 0x800000); // V2->V1
memcpy(buf+0x800000, rom+0x000000, 0x800000); // V1->V2
memcpy(rom, buf, 0x1000000);
free( buf );
}

// Descramble samsh5bl's V roms (data lines are bitswaped)
if (nADPCMByteswap == 4) {
// Thanks to fataku for the driver
int i, rom_size = 0x1000000;
unsigned char* rom = YM2610ADPCMAROM;
for( i=0; i rom[i] = BITSWAP08(rom[i],0,1,5,4,3,2,6,7);
}
}

Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: bms888 on January 13, 2005, 12:02:20 AM
Quote from: FerchogtX
Maye this can help you to add this games, they use it's original lyouts, at least the normal version does, i'm not sire about the plus bootleg, Thanks to KanyEr0 for the infos...

Code: [Select]
nADPCMByteswap  = 0;
for NeoTextROMFixType refer to the according thread in the forum
See ya!!!!! :D
P.D. The roms can be found in a chinisse forum called PPX BBS... i don't know if i can post the url here so, search by yourself


The King of Fighters Special Edition 2004 Plus! (hack), why i can't find kfs2k4pl roms in PPX bbs? ^_^. the URL ?
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: James33 on January 13, 2005, 08:20:10 AM
I know its not the right thread but has anyone worked out the Mame driver for this game ?

My Mame driver does not seem to work :(
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: X-or on January 13, 2005, 09:29:17 AM
Quote from: James33
I know its not the right thread but has anyone worked out the Mame driver for this game ?

My Mame driver does not seem to work :(


post your driver on mame section, I'll fix it
btw I wish you would stop posting mame code on the fba section you all  :mad:
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: FerchogtX on January 13, 2005, 12:10:30 PM
bms... your code is outdated, svcboot and clones load the roms dyrectly, they doesn't have a descrambling chip as you have, this must be the complete and more accurate code (more cases but is correct)
Code: [Select]
/* Thanks to fataku and IQ_132 for the info */
/* This is for matrimbl */
if (nADPCMByteswap == 1) {
/* Here only 2 sample ROMs have byteswap,
so we divide the function in two processes */
BurnByteswap(YM2610ADPCMAROM+0x400000, 0x400000); // V2
BurnByteswap(YM2610ADPCMAROM+0xc00000, 0x400000); // V4
}
/* This is for svcboot and clones */
if (nADPCMByteswap == 2) {
// svcboot
BurnLoadRom(YM2610ADPCMAROM+0x000000, 12, 1); // V2->V1
BurnLoadRom(YM2610ADPCMAROM+0x400000, 11, 1); // V1->V2
BurnLoadRom(YM2610ADPCMAROM+0x800000, 14, 1); // V4->V3
BurnLoadRom(YM2610ADPCMAROM+0xc00000, 13, 1); // V3->V4
BurnByteswap(YM2610ADPCMAROM, 0x1000000);
}
if (nADPCMByteswap == 3) {
// svcplusa/svcsplus
BurnLoadRom(YM2610ADPCMAROM+0x000000, 13, 1); // V2->V1
BurnLoadRom(YM2610ADPCMAROM+0x400000, 12, 1); // V1->V2
BurnLoadRom(YM2610ADPCMAROM+0x800000, 15, 1); // V4->V3
BurnLoadRom(YM2610ADPCMAROM+0xc00000, 14, 1); // V3->V4
BurnByteswap(YM2610ADPCMAROM, 0x1000000);
}
if (nADPCMByteswap == 4) {
// svcplus
BurnLoadRom(YM2610ADPCMAROM+0x000000, 14, 1); // V2->V1
BurnLoadRom(YM2610ADPCMAROM+0x400000, 13, 1); // V1->V2
BurnLoadRom(YM2610ADPCMAROM+0x800000, 16, 1); // V4->V3
BurnLoadRom(YM2610ADPCMAROM+0xc00000, 15, 1); // V3->V4
BurnByteswap(YM2610ADPCMAROM, 0x1000000);
}
// This is for kofse2k4
if (nADPCMByteswap == 5) {
// load the roms in the correct order
BurnLoadRom(YM2610ADPCMAROM+0x000000, 14, 1); // V2->V1
BurnLoadRom(YM2610ADPCMAROM+0x800000, 13, 1); // V1->V2
}
// Descramble samsh5bl's V roms (data lines are bitswaped)
if (nADPCMByteswap == 6) {
// Thanks to fataku for the driver
for(int i=0; i<0x1000000; i++) {
YM2610ADPCMAROM[i] = BITSWAP08(YM2610ADPCMAROM[i],0,1,5,4,3,2,6,7);
}
}
// This is for kfs2k4pl
if (nADPCMByteswap == 7) {
// load the roms in the correct order
BurnLoadRom(YM2610ADPCMAROM+0x000000, 13, 1); // V2->V1
BurnLoadRom(YM2610ADPCMAROM+0x800000, 12, 1); // V1->V2
}
See ya!!!!! :D
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: bms888 on January 13, 2005, 08:25:50 PM
Quote from: FerchogtX
bms... your code is outdated, svcboot and clones load the roms dyrectly, they doesn't have a descrambling chip as you have, this must be the complete and more accurate code (more cases but is correct)
Code: [Select]
/* This is for svcboot and clones */
if (nADPCMByteswap == 2) {
// svcboot
BurnLoadRom(YM2610ADPCMAROM+0x000000, 12, 1); // V2->V1
BurnLoadRom(YM2610ADPCMAROM+0x400000, 11, 1); // V1->V2
BurnLoadRom(YM2610ADPCMAROM+0x800000, 14, 1); // V4->V3
BurnLoadRom(YM2610ADPCMAROM+0xc00000, 13, 1); // V3->V4
BurnByteswap(YM2610ADPCMAROM, 0x1000000);
}
if (nADPCMByteswap == 3) {
// svcplusa/svcsplus
BurnLoadRom(YM2610ADPCMAROM+0x000000, 13, 1); // V2->V1
BurnLoadRom(YM2610ADPCMAROM+0x400000, 12, 1); // V1->V2
BurnLoadRom(YM2610ADPCMAROM+0x800000, 15, 1); // V4->V3
BurnLoadRom(YM2610ADPCMAROM+0xc00000, 14, 1); // V3->V4
BurnByteswap(YM2610ADPCMAROM, 0x1000000);
}
if (nADPCMByteswap == 4) {
// svcplus
BurnLoadRom(YM2610ADPCMAROM+0x000000, 14, 1); // V2->V1
BurnLoadRom(YM2610ADPCMAROM+0x400000, 13, 1); // V1->V2
BurnLoadRom(YM2610ADPCMAROM+0x800000, 16, 1); // V4->V3
BurnLoadRom(YM2610ADPCMAROM+0xc00000, 15, 1); // V3->V4
BurnByteswap(YM2610ADPCMAROM, 0x1000000);
}
See ya!!!!! :D

outdated? complete and more accurate code? of course not,plz use your FBAP with my and your nADPCMByteswap code to save decrypt svcboot V-roms,then you known.See ya!!!!!

the CRC result is:
269-v1b.bin with your code,269-v1d.bin with my code.
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: bms888 on January 13, 2005, 08:30:35 PM
FerchogtX, The King of Fighters Special Edition 2004 Plus! (hack), why i can't find kfs2k4pl roms in PPX bbs? ^_^. can you make a patch? THX.
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: bms888 on January 13, 2005, 08:33:24 PM
FBASP original svcboot m&v code is here,^_^.

Code: [Select]

static void svcbsoundfix()
{ UINT8 *src = (UINT8 *)malloc(0x20000);
UINT8 *dst=(UINT8 *)NeoZ80ROM;
if(src)
{memcpy(src,dst,0x20000);
memcpy(dst,src+0x10000,0x10000);
memcpy(dst+0x10000,src,0x10000);
  free(src);
}
src=(UINT8 *)malloc(0x400000);
if(src)
{memcpy(src,YM2610ADPCMAROM,0x400000);
memcpy(YM2610ADPCMAROM,YM2610ADPCMAROM+0x400000,0x400000);
memcpy(YM2610ADPCMAROM+0x400000,src,0x400000);
memcpy(src,YM2610ADPCMAROM+0x800000,0x400000);
memcpy(YM2610ADPCMAROM+0x800000,YM2610ADPCMAROM+0xc00000,0x400000);
memcpy(YM2610ADPCMAROM+0xc00000,src,0x400000);
        free(src);
}
for(int i=0;i<0x1000000;i+=2)
{unsigned char n = YM2610ADPCMAROM[i];
YM2610ADPCMAROM[i] = YM2610ADPCMAROM[1 + i];
YM2610ADPCMAROM[1 + i] = n;
}
}
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: bms888 on January 13, 2005, 08:36:07 PM
FBASP original matrimbl v code is here,^_^.

Code: [Select]

static void matrimblsoundfix()
{
for(int i=0x400000;i<0x800000;i+=2)
{unsigned char n = YM2610ADPCMAROM[i];
YM2610ADPCMAROM[i] = YM2610ADPCMAROM[1 + i];
YM2610ADPCMAROM[1 + i] = n;
}
for(int i=0xc00000;i<0x1000000;i+=2)
{unsigned char n = YM2610ADPCMAROM[i];
YM2610ADPCMAROM[i] = YM2610ADPCMAROM[1 + i];
YM2610ADPCMAROM[1 + i] = n;
}
}
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: FerchogtX on January 14, 2005, 12:06:55 AM
thats stange, i get the old watermarked v1d and v2d with my code... i tested it when i added it... is strange really  :eek: BTW i also get good sound...
As far as i can see in the pic if you split tha v1 you get the roms BTW... maybe the descrambling is not made by default... XD this strange
See ya!!!! :D
P.D. Anyway you need to load the roms in the correct places, not to descramble them, because sbcboot and clones doesn't have a descrambling chip for this
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: FerchogtX on January 14, 2005, 12:22:22 AM
Wow... i didn't saw that codes... maybe from fbasp you can get the second bankswitch code needed for svcchaos and kof2003, that could help us finally to get rid of patches codes
See ya!!!!!! :D
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: bms888 on January 14, 2005, 09:08:41 PM
OK,my kfs2k4pl FBA code is here:

Code: [Select]

// The King of Fighters Special Edition 2004 Plus! (hack)

static struct BurnRomInfo kfs2k4plRomDesc[] = {
{"2k4-p1p.bin",0x200000, 0xed97c684, 0x10}, //  0 68K code (scrambled)
{"2k4-p2p.bin",0x400000, 0xe6c50566, 0x10}, //  1 (is the same as 2k4-p1.bin)


Code: [Select]

static void kfs2k4pl_px_decrypt()
{
int sec[] = { 0x0D, 0x04, 0x0A, 0x00, 0x0C, 0x05, 0x08, 0x02,
  0x0F, 0x06, 0x0B, 0x01, 0x0E, 0x07, 0x09, 0x03 };
int sed[] = { 0x00, 0x05, 0x04, 0x03, 0x02 };

int i, rom_size = 0x200000;
UINT8 *src = Neo68KROM01;
UINT8 *dst = (UINT8 *)malloc(rom_size);

memcpy(dst, src, rom_size);
for( i=0; i<0x10; i++){
memcpy(src+i*0x20000, dst+sec[i]*0x20000, 0x20000);
}

dst = (UINT8 *)malloc(0x600000);

memcpy(dst, src, 0x600000); // last 1MB data same as first 1MB, only repeated data
for( i=0; i<6; i++){
memcpy(src+i*0x100000, dst+sed[i]*0x100000, 0x100000);
}

free( dst );
}
Title: Try this hack version as well.
Post by: KingHanco on January 23, 2005, 12:23:36 AM
You may want to write this out on fba driver.

Code: [Select]
kof2k4xx.zip - 39.2mb - Different sets than the "The King Of The Fighters Speical Edition 2004 (hacked) from winkawaks 1.53 (kfs2k4pl.zip)"

This have an website - and the other one doesn't.

2k4-c1.bin / 7a050288 / 8.0mb
2k4-c2.bin / e924afcf / 8.0mb
2k4-c3.bin / 959fad0b / 8.0mb
2k4-c4.bin / efe6a468 / 8.0mb
2k4-c5.bin / 74bba7c6 / 8.0mb
2k4-c6.bin / e20d2216 / 8.0mb
2k4-c7.bin / fa705b2b / 8.0mb
2k4-c8.bin / 2c912ff9 / 8.0mb
2k4-m1.bin / 5a47d9ad / 128.0kb
2k4-p1.bin / 7d93c380 / 1.0mb
2k4-p2.bin / 698679a7 / 4.0mb
2k4-s1.bin / a3c9b2d8 / 128.0kb
2k4-v1.bin / 8991f6e9 / 4.0mb
2k4-v2.bin / 511e4d2f / 4.0mb
2k4-v3.bin / 1dd8b53a / 4.0mb
2k4-v4.bin / 63bb5462 / 4.0mb

Don't talk to Jan or Raz about this hacked version. They doesn't have anything to do with this version. This is dump and then hacked by Romman. I almost gotting kick out of mIRC talking to them about it. At first they doesn't beleave me until I gave them the info about this. Raz deleted the email and didn't even see the screenshot of this version. They clam this is remade on graphics which I beleave also.

Btw: Here is the note that came with the japanese hacked kawaks.

Code: [Select]
ネサハ2004イリチ昀ヤサ「」ィネサハ2002フリア゙クトー譽ゥ

-------------------------------------------------------------------------。・

ヌ・ケモテLoadNowタエヤヒミミト」ト簇ャネ郢鈺羞トマオヘウヨミテサモミーイラーモミノィサヌノィモミケハユマ」ャKAWAKSト」ト簇ォイサトワヤヒミミ。」
ヤリネ・ホマキコエマツF7タエカチネ。メムセノ靹テコテオトエ豬オ」ャシ、サ錝ヒボマ゙ヘカアメコヘメサミゥメイリオトム。マ釭」
ネ郢鈺羝ヤUNI-BIOSオトハケモテキスキィイサハヌコワヌ蟲オトサー」ャヌ・サメェツメミ゙クト」ャウヨホハフ篌・簷ケヒACKUP.RARユ篋トシ」ャヨリミツクイクヌ。」

-------------------------------------------------------------------------。・

サセソリヨニ」コ
F1」スヨリヨテモホマキ
F2」ススヨサ嶹ヤ
F5」スア」エ貎ネ
F7」スヤリネ・ネ
TAB」スメイリト」ト簇ーソレイヒオ・

Ctrl+P」スキヌケツヒラ・ヘシ
Ctrl+Alt+P」スケツヒラ・ヘシ
ラ・ヘシコトホトシエ豺ナヤレCAPTUREホトシシミトレ」ャソノメヤモテToolsイヒオ・ヨミオトラ・ヘシケ、ウァオ鉷シニャオトマクスレ。」

-------------------------------------------------------------------------。・

Enter」スヤンヘ」
Alt+Enter」スネォニチト」ハス
Ctrl+1」スア・シエーソレアネタ
Ctrl+2」ス2アカエーソレアネタ」ィトャネマ」ゥ
Ctrl+3」ス3アカエーソレアネタ
Shift+1」スボ葷ネセ
Shift+2」ススサフ貂ミノィテ・
Shift+3」スネ晴チスアカキナエ・
Shift+4」スア゚ヤオソケセ箋ン」ィチスアカニスサャ」ゥ
Shift+5」スセリユォマ゚ケツヒ
Shift+6」スヤソクミノィテ・

1」ス1Pソェハシ」サネヒホ・菻。
2」ス1Pヘカアメ

W/S/A/D/」ス。・。/。・。・
J/K/U/I」スA/B/C/D
O」スB+C
L」スA+B+C+D
Y」スA+C
H」スB+D

-------------------------------------------------------------------------。・

UNI-BIOSソリヨニ」コ

*ヤレマヤハセUNI-BIOSサテ豬トハアコエシ・
A」ォB」ォC」スBIOSヨヒオ・」ィラヤカィメ螢ゥ
A」ォB」ォC」ォD」スシヌメ菫ィケワタ・

*ヤレモホマキスミオトハアコエシ・
ソェハシ」ォヘカアメ=モホマキ」ィオヤ」ゥイヒオ・
ソェハシ」ォA」ォB」ォC=モホマキ」ィオヤ」ゥイヒオ・

ヤレBIOSヨヒオ・ヨミソノメヤクトア萇ヘモ・ヤム。マ釤ャConsoleホェシメモテト」ハス」ャArcadeホェスヨサ愷」ハス」ササケトワハケモテJukeBoxイ・キナモホマキオトネォイソメヨコヘノァ」サヤレオヤイヒオ・ヨミモミトレヨテオトCheats」ィスヨヨク」ゥケヲトワ」ャソノメヤソェニェミネ。「ボマ゙ヘカアメコヘメサミゥフリハ箏トミァケ蠇」

-------------------------------------------------------------------------。・

ホメテヌヘニシトラ錡ムオトモホマキニスフィハヌWindowsXP」ォSP2」ャホネカィミヤコヘシ貶ンミヤキヌウ」ウォ」サキヌシ袒ミホトマオヘウオトヘ貍メヌ・ケモテMicrosoft AppLocaleケ、セ゚ネ晴タエヤヒミミモホマキ」ィウフミゥ。」

ノ貍ーエヒト」ト簇ヘROMオトミ゙クトア默・ャエソハヒマイコテ」ャイサオテモテモレネホコホノフメオモテヘセ」ャイ「ヤレムミセソ。「ハヤヘ贍ョコャチ「シエノセウアセウフミサモ・ョキ「ノ嶹トネホコホホハフ簑カモ鉸「イサクコヤャフリエヒヨ」ヨリノ・。」。」。」。

-------------------------------------------------------------------------。・

タカノォモ靑・
QQ」コ181843092
ICQ」コ225596168

Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: iq_132 on January 23, 2005, 01:50:12 AM
Meh... screw hacked sets.
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: James33 on January 23, 2005, 04:51:55 AM
I no longer care about these hacks And I sort of see why they might ban you from there IRC channel.
Title: Re:
Post by: KingHanco on January 24, 2005, 10:09:28 PM
Quote from: James33
I no longer care about these hacks And I sort of see why they might ban you from there IRC channel.


Well they thought that I was a liar over this hacked version. Until they wakeup reading the into and decident not to kick me off. Which is they didn't know about this version that Romman redid the graphics and some other stuffs. Romman did tookoff the neogeo on the screen and replace it with 2 dots. The highscore screen also was hacked by Romman. I don't blame anyone that don't want this version that redid by Romman. Romman did broke the copyrights though. :)
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: iq_132 on January 24, 2005, 10:58:05 PM
The copyrights on that game were already broken.  Romman was just being an attention whore by branding the whole game with his stupid web address.
Honestly... It's not hard to make a neogeo game say something else; just open it up in a hex editor and swap your letters -- example = xemalp e
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: iq_132 on January 28, 2005, 01:39:52 AM
Just wrote this code:

Code: [Select]

static void kof2k4se_dec()
{
int i;
unsigned char *src = (unsigned char*)Neo68KROM;
unsigned char *dst = (unsigned char*)malloc(0x500000);

memcpy(dst, src, 0x500000);

for (i = 0; i < 5; i+=1)
{
memcpy(src+i*0x100000, dst+0x400000-i*0x100000, 0x100000);
}
}


For these P roms:
Code: [Select]
{"2k4-p1.bin", 0x400000, 0xe6c50566, 1 | BRF_ESS | BRF_PRG }, //  0 68K code
{"2k4-p2.bin", 0x080000, 0x21a84084, 1 | BRF_ESS | BRF_PRG }, //  1
{"2k4-p3.bin", 0x080000, 0xfebb484e, 1 | BRF_ESS | BRF_PRG }, //  2
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: Shoometsu on February 15, 2005, 06:46:56 PM
I'm using this driver:

Code: [Select]
static struct BurnRomInfo kofse2k4RomDesc[] = {
{"k2k4s-p1.bin", 0x400000, 0xe6c50566, 1 | BRF_ESS | BRF_PRG }, //  1 68K code (Scrambled)
{"k2k4s-p2.bin", 0x080000, 0x21a84084, 1 | BRF_ESS | BRF_PRG }, //  2
{"k2k4s-p3.bin", 0x080000, 0xfebb484e, 1 | BRF_ESS | BRF_PRG }, //  3

{"k2k4s-s1.bin", 0x020000, 0xA3C9B2D8, 2 | BRF_GRA }, //  4 Text layer tiles

{"k2k4s-c1.bin", 0x800000, 0x7A050288, 3 | BRF_GRA }, //  5 Sprite data
{"k2k4s-c2.bin", 0x800000, 0xE924AFCF, 3 | BRF_GRA }, //  6
{"k2k4s-c3.bin", 0x800000, 0x959FAD0B, 3 | BRF_GRA }, //  7
{"k2k4s-c4.bin", 0x800000, 0xEFE6A468, 3 | BRF_GRA }, //  8
{"k2k4s-c5.bin", 0x800000, 0x74BBA7C6, 3 | BRF_GRA }, //  9
{"k2k4s-c6.bin", 0x800000, 0xE20D2216, 3 | BRF_GRA }, //  10
{"k2k4s-c7.bin", 0x800000, 0xFA705B2B, 3 | BRF_GRA }, //  11
{"k2k4s-c8.bin", 0x800000, 0x2C912FF9, 3 | BRF_GRA }, //  12

{"k2k4s-m1.bin", 0x020000, 0x5A47D9AD, 4 | BRF_ESS | BRF_PRG }, //  13 Z80 code

{"k2k4s-v1.bin", 0x800000, 0xB887D287, 5 | BRF_SND }, //  14 Sound data
{"k2k4s-v2.bin", 0x800000, 0x8AD2EDBD, 5 | BRF_SND }, //  15
};

STDROMPICKEXT(kofse2k4, kofse2k4, neogeo);
STD_ROM_FN(kofse2k4);

// Code by IQ_132

static void kofse2k4Decrypt()
{
int i;
unsigned char *src = (unsigned char*)Neo68KROM;
unsigned char *dst = (unsigned char*)malloc(0x500000);

memcpy(dst, src, 0x500000);

for (i = 0; i < 5; i+=1)
{
memcpy(src+i*0x100000, dst+0x400000-i*0x100000, 0x100000);
}
}

//

static int kofse2k4Init()
{
pNeoInitCallback=kofse2k4Decrypt;
nADPCMByteswap = 4;

return NeoInit();
}

struct BurnDriver BurnDrvkofse2k4 = {
"kofse2k4", NULL, "neogeo", "2004",
"The King of Fighters Special Edition 2004\0", NULL, "Dragon", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO,
NULL, kofse2k4RomInfo, kofse2k4RomName, neogeoInputInfo, neogeoDIPInfo,
kofse2k4Init, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};

in fba 0.2.95.23:

but I got a guru meditation when loads the p roms, but if i deactivate the s1 the game loads without any problem :eek:
Title: The King of Fighters Special Edition 2004 (hack & Plus drivers)
Post by: Shoometsu on February 15, 2005, 09:16:58 PM
problem solved, it was just a corrupted zip file :D

thnaks for help Jimmy_Page XD
working driver in fba 0.2.95.23

Code: [Select]
// The King of Fighters Special Edition 2004 (Bootleg)
// ================================================================================
/* Hack of The King of Fighters 2002 like cthd2003, but this cart only have a litle
   disorder in the 68K... p1 is p2 and is scrambled and p2 and p3 are the 1st and
   2nd chunks of p1 respectivectly, only 4 C-ROMs, s1, v-ROMs, m1 and p-ROMs have
   changed, the others come from kof2k2nd set... not really a good hack BTW */
// ================================================================================

static struct BurnRomInfo kofse2k4RomDesc[] = {
{"k2k4s-p1.bin", 0x400000, 0xe6c50566, 1 | BRF_ESS | BRF_PRG }, //  0 68K code (Scrambled)
{"k2k4s-p2.bin", 0x080000, 0x21a84084, 1 | BRF_ESS | BRF_PRG }, //  1
{"k2k4s-p3.bin", 0x080000, 0xfebb484e, 1 | BRF_ESS | BRF_PRG }, //  2

{"k2k4s-s1.bin", 0x020000, 0xA3C9B2D8, 2 | BRF_GRA }, //  3 Text layer tiles

{"k2k4s-c1.bin", 0x800000, 0x7A050288, 3 | BRF_GRA }, //  4 Sprite data
{"k2k4s-c2.bin", 0x800000, 0xE924AFCF, 3 | BRF_GRA }, //  5
{"k2k4s-c3.bin", 0x800000, 0x959FAD0B, 3 | BRF_GRA }, //  6 kof2k2nd's c3
{"k2k4s-c4.bin", 0x800000, 0xEFE6A468, 3 | BRF_GRA }, //  7 kof2k2nd's c4
{"k2k4s-c5.bin", 0x800000, 0x74BBA7C6, 3 | BRF_GRA }, //  8 kof2k2nd's c5
{"k2k4s-c6.bin", 0x800000, 0xE20D2216, 3 | BRF_GRA }, //  9 kof2k2nd's c6
{"k2k4s-c7.bin", 0x800000, 0xFA705B2B, 3 | BRF_GRA }, //  10
{"k2k4s-c8.bin", 0x800000, 0x2C912FF9, 3 | BRF_GRA }, //  11

{"k2k4s-m1.bin", 0x020000, 0x5A47D9AD, 4 | BRF_ESS | BRF_PRG }, //  12 Z80 code

{"k2k4s-v1.bin", 0x800000, 0xB887D287, 5 | BRF_SND }, //  13 Sound data
{"k2k4s-v2.bin", 0x800000, 0x8AD2EDBD, 5 | BRF_SND }, //  14
};

STDROMPICKEXT(kofse2k4, kofse2k4, neogeo);
STD_ROM_FN(kofse2k4);

// Code by IQ_132

static void kofse2k4Decrypt()
{
int i;
unsigned char *src = (unsigned char*)Neo68KROM;
unsigned char *dst = (unsigned char*)malloc(0x500000);

memcpy(dst, src, 0x500000);

for (i = 0; i < 5; i+=1)
{
memcpy(src+i*0x100000, dst+0x400000-i*0x100000, 0x100000);
}
}

//

static int kofse2k4Init()
{
pNeoInitCallback=kofse2k4Decrypt;
nADPCMByteswap = 4;

return NeoInit();
}

struct BurnDriver BurnDrvkofse2k4 = {
"kofse2k4", NULL, "neogeo", "2004",
"The King of Fighters Special Edition 2004\0", NULL, "Dragon", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO,
NULL, kofse2k4RomInfo, kofse2k4RomName, neogeoInputInfo, neogeoDIPInfo,
kofse2k4Init, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};