Welcome!
Final Burn Neo => FBN Development => Topic started by: NJ7 on November 08, 2004, 07:39:58 PM
-
Note.....there's other code you have to add to get these working, but I'm not sure what it is for sure, maybe someone can post that information..... :cool:
// Power Instinct Matrimelee
static struct BurnRomInfo matrimRomDesc[] = {
{"266-p1.bin", 0x100000, 0x5d4c2dc7, 0x10}, // 0 68K code
{"266-p2.bin", 0x400000, 0xa14b1906, 0x10}, // 1 /* scrambled */
{"266-c1.bin", 0x800000, 0x505f4e30, 1}, // 2 Sprite data
{"266-c2.bin", 0x800000, 0x3cb57482, 1}, // 3
{"266-c3.bin", 0x800000, 0xf1cc6ad0, 1}, // 5
{"266-c4.bin", 0x800000, 0x45b806b7, 1}, // 6
{"266-c5.bin", 0x800000, 0x9a15dd6b, 1}, // 7
{"266-c6.bin", 0x800000, 0x281cb939, 1}, // 8
{"266-c7.bin", 0x800000, 0x4b71f780, 1}, // 9
{"266-c8.bin", 0x800000, 0x29873d33, 1}, // 10
{"266-m1d.bin",0x020000, 0xF692D84B, 0x10}, // 11 Z80 code (decrypted)
{"266-m1.bin", 0x020000, 0x456c3e6c, 0x10}, // 12 Z80 code (encrypted)
{"266-v1d.bin",0x400000, 0x352b0a07, 2}, // 13 Sound data
{"266-v2d.bin",0x400000, 0x1e9bd59e, 2}, // 14
{"266-v3d.bin",0x400000, 0xe8362fcc, 2}, // 15
{"266-v4d.bin",0x400000, 0xc8c79b19, 2}, // 16
};
STDROMPICKEXT(matrim, matrim, neogeo);
STD_ROM_FN(matrim);
static void matrimDecrypt()
{
/* matrim AES patch */
*((unsigned short*)(Neo68KROM01 + 0x01050)) = 0x4E75;
kof2002Decrypt();
}
static int matrimInit()
{
nADPCMByteswap = 1;
nNeoTextROMSize = 0x080000;
nNeoProtectionXor = 0x6a;
pNeoInitCallback = matrimDecrypt;
return NeoInit();
}
struct BurnDriver BurnDrvmatrim = {
{"matrim", "Power Instinct Matrimelee", "Japanese title is Shin Goketsuji Ichizoku", "Atlus / Noise Factory", "Neo Geo", "2002", NULL, "neogeo"},
BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ENCRYPTED_B | HARDWARE_SNK_ALTERNATE_TEXT,
NULL, matrimRomInfo, matrimRomName, neogeoInputInfo, neogeoDIPInfo,
matrimInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
// Power Instinct Matrimelee (bootleg)
/* This game uses the same samples and program code as matrim, the M1-ROM and C-ROMs are bitswaped
like cthd2003 ones. */
static struct BurnRomInfo matrimblRomDesc[] = {
{"mat-p1.bin", 0x100000, 0x5d4c2dc7, 0x10}, // 0 68K code
{"mat-p2.bin", 0x400000, 0xa14b1906, 0x10}, // 1 /* scrambled */
{"mat-c1.bin", 0x800000, 0xa5595656, 1}, // 2 sprite data /* has 64 bit-swap like cthd2003 */
{"mat-c2.bin", 0x800000, 0xc5f7c300, 1}, // 3
{"mat-c3.bin", 0x800000, 0x574efd7d, 1}, // 4
{"mat-c4.bin", 0x800000, 0x109d54d9, 1}, // 5
{"mat-c5.bin", 0x800000, 0x15c9e882, 1}, // 6
{"mat-c6.bin", 0x800000, 0x77497b97, 1}, // 7
{"mat-c7.bin", 0x800000, 0xab481bb6, 1}, // 8
{"mat-c8.bin", 0x800000, 0x906cf267, 1}, // 9
{"mat-m1.bin", 0x020000, 0x3ea96ab1, 0x10}, // 10 Z80 code /* bit-swaped */
{"mat-v1.bin", 0x400000, 0x352b0a07, 2}, // 11 Sound data
{"mat-v2.bin", 0x400000, 0x1e9bd59e, 2}, // 12 /* byteswapped */
{"mat-v3.bin", 0x400000, 0xe8362fcc, 2}, // 13
{"mat-v4.bin", 0x400000, 0xc8c79b19, 2}, // 14 /* byteswapped */
};
STDROMPICKEXT(matrimbl, matrimbl, neogeo);
STD_ROM_FN(matrimbl);
#define MATRIMBLFIX(i) (i^(BITSWAP08(i&0x3,4,3,1,2,0,7,6,5)<<8)) /* bit-swap for M1-ROM */
static void matrimblDecrypt()
{
matrimDecrypt(); // Uses the same decryption method as matrim
int i,j;
UINT8 *src = (UINT8 *)(NeoZ80ROM);
UINT8 *dst = (UINT8 *)malloc(0x20000);
memcpy(dst,src,0x20000);
for(i=0x00000;i<0x20000;i++)
{
if (i&0x10000)
{
if (i&0x800)
{
j=MATRIMBLFIX(i);
j=j^0x10000;
}
else
{
j=MATRIMBLFIX((i^0x01));
}
}
else
{
if (i&0x800)
{
j=MATRIMBLFIX((i^0x01));
j=j^0x10000;
}
else
{
j=MATRIMBLFIX(i);
}
}
src[j]=dst[i];
}
free(dst);
memcpy(src-0x10000,src,0x10000);
}
static int matrimblInit()
{
nADPCMByteswap = 1;
pNeoInitCallback = matrimblDecrypt;
nNeoTextROMSize = 0x080000;
return NeoInit();
}
struct BurnDriver BurnDrvmatrimbl = {
{"matrimbl", "Power Instinct Matrimelee (bootleg)", "Japanese title is Shin Goketsuji Ichizoku", "Atlus / Noise Factory", "Neo Geo", "2002", "matrim", "neogeo"},
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ALTERNATE_TEXT,
NULL, matrimblRomInfo, matrimblRomName, neogeoInputInfo, neogeoDIPInfo,
matrimblInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
-
What part of that go into the FBA?
What file?
-
All of it.
src/burn/neogeo/d_neogeo.cpp
-
Outdated drivers, here the new and correct ones:
in neogeo.h: and neo_run.cpp:
add this (look at the thread, thanks to IQ_132 and fataku):
in d_neogeo.cpp:
add this drivers (if you like XD)
// Power Instinct Matrimelee
/* This set has a little disorder in P2 rom identical to kof2002 */
static struct BurnRomInfo matrimRomDesc[] = {
{"266-p1.bin", 0x100000, 0x5d4c2dc7, 0x10}, // 0 68K code
{"266-p2.bin", 0x400000, 0xa14b1906, 0x10}, // 1 /* scrambled */
{"266-c1.bin", 0x800000, 0x505f4e30, 1}, // 2 Sprite data
{"266-c2.bin", 0x800000, 0x3cb57482, 1}, // 3
{"266-c3.bin", 0x800000, 0xf1cc6ad0, 1}, // 5
{"266-c4.bin", 0x800000, 0x45b806b7, 1}, // 6
{"266-c5.bin", 0x800000, 0x9a15dd6b, 1}, // 7
{"266-c6.bin", 0x800000, 0x281cb939, 1}, // 8
{"266-c7.bin", 0x800000, 0x4b71f780, 1}, // 9
{"266-c8.bin", 0x800000, 0x29873d33, 1}, // 10
{"266-m1d.bin",0x020000, 0x6cdfbb6d, 0x10}, // 11 Z80 code (decrypted)
{"266-m1.bin", 0x020000, 0x456c3e6c, 0x10}, // 12 Z80 code (encrypted)
/* This uses Neo-PCM2 PLAYMORE(c) 2002 Chip */
{"266-v1.bin", 0x800000, 0xa4f83690, 2}, // 13 Sound data
{"266-v2.bin", 0x800000, 0xd0f69eda, 2}, // 14
};
STDROMPICKEXT(matrim, matrim, neogeo);
STD_ROM_FN(matrim);
static void matrimDecrypt()
{
/* matrim AES patch */
*((unsigned short*)(Neo68KROM01 + 0x01050)) = 0x4E75;
/* We don't need to write all code again since this uses same bankswitching as kof2002
so we call the function in this one */
kof2002Decrypt();//code by iq_132 from RomShare == http://neosource.1emu.net/
}
static int matrimInit()
{
nNeoTextROMSize = 0x080000; /* is suposed that the real text data should be 128 KB instead of 512 KB (?) */
nNeoProtectionXor = 0x6a;
pNeoInitCallback = matrimDecrypt;
nNeoPCM2PLAYMOREByteswap = 2;
return NeoInit();
}
struct BurnDriver BurnDrvmatrim = {
{"matrim", "Power Instinct Matrimelee", "Japanese title is: Shin Gouketsuji-Ichizoku", "Atlus", "Neo Geo", "2002", NULL, "neogeo"},
BDF_GAME_WORKING | BDF_LOCKED, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ENCRYPTED_B | HARDWARE_SNK_ALTERNATE_TEXT,
NULL, matrimRomInfo, matrimRomName, neogeoInputInfo, neogeoDIPInfo,
matrimInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
// Power Instinct Matrimelee (Decrypted C-ROMs)
static struct BurnRomInfo matrimndRomDesc[] = {
{"266-p1.bin", 0x100000, 0x5d4c2dc7, 0x10}, // 0 68K code
{"266-p2.bin", 0x400000, 0xa14b1906, 0x10}, // 1
{"matr_c1.rom", 0x800000, 0x0ab54c54, 1}, // 2 sprite data
{"matr_c2.rom", 0x800000, 0xb834dd89, 1}, // 3
{"matr_c3.rom", 0x800000, 0xf31d68d4, 1}, // 4
{"matr_c4.rom", 0x800000, 0x58cfb6e9, 1}, // 5
{"matr_c5.rom", 0x800000, 0xf3c0e3fd, 1}, // 6
{"matr_c6.rom", 0x800000, 0xb53c8dcf, 1}, // 7
{"matr_c7.rom", 0x800000, 0x3c1fb02a, 1}, // 8
{"matr_c8.rom", 0x800000, 0x5ee31f80, 1}, // 9
{"266-m1d.bin", 0x020000, 0x6cdfbb6d, 0x10}, // 10 Z80 code
{"266-v1.bin", 0x800000, 0xa4f83690, 2}, // 11 Sound data
{"266-v2.bin", 0x800000, 0xd0f69eda, 2}, // 12
};
STDROMPICKEXT(matrimnd, matrimnd, neogeo);
STD_ROM_FN(matrimnd);
struct BurnDriver BurnDrvmatrimnd = {
{"matrimnd", "Power Instinct Matrimelee (decrypted C)", "Decrypted C-ROMs", "Atlus", "Neo Geo", "2002", "matrim", "neogeo"},
BDF_GAME_WORKING | BDF_CLONE | BDF_LOCKED, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ALTERNATE_TEXT,
NULL, matrimndRomInfo, matrimndRomName, neogeoInputInfo, neogeoDIPInfo,
matrimInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
// Power Instinct Matrimelee (bootleg)
/* This game uses the same program code as matrim, the M1-ROM and C-ROMs are bitswaped
like cthd2003 ones. */
static struct BurnRomInfo matrimblRomDesc[] = {
{"mat-p1.bin", 0x100000, 0x5d4c2dc7, 0x10}, // 0 68K code
{"mat-p2.bin", 0x400000, 0xa14b1906, 0x10}, // 1 /* scrambled */
{"mat-c1.bin", 0x800000, 0xa5595656, 1}, // 2 sprite data /* has 64 bit-swap like cthd2003 */
{"mat-c2.bin", 0x800000, 0xc5f7c300, 1}, // 3
{"mat-c3.bin", 0x800000, 0x574efd7d, 1}, // 4
{"mat-c4.bin", 0x800000, 0x109d54d9, 1}, // 5
{"mat-c5.bin", 0x800000, 0x15c9e882, 1}, // 6
{"mat-c6.bin", 0x800000, 0x77497b97, 1}, // 7
{"mat-c7.bin", 0x800000, 0xab481bb6, 1}, // 8
{"mat-c8.bin", 0x800000, 0x906cf267, 1}, // 9
{"mat-m1.bin", 0x020000, 0x3ea96ab1, 0x10}, // 10 Z80 code /* bit-swaped */
{"mat-v1.bin", 0x400000, 0x352b0a07, 2}, // 11 Sound data
{"mat-v2.bin", 0x400000, 0x1e9bd59e, 2}, // 12 /* byteswapped */
{"mat-v3.bin", 0x400000, 0xe8362fcc, 2}, // 13
{"mat-v4.bin", 0x400000, 0xc8c79b19, 2}, // 14 /* byteswapped */
};
STDROMPICKEXT(matrimbl, matrimbl, neogeo);
STD_ROM_FN(matrimbl);
#define MATRIMBLFIX(i) (i^(BITSWAP08(i&0x3,4,3,1,2,0,7,6,5)<<8)) /* bit-swap for M1-ROM */
static void matrimblDecrypt()
{
matrimDecrypt(); // Uses the same decryption method as matrim
int i,j;
UINT8 *src = (UINT8 *)(NeoZ80ROM);
UINT8 *dst = (UINT8 *)malloc(0x20000);
memcpy(dst,src,0x20000);
for(i=0x00000;i<0x20000;i++)
{
if (i&0x10000)
{
if (i&0x800)
{
j=MATRIMBLFIX(i);
j=j^0x10000;
}
else
{
j=MATRIMBLFIX((i^0x01));
}
}
else
{
if (i&0x800)
{
j=MATRIMBLFIX((i^0x01));
j=j^0x10000;
}
else
{
j=MATRIMBLFIX(i);
}
}
src[j]=dst[i];
}
free(dst);
memcpy(src-0x10000,src,0x10000);
}
static int matrimblInit()
{
nADPCMByteswap = 1;
pNeoInitCallback = matrimblDecrypt;
nNeoTextROMSize = 0x080000;
return NeoInit();
}
struct BurnDriver BurnDrvmatrimbl = {
{"matrimbl", "Power Instinct Matrimelee (bootleg)", "Bootleg of matrimelee", "Atlus", "Neo Geo", "2002", "matrim", "neogeo"},
BDF_GAME_WORKING | BDF_CLONE | BDF_LOCKED | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ALTERNATE_TEXT,
NULL, matrimblRomInfo, matrimblRomName, neogeoInputInfo, neogeoDIPInfo,
matrimblInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
delete decrypted set if you don't like decrypted sets in your build.
See ya!!!!!! :D
-
the C5 and M1 from set encripted is different of the set of kawaks dev
what is the difference :confused:
-
I think becuase the kawaks ones were watermarked .
-
the C5 and M1 from set encripted is different of the set of kawaks dev
what is the difference :confused:
266-c5.bin was watermarked man, so the original one is used here, the m1d has changed acording to the unreleased (?) Japanesse M1 FIX Team 10th voice fix for matrimelee, with this you can get nmore voices, this is not really inportant BTW because if the codes for emulating encripted m1 get public, this fixes and bootlegs will be tossed away...
See ya!!!!! :D
P.D. C1 in decrypted set had chaged too because of C5 in encrypted set
-
This isn't picking up at all.
What I'm doing wrong?
This part already added.
Add this to d_neogeo.cpp
// Power Instinct Matrimelee
static struct BurnRomInfo matrimRomDesc[] = {
{"266-p1.bin", 0x100000, 0x5D4C2DC7, 0x10}, // 0 68K code
{"266-p2.bin", 0x400000, 0xa14b1906, 0x10}, // 1
{"266-c1.bin", 0x800000, 0x505f4e30, 1}, // 2 Sprite data
{"266-c2.bin", 0x800000, 0x3cb57482, 1}, // 3
{"266-c3.bin", 0x800000, 0xf1cc6ad0, 1}, // 4
{"266-c4.bin", 0x800000, 0x45b806b7, 1}, // 5
{"266-c5.bin", 0x800000, 0x2584945b, 1}, // 6
{"266-c6.bin", 0x800000, 0x281cb939, 1}, // 7
{"266-c7.bin", 0x800000, 0x4b71f780, 1}, // 8
{"266-c8.bin", 0x800000, 0x29873d33, 1}, // 9
//{"266-m1d.bin", 0x020000, 0x456C3E6C, 0x10}, // 10 Z80 code (correct dump?)
{"266-m1d.bin", 0x020000, 0x0, 0x10}, // 10 Z80 code
{"266-v1d.bin", 0x400000, 0x352B0A07, 2}, // 11 Sound data
{"266-v2dd.bin", 0x400000, 0x1e9bd59e, 2}, // 12
{"266-v3d.bin", 0x400000, 0xE8362FCC, 2}, // 13
{"266-v4dd.bin", 0x400000, 0xc8c79b19, 2}, // 14
};
STDROMPICKEXT(matrim, matrim, neogeo);
STD_ROM_FN(matrim);
static void matrimDecrypt() // Converted to FBA code by IQ_132 (bbs.romshare.net)
{
unsigned char* src = Neo68KROM01+0x100000;
unsigned char* dst = (unsigned char*)malloc(0x400000);
int sec[] = {0x100000,0x280000,0x300000,0x180000,0x000000,0x380000,0x200000,0x080000};
if (dst)
{
memcpy(dst,src,0x400000);
for(int i = 0; i < 8; ++i)
{
memcpy(src+i*0x80000,dst+sec[i],0x80000);
}
free(dst);
}
*((unsigned short*)(Neo68KROM01 + 0x01050)) = 0x4E75; // AES Patch
}
static int matrimInit()
{
nNeoTextROMSize = 0x080000;
nNeoProtectionXor = 0x6a;
pNeoInitCallback = matrimDecrypt;
return NeoInit();
}
struct BurnDriver BurnDrvmatrim = {
{"matrim", "Matrimelee", NULL, "Noise Factory", "Neo Geo", "2002", NULL, "neogeo"},
BDF_GAME_WORKING | BDF_LOCKED, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ENCRYPTED_B | HARDWARE_SNK_ALTERNATE_TEXT,
NULL, matrimRomInfo, matrimRomName, neogeoInputInfo, neogeoDIPInfo,
matrimInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
This part might be wrong or can't go after.
src/burn/neogeo/neo_run.cpp
Find this:
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;
}
}
}
Add this after
// Descramble matrimelee's V roms
if (!strcmp(BurnDrvText(0), "matrim")) {
BurnByteswap(YM2610ADPCMAROM+0x400000, 0x400000); // byteswap V2
BurnByteswap(YM2610ADPCMAROM+0xc00000, 0x400000); // byteswap V4
}
I already try though.
-
I wouldn't suggest using that driver. It's out of date, and the roms are wrong.
You should use Ferchogtx's Driver (http://neo-source.com/showpost.php?p=1784&postcount=4) which is a few posts above yours.
-
I wouldn't suggest using that driver. It's out of date, and the roms are wrong.
You should use Ferchogtx's Driver (http://neo-source.com/showpost.php?p=1784&postcount=4) which is a few posts above yours.
That didn't help ether. :(
-
i have a Question
what is the correct
{"266-m1d.bin",0x020000, 0x6cdfbb6d, 0x10}, // 11 Z80 code (decrypted)
{"266-m1.bin", 0x020000, 0x456c3e6c, 0x10}, // 12 Z80 code (encrypted)
or
{"266-m1d.bin",0x020000, 0x6cdfbb6d, 0x10}, // 11 Z80 code (decrypted)
// {"266-m1.bin", 0x020000, 0x456c3e6c, 0x10}, // 12 Z80 code (encrypted)
or this
-
i have a Question
what is the correct
or
{"266-m1d.bin",0x020000, 0x6cdfbb6d, 0x10}, // 11 Z80 code (decrypted)
// {"266-m1.bin", 0x020000, 0x456c3e6c, 0x10}, // 12 Z80 code (encrypted)
or this
With the first code, you load both M1 roms, encrypted & decrypted, with the second code you only load the decrytpted m1. Doesn´t matter after all :D
-
Here is the problem. :)
BDF_LOCKED
That is why. :D