I'm sure many of you have this set for fr2ch. It's the original, broken mvs->cd conversion, however...
static struct BurnRomInfo fr2chRomDesc[] = {
{ "098-p1ch.bin", 0x100000, 0xA2527A5F, 1 | BRF_ESS | BRF_PRG }, // 0 68K code
{ "098-s1ch.bin", 0x020000, 0x764AC7AA, 2 | BRF_GRA }, // 1 Text data
{ "098-c1ch.bin", 0x300000, 0x29BF9AF0, 3 | BRF_GRA }, // 2 Sprite data
{ "098-c2ch.bin", 0x300000, 0x3CF46F63, 3 | BRF_GRA }, // 3
{ "098-m1ch.bin", 0x010000, 0xA455FA31, 4 | BRF_ESS | BRF_PRG }, // 4 Z80 code
{ "098-v1ch.bin", 0x100000, 0x92E175F0, 5 | BRF_SND }, // 5 Sound data
};
If you look at the p1, it doesn't particularly need to be 1mb in size, the original p data is ~512k
Also, the Cx, like kanyero mentioned, should not be 3mb, but more like 1mb/c. However, this was not the only problem with these cx roms. The person that made this conversion didn't take in account that the neogeo cd has 1mb sprite banks (4 of them, actually), so 4mb of sprite data can be stored at one time.
So the person copied + pasted the spr roms together without dummying them up to 1mb first. This should not affect the regular game at all, but I noticed a cheat in the uni-bios for "Unlock album mode." So I tried this and went into the photo album (which is nothing but softcore anime porn) and realized that the albums were completely broken.
cheat "Unlock Photo Album"
default 1
0 "Disabled"
1 "Enabled", 0, 0x101ED7, 0x09
So I decided to re-port the cx, dummying them with FF data and then copy + pasting them together. This produced some good results, except that the last 2 cx are outside the boundry of what the neo-cd can deal with (4mb).
This is the set I ended up with:
static struct BurnRomInfo fr2chRomDesc[] = {
{ "098-p1ch.bin", 0x080000, 0x9AA8CEE0, 1 | BRF_ESS | BRF_PRG }, // 0 68K Code
{ "098-s1ch.bin", 0x020000, 0x764ac7aa, 2 | BRF_GRA }, // 1 Text data
{ "098-c1ch.bin", 0x100000, 0x6158CF4A, 3 | BRF_GRA }, // 2 Sprite data
{ "098-c2ch.bin", 0x100000, 0x93A809A3, 3 | BRF_GRA }, // 3
{ "098-c3ch.bin", 0x100000, 0xFAFA3381, 3 | BRF_GRA }, // 4
{ "098-c4ch.bin", 0x100000, 0x9895E23F, 3 | BRF_GRA }, // 5
// swap these in dynamically
{ "098-c5ch.bin", 0x100000, 0xEEAAA818, 3 | BRF_GRA }, // 6
{ "098-c6ch.bin", 0x100000, 0xF3D9A190, 3 | BRF_GRA }, // 7
{ "098-m1ch.bin", 0x010000, 0xA455FA31, 4 | BRF_ESS | BRF_PRG }, // 8 Z80 code
{ "098-v1ch.bin", 0x100000, 0x92E175F0, 5 | BRF_SND }, // 9 Sound data
};
Here's the original driver I had for it, it fixed the crashes from the game trying to go to an invalid sub in the bios and a few other misc things -- does it look familar (someone leaked some code and someone else took credit it for it
Thanks mame32plus
.
void fr2ch_fixes()
{
// change jsr to C004DA (rts)
*((unsigned short*)(Neo68KROM + 0x01AF8)) = 0x04DA; // C00552 (Not used?)
*((unsigned short*)(Neo68KROM + 0x01BF6)) = 0x04DA; // C0056A (fixes crash)
*((unsigned short*)(Neo68KROM + 0x01ED8)) = 0x04DA; // C00570 (Not used?)
*((unsigned short*)(Neo68KROM + 0x1C384)) = 0x04DA; // C00552 (fixes crash)
// 0x001C06 - this routine can cause a loop/freeze
*((unsigned short*)(Neo68KROM + 0x01C06)) = 0x4E75;
// can cause bugs
// Move text for credit + coin info (Thanks to Kanyero)
memcpy (NeoTextROM + 0x20000, NeoTextROM + 0x20600, 0x140);
// Patch out neogeo intro (Moving S causes garbage)
*((unsigned short*)(Neo68KROM + 0x00112)) = 0x0180;
*((unsigned short*)(Neo68KROM + 0x00114)) = 0x0100;
// optional
// Hack in the proper identification (see setup menu [F2])
unsigned char data[16] = {
0x49, 0x46, 0x41, 0x4E, 0x20, 0x4C, 0x4F, 0x52,
0x41, 0x4D, 0x43, 0x4E, 0x20, 0x45, 0x20, 0x32
};
for (int i = 0; i < 0x10; i++)
Neo68KROM[0x3A6 + i] = Neo68KROM[0x61E + i] = Neo68KROM[0x896 + i] = data[i];
}
However, this still doesn't fix the second part of the album mode (as you may have noticed if you tried the cheat.)
I wasn't sure quite how to fix it (since I don't know much 68k stuff), so I hacked in a quick fix for it, which really does seem to do the job.
It patches in a jump to 0x80000 (just past the 512k p1 -- since fba dummies it to 1mb), and patches in a write to 0x200002. When that address is written to, I have the last two cx roms swapped. This fixes the album mode.
Kind of a dirty hack, but it works, I guess.
// Idol Mah jong Final Romance 2 (CD Conversion / Hack)
static struct BurnRomInfo fr2chRomDesc[] = {
{ "098-p1ch.bin", 0x080000, 0x9AA8CEE0, 1 | BRF_ESS | BRF_PRG }, // 0 68K Code
{ "098-s1ch.bin", 0x020000, 0x764ac7aa, 2 | BRF_GRA }, // 1 Text data
{ "098-c1ch.bin", 0x100000, 0x6158CF4A, 3 | BRF_GRA }, // 2 Sprite data
{ "098-c2ch.bin", 0x100000, 0x93A809A3, 3 | BRF_GRA }, // 3
{ "098-c3ch.bin", 0x100000, 0xFAFA3381, 3 | BRF_GRA }, // 4
{ "098-c4ch.bin", 0x100000, 0x9895E23F, 3 | BRF_GRA }, // 5
// swap these in dynamically
{ "098-c5ch.bin", 0x100000, 0xEEAAA818, 3 | BRF_GRA }, // 6
{ "098-c6ch.bin", 0x100000, 0xF3D9A190, 3 | BRF_GRA }, // 7
{ "098-m1ch.bin", 0x010000, 0xA455FA31, 4 | BRF_ESS | BRF_PRG }, // 8 Z80 code
{ "098-v1ch.bin", 0x100000, 0x92E175F0, 5 | BRF_SND }, // 9 Sound data
};
STDROMPICKEXT(fr2ch, fr2ch, neogeo);
STD_ROM_FN(fr2ch);
void fr2ch_fixes()
{
// change jsr to C004DA (rts)
*((unsigned short*)(Neo68KROM + 0x01AF8)) = 0x04DA; // C00552 (Not used?)
*((unsigned short*)(Neo68KROM + 0x01BF6)) = 0x04DA; // C0056A (fixes crash)
*((unsigned short*)(Neo68KROM + 0x01ED8)) = 0x04DA; // C00570 (Not used?)
*((unsigned short*)(Neo68KROM + 0x1C384)) = 0x04DA; // C00552 (fixes crash)
// 0x001C06 - this routine can cause a loop/freeze
*((unsigned short*)(Neo68KROM + 0x01C06)) = 0x4E75;
// can cause bugs
// Move text for credit + coin info (Thanks to Kanyero)
memcpy (NeoTextROM + 0x20000, NeoTextROM + 0x20600, 0x140);
// Patch out neogeo intro (Moving S causes garbage)
*((unsigned short*)(Neo68KROM + 0x00112)) = 0x0180;
*((unsigned short*)(Neo68KROM + 0x00114)) = 0x0100;
// optional
// Hack in the proper identification (see setup menu [F2])
unsigned char data[16] = {
0x49, 0x46, 0x41, 0x4E, 0x20, 0x4C, 0x4F, 0x52,
0x41, 0x4D, 0x43, 0x4E, 0x20, 0x45, 0x20, 0x32
};
for (int i = 0; i < 0x10; i++)
Neo68KROM[0x3A6 + i] = Neo68KROM[0x61E + i] = Neo68KROM[0x896 + i] = data[i];
for (int i = 0; i < 0x20; i+=4)
*((unsigned short*)(Neo68KROM + 0x40 + i + 2)) = 0x0426;
// Album Fix (Very Hacky)
*((unsigned short*)(Neo68KROM + 0x1C382)) = 0x0008; // C00552
*((unsigned short*)(Neo68KROM + 0x1C384)) = 0x0000;
*((unsigned short*)(Neo68KROM + 0x80000)) = 0x33FC;
*((unsigned short*)(Neo68KROM + 0x80002)) = 0x0001;
*((unsigned short*)(Neo68KROM + 0x80004)) = 0x0020;
*((unsigned short*)(Neo68KROM + 0x80006)) = 0x0002;
*((unsigned short*)(Neo68KROM + 0x80008)) = 0x4E75;
}
// Album fix
void __fastcall fr2ch_swap_cx_romsw(unsigned int sekAddress, unsigned short)
{
if (sekAddress == 0x200002) {
for (int i = 0; i < 0x200000; i++) {
int n = NeoSpriteROM[0x200000 + i];
NeoSpriteROM[0x200000 + i] = NeoSpriteROM[0x400000 + i];
NeoSpriteROM[0x400000 + i] = n;
}
}
}
static int fr2chInit()
{
pNeoInitCallback = fr2ch_fixes;
int nRet = NeoInit();
if (nRet == 0) {
SekMapHandler(4, 0x200000, 0x2FFFFF, SM_WRITE);
SekSetWriteWordHandler(4, fr2ch_swap_cx_romsw);
}
return nRet;
}
struct BurnDriver BurnDrvfr2ch = {
"fr2ch", NULL, "neogeo", "1995",
"Idol Mah jong Final Romance 2\0", "CD Conversion / Hack", "Video Systems", "Neo Geo",
L"\u30A2\u30A4\u30C9\u30EB\u96C0\u9EBB\u30D5\u30A1\u30A4\u30CA\u30EB\u30ED\u30DE\u30F3\u30B9\0", NULL, NULL, NULL,
BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO,
NULL, fr2chRomInfo, fr2chRomName, neogeoInputInfo, neogeoDIPInfo,
fr2chInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
Take that XiaoFang!