Here's the matrim driver, I tried pNeoInitCallback = matrimAESPatch; in all posible places but no luck...
This is using Neo Geo
Normal BIOS, on all regions. AES Mode works with Universe BIOS.
// Matrimelee (encrypted graphics / sound)
static struct BurnRomInfo matrimRomDesc[] = {
{ "266-p1.bin", 0x100000, 0x5d4c2dc7, 1 | BRF_ESS | BRF_PRG }, // 0 68K code
{ "266-p2.bin", 0x400000, 0xa14b1906, 1 | BRF_ESS | BRF_PRG }, // 1
{ "266-c1.bin", 0x800000, 0x505f4e30, 3 | BRF_GRA }, // 2 Sprite data (decrypted)
{ "266-c2.bin", 0x800000, 0x3cb57482, 3 | BRF_GRA }, // 3
{ "266-c3.bin", 0x800000, 0xf1cc6ad0, 3 | BRF_GRA }, // 4
{ "266-c4.bin", 0x800000, 0x45b806b7, 3 | BRF_GRA }, // 5
{ "266-c5.bin", 0x800000, 0x9a15dd6b, 3 | BRF_GRA }, // 6
{ "266-c6.bin", 0x800000, 0x281cb939, 3 | BRF_GRA }, // 7
{ "266-c7.bin", 0x800000, 0x4b71f780, 3 | BRF_GRA }, // 8
{ "266-c8.bin", 0x800000, 0x29873d33, 3 | BRF_GRA }, // 9
{ "266-m1d.bin", 0x020000, 0xD2F3742D, 4 | BRF_ESS | BRF_PRG }, // 10 Z80 code (decrypted)
{ "266-m1.bin", 0x020000, 0x456c3e6c, 0 | BRF_PRG | BRF_OPT }, // 11 Z80 code
{ "266-v1.bin", 0x800000, 0xa4f83690, 5 | BRF_SND }, // 12
{ "266-v2.bin", 0x800000, 0xd0f69eda, 5 | BRF_SND }, // 13
};
STDROMPICKEXT(matrim, matrim, neogeo);
STD_ROM_FN(matrim);
static void matrimAESPatch()
{
*((unsigned short*)(Neo68KROM + 0x01050)) = 0x4E75; // <-------------
}
static int matrimInit()
{
int nRet;
nNeoTextROMSize = 0x080000;
nNeoProtectionXor = 0x6A;
pNeoInitCallback = PCM2DecryptP;
pNeoInitCallback = matrimAESPatch; // <-------------
nRet = NeoInit();
if (nRet == 0) {
PCM2DecryptVInfo Info = { 0x001000, 0xFFCE20, { 0xC4, 0x83, 0xA8, 0x5F, 0x21, 0x27, 0x64, 0xAF } };
PCM2DecryptV(&Info);
}
return nRet;
}
struct BurnDriver BurnDrvmatrim = {
"matrim", NULL, "neogeo", "2002",
"Shin gouketsuzi ichizoku - Toukon\0Matrimelee\0", NULL, "Playmore / Noise Factory / Atlus", "Neo Geo",
L"\u65B0\u8C6A\u8840\u5BFA\u4E00\u65CF - \u95D8\u5A5A\0Matrimelee\0", NULL, NULL, NULL,
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
};
As for the kof2000 driver, I did this and I
did not use kof2000AESPatch(); code in any way:
*note*: This is not the full, driver, just a little part.
static void kof2000SMADecrypt()
{
for (int i = 0; i < 0x800000 / 2; i++) {
((unsigned short*)(Neo68KROM + 0x100000))[i] = BITSWAP16(((unsigned short*)(Neo68KROM + 0x100000))[i], 12, 8, 11, 3, 15, 14, 7, 0, 10, 13, 6, 5, 9, 2, 1, 4);
}
for (int i = 0; i < 0x0C0000 / 2; i++) {
((unsigned short*)Neo68KROM)[i] = ((unsigned short*)Neo68KROM)[0x73A000 / 2 + BITSWAP24(i, 23, 22, 21, 20, 19, 18, 8, 4, 15, 13, 3, 14, 16, 2, 6, 17, 7, 12, 10, 0, 5, 11, 1, 9)];
}
for (int i = 0; i < 0x63A000 / 2; i += 0x0800 / 2) {
unsigned short nBuffer[0x0800 / 2];
memcpy(nBuffer, &((unsigned short*)(Neo68KROM + 0x100000))[i], 0x0800);
for (int j = 0; j < 0x0800 / 2; j++) {
((unsigned short*)(Neo68KROM + 0x100000))[i + j] = nBuffer[BITSWAP24(j, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 4, 1, 3, 8, 6, 2, 7, 0, 9, 5)];
}
}
{
*((unsigned short*)(Neo68KROM + 0xA226E)) = 0x4E75;
}
}
PD: Sorry for being so n00b, but I hate programming. I just like emulators