Welcome!

Final Burn Neo => FBN Development => Topic started by: iq_132 on November 08, 2004, 12:38:49 AM

Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: iq_132 on November 08, 2004, 12:38:49 AM
In your kof2003b (bootleg) driver change this:

Code: [Select]
static void kof2003bWriteBankSwitch(unsigned int sekAddress,unsigned short wordValue,unsigned short valueMask)
{
int address=(sekAddress-0x2fe000)/2,bankaddress;
kof2003b_tbl[address]=(wordValue&valueMask)|(~valueMask&kof2003b_tbl[address]);
if(address!=0xff8 && address!=0xff9 ) return;
bankaddress=(kof2003b_tbl[0xff8]>>8)|(kof2003b_tbl[0xff9]<<8);
*(((unsigned char *)kof2003b_tbl)+0x1ff0)=0xa0;
*(((unsigned char *)kof2003b_tbl)+0x1ff1)&=0xfe;
*(((unsigned char *)kof2003b_tbl)+0x1ff3)&=0x7f;
SekMapMemory(Neo68KROM02+bankaddress,0x200000,0x2fdfff,SM_ROM);
Neo68KROM01[0x58196]=kof2003b_tbl[0xff9]&0xff;
}


to this:

Code: [Select]
static void kof2003bWriteBankSwitch(unsigned int sekAddress,unsigned short wordValue,unsigned short valueMask)
{
int address=(sekAddress-0x2fe000)/2,bankaddress;
kof2003b_tbl[address]=(wordValue&valueMask)|(~valueMask&kof2003b_tbl[address]);
if(address!=0xff8 && address!=0xff9 ) return;
// Make this universal for kof2003b + kof2003p
if ((!strcmp(BurnDrvText(0), "kof2003p")) || (!strcmp(BurnDrvText(0), "kof2k4ex")) || (!strcmp(BurnDrvText(0), "kf2k3pls"))) {
bankaddress=(kof2003b_tbl[0xff8])|(kof2003b_tbl[0xff9]<<8);
*(((unsigned char *)kof2003b_tbl)+0x1ff0)&=0xfe;
*(((unsigned char *)kof2003b_tbl)+0x1ff3)&=0x7f;
} else {
bankaddress=(kof2003b_tbl[0xff8]>>8)|(kof2003b_tbl[0xff9]<<8);
*(((unsigned char *)kof2003b_tbl)+0x1ff0)=0xa0;
*(((unsigned char *)kof2003b_tbl)+0x1ff1)&=0xfe;
*(((unsigned char *)kof2003b_tbl)+0x1ff3)&=0x7f;
}
SekMapMemory(Neo68KROM02+bankaddress,0x200000,0x2fdfff,SM_ROM);
Neo68KROM01[0x58196]=kof2003b_tbl[0xff9]&0xff;
}


These may or may not match your sets.  Just change them to
Code: [Select]
// The King of Fighters 2003 (ex plus)

static struct BurnRomInfo kof2003pRomDesc[] = {
{"271-p1p.bin", 0x100000, 0xDACF5B2D, 0x10}, //  0 68K code
{"271-p2p.bin", 0x200000, 0x0d0a5861, 0x10}, //  1
{"271-p3p.bin", 0x400000, 0x92ed6ee3, 0x10}, //  2

{"kof2k3_s1.rom", 0x020000, 0xA5D78A9A,  1}, // 3 Text data
// {"271-s1p.bin", 0x020000,  0xD168751D,    1}, //  3 (unibios fix)

{"271-c1d.bin", 0x1000000, 0xC29ACD28,    1}, //  4 Sprite data
{"271-c2d.bin", 0x1000000, 0x328E80B1,    1}, //  5
{"271-c3d.bin", 0x1000000, 0x020A11F1,    1}, //  6
{"271-c4d.bin", 0x1000000, 0x991B5ED2,    1}, //  7
// {"271-c5d.bin", 0x1000000, 0xc2de8b66,    1}, //  8
// {"271-c6d.bin", 0x1000000, 0x3ff750db,    1}, //  9

{"271-m1d.bin", 0x080000, 0x0E86AF8F, 0x10}, //  10 Z80 code

{"271-v1d.bin", 0x1000000, 0x2058EC5E,    2}, //  11 Sound data
};

STDROMPICKEXT(kof2003p, kof2003p, neogeo);
STD_ROM_FN(kof2003p);

static int kof2003pInit()
{
int nRet;

memset(kof2003b_tbl,0,0x2000);

nRet=NeoInit();
if(!nRet)
kof2003bMapHandler();
return nRet;
}

struct BurnDriver BurnDrvkof2003p = {

{"kof2003p", "The King of Fighters 2004 (ex plus)", NULL, "SNK Playmore Corporation", "Neo Geo", "2003", "kof2003", "neogeo"},
BDF_GAME_WORKING | BDF_BOOTLEG | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_NEWBANKSYSTEM,
NULL, kof2003pRomInfo, kof2003pRomName, neogeoInputInfo, neogeoDIPInfo,
kof2003pInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};


// The King of Fighters 2004 (ex plus set 2)

static struct BurnRomInfo kof2k4exRomDesc[] = {
{"271-p1p.bin", 0x100000, 0xDACF5B2D, 0x10}, //  0 68K code
{"271h-p2.bin", 0x200000, 0x8c06e880, 0x10}, //  1
{"271h-p3.bin", 0x400000, 0x96842d45, 0x10}, //  2

{"271-s1p.bin", 0x020000, 0xA5D78A9A,  1}, // 3 Text data
// {"271-s1p.bin", 0x020000,  0xD168751D,    1}, //  3 (unibios fix)

{"271-c1d.bin", 0x1000000, 0xC29ACD28,    1}, //  4 Sprite data
{"271-c2d.bin", 0x1000000, 0x328E80B1,    1}, //  5
{"271-c3d.bin", 0x1000000, 0x020A11F1,    1}, //  6
{"271-c4d.bin", 0x1000000, 0x991B5ED2,    1}, //  7
// {"271-c5d.bin", 0x1000000, 0xc2de8b66,    1}, //  8
// {"271-c6d.bin", 0x1000000, 0x3ff750db,    1}, //  9

{"271-m1d.bin", 0x080000, 0x0E86AF8F, 0x10}, //  10 Z80 code

{"271-v1d.bin", 0x1000000, 0x2058EC5E,    2}, //  11 Sound data
};

STDROMPICKEXT(kof2k4ex, kof2k4ex, neogeo);
STD_ROM_FN(kof2k4ex);

static int kof2k4exInit()
{
int nRet;

memset(kof2003b_tbl,0,0x2000);

nRet=NeoInit();
if(!nRet)
kof2003bMapHandler();
return nRet;
}

struct BurnDriver BurnDrvkof2k4ex = {

{"kof2k4ex", "The King of Fighters 2004 (ex plus set 2)", NULL, "SNK Playmore Corporation", "Neo Geo", "2003", "kof2003", "neogeo"},
BDF_GAME_WORKING | BDF_BOOTLEG | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_NEWBANKSYSTEM,
NULL, kof2k4exRomInfo, kof2k4exRomName, neogeoInputInfo, neogeoDIPInfo,
kof2k4exInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: fataku on November 08, 2004, 01:29:23 AM
You dont need to load the roms C5 and C6, since those roms are used for extract the S1 information in the real game, but this bootleg use a S1 roms so the C5 and C6 are useless.
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: NJ7 on November 08, 2004, 08:25:03 PM
I'm using the below drivers (note: the universal code is not applied), tried to update to this new "universal" code, IQ, but I get compile errors....anyone know how to edit it..... :eek:

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

//==========================================================================
/* This game has its own bios to work, there are different versions of that
   bios that are for certain world region, this game has maybe the same
   encryption method as svcchaos (?) but the text layer is supposed to
   be of 1,048,576 bytes (1 MB) size in which is stored the data for the
   blending effects in the game (like svcchaos, but more "gorgeous")
   68K roms have PCB protection...  */
//==========================================================================

static struct BurnRomInfo kof2003RomDesc[] = {
{"271-bios.bin",0x040000, 0xc521b5bc,  0xD0}, //  D 68K bios
{"271-p1.bin",  0x400000, 0xb9da070c,  0x10}, //  0 68K code
{"271-p2.bin",  0x400000, 0xda3118c4,  0x10}, //  1
//{"271-p3.bin",  0x100000, 0x5cefd0d2,  0x10}, //  2
{"271-p3d.bin", 0x100000, 0x59d376da,  0x10}, //  3

{"271-c1d.bin", 0x1000000, 0xc29acd28,    1}, //  4 Sprite data
{"271-c2d.bin", 0x1000000, 0x328e80b1,    1}, //  5
{"271-c3d.bin", 0x1000000, 0x020a11f1,    1}, //  6
{"271-c4d.bin", 0x1000000, 0x991b5ed2,    1}, //  7
{"271-c5d.bin" ,0x1000000, 0xc2de8b66,    1}, //  8
{"271-c6d.bin" ,0x1000000, 0x3ff750db,    1}, //  9

{"271-m1d.bin", 0x080000, 0x0e86af8f,  0x10}, //  10 Z80 code

{"271-v1d.bin" ,0x1000000, 0x2058ec5e,    2}, //  11 Sound data
};

STDROMPICKEXT(kof2003, kof2003, neogeo);
STD_ROM_FN(kof2003);

static int kof2003Init()
{
//pNeoInitCallback = ?
//nNeoTextROMSize = 0x100000;
return NeoInit();
}

struct BurnDriver BurnDrvkof2003 = {
{"kof2003", "The King of Fighters 2003", "Not working (Neo-PVC Protection not emulated)", "SNK Playmore", "Neo Geo", "2003", NULL, "neogeo"},
0, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ALTERNATE_TEXT,
NULL, kof2003RomInfo, kof2003RomName, neogeoInputInfo, neogeoDIPInfo,
kof2003Init, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};

// The King of Fighter's 2003 (bootleg, set 1)

static struct BurnRomInfo kof2003bRomDesc[] = {
{"271-p1bl.bin", 0x400000, 0x92ed6ee3, 0x10}, //  0 68K code
{"271-p2bl.bin" , 0x400000, 0x5d3d8bb3, 0x10}, //  1 68k code

{"271-s1bl.bin", 0x020000,  0x3ba05252,    1}, //  2 Text layer tiles

{"271-c1d.bin"  , 0x1000000, 0xc29acd28,    1}, //  3 Sprite data
{"271-c2d.bin"  , 0x1000000, 0x328e80b1,    1}, //  4
{"271-c3d.bin"  , 0x1000000, 0x020a11f1,    1}, //  5
{"271-c4d.bin"  , 0x1000000, 0x991b5ed2,    1}, //  6

{"271-m1d.bin"  , 0x080000, 0x0e86af8f, 0x10}, //  7 Z80 code

{"271-v1d.bin"  , 0x1000000, 0x2058ec5e,    2}, //  8 Sound data
};

STDROMPICKEXT(kof2003b, kof2003b, neogeo);
STD_ROM_FN(kof2003b);

static unsigned short kof2003b_tbl[0x1000];


unsigned char __fastcall kof2003bReadByteBankSwitch(unsigned int sekAddress)
{
return *(((unsigned char *)kof2003b_tbl)+((sekAddress^1)-0x2fe000));
}


unsigned short __fastcall kof2003bReadWordBankSwitch(unsigned int sekAddress)
{
return kof2003b_tbl[(sekAddress-0x2fe000)/2];
}

static void kof2003bWriteBankSwitch(unsigned int sekAddress,unsigned short wordValue,unsigned short valueMask)
{
int address=(sekAddress-0x2fe000)/2,bankaddress;
kof2003b_tbl[address]=(wordValue&valueMask)|(~valueMask&kof2003b_tbl[address]);
if(address!=0xff8 && address!=0xff9 ) return;
bankaddress=(kof2003b_tbl[0xff8]>>8)|(kof2003b_tbl[0xff9]<<8);
*(((unsigned char *)kof2003b_tbl)+0x1ff0)=0xa0;
*(((unsigned char *)kof2003b_tbl)+0x1ff1)&=0xfe;
*(((unsigned char *)kof2003b_tbl)+0x1ff3)&=0x7f;
SekMapMemory(Neo68KROM02+bankaddress,0x200000,0x2fdfff,SM_ROM);
Neo68KROM01[0x58196]=kof2003b_tbl[0xff9]&0xff;
}


void __fastcall kof2003bWriteWordBankSwitch(unsigned int sekAddress, unsigned short wordValue)
{
unsigned short valueMask=0xffff;
kof2003bWriteBankSwitch(sekAddress, wordValue, valueMask);
}

void __fastcall kof2003bWriteByteBankSwitch(unsigned int sekAddress, unsigned char byteValue)
{
unsigned short wordValue=0,valueMask=0xff;
if(!(sekAddress&1)) {
wordValue=byteValue<<8;
valueMask<<=8;
}
else{
wordValue=byteValue;
}
kof2003bWriteBankSwitch(sekAddress,wordValue,valueMask);
}

void kof2003b_RomExchange()
{
memcpy(Neo68KROM01+0x100000,Neo68KROM01,0x600000);
memcpy(Neo68KROM01,Neo68KROM01+0x700000,0x100000);
memset(Neo68KROM01+0x700000,0,0x100000);
}

static void kof2003bMapHandler()
{
// Install BankSwitch handler
SekMapHandler(5, 0x2fe000, 0x2fffff, SM_READ);
SekSetReadWordHandler(5,  kof2003bReadWordBankSwitch);
SekSetReadByteHandler(5,  kof2003bReadByteBankSwitch);

SekMapHandler(5, 0x2fe000, 0x2fffff, SM_WRITE);
SekSetWriteWordHandler(5, kof2003bWriteWordBankSwitch);
SekSetWriteByteHandler(5, kof2003bWriteByteBankSwitch);
}

static int kof2003bInit()
{
int nRet;

memset(kof2003b_tbl,0,0x2000);

nTextBankswitch=3;
        pNeoInitCallback=kof2003b_RomExchange;

nRet=NeoInit();
if(!nRet)
kof2003bMapHandler();
return nRet;
}

struct BurnDriver BurnDrvkof2003b = {
{"kof2003b", "The King of Fighters 2003 (bootleg, set 1)", NULL, "SNK Playmore", "Neo Geo", "2003", "kof2003", "neogeo"},
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_NEWBANKSYSTEM,
NULL, kof2003bRomInfo, kof2003bRomName, neogeoInputInfo, neogeoDIPInfo,
kof2003bInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};

// The King of Fighters 2003 (bootleg, set 2)

//==================================================

/* This set seems to have the transparency effects like kof2003 PCB... maybe the first one is an alternate bootleg. The S1 ROM seems to be encrypted and complete (512 KB) maybe from the last Cx ROMs */

//==================================================  

static struct BurnRomInfo kof2k3baRomDesc[] = {
{"271-p1bl.bin", 0x400000,  0x92ed6ee3, 0x10}, //  0 68K code
{"271-p2bl.bin", 0x400000,  0x5d3d8bb3, 0x10}, //  1    

{"271-s1ba.bin" , 0x080000,  0xf4515195,    1}, //  2 Text layer tiles

{"271-c1d.bin" , 0x1000000, 0xc29acd28,    1}, //  3 Sprite data
{"271-c2d.bin" , 0x1000000, 0x328e80b1,    1}, //  4
{"271-c3d.bin" , 0x1000000, 0x020a11f1,    1}, //  5
{"271-c4d.bin" , 0x1000000, 0x991b5ed2,    1}, //  6

{"271-m1d.bin" , 0x080000,  0x0e86af8f, 0x10}, //  7 Z80 code

{"271-v1d.bin" , 0x1000000, 0x2058ec5e,    2}, //  8 Sound data
};

STDROMPICKEXT(kof2k3ba, kof2k3ba, neogeo);
STD_ROM_FN(kof2k3ba);

static int kof2k3baInit()
{
int nRet;

memset(kof2003b_tbl,0,0x2000);

nTextBankswitch=4;
pNeoInitCallback=kof2003b_RomExchange;

nRet=NeoInit();
if(!nRet)
kof2003bMapHandler();
return nRet;
}

struct BurnDriver BurnDrvkof2k3ba = {
{"kof2k3ba", "The King of Fighters 2003 (bootleg, set 2)", NULL, "SNK Playmore", "Neo Geo", "2003", "kof2003", "neogeo"},
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ALTERNATE_TEXT | HARDWARE_SNK_NEWBANKSYSTEM,
NULL, kof2k3baRomInfo, kof2k3baRomName, neogeoInputInfo, neogeoDIPInfo,
kof2k3baInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};

// The King of Fighters 2004 Ex Hero (bootleg, set 1)

static struct BurnRomInfo kof2k4exRomDesc[] = {
{"271h-p1.bin", 0x100000, 0xDACF5B2D, 0x10}, //  0 68K code
{"271h-p3.bin", 0x400000, 0x92ed6ee3, 0x10}, //  2
        {"271h-p2.bin", 0x200000, 0x0D0A5861, 0x10}, //  1

{"271h-s1.bin", 0x020000, 0xA5D78A9A,    1}, //  3 Text layer tiles

{"271-c1d.bin"  , 0x1000000, 0xc29acd28,    1}, //  4 Sprite data
{"271-c2d.bin"  , 0x1000000, 0x328e80b1,    1}, //  5
{"271-c3d.bin"  , 0x1000000, 0x020a11f1,    1}, //  6
{"271-c4d.bin"  , 0x1000000, 0x991b5ed2,    1}, //  7

{"271-m1d.bin", 0x080000, 0x0E86AF8F, 0x10}, //  8 Z80 code

{"271-v1d.bin", 0x1000000, 0x2058EC5E,    2}, //  9 Sound data
};

STDROMPICKEXT(kof2k4ex, kof2k4ex, neogeo);
STD_ROM_FN(kof2k4ex);

static void kof2k4exWriteBankSwitch(unsigned int sekAddress,unsigned short wordValue,unsigned short valueMask)
{
int address=(sekAddress-0x2fe000)/2,bankaddress;
kof2003b_tbl[address]=(wordValue&valueMask)|(~valueMask&kof2003b_tbl[address]);
if(address!=0xff8 && address!=0xff9 ) return;
bankaddress=(kof2003b_tbl[0xff8])|(kof2003b_tbl[0xff9]<<8);
*(((unsigned char *)kof2003b_tbl)+0x1ff0)&=0xfe;
*(((unsigned char *)kof2003b_tbl)+0x1ff3)&=0x7f;
SekMapMemory(Neo68KROM02+bankaddress, 0x200000, 0x2fdfff, SM_ROM);
Neo68KROM01[0x58196]=kof2003b_tbl[0xff9]&0xff;
}

void __fastcall kof2k4exWriteWordBankSwitch(unsigned int sekAddress, unsigned short wordValue)
{
unsigned short valueMask=0xffff;
kof2k4exWriteBankSwitch(sekAddress, wordValue, valueMask);
}

void __fastcall kof2k4exWriteByteBankSwitch(unsigned int sekAddress, unsigned char byteValue)
{
unsigned short wordValue=0,valueMask=0xff;
if(!(sekAddress&1)) {
wordValue=byteValue<<8;
valueMask<<=8;
}
else{
wordValue=byteValue;
}
kof2k4exWriteBankSwitch(sekAddress, wordValue, valueMask);
}

static void kof2k4exMapHandler()
{
// Install BankSwitch handler
SekMapHandler(5, 0x2fe000, 0x2fffff, SM_READ);
SekSetReadWordHandler(5,  kof2003bReadWordBankSwitch);
SekSetReadByteHandler(5,  kof2003bReadByteBankSwitch);

SekMapHandler(5, 0x2fe000, 0x2fffff, SM_WRITE);
SekSetWriteWordHandler(5, kof2k4exWriteWordBankSwitch);
SekSetWriteByteHandler(5, kof2k4exWriteByteBankSwitch);
}

static int kof2k4exInit()
{
int nRet;

memset(kof2003b_tbl,0,0x2000);

nRet=NeoInit();
if(!nRet)
kof2k4exMapHandler();
return nRet;
}

struct BurnDriver BurnDrvkof2k4ex = {

{"kof2k4ex", "The King of Fighters 2004 EX Hero (bootleg, set 1)", NULL, "SNK Playmore", "Neo Geo", "2003", "kof2003", "neogeo"},
BDF_GAME_WORKING | BDF_LOCKED | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO,
NULL, kof2k4exRomInfo, kof2k4exRomName, neogeoInputInfo, neogeoDIPInfo,
kof2k4exInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};

// The King of Fighters 2004 Ex Hero (bootleg, set 2)

//==================================================

/* This set seems to have the transparency effects like kof2003 PCB... maybe the first one is an alternate bootleg. The S1 ROM seems to be encrypted and complete (512 KB) maybe from the last Cx ROMs */

//==================================================  

static struct BurnRomInfo kof2k4xaRomDesc[] = {
{"271h-p1.bin", 0x100000, 0xDACF5B2D, 0x10}, //  0 68K code
{"271h-p3.bin", 0x400000, 0x92ed6ee3, 0x10}, //  2
{"271h-p2.bin", 0x200000, 0x0D0A5861, 0x10}, //  1    

{"271p-s1d.bin " , 0x080000,  0x09e3f2bd,    1}, //  2 Text layer tiles

{"271-c1d.bin" , 0x1000000, 0xc29acd28,    1}, //  3 Sprite data
{"271-c2d.bin" , 0x1000000, 0x328e80b1,    1}, //  4
{"271-c3d.bin" , 0x1000000, 0x020a11f1,    1}, //  5
{"271-c4d.bin" , 0x1000000, 0x991b5ed2,    1}, //  6

{"271-m1d.bin" , 0x080000,  0x0e86af8f, 0x10}, //  7 Z80 code

{"271-v1d.bin" , 0x1000000, 0x2058ec5e,    2}, //  8 Sound data
};

STDROMPICKEXT(kof2k4xa, kof2k4xa, neogeo);
STD_ROM_FN(kof2k4xa);

static int kof2k4xaInit()
{
int nRet;

nTextBankswitch=4;
memset(kof2003b_tbl,0,0x2000);
        
nRet=NeoInit();
if(!nRet)
kof2k4exMapHandler();
return nRet;
}

struct BurnDriver BurnDrvkof2k4xa = {
{"kof2k4xa", "The King of Fighters 2004 EX Hero (bootleg, set 2)", NULL, "SNK Playmore", "Neo Geo", "2003", "kof2003", "neogeo"},
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ALTERNATE_TEXT | HARDWARE_SNK_NEWBANKSYSTEM,
NULL, kof2k4xaRomInfo, kof2k4xaRomName, neogeoInputInfo, neogeoDIPInfo,
kof2k4xaInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: FerchogtX on November 08, 2004, 09:53:16 PM
Quote from: fataku
You dont need to load the roms C5 and C6, since those roms are used for extract the S1 information in the real game, but this bootleg use a S1 roms so the C5 and C6 are useless.

But the real bootleg board uses that roms isn't? kof2003b does that... I guess...
See ya!!!!!! :D
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: fataku on November 08, 2004, 10:01:57 PM
Quote from: FerchogtX
But the real bootleg board uses that roms isn't? kof2003b does that... I guess...
See ya!!!!!! :D

The bootleg board have 8 C roms (8mb each), so NO, doesnt have those roms, just take a look in those C roms, oh wait, you cant ^_^
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: FerchogtX on November 08, 2004, 10:11:34 PM
Quote from: fataku
The bootleg board have 8 C roms (8mb each), so NO, doesnt have those roms, just take a look in those C roms, oh wait, you cant ^_^

That means that the bootleg board has the "old" 8 C-ROMs dump and the ex hero set uses the same?... Why Razoola chaged this?... Hard Drive reasons? ^_^ XD
See ya!!!!! :D
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: fataku on November 08, 2004, 10:19:47 PM
Quote from: FerchogtX
That means that the bootleg board has the "old" 8 C-ROMs dump and the ex hero set uses the same?... Why Razoola chaged this?... Hard Drive reasons? ^_^ XD
See ya!!!!! :D

maybe, or maybe he doesnt have the full bootleg set at that time, like some roms from bootleg set that arent publics...
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: FerchogtX on November 08, 2004, 11:10:12 PM
???... are you trying to say that maybe the C-ROMs from bootleg have some kind of bitswap like cthd2003/matrimbl/svcboot???? I'm getting a headache XD
See ya!!!!! :D
P.D. What roms ren't public? P-ROMs are already, s1 rom... sound?...GFX??
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: KaNyErO on November 21, 2004, 10:20:37 AM
is there any driver (mame/fba) for kof2k3 ultra plus?

thanks
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: FerchogtX on November 23, 2004, 05:59:59 PM
this is preliminar, I have to see what i have to patch in order to get the game working... It uses the same descrambilng chip as kof2003b (it seems) and maybe the same bankswitch, here the driver:
Code: [Select]
// The King of Fighters 2003 Ultra Plus! (bootleg)

static struct BurnRomInfo kof2k3upRomDesc[] = {
{"2k3-p1up.bin",0x800000, 0x87294c01, 0x10}, //  0 68K code

{"2k3-s1up.bin",0x020000, 0xe5708c0c,    1}, //  1 Text layer tiles (scrambled)

{"2k3-c1.bin",  0x800000, 0xe42fc226,    1}, //  2 Sprite data
{"2k3-c2.bin",  0x800000, 0x1b5e3b58,    1}, //  3
{"2k3-c3.bin",  0x800000, 0xd334fdd9,    1}, //  4
{"2k3-c4.bin",  0x800000, 0x0d457699,    1}, //  5
{"2k3-c5.bin",  0x800000, 0x8a91aae4,    1}, //  6
{"2k3-c6.bin",  0x800000, 0x9f8674b8,    1}, //  7
{"2k3-c7.bin",  0x800000, 0x374ea523,    1}, //  8
{"2k3-c8.bin",  0x800000, 0x75211f4d,    1}, //  9

{"2k3-m1.bin",  0x080000, 0x0e86af8f, 0x10}, //  10 Z80 code (same as kof2003?)

{"2k3-v1.bin",  0x400000, 0xd2b8aa5e,    2}, //  11 Sound data
{"2k3-v2.bin",  0x400000, 0x71956ee2,    2}, //  12
{"2k3-v3.bin",  0x400000, 0xddbbb199,    2}, //  13
{"2k3-v4.bin",  0x400000, 0x01b90c4f,    2}, //  14
};

STDROMPICKEXT(kof2k3up, kof2k3up, neogeo);
STD_ROM_FN(kof2k3up);

static int kof2k3upInit()
{
int nRet;

memset(CartRAM,0,0x2000);

nNeoTextROMFixType = 5;
pNeoInitCallback=kof2003bDecrypt;

nRet=NeoInit();
if(!nRet)
svcsplusMapHandler();
return nRet;
}

struct BurnDriver BurnDrvkof2k3up = {
{"kof2k3up", "The King of Fighters 2003 Ultra Plus! (bootleg)", "Bootleg of kof2003", "SNK Playmore", "Neo Geo", "2003", "kof2003b", "neogeo"},
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG | BDF_LOCKED, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_NEWBANKSYSTEM,
NULL, kof2k3upRomInfo, kof2k3upRomName, neogeoInputInfo, neogeoDIPInfo,
kof2k3upInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
you need kof2003b and svcsplus codes in order to get this working without compile errors, now it rests the memory patch for the extra protection (?)
See ya!!!!! :D
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: iq_132 on November 24, 2004, 02:21:09 AM
I got kof2k3up working :D (Yes, it does have the plus and extra chars)
for this P rom:

271-p1p.bin 0x800000  0x87294C01

Code: [Select]
static void kof2k3up_fix()
{
// Descramble P1 (bring part 8 to the front)
memcpy(Neo68KROM01+0x100000, Neo68KROM01, 0x600000);
memcpy(Neo68KROM01, Neo68KROM01+0x700000, 0x100000);

// Patch out protected addresses
*((unsigned short*)(Neo68KROM01 + 0x0D8A)) = 0x0000;
*((unsigned short*)(Neo68KROM01 + 0x0D8C)) = 0x12EE;
}

make sure you are have the kof2003b maphandlers in your driver or this won't work.

btw, this also uses the same S descrambling method as svcsplus and requires HARDWARE_SNK_ALTERNATE_TEXT
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: James33 on November 24, 2004, 04:02:25 AM
Quote from: FerchogtX
this is preliminar, I have to see what i have to patch in order to get the game working... It uses the same descrambilng chip as kof2003b (it seems) and maybe the same bankswitch, here the driver:
Code: [Select]
// The King of Fighters 2003 Ultra Plus! (bootleg)

static struct BurnRomInfo kof2k3upRomDesc[] = {
{"2k3-p1up.bin",0x800000, 0x87294c01, 0x10}, //  0 68K code

{"2k3-s1up.bin",0x020000, 0xe5708c0c,    1}, //  1 Text layer tiles (scrambled)

{"2k3-c1.bin",  0x800000, 0xe42fc226,    1}, //  2 Sprite data
{"2k3-c2.bin",  0x800000, 0x1b5e3b58,    1}, //  3
{"2k3-c3.bin",  0x800000, 0xd334fdd9,    1}, //  4
{"2k3-c4.bin",  0x800000, 0x0d457699,    1}, //  5
{"2k3-c5.bin",  0x800000, 0x8a91aae4,    1}, //  6
{"2k3-c6.bin",  0x800000, 0x9f8674b8,    1}, //  7
{"2k3-c7.bin",  0x800000, 0x374ea523,    1}, //  8
{"2k3-c8.bin",  0x800000, 0x75211f4d,    1}, //  9

{"2k3-m1.bin",  0x080000, 0x0e86af8f, 0x10}, //  10 Z80 code (same as kof2003?)

{"2k3-v1.bin",  0x400000, 0xd2b8aa5e,    2}, //  11 Sound data
{"2k3-v2.bin",  0x400000, 0x71956ee2,    2}, //  12
{"2k3-v3.bin",  0x400000, 0xddbbb199,    2}, //  13
{"2k3-v4.bin",  0x400000, 0x01b90c4f,    2}, //  14
};

STDROMPICKEXT(kof2k3up, kof2k3up, neogeo);
STD_ROM_FN(kof2k3up);

static int kof2k3upInit()
{
int nRet;

memset(CartRAM,0,0x2000);

nNeoTextROMFixType = 5;
pNeoInitCallback=kof2003bDecrypt;

nRet=NeoInit();
if(!nRet)
svcsplusMapHandler();
return nRet;
}

struct BurnDriver BurnDrvkof2k3up = {
{"kof2k3up", "The King of Fighters 2003 Ultra Plus! (bootleg)", "Bootleg of kof2003", "SNK Playmore", "Neo Geo", "2003", "kof2003b", "neogeo"},
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG | BDF_LOCKED, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_NEWBANKSYSTEM,
NULL, kof2k3upRomInfo, kof2k3upRomName, neogeoInputInfo, neogeoDIPInfo,
kof2k3upInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
you need kof2003b and svcsplus codes in order to get this working without compile errors, now it rests the memory patch for the extra protection (?)
See ya!!!!! :D


It should only need the kof2003b map handlers .
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: KaNyErO on November 24, 2004, 05:28:16 AM
well here are some other S1 i released for this set some months ago when the bad dump was released:

271-s1u (e5708c0c) Encrypted original infinite bug.zip

271-s1u (eb232b3a) Decrypted infinite bug not fixed just decrypted.zip
271-s1u (53248853) Decrypted infinite bug fixed.zip
271-s1u (f01e85b9) Decrypted Infinite bug and unibios bug fixed.zip

271-s1u (88a500bf) 512k Scrambled.zip
271-s1u (773e17f0) 512k Descrambled.zip
271-s1u (4791dc0c) 512k Descrambled-Unibios Fix.zip

i still have not done:
encrypted infinite bug fixed
encrypted Infinite bug and unibios bug fixed

but i think they dont worth the effort :D

pss: the 512k versions shows transparencies :D
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: neo04 on November 24, 2004, 07:26:29 AM
kanyero, can u post those patches please? thx in advance!
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: James33 on November 24, 2004, 08:53:41 AM
I Have ultra plus working in Mame with the help of IQ :)
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: neo04 on November 24, 2004, 09:53:11 AM
james, please post mame driver.. :)
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: JiMMy_PaGe on November 24, 2004, 12:18:11 PM
Quote from: iq_132
I got kof2k3up working :D (Yes, it does have the plus and extra chars)
for this P rom:

271-p1p.bin 0x800000  0x87294C01

Code: [Select]
static void kof2k3up_fix()
{
// Driver by IQ_132 -- http://neosource.1emu.net/
// Descramble P1 (bring part 8 to the front)
memcpy(Neo68KROM01+0x100000, Neo68KROM01, 0x600000);
memcpy(Neo68KROM01, Neo68KROM01+0x700000, 0x100000);

// Patch out protected addresses
*((unsigned short*)(Neo68KROM01 + 0x0D8A)) = 0x0000;
*((unsigned short*)(Neo68KROM01 + 0x0D8C)) = 0x12EE;
}


make sure you are have the kof2003b maphandlers in your driver or this won't work.

btw, this also uses the same S descrambling method as svcsplus and requires HARDWARE_SNK_ALTERNATE_TEXT


Thanks alot iq for this code, as i aways say, u rocks  :D
Here something that i was thinking:
The game title shows it: "The King Of Fighters 2004 Ex Ultra Plus"
So dont u think that the rom should be called The King Of Fighters 2004 Ex Ultra Plus to? But i donno maybe im wrong  :cool:
Ahhh, i forgot to say that the shirink characters are not enable, maybe we have to change the patch value...
See ya  ;)
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: iq_132 on November 24, 2004, 02:27:11 PM
make sure you use kof2003b's bankswitching for this game, otherwise the game will just crash.

Code: [Select]
static void kof2k3up_sx_decrypt( void )
{
UINT8 *rom = memory_region( REGION_GFX1 );
int rom_size = memory_region_length( REGION_GFX1 );

for( int i = 0; i < rom_size; i++ ){
rom[ i ] = BITSWAP8( rom[ i ], 7, 6, 0, 4, 3, 2, 1, 5 );
}
}

DRIVER_INIT( kof2k3up )
{
// Driver by IQ_132 -- http://neosource.1emu.net/
// MAME Conversion by James33
// Descramble P1 (bring part 8 to the front)
UINT8 *src = memory_region(REGION_CPU1);
memcpy(src+0x100000, src, 0x600000);
memcpy(src, src+0x700000, 0x100000);

// Patch out protected addresses
data16_t *mem16 = (data16_t *)memory_region(REGION_CPU1);
mem16[0x0D8A/2] = 0x0000;
mem16[0x0D8C/2] = 0x12EE;

neogeo_fix_bank_type = 2;
kof2k3up_sx_decrypt();
init_neogeo();
}
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: babytek on November 24, 2004, 03:17:20 PM
EDIT : Forget it I have found lol :)

Sorry !
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: James33 on November 24, 2004, 07:21:03 PM
Quote from: neo04
james, please post mame driver.. :)
I posted it in the Mame thread :)
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: FerchogtX on November 24, 2004, 07:53:25 PM
Quote from: iq_132
I got kof2k3up working :D (Yes, it does have the plus and extra chars)
for this P rom:

271-p1p.bin 0x800000  0x87294C01

Code: [Select]
static void kof2k3up_fix()
{
// Driver by IQ_132 -- http://neosource.1emu.net/
// Descramble P1 (bring part 8 to the front)
memcpy(Neo68KROM01+0x100000, Neo68KROM01, 0x600000);
memcpy(Neo68KROM01, Neo68KROM01+0x700000, 0x100000);

// Patch out protected addresses
*((unsigned short*)(Neo68KROM01 + 0x0D8A)) = 0x0000;
*((unsigned short*)(Neo68KROM01 + 0x0D8C)) = 0x12EE;
}


make sure you are have the kof2003b maphandlers in your driver or this won't work.

btw, this also uses the same S descrambling method as svcsplus and requires HARDWARE_SNK_ALTERNATE_TEXT

Thanks IQ... now it boots XD, BTW is not strange that it uses a flag that is exclusively for 512 KB or bigger S1 ROMs? (like kof2000) :eek:  :confused: just weird XD
Thanks for the driver man...
See ya!!!!! :D
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: iq_132 on November 24, 2004, 08:34:13 PM
Actually, sengoku3 and ganryu also use HARDWARE_SNK_ALTERNATE_TEXT
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: Xeon on November 24, 2004, 11:31:42 PM
Quote from: iq_132
Actually, sengoku3 and ganryu also use HARDWARE_SNK_ALTERNATE_TEXT

 hmmm...weird, they seem to work fine without it. how did you find that out?
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: iq_132 on November 25, 2004, 04:29:46 AM
I searched through my d_neogeo.cpp :)
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: Accosta_m on November 25, 2004, 12:44:21 PM
Quote from: MAKE
src/burn/neogeo/d_neogeo.cpp: In function `int kof2003bInit()':
src/burn/neogeo/d_neogeo.cpp:7377: `nTextBankswitch' undeclared (first use this  function)
src/burn/neogeo/d_neogeo.cpp:7377: (Each undeclared identifier is reported only once for each function it appears in.)
src/burn/neogeo/d_neogeo.cpp: At global scope:
src/burn/neogeo/d_neogeo.cpp:7390: `HARDWARE_SNK_NEWBANKSYSTEM' was not declared in this scope


I Have this problem But i can't fix it

Who can i fix this Error  :confused:
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: Vorador on November 25, 2004, 02:47:13 PM
Quote from: Accosta_m
I Have this problem But i can't fix it

Who can i fix this Error  :confused:


Seems that you don´t have added the codes for the New Banksystem and textbankswitch in neogeo.h and some other files
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: KaNyErO on November 26, 2004, 11:03:50 PM
i have a question ... kof2k3up should allow to make chars small... but with this driver it cant be done

check this:
http://www.emumaquinitas.com/videos/kof2003up.wmv

maybe some other adresses must be patched?

 :confused:
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: bms888 on December 14, 2004, 03:00:28 AM
Quote from: KaNyErO
i have a question ... kof2k3up should allow to make chars small... but with this driver it cant be done

check this:
http://www.emumaquinitas.com/videos/kof2003up.wmv

maybe some other adresses must be patched?

 :confused:


Yes,kof2k3up should allow to make chars small.

Try this p1,just add kof2003bMapHandler can working perfect.

   {"271-s1up.bin" , 0x020000,  0xe5708c0c,    1}, //  3 Text layer tiles

static void kof2k3up_sx_decrypt()
{
   UINT8 *srom = (UINT8 *)(NeoTextROM + 0x020000);
   for (int i=0;i<0x20000;i++) {
      srom=BITSWAP08(srom,7,6,0,4,3,2,1,5);
   }
}

   BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG | BDF_LOCKED, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_NEWBANKSYSTEM | HARDWARE_SNK_ALTERNATE_TEXT,
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: iq_132 on December 14, 2004, 03:13:35 AM
Interesting. Thanks BMS :)
btw, nice to see you posting again.
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: bms888 on December 14, 2004, 03:18:52 AM
Quote from: iq_132
Interesting. Thanks BMS :)
btw, nice to see you posting again.


The King of Fighters 2003 Ultra Plus (bootleg)

kof2k3up Px & Sx decrypt FBA code in here,^_^

   
Quote
{"271-p1up.bin" , 0x100000,  0xE3A57A9C, 0x10}, //  0 68K code /* has protection */


Code: [Select]

static void kof2k3up_px_decrypt()
{
int i;
UINT8 *src = (UINT8 *)(Neo68KROM01);
unsigned short *tmp = (unsigned short *)malloc(0x2000);
unsigned short *rom = (unsigned short *)(src+0xfe000);
memcpy(tmp,src+0xd0610,0x2000);
for ( i=0; i<0x2000/2; i++)
rom[i] = tmp[BITSWAP16(i,15,14,13,12,11,10,9,8,7,6,0,4,3,2,1,5)];
free(tmp);
}


   
Quote
{"271-s1up.bin" , 0x020000,  0xe5708c0c,    1}, //  3 Text layer tiles


Code: [Select]

static void kof2k3up_sx_decrypt()
{
UINT8 *srom = (UINT8 *)(NeoTextROM + 0x020000);
for (int i=0;i<0x20000;i++) {
srom[i]=BITSWAP08(srom[i],7,6,0,4,3,2,1,5);
}
}
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: iq_132 on December 14, 2004, 04:00:38 AM
Does this make the characters shrink?? or are we going to need a different P?
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: bms888 on December 14, 2004, 04:15:08 AM
Quote from: iq_132
Does this make the characters shrink?? or are we going to need a different P?


not need a different P,just use Flycboy data's 271-p1up.bin 1MB E3A57A9C.

p2 & p3 use kof2003 EX Hero,^_^

{"271-p1up.bin" , 0x100000, 0xE3A57A9C, 0x10}, // 0 68K code /* has protection */
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: iq_132 on December 14, 2004, 04:19:12 AM
Ok, thanks :)
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: bms888 on December 14, 2004, 04:20:47 AM
my FBA code here:

Code: [Select]

// The King of Fighters 2003 Ultra Plus (bootleg)

static struct BurnRomInfo kof2k3upRomDesc[] = {
// {"271-p1up.bin" , 0x800000,  0x87294c01, 0x10}, //  0 68K code
{"271-p1up.bin" , 0x100000,  0xE3A57A9C, 0x10}, //  0 68K code /* has protection */
{"271-p1bl.bin" , 0x400000,  0x92ed6ee3, 0x10}, //  2 /* same as 271-p1bl.bin from kof2003b */
{"271h-p3.bin"  , 0x200000,  0x0d0a5861, 0x10}, //  1

{"271-s1up.bin" , 0x020000,  0xe5708c0c,    1}, //  3 Text layer tiles

{"271-c1d.bin" , 0x1000000, 0xc29acd28,    1}, //  4 Sprite data
{"271-c2d.bin" , 0x1000000, 0x328e80b1,    1}, //  5
{"271-c3d.bin" , 0x1000000, 0x020a11f1,    1}, //  6
{"271-c4d.bin" , 0x1000000, 0x991b5ed2,    1}, //  7
{"271-c5d.bin" , 0x1000000, 0xc2de8b66,    1}, //  8 /* The last 2 CxD roms contains S1-ROM */
{"271-c6d.bin" , 0x1000000, 0x3ff750db,    1}, //  9 /* data (1 MB) only, no sprite data */

{"271-m1d.bin" , 0x080000,  0x0e86af8f, 0x10}, //  10 Z80 code

{"271-v1d.bin" , 0x1000000, 0x2058ec5e,    2}, //  11 Sound data
};

STDROMPICKEXT(kof2k3up, kof2k3up, neogeo);
STD_ROM_FN(kof2k3up);

static void kof2k3up_px_decrypt()
{
int i;
UINT8 *src = (UINT8 *)(Neo68KROM01);
unsigned short *tmp = (unsigned short *)malloc(0x2000);
unsigned short *rom = (unsigned short *)(src+0xfe000);
memcpy(tmp,src+0xd0610,0x2000);
for ( i=0; i<0x2000/2; i++)
rom[i] = tmp[BITSWAP16(i,15,14,13,12,11,10,9,8,7,6,0,4,3,2,1,5)];
free(tmp);
}

static void kof2k3up_sx_decrypt()
{
UINT8 *srom = (UINT8 *)(NeoTextROM + 0x020000);
for (int i=0;i<0x20000;i++) {
srom[i]=BITSWAP08(srom[i],7,6,0,4,3,2,1,5);
}
}

static int kof2k3upInit()
{
memset(kof2003b_tbl,0,0x2000);

pNeoInitCallback = kof2k3up_px_decrypt;
pNeoInitCallbackgfx = kof2k3up_sx_decrypt;
pNeoInitCallbackmap = kof2003bMapHandler;
return NeoInit();
}

struct BurnDriver BurnDrvkof2k3up = {
{"kof2k3up", "The King of Fighters 2003 Ultra Plus (bootleg)", NULL, "SNK Playmore Corporation", "Neo Geo", "2003", "kof2003", "neogeo"},
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG | BDF_LOCKED, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_NEWBANKSYSTEM | HARDWARE_SNK_ALTERNATE_TEXT,
NULL, kof2k3upRomInfo, kof2k3upRomName, neogeoInputInfo, neogeoDIPInfo,
kof2k3upInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
Title: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: bms888 on December 14, 2004, 04:24:57 AM
P roms > 3,maybe you need add this code to your neogeo.cpp

thanks for netbug,^_^

Bug fixed loading the 68K ROMs(p files>3,such as ms5plus and so on ) for all NeoGeo games as follows:
in neogeo.cpp

Code: [Select]
// This function loads the 68K ROMs
int NeoLoadCode(int nOffset, int nNum, unsigned char* pDest)
{
int nRomSize = 0;
unsigned char* pROM = pDest;
struct BurnRomInfo ri;

// Load the ROMs
for (int i = 0; i < nNum; i++) {
ri.nType = 0;
ri.nLen = 0;
BurnDrvGetRomInfo(&ri,nOffset+i);
nRomSize =ri.nLen;

if (BurnLoadRom(pROM, nOffset + i, 1)) {
return 1;
}

pROM +=nRomSize;

BurnDrvGetRomInfo(&ri, nOffset + i);
// Swap the blocks in the ROM if needed.
if (BurnDrvGetHardwareCode() & HARDWARE_SNK_SWAPP && i && ri.nLen == 0x400000) {
for (unsigned int k = 0; k < (ri.nLen >> 1); k++) {
unsigned char n = pROM[k];
pROM[k] = pROM[k + (ri.nLen >> 1)];
pROM[k + (ri.nLen >> 1)] = n;
}
}

// Swap the blocks in the ROM if needed.
if (BurnDrvGetHardwareCode() & HARDWARE_SNK_SWAPP && nRomSize == 0x200000) {
for (int j = 0; j < nNum; j++) {
for (int k = 0; k < (nRomSize >> 1); k++) {
unsigned char n = pDest[k];
pDest[k] = pDest[k + (nRomSize >> 1)];
pDest[k + (nRomSize >> 1)] = n;
}
}
}
}

return 0;
}
Title: Re: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: iq_132 on July 06, 2005, 01:33:20 PM
Here's an updated version of the 2k4ex bankswitch :)

Code: [Select]
static unsigned short CartRAMEX[2]; // store 4 bytes (2 words)

// Special bankswitch for King of Fighters 2004 Ex (Hero) [Hack]
// Heavily modified by IQ_132 - http://neosource.1emu.net
void __fastcall kof2k4exWriteWordBankSwitch(unsigned int sekAddress, unsigned short wordValue)
{
int offset=(sekAddress-0x2ffff0)/2,bankaddress;
CartRAMEX[offset]=(wordValue)|(~0xFFFF&CartRAMEX[offset]);
bankaddress=CartRAMEX[0]|(CartRAMEX[1]<<8)+0x100000;
SekMapMemory(Neo68KROM+bankaddress,0x200000,0x2fdfff,SM_ROM);
}

unsigned short __fastcall kof2k4exReadWordBankSwitch(unsigned int sekAddress)
{
return CartRAMEX[(sekAddress-0x2ffff0)/2];
}

static int kof2k4exInit()
{
int nRet;

memset(CartRAMEX, 0, 0x02);

nRet=NeoInit();
if (nRet == 0) {
// Install BankSwitch handler
SekMapHandler(5,    0x2ffff0, 0x2ffff3,  SM_READ);
SekMapHandler(5, 0x2ffff0, 0x2ffff3, SM_WRITE);
SekSetReadWordHandler(5,   kof2k4exReadWordBankSwitch);
SekSetWriteWordHandler(5, kof2k4exWriteWordBankSwitch);
}
return nRet;
}

It does require this:
Code: [Select]
| HARDWARE_SNK_CUSTOM_BANKING,or this: (depending on which you are using in your build)
Code: [Select]
| HARDWARE_SNK_NEWBANKSYSTEM,
Title: Re: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: iq_132 on August 15, 2005, 01:27:52 AM
Worked on this a bit more, it's a bit smaller.

Code: [Select]
// Special bankswitch for King of Fighters 2004 Ex Hero [Hack]
// Heavily modified by IQ_132 - http://neosource.1emu.net
void __fastcall kof2k4exWriteWordBankSwitch(unsigned int sekAddress, unsigned short wordValue)
{
CartRAM[(sekAddress-0x2ffff0)/2] = wordValue;
int bankaddress = (CartRAM[0] & 0x00ff) + (CartRAM[1] << 8) + 0x100000;
SekMapMemory(Neo68KROM+bankaddress, 0x200000, 0x2fdfff, SM_ROM);
}

unsigned short __fastcall kof2k4exReadWordBankSwitch(unsigned int sekAddress)
{
return CartRAM[(sekAddress-0x2ffff0)/2];
}
Title: Re: King of Fighters 2003, The (2004, EX, Hero) Drivers
Post by: CaptainCPS on August 15, 2005, 01:49:04 AM
Cool! ThanX IQ!! ^^

SeeYaa!!
:-D