megadrive: use cute sram patch to get megaman parent working right
This commit is contained in:
parent
630ebb2b7e
commit
8dd10523c2
|
@ -18613,32 +18613,14 @@ STD_ROM_FN(md_megaman)
|
|||
|
||||
struct BurnDriver BurnDrvmd_megaman = {
|
||||
"md_megaman", NULL, NULL, NULL, "1994",
|
||||
"Mega Man - The Wily Wars (Euro)\0", "Use SRAM Saves clone, instead!", "Capcom", "Sega Megadrive",
|
||||
"Mega Man - The Wily Wars (Euro)\0", NULL, "Capcom", "Sega Megadrive",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_NOT_WORKING | BDF_16BIT_ONLY, 2, HARDWARE_SEGA_MEGADRIVE | HARDWARE_SEGA_MEGADRIVE_PCB_SEGA_EEPROM, GBF_MISC, 0,
|
||||
BDF_GAME_WORKING | BDF_16BIT_ONLY, 2, HARDWARE_SEGA_MEGADRIVE | HARDWARE_SEGA_MEGADRIVE_PCB_SEGA_SRAM, GBF_MISC, 0,
|
||||
MegadriveGetZipName, md_megamanRomInfo, md_megamanRomName, NULL, NULL, MegadriveInputInfo, MegadriveDIPInfo,
|
||||
MegadriveInit, MegadriveExit, MegadriveFrame, MegadriveDraw, MegadriveScan,
|
||||
&bMegadriveRecalcPalette, 0x100, 320, 224, 4, 3
|
||||
};
|
||||
|
||||
// Mega Man - The Wily Wars (Euro, US, SRAM)
|
||||
static struct BurnRomInfo md_megamansrRomDesc[] = {
|
||||
{ "mega man - the wily wars (euro,us,SRAM).bin", 0x200000, 0x589542cc, BRF_PRG | SEGA_MD_ROM_LOAD16_WORD_SWAP | SEGA_MD_ROM_OFFS_000000 },
|
||||
};
|
||||
|
||||
STD_ROM_PICK(md_megamansr)
|
||||
STD_ROM_FN(md_megamansr)
|
||||
|
||||
struct BurnDriver BurnDrvmd_megamansr = {
|
||||
"md_megamansr", "md_megaman", NULL, NULL, "1994",
|
||||
"Mega Man - The Wily Wars (Euro, US, SRAM Saves)\0", NULL, "Capcom", "Sega Megadrive",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING | BDF_16BIT_ONLY | BDF_CLONE, 2, HARDWARE_SEGA_MEGADRIVE | HARDWARE_SEGA_MEGADRIVE_PCB_SEGA_SRAM, GBF_MISC, 0,
|
||||
MegadriveGetZipName, md_megamansrRomInfo, md_megamansrRomName, NULL, NULL, MegadriveInputInfo, MegadriveDIPInfo,
|
||||
MegadriveInit, MegadriveExit, MegadriveFrame, MegadriveDraw, MegadriveScan,
|
||||
&bMegadriveRecalcPalette, 0x100, 320, 224, 4, 3
|
||||
};
|
||||
|
||||
// Rockman Mega World (Jpn)
|
||||
static struct BurnRomInfo md_rockmanRomDesc[] = {
|
||||
{ "rockman mega world (jpn).bin", 0x200000, 0x4d87235e, BRF_PRG | SEGA_MD_ROM_LOAD16_WORD_SWAP | SEGA_MD_ROM_OFFS_000000 },
|
||||
|
|
|
@ -3288,6 +3288,35 @@ static void MegadriveSetupSRAM()
|
|||
}
|
||||
}
|
||||
|
||||
static void sram_patch_megaman()
|
||||
{
|
||||
UINT16 *rom = (UINT16*)RomMain;
|
||||
// code to allow use of sram in megaman, which is i2c eeprom(not impl. yet)
|
||||
rom[0x0018e/2] = 0x125a; rom[0x001b2/2] = 0xf820;
|
||||
rom[0x001ba/2] = 0x3fff; rom[0x0036a/2] = 0x4e71;
|
||||
rom[0x003a4/2] = 0x4e71; rom[0x6db4e/2] = 0x4e71;
|
||||
rom[0x6db50/2] = 0x4e71; rom[0x6db5c/2] = 0x40ce;
|
||||
rom[0x6db76/2] = 0x0050; rom[0x6db8c/2] = 0x40ce;
|
||||
rom[0x6dba8/2] = 0x003e; rom[0x6dbb8/2] = 0x4e71;
|
||||
rom[0x6dbba/2] = 0x4e71; rom[0x6dbbc/2] = 0x60fa;
|
||||
rom[0x6dbbe/2] = 0x4e71; rom[0x6dbc0/2] = 0x4e71;
|
||||
rom[0x6dbc2/2] = 0x4e71; rom[0x6dbc4/2] = 0x4e71;
|
||||
rom[0x6dbc6/2] = 0x4a41; rom[0x6dbc8/2] = 0x6606;
|
||||
rom[0x6dbca/2] = 0x45f9; rom[0x6dbce/2] = 0x0101;
|
||||
rom[0x6dbd0/2] = 0x1412; rom[0x6dbd2/2] = 0xe14a;
|
||||
rom[0x6dbd4/2] = 0x142a; rom[0x6dbd6/2] = 0x0002;
|
||||
rom[0x6dbd8/2] = 0x45ea; rom[0x6dbda/2] = 0x0004;
|
||||
rom[0x6dbdc/2] = 0x4e75; rom[0x6dbde/2] = 0x4e71;
|
||||
rom[0x6dbe0/2] = 0x4e71; rom[0x6dbe2/2] = 0x4e71;
|
||||
rom[0x6dbe4/2] = 0x4e71; rom[0x6dbe6/2] = 0x4a41;
|
||||
rom[0x6dbe8/2] = 0x6606; rom[0x6dbea/2] = 0x45f9;
|
||||
rom[0x6dbec/2] = 0x0020; rom[0x6dbee/2] = 0x0101;
|
||||
rom[0x6dbf0/2] = 0x1542; rom[0x6dbf2/2] = 0x0002;
|
||||
rom[0x6dbf4/2] = 0xe04a; rom[0x6dbf6/2] = 0x1482;
|
||||
rom[0x6dbf8/2] = 0x45ea; rom[0x6dbfa/2] = 0x0004;
|
||||
rom[0x6dbfc/2] = 0x4e75; rom[0x6dbfe/2] = 0x4e71;
|
||||
}
|
||||
|
||||
static INT32 __fastcall MegadriveTAScallback(void)
|
||||
{
|
||||
return 0; // disable
|
||||
|
@ -3305,6 +3334,11 @@ INT32 MegadriveInit()
|
|||
MegadriveLoadRoms(0);
|
||||
if (MegadriveLoadRoms(1)) return 1;
|
||||
|
||||
if (strstr(BurnDrvGetTextA(DRV_NAME), "megaman")) {
|
||||
bprintf(0, _T("Megaman SRAM fix activated!\n"));
|
||||
sram_patch_megaman(); // after rom-load (must!)
|
||||
}
|
||||
|
||||
{
|
||||
SekInit(0, 0x68000); // Allocate 68000
|
||||
SekOpen(0);
|
||||
|
|
Loading…
Reference in New Issue