Add bootleg of 3 Wonders (Barry, JacKc, ANY)

This commit is contained in:
Barry Harris 2013-05-08 13:37:43 +00:00
parent d5cdcfce03
commit 80120a2e21
3 changed files with 115 additions and 1 deletions

View File

@ -632,6 +632,47 @@ static INT32 CpsLoadOneSf2stt(UINT8* Tile, INT32 nNum, INT32 nWord, INT32 nShift
return 0;
}
static INT32 CpsLoadOneWonder3b(UINT8* Tile, INT32 nNum, INT32 nWord, INT32 nShift)
{
UINT8 *Rom = NULL; INT32 nRomLen=0;
UINT8 *pt = NULL, *pr = NULL;
INT32 i;
LoadUp(&Rom, &nRomLen, nNum);
if (Rom == NULL) {
return 1;
}
nRomLen &= ~1; // make sure even
for (i = 0, pt = Tile, pr = Rom; i < (nRomLen >> 1); pt += 8) {
UINT32 Pix; // Eight pixels
UINT8 b;
b = *pr++; i++; Pix = SepTable[b];
if (nWord) {
b = *pr++; i++; Pix |= SepTable[b] << 1;
}
Pix <<= nShift;
*((UINT32 *)pt) |= Pix;
}
for (i = 0, pt = Tile + 0x200000, pr = Rom + 0x40000; i < (nRomLen >> 1); pt += 8) {
UINT32 Pix; // Eight pixels
UINT8 b;
b = *pr++; i++; Pix = SepTable[b];
if (nWord) {
b = *pr++; i++; Pix |= SepTable[b] << 1;
}
Pix <<= nShift;
*((UINT32 *)pt) |= Pix;
}
BurnFree(Rom);
return 0;
}
static INT32 CpsLoadSf2ceuab3Tiles(UINT8* Tile, INT32 nNum)
{
UINT8 *Rom = (UINT8*)BurnMalloc(0x200000 * sizeof(UINT8));
@ -1188,6 +1229,20 @@ INT32 CpsLoadTilesKodb(INT32 nStart)
return 0;
}
INT32 CpsLoadTilesWonder3b(INT32 nStart)
{
CpsLoadOneWonder3b(CpsGfx + 0x000000, nStart + 0, 0, 0);
CpsLoadOneWonder3b(CpsGfx + 0x000000, nStart + 1, 0, 2);
CpsLoadOneWonder3b(CpsGfx + 0x000004, nStart + 2, 0, 0);
CpsLoadOneWonder3b(CpsGfx + 0x000004, nStart + 3, 0, 2);
CpsLoadOneWonder3b(CpsGfx + 0x000000, nStart + 4, 0, 1);
CpsLoadOneWonder3b(CpsGfx + 0x000000, nStart + 5, 0, 3);
CpsLoadOneWonder3b(CpsGfx + 0x000004, nStart + 6, 0, 1);
CpsLoadOneWonder3b(CpsGfx + 0x000004, nStart + 7, 0, 3);
return 0;
}
INT32 CpsLoadStars(UINT8* pStar, INT32 nStart)
{
UINT8* pTemp[2] = { NULL, NULL};

View File

@ -56,6 +56,7 @@ INT32 CpsLoadTilesCaptcommb(INT32 nStart);
INT32 CpsLoadTilesDinopic(INT32 nStart);
INT32 CpsLoadTilesSlampic(INT32 nStart);
INT32 CpsLoadTilesKodb(INT32 nStart);
INT32 CpsLoadTilesWonder3b(INT32 nStart);
INT32 CpsLoadStars(UINT8 *pStar, INT32 nStart);
INT32 CpsLoadStarsByte(UINT8 *pStar, INT32 nStart);
INT32 CpsLoadStarsForgottnAlt(UINT8 *pStar, INT32 nStart);

View File

@ -4186,6 +4186,33 @@ static struct BurnRomInfo Wonder3hRomDesc[] = {
STD_ROM_PICK(Wonder3h)
STD_ROM_FN(Wonder3h)
static struct BurnRomInfo Wonder3bRomDesc[] = {
{ "274001.4", 0x080000, 0x47887cf3, BRF_ESS | BRF_PRG | CPS1_68K_PROGRAM_BYTESWAP },
{ "274001.3", 0x080000, 0xe79eacb3, BRF_ESS | BRF_PRG | CPS1_68K_PROGRAM_BYTESWAP },
{ "274001.12", 0x080000, 0x47cf8dfb, BRF_GRA | CPS1_TILES },
{ "274001.10", 0x080000, 0xa0d27605, BRF_GRA | CPS1_TILES },
{ "274001.11", 0x080000, 0x8112bbb4, BRF_GRA | CPS1_TILES },
{ "274001.9", 0x080000, 0xcb73759d, BRF_GRA | CPS1_TILES },
{ "274001.8", 0x080000, 0x3bc2ef5e, BRF_GRA | CPS1_TILES },
{ "274001.6", 0x080000, 0x312d790c, BRF_GRA | CPS1_TILES },
{ "274001.7", 0x080000, 0x58307167, BRF_GRA | CPS1_TILES },
{ "274001.5", 0x080000, 0x3f765ae8, BRF_GRA | CPS1_TILES },
{ "27512.2", 0x010000, 0xabfca165, BRF_PRG | CPS1_Z80_PROGRAM },
{ "27020.1", 0x040000, 0x3c4348cf, BRF_SND | CPS1_OKIM6295_SAMPLES },
A_BOARD_PLDS
{ "rt24b.1a", 0x000117, 0x54b85159, BRF_OPT }, // b-board PLDs
{ "iob1.11e", 0x000117, 0x3abc0700, BRF_OPT },
{ "ioc1.ic1", 0x000117, 0x0d182081, BRF_OPT }, // c-board PLDs
};
STD_ROM_PICK(Wonder3b)
STD_ROM_FN(Wonder3b)
static struct BurnRomInfo CaptcommRomDesc[] = {
{ "cce_23f.8f", 0x080000, 0x42c814c5, BRF_ESS | BRF_PRG | CPS1_68K_PROGRAM_NO_BYTESWAP },
{ "cc_22f.7f", 0x080000, 0x0fd34195, BRF_ESS | BRF_PRG | CPS1_68K_PROGRAM_NO_BYTESWAP },
@ -11653,6 +11680,7 @@ static const struct GameConfig ConfigTable[] =
{ "3wondersu" , CPS_B_21_BT1, mapper_RT24B , 0, NULL },
{ "wonder3" , CPS_B_21_BT1, mapper_RT22B , 0, NULL },
{ "3wondersh" , CPS_B_02 , mapper_RT24B , 0, NULL },
{ "3wondersb" , CPS_B_21_BT1, mapper_RT24B , 0, NULL },
{ "captcomm" , CPS_B_21_BT3, mapper_CC63B , 0, NULL },
{ "captcommr1" , CPS_B_21_BT3, mapper_CC63B , 0, NULL },
{ "captcommu" , CPS_B_21_BT3, mapper_CC63B , 0, NULL },
@ -12300,6 +12328,26 @@ static INT32 CpsBootlegSpriteRamScanCallback(INT32 nAction, INT32*)
return 0;
}
static INT32 Wonder3bInit()
{
bCpsUpdatePalEveryFrame = 1;
Cps1GfxLoadCallbackFunction = CpsLoadTilesWonder3b;
CpsLayer1XOffs = 4;
CpsLayer2XOffs = 6;
CpsLayer3XOffs = 10;
INT32 nRet = DrvInit();
// the game doesn't write these anywhere - does the hardware have them stored somewhere?
*((UINT16*)(CpsReg + 0x04)) = BURN_ENDIAN_SWAP_INT16(0x90c0); // scroll2 address
*((UINT16*)(CpsReg + 0x06)) = BURN_ENDIAN_SWAP_INT16(0x9100); // scroll3 address
*((UINT16*)(CpsReg + 0x0a)) = BURN_ENDIAN_SWAP_INT16(0x9140); // palette address
*((UINT16*)(CpsReg + nCpsPalCtrlReg)) = BURN_ENDIAN_SWAP_INT16(0x003f); // palette control
return nRet;
}
static INT32 CaptcommbInit()
{
CpsLayer1XOffs = -8;
@ -15592,7 +15640,7 @@ struct BurnDriver BurnDrvCpsWonder3 = {
struct BurnDriver BurnDrvCps3wondersh = {
"3wondersh", "3wonders", NULL, NULL, "1991",
"Three Wonders (bootleg, wonder 3 910520 etc)\0", NULL, "Capcom", "CPS1",
"Three Wonders (bootleg set 1, wonder 3 910520 etc)\0", NULL, "Capcom", "CPS1",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_CAPCOM_CPS1, GBF_MINIGAMES, 0,
NULL, Wonder3hRomInfo, Wonder3hRomName, NULL, NULL, ThreeWondersInputInfo, ThreeWondersDIPInfo,
@ -15600,6 +15648,16 @@ struct BurnDriver BurnDrvCps3wondersh = {
&CpsRecalcPal, 0x1000, 384, 224, 4, 3
};
struct BurnDriver BurnDrvCps3wondersb = {
"3wondersb", "3wonders", NULL, NULL, "1991",
"Three Wonders (bootleg set 2, wonder 3 910520 etc)\0", NULL, "Capcom", "CPS1",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_CAPCOM_CPS1, GBF_MINIGAMES, 0,
NULL, Wonder3bRomInfo, Wonder3bRomName, NULL, NULL, ThreeWondersInputInfo, ThreeWondersDIPInfo,
Wonder3bInit, DrvExit, Cps1Frame, CpsRedraw, CpsAreaScan,
&CpsRecalcPal, 0x1000, 384, 224, 4, 3
};
struct BurnDriver BurnDrvCpsCaptcomm = {
"captcomm", NULL, NULL, NULL, "1991",
"Captain Commando (911202 other country)\0", NULL, "Capcom", "CPS1",