Add working clone of bagman (Barry, Robbert, Misfitmame)

This commit is contained in:
Barry Harris 2012-11-17 21:19:21 +00:00
parent eb7244376f
commit 45d1c941da
5 changed files with 56 additions and 31 deletions

View File

@ -45,7 +45,7 @@ static struct BurnRomInfo BagmanRomDesc[] = {
STD_ROM_PICK(Bagman)
STD_ROM_FN(Bagman)
struct BurnDriverD BurnDrvBagman = {
struct BurnDriver BurnDrvBagman = {
"bagman", NULL, NULL, NULL, "1982",
"Bagman\0", "Parent set for working drivers", "Valadon Automation", "Miscellaneous",
NULL, NULL, NULL, NULL,

View File

@ -10222,17 +10222,31 @@ static struct BurnRomInfo BagmanmcRomDesc[] = {
{ "b5.bin", 0x01000, 0x0fe24b8c, BRF_ESS | BRF_PRG | GAL_ROM_Z80_PROG1 },
{ "b6.bin", 0x01000, 0xf50390e7, BRF_ESS | BRF_PRG | GAL_ROM_Z80_PROG1 },
{ "g1-u.bin", 0x01000, 0xb63cfae4, BRF_GRA | GAL_ROM_TILES_SHARED },
{ "g2-u.bin", 0x01000, 0xa2790089, BRF_GRA | GAL_ROM_TILES_SHARED },
{ "g1-l.bin", 0x00800, 0x2ae6b5ab, BRF_GRA | GAL_ROM_TILES_SHARED },
{ "g2-u.bin", 0x01000, 0xa2790089, BRF_GRA | GAL_ROM_TILES_SHARED },
{ "g2-l.bin", 0x00800, 0x98b37397, BRF_GRA | GAL_ROM_TILES_SHARED },
{ "g1-u.bin", 0x01000, 0xb63cfae4, BRF_GRA | GAL_ROM_TILES_SHARED },
{ "bagmanmc.clr", 0x00020, 0x00000000, BRF_OPT | BRF_NODUMP },
{ "bagmanmc.clr", 0x00020, 0x6a0c7d87, BRF_GRA | GAL_ROM_PROM },
};
STD_ROM_PICK(Bagmanmc)
STD_ROM_FN(Bagmanmc)
static struct BurnRomInfo Bagmanm2RomDesc[] = {
{ "bagmanm2.1", 0x02000, 0x53769ebe, BRF_ESS | BRF_PRG | GAL_ROM_Z80_PROG1 },
{ "bagmanm2.2", 0x02000, 0x9435bb87, BRF_ESS | BRF_PRG | GAL_ROM_Z80_PROG1 },
{ "bagmanm2.3", 0x02000, 0xf37ba7f6, BRF_ESS | BRF_PRG | GAL_ROM_Z80_PROG1 },
{ "bagmanm2.9", 0x02000, 0xf1e70d9e, BRF_GRA | GAL_ROM_TILES_SHARED },
{ "bagmanm2.7", 0x02000, 0x777e48c4, BRF_GRA | GAL_ROM_TILES_SHARED },
{ "bagmanmc.clr", 0x00020, 0x6a0c7d87, BRF_GRA | GAL_ROM_PROM },
};
STD_ROM_PICK(Bagmanm2)
STD_ROM_FN(Bagmanm2)
static struct BurnRomInfo DkongjrmRomDesc[] = {
{ "a1", 0x01000, 0x299486e9, BRF_ESS | BRF_PRG | GAL_ROM_Z80_PROG1 },
{ "a2", 0x01000, 0xa74a193b, BRF_ESS | BRF_PRG | GAL_ROM_Z80_PROG1 },
@ -10410,7 +10424,7 @@ void __fastcall BagmanmcZ80Write(UINT16 a, UINT8 d)
case 0xa000:
case 0xa001:
case 0xa002: {
GalGfxBank[a - 0xa000] = d;
// ???
return;
}
@ -10444,6 +10458,11 @@ void __fastcall BagmanmcZ80Write(UINT16 a, UINT8 d)
return;
}
case 0xb002: {
GalGfxBank[0] = d;
return;
}
case 0xb006: {
GalFlipScreenX = d & 1;
return;
@ -10848,34 +10867,13 @@ static INT32 BagmanmcInit()
INT32 nRet;
GalPostLoadCallbackFunction = BagmanmcPostLoad;
GalPromRomSize = 0x20;
GameIsBagmanmc = 1;
nRet = GalInit();
GalNumChars = 512;
GalNumSprites = 64;
CharPlaneOffsets[1] = GalNumChars * 8 * 8;
SpritePlaneOffsets[1] = GalNumSprites * 16 * 16;
UINT8 *TempRom = (UINT8*)BurnMalloc(0x1000);
GalTempRom = (UINT8*)BurnMalloc(GalTilesSharedRomSize);
nRet = BurnLoadRom(TempRom + 0x0000, GAL_ROM_OFFSET_TILES_SHARED + 0, 1); if (nRet) return 1;
memcpy(GalTempRom + 0x0000, TempRom + 0x0000, 0x800);
memcpy(GalTempRom + 0x2000, TempRom + 0x0800, 0x800);
nRet = BurnLoadRom(TempRom + 0x0000, GAL_ROM_OFFSET_TILES_SHARED + 1, 1); if (nRet) return 1;
memcpy(GalTempRom + 0x1000, TempRom + 0x0000, 0x800);
memcpy(GalTempRom + 0x2800, TempRom + 0x0800, 0x800);
nRet = BurnLoadRom(GalTempRom + 0x0800, GAL_ROM_OFFSET_TILES_SHARED + 2, 1); if (nRet) return 1;
nRet = BurnLoadRom(GalTempRom + 0x1800, GAL_ROM_OFFSET_TILES_SHARED + 3, 1); if (nRet) return 1;
GfxDecode(GalNumChars, 2, 8, 8, CharPlaneOffsets, CharXOffsets, CharYOffsets, 0x40, GalTempRom, GalChars);
GfxDecode(GalNumSprites, 2, 16, 16, SpritePlaneOffsets, SpriteXOffsets, SpriteYOffsets, 0x100, GalTempRom + 0x2000, GalSprites);
BurnFree(GalTempRom);
BurnFree(TempRom);
HardCodeMooncrstPROM();
GalIrqType = GAL_IRQ_TYPE_IRQ0;
GalExtendTileInfoFunction = PiscesExtendTileInfo;
GalExtendTileInfoFunction = BagmanmcExtendTileInfo;
GalExtendSpriteInfoFunction = BagmanmcExtendSpriteInfo;
return nRet;
}
@ -11197,7 +11195,7 @@ struct BurnDriver BurnDrvSkybase = {
struct BurnDriverD BurnDrvBagmanmc = {
"bagmanmc", "bagman", NULL, NULL, "1982",
"Bagman (Moon Cresta hardware)\0", "Bad Colours", "bootleg", "Galaxian",
"Bagman (bootleg on Moon Cresta hardware)\0", "Bad Colours", "bootleg", "Galaxian",
NULL, NULL, NULL, NULL,
BDF_CLONE | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED | BDF_BOOTLEG, 2, HARDWARE_GALAXIAN, GBF_MAZE, 0,
NULL, BagmanmcRomInfo, BagmanmcRomName, NULL, NULL, BagmanmcInputInfo, BagmanmcDIPInfo,
@ -11205,6 +11203,16 @@ struct BurnDriverD BurnDrvBagmanmc = {
NULL, 392, 224, 256, 3, 4
};
struct BurnDriver BurnDrvBagmanm2 = {
"bagmanm2", "bagman", NULL, NULL, "1982",
"Bagman (Moon Cresta hardware)\0", "Bad Colours", "Valadon Automation", "Galaxian",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED | BDF_BOOTLEG, 2, HARDWARE_GALAXIAN, GBF_MAZE, 0,
NULL, Bagmanm2RomInfo, Bagmanm2RomName, NULL, NULL, BagmanmcInputInfo, BagmanmcDIPInfo,
BagmanmcInit, GalExit, GalFrame, NULL, GalScan,
NULL, 392, 224, 256, 3, 4
};
struct BurnDriver BurnDrvDkongjrm = {
"dkongjrm", "dkongjr", NULL, NULL, "1982",
"Donkey Kong Jr. (Moon Cresta hardware)\0", "Bad Colours", "bootleg", "Galaxian",

View File

@ -137,6 +137,8 @@ void DambustrExtendTileInfo(UINT16 *Code, INT32*, INT32, INT32 x);
void Ad2083ExtendTileInfo(UINT16 *Code, INT32 *Colour, INT32 Attr, INT32);
void Ad2083ExtendSpriteInfo(const UINT8 *Base, INT32*, INT32*, UINT8 *xFlip, UINT8*, UINT16 *Code, UINT8*);
void RacknrolExtendTileInfo(UINT16 *Code, INT32*, INT32, INT32 x);
void BagmanmcExtendTileInfo(UINT16 *Code, INT32*, INT32, INT32);
void BagmanmcExtendSpriteInfo(const UINT8*, INT32*, INT32*, UINT8*, UINT8*, UINT16 *Code, UINT8*);
void HardCodeGalaxianPROM();
void HardCodeMooncrstPROM();
void GalaxianCalcPalette();
@ -244,6 +246,7 @@ extern UINT8 MshuttleAY8910CS;
extern UINT8 GmgalaxSelectedGame;
extern UINT8 Fourin1Bank;
extern UINT8 GameIsGmgalax;
extern UINT8 GameIsBagmanmc;
extern UINT8 CavelonBankSwitch;
extern UINT8 GalVBlank;

View File

@ -132,6 +132,11 @@ void RacknrolExtendTileInfo(UINT16 *Code, INT32*, INT32, INT32 x)
*Code |= Bank << 8;
}
void BagmanmcExtendTileInfo(UINT16 *Code, INT32*, INT32, INT32)
{
*Code |= GalGfxBank[0] << 9;
}
// Sprite extend helpers
void UpperExtendSpriteInfo(const UINT8*, INT32*, INT32*, UINT8*, UINT8*, UINT16 *Code, UINT8*)
{
@ -212,6 +217,11 @@ void Ad2083ExtendSpriteInfo(const UINT8 *Base, INT32*, INT32*, UINT8 *xFlip, UIN
*xFlip = 0;
}
void BagmanmcExtendSpriteInfo(const UINT8*, INT32*, INT32*, UINT8*, UINT8*, UINT16 *Code, UINT8*)
{
*Code |= (GalGfxBank[0] << 7) | 0x40;
}
// Hardcode a Galaxian PROM for any games that are missing a PROM dump
void HardCodeGalaxianPROM()
{

View File

@ -75,6 +75,7 @@ UINT8 MshuttleAY8910CS;
UINT8 GmgalaxSelectedGame;
UINT8 Fourin1Bank;
UINT8 GameIsGmgalax;
UINT8 GameIsBagmanmc;
UINT8 CavelonBankSwitch;
UINT8 GalVBlank;
@ -1570,6 +1571,7 @@ INT32 GalExit()
MshuttleAY8910CS = 0;
Fourin1Bank = 0;
GameIsGmgalax = 0;
GameIsBagmanmc = 0;
CavelonBankSwitch = 0;
DarkplntBulletColour = 0;
DambustrBgColour1 = 0;
@ -1608,6 +1610,8 @@ INT32 GalFrame()
INT32 nIrqInterleaveFire = nInterleave / 4;
if (GameIsBagmanmc) nIrqInterleaveFire = 0;
if (GalReset) GalDoReset();
if (GameIsGmgalax && (GmgalaxSelectedGame != GalFakeDip)) {