Add support for alt sf2koryu gfx roms

This commit is contained in:
Barry Harris 2012-04-08 20:34:07 +00:00
parent 1a84d17e90
commit d00228b574
3 changed files with 77 additions and 13 deletions

View File

@ -365,6 +365,49 @@ static INT32 CpsLoadOneSf2ebbl(UINT8* Tile, INT32 nNum, INT32 nWord, INT32 nShif
return 0;
}
static INT32 CpsLoadOneSf2koryu(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;
}
Tile += 4;
for (i = 0, pt = Tile, pr = Rom + (nRomLen >> 1); 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;
}
INT32 CpsLoadTiles(UINT8* Tile, INT32 nStart)
{
// left side of 16x16 tiles
@ -498,6 +541,18 @@ INT32 CpsLoadTilesSf2ebbl(UINT8 *Tile, INT32 nStart)
return 0;
}
INT32 CpsLoadTilesSf2koryu(INT32 nStart)
{
CpsLoadOneSf2koryu(CpsGfx + 0x000000, nStart + 0, 1, 0);
CpsLoadOneSf2koryu(CpsGfx + 0x000000, nStart + 1, 1, 2);
CpsLoadOneSf2koryu(CpsGfx + 0x200000, nStart + 2, 1, 0);
CpsLoadOneSf2koryu(CpsGfx + 0x200000, nStart + 3, 1, 2);
CpsLoadOneSf2koryu(CpsGfx + 0x400000, nStart + 4, 1, 0);
CpsLoadOneSf2koryu(CpsGfx + 0x400000, nStart + 5, 1, 2);
return 0;
}
INT32 CpsLoadStars(UINT8* pStar, INT32 nStart)
{
UINT8* pTemp[2] = { NULL, NULL};

View File

@ -42,6 +42,7 @@ INT32 CpsLoadTilesBootleg(UINT8 *Tile, INT32 nStart);
INT32 CpsLoadTilesCaptcomb(UINT8 *Tile, INT32 nStart);
INT32 CpsLoadTilesPunipic2(UINT8 *Tile, INT32 nStart);
INT32 CpsLoadTilesSf2ebbl(UINT8 *Tile, INT32 nStart);
INT32 CpsLoadTilesSf2koryu(INT32 nStart);
INT32 CpsLoadStars(UINT8 *pStar, INT32 nStart);
INT32 CpsLoadStarsByte(UINT8 *pStar, INT32 nStart);
INT32 CpsLoadStarsForgottnAlt(UINT8 *pStar, INT32 nStart);

View File

@ -8146,18 +8146,12 @@ static struct BurnRomInfo Sf2koryuRomDesc[] = {
{ "u221.rom", 0x0020000, 0x64e6e091, BRF_ESS | BRF_PRG | CPS1_68K_PROGRAM_BYTESWAP },
{ "u195.rom", 0x0020000, 0xc95e4443, BRF_ESS | BRF_PRG | CPS1_68K_PROGRAM_BYTESWAP },
{ "s92_01.bin", 0x0080000, 0x03b0d852, BRF_GRA | CPS1_TILES },
{ "s92_02.bin", 0x0080000, 0x840289ec, BRF_GRA | CPS1_TILES },
{ "s92_03.bin", 0x0080000, 0xcdb5f027, BRF_GRA | CPS1_TILES },
{ "s92_04.bin", 0x0080000, 0xe2799472, BRF_GRA | CPS1_TILES },
{ "s92_05.bin", 0x0080000, 0xba8a2761, BRF_GRA | CPS1_TILES },
{ "s92_06.bin", 0x0080000, 0xe584bfb5, BRF_GRA | CPS1_TILES },
{ "s92_07.bin", 0x0080000, 0x21e3f87d, BRF_GRA | CPS1_TILES },
{ "s92_08.bin", 0x0080000, 0xbefc47df, BRF_GRA | CPS1_TILES },
{ "s92_10.bin", 0x0080000, 0x960687d5, BRF_GRA | CPS1_TILES },
{ "s92_11.bin", 0x0080000, 0x978ecd18, BRF_GRA | CPS1_TILES },
{ "s92_12.bin", 0x0080000, 0xd6ec9a0a, BRF_GRA | CPS1_TILES },
{ "s92_13.bin", 0x0080000, 0xed2c67f6, BRF_GRA | CPS1_TILES },
{ "u70.rom", 0x0100000, 0xbaa0f81f, BRF_GRA | CPS1_TILES },
{ "u68.rom", 0x0100000, 0x8edff95a, BRF_GRA | CPS1_TILES },
{ "u69.rom", 0x0100000, 0x468962b1, BRF_GRA | CPS1_TILES },
{ "u64.rom", 0x0100000, 0x8165f536, BRF_GRA | CPS1_TILES },
{ "u19.rom", 0x0100000, 0x39d763d3, BRF_GRA | CPS1_TILES },
{ "u18.rom", 0x0100000, 0x93ec42ae, BRF_GRA | CPS1_TILES },
{ "s92_09.bin", 0x0010000, 0x08f6b60e, BRF_PRG | CPS1_Z80_PROGRAM },
@ -11355,6 +11349,20 @@ static INT32 Sf2yycInit()
}
static INT32 Sf2koryuInit()
{
Cps1CallbackFunction = CpsLoadTilesSf2koryu;
Cps1LockSpriteList910000 = 1;
CpsLayer1XOffs = -12;
CpsLayer2XOffs = -14;
CpsLayer3XOffs = -16;
CpsDrawSpritesInReverse = 1;
return Sf2ceInit();
}
static INT32 Sf2koryu2Init()
{
Cps1LockSpriteList910000 = 1;
@ -13611,7 +13619,7 @@ struct BurnDriver BurnDrvCpsSf2koryu2 = {
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_CAPCOM_CPS1, GBF_VSFIGHT, FBF_SF,
NULL, Sf2koryu2RomInfo, Sf2koryu2RomName, NULL, NULL, Sf2yycInputInfo, Sf2DIPInfo,
Sf2koryuInit, DrvExit, Cps1Frame, CpsRedraw, CpsAreaScan,
Sf2koryu2Init, DrvExit, Cps1Frame, CpsRedraw, CpsAreaScan,
&CpsRecalcPal, 0x1000, 384, 224, 4, 3
};