Final Burn Neo > FBN Development

King of Fighters 2003, The (2004, EX, Hero) Drivers

(1/8) > >>

iq_132:
In your kof2003b (bootleg) driver change this:


--- Code: ---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]

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.

NJ7:
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: ---// 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
};
--- End code ---

FerchogtX:

--- 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.
--- End quote ---

But the real bootleg board uses that roms isn't? kof2003b does that... I guess...
See ya!!!!!! :D

fataku:

--- Quote from: FerchogtX ---But the real bootleg board uses that roms isn't? kof2003b does that... I guess...
See ya!!!!!! :D
--- End quote ---

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 ^_^

Navigation

[0] Message Index

[#] Next page

Go to full version