Author Topic: Metal Slug 5 Drivers  (Read 25222 times)

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Metal Slug 5 Drivers
« Reply #30 on: January 14, 2005, 12:00:37 PM »
Thanks for the init BMS, check PM in PPX BBS...
BTW, about the s1 rom... it looks really messy but thanks for the info Kany
See ya!!!! :D

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 Xeon

  • Newbies
  • *
  • Posts: 45
  • Karma: +0/-0
  • Member
Metal Slug 5 Drivers
« Reply #31 on: January 14, 2005, 02:24:04 PM »
Quote from: James33
I thought kof2003 does work (not the bootleg)  As it works here .

 i asked the question back when the driver for kof2003 wasnt totally figured out yet. sorry for the spam but im trying to get back again and surprised about the reply :D

Offline bms888

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
  • Member
Metal Slug 5 Drivers
« Reply #32 on: January 14, 2005, 10:22:00 PM »
why i use HalRIN's mslug5 MAME code,i can't get good CRC with Uni-bios,but with FBASP can get it?

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Metal Slug 5 Drivers
« Reply #33 on: January 14, 2005, 10:41:01 PM »
Quote from: bms888
why i use HalRIN's mslug5 MAME code,i can't get good CRC with Uni-bios,but with FBASP can get it?

Have you tried with my version? (with the real bankswitch enabled in FBA? is just one page back)... maybe that one gives the correct CRC...
See ya!!!!! :D
P.D. Any luck with kof2002b C-ROMs? :confused:

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 bms888

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
  • Member
Metal Slug 5 Drivers
« Reply #34 on: January 15, 2005, 02:03:25 AM »
Quote from: FerchogtX
Have you tried with my version? (with the real bankswitch enabled in FBA? is just one page back)... maybe that one gives the correct CRC...
See ya!!!!! :D
P.D. Any luck with kof2002b C-ROMs? :confused:



real bankswitch??? means you have got it,^_^.

I have the whole PVC bankswitch code,but it's not time to open now:D

Offline iq_132

  • Administrator
  • *****
  • Posts: 3724
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: Metal Slug 5 Drivers
« Reply #35 on: June 06, 2005, 05:54:15 AM »
Just ported Neoathyr's MAME bankswitch.  I like this a lot better than the large pvc code.

No cartram and no HARDWARE_SNK_CUSTOMBANKING or HARDWARE_SNK_NEWBANKSYSTEM is required either. ;)

Code: [Select]
// Metal Slug 5

static struct BurnRomInfo mslug5RomDesc[] = {
{"268-p1.bin", 0x400000, 0xd0466792, 1 | BRF_ESS | BRF_PRG }, //  0 68K code
{"268-p2.bin", 0x400000, 0xfbf6b61e, 1 | BRF_ESS | BRF_PRG }, //  1

{"268-c1.bin", 0x800000, 0x27d59de8, 3 | BRF_GRA }, //  2 Sprite data
{"268-c2.bin", 0x800000, 0xe600dee1, 3 | BRF_GRA }, //  3
{"268-c3.bin", 0x800000, 0xb650f098, 3 | BRF_GRA }, //  4
{"268-c4.bin", 0x800000, 0x10499589, 3 | BRF_GRA }, //  5
{"268-c5.bin", 0x800000, 0x19352405, 3 | BRF_GRA }, //  6
{"268-c6.bin", 0x800000, 0xb1531523, 3 | BRF_GRA }, //  7
{"268-c7.bin", 0x800000, 0xfe2c1338, 3 | BRF_GRA }, //  8
{"268-c8.bin", 0x800000, 0xecce3141, 3 | BRF_GRA }, //  9

{"268-m1d.bin", 0x040000, 0x6866d696, 4 | BRF_ESS | BRF_PRG }, //  10 Z80 code
{"268-m1.bin",  0x040000, 0x88c11f51, 4 | BRF_PRG | BRF_OPT }, //  10

{"268-v1.bin",  0x800000, 0x33c6305c, 5 | BRF_SND }, //  11 Sound data
{"268-v2.bin",  0x800000, 0x1afb848e, 5 | BRF_SND }, //  12
};

STDROMPICKEXT(mslug5, mslug5, neogeo);
STD_ROM_FN(mslug5);

static void mslug5PVCDecrypt()
{
interleave_pdata();
do_neopvc(3);

memcpy(Neo68KROM+0x200000, Neo68KROM+0x100000, 0x400000);

*((unsigned short*)(Neo68KROM + 0x122A)) = 0x4e75; // AES Patch
}

// Based on code provided by BMS888 and Neoaethyr, ported by IQ_132
void __fastcall mslug5_w(unsigned int sekAddress, unsigned short data)
{
if (sekAddress==0x2ffff2)
{
SekMapMemory(Neo68KROM+(data<<8)+0x100000, 0x200000, 0x2fdfff,  SM_ROM);
};
}

static void ms5MapHandler()
{
SekMapHandler(5, 0x2ffff0, 0x2fffff, SM_WRITE);
SekSetWriteWordHandler(5, mslug5_w);
}

static int mslug5Init()
{
int nRet;

pNeoInitCallback = mslug5PVCDecrypt;
nNeoProtectionXor = 0x19;
nNeoPCM2PLAYMOREProtection = 3;

nRet = NeoInit();

if (nRet == 0) {
ms5MapHandler();
}

return nRet;
}

struct BurnDriver BurnDrvmslug5 = {
"mslug5", NULL, "neogeo", "2003",
"Metal Slug 5\0", NULL, "SNK Playmore Corporation", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ENCRYPTED_B,
NULL, mslug5RomInfo, mslug5RomName, neogeoInputInfo, neogeoDIPInfo,
mslug5Init, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};


Offline iq_132

  • Administrator
  • *****
  • Posts: 3724
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: Metal Slug 5 Drivers
« Reply #36 on: June 06, 2005, 06:13:25 AM »
And again wth mslug5b (Real bootleg??)

Code: [Select]
// Metal Slug 5 (Bootleg)

static struct BurnRomInfo mslug5bRomDesc[] = {
{ "268-p1b.bin", 0x800000, 0x3f1cf3d2, 1 | BRF_ESS | BRF_PRG }, //  0 68K code

{ "268-c1b.bin", 0x800000, 0x969c0d62,    3 | BRF_GRA }, //  1 Sprite data
{ "268-c2b.bin", 0x800000, 0xc69ae867,    3 | BRF_GRA }, //  2
{ "268-c3b.bin", 0x800000, 0xd7beaeaf,    3 | BRF_GRA }, //  3
{ "268-c4b.bin", 0x800000, 0xe1b1131b,    3 | BRF_GRA }, //  4
{ "268-c5b.bin", 0x800000, 0x2fa1a5ad,    3 | BRF_GRA }, //  5
{ "268-c6b.bin", 0x800000, 0x6de89589,    3 | BRF_GRA }, //  6
{ "268-c7b.bin", 0x800000, 0x97bd0c0a,    3 | BRF_GRA }, //  7
{ "268-c8b.bin", 0x800000, 0xc0d5bc20,    3 | BRF_GRA }, //  8

{ "268-m1b.bin", 0x020000, 0x6FA01C9A, 4 | BRF_ESS | BRF_PRG }, //  9 Z80 code

{ "268-v1b.bin", 0x400000, 0xc3540e0d,    5 | BRF_SND }, //  10 Sound data
{ "268-v2b.bin", 0x400000, 0x077bd2f4,    5 | BRF_SND }, //  11
{ "268-v3b.bin", 0x400000, 0x39b14567,    5 | BRF_SND }, //  12
{ "268-v4b.bin", 0x400000, 0x969ff3b2,    5 | BRF_SND }, //  13
};

STDROMPICKEXT(mslug5b, mslug5b, neogeo);
STD_ROM_FN(mslug5b);

// Based on code provided by BMS888 and Neoaethyr, ported by IQ_132
void __fastcall mslug5b_bankswitch_w(unsigned int offset, unsigned short data)
{
if (offset == 0x2ffff2)
{
data = (data >> 12);

if (data == 2)
data = 3;
else
if (data == 3)
data = 2;

SekMapMemory(Neo68KROM+data*0x100000, 0x200000, 0x2fdfff,  SM_ROM);
}
}

static int mslug5bInit()
{
int nRet = NeoInit();

if (nRet == 0)
{
SekMapHandler(5, 0x2ffff0, 0x2fffff, SM_WRITE);
SekSetWriteWordHandler(5, mslug5b_bankswitch_w);
}

return nRet;
}

struct BurnDriver BurnDrvmslug5b = {
"mslug5b", "mslug5", "neogeo", "2003",
"Metal Slug 5 (Bootleg)\0", NULL, "SNK Playmore Corporation", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_BOOTLEG | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO,
NULL, mslug5bRomInfo, mslug5bRomName, neogeoInputInfo, neogeoDIPInfo,
mslug5bInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};