Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/finalburnneo/FBNeo
Browse files Browse the repository at this point in the history
  • Loading branch information
dinkc64 committed Sep 23, 2023
2 parents c50105e + c139b0d commit 023fed9
Show file tree
Hide file tree
Showing 9 changed files with 248 additions and 192 deletions.
33 changes: 12 additions & 21 deletions src/burn/drv/capcom/cps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1922,9 +1922,11 @@ static INT32 CpsGetROMs(bool bLoad)
}

INT32 i = 0;
INT32 nLoadedRoms = 1;
do {
ri.nLen = 0;
ri.nType = 0;
nLoadedRoms = 1;
BurnDrvGetRomInfo(&ri, i);

if ((ri.nType & 0x0f) == CPS2_PRG_68K) {
Expand All @@ -1934,18 +1936,16 @@ static INT32 CpsGetROMs(bool bLoad)
} else {
nCpsRomLen += ri.nLen;
}
i++;
}

if ((ri.nType & 0x0f) == CPS2_PRG_68K_SIMM) {
if (bLoad) {
if (BurnLoadRom(CpsRomLoad + 0x000001, i + 0, 2)) return 1;
if (BurnLoadRom(CpsRomLoad + 0x000000, i + 1, 2)) return 1;
CpsRomLoad += ri.nLen * 2;
i += 2;
nLoadedRoms = 2;
} else {
nCpsRomLen += ri.nLen;
i++;
}
}

Expand All @@ -1956,14 +1956,13 @@ static INT32 CpsGetROMs(bool bLoad)
} else {
nCpsCodeLen += ri.nLen;
}
i++;
}

if ((ri.nType & 0x0f) == CPS2_GFX) {
if (bLoad) {
Cps2LoadTiles(CpsGfxLoad, i);
CpsGfxLoad += (nGfxMaxSize == ~0U ? ri.nLen : nGfxMaxSize) * 4;
i += 4;
nLoadedRoms = 4;
} else {
if (ri.nLen > nGfxMaxSize) {
nGfxMaxSize = ri.nLen;
Expand All @@ -1973,26 +1972,24 @@ static INT32 CpsGetROMs(bool bLoad)
}
nCpsGfxLen += ri.nLen;
nGfxNum++;
i++;
}
}

if ((ri.nType & 0x0f) == CPS2_GFX_SIMM) {
if (bLoad) {
Cps2LoadTilesSIM(CpsGfxLoad, i);
CpsGfxLoad += ri.nLen * 8;
i += 8;
nLoadedRoms = 8;
} else {
nCpsGfxLen += ri.nLen;
i++;
}
}

if ((ri.nType & 0x0f) == CPS2_GFX_SPLIT4) {
if (bLoad) {
Cps2LoadTilesSplit4(CpsGfxLoad, i);
CpsGfxLoad += (nGfxMaxSize == ~0U ? ri.nLen : nGfxMaxSize) * 16;
i += 16;
nLoadedRoms = 16;
} else {
if (ri.nLen > nGfxMaxSize) {
nGfxMaxSize = ri.nLen;
Expand All @@ -2002,15 +1999,14 @@ static INT32 CpsGetROMs(bool bLoad)
}
nCpsGfxLen += ri.nLen;
nGfxNum++;
i++;
}
}

if ((ri.nType & 0x0f) == CPS2_GFX_SPLIT8) {
if (bLoad) {
Cps2LoadTilesSplit8(CpsGfxLoad, i);
CpsGfxLoad += (nGfxMaxSize == ~0U ? ri.nLen : nGfxMaxSize) * 32;
i += 32;
nLoadedRoms = 32;
} else {
if (ri.nLen > nGfxMaxSize) {
nGfxMaxSize = ri.nLen;
Expand All @@ -2020,31 +2016,28 @@ static INT32 CpsGetROMs(bool bLoad)
}
nCpsGfxLen += ri.nLen;
nGfxNum++;
i++;
}
}

if ((ri.nType & 0x0f) == CPS2_GFX_19XXJ) {
if (bLoad) {
Cps2LoadTiles19xxj(CpsGfxLoad, i);
CpsGfxLoad += (nGfxMaxSize == ~0U ? ri.nLen : nGfxMaxSize) * 20;
i += 20;
nLoadedRoms = 20;
} else {
nGfxMaxSize = 0xcd000;
nCpsGfxLen += ri.nLen;
nGfxNum++;
i++;
}
}

if ((ri.nType & 0x0f) == CPS2_PRG_Z80) {
if (bLoad) {
BurnLoadRom(CpsZRomLoad, i, 1);
CpsZRomLoad += ri.nLen;
} else {
nCpsZRomLen += ri.nLen;
}
i++;
}

if ((ri.nType & 0x0f) == CPS2_QSND) {
Expand All @@ -2055,7 +2048,6 @@ static INT32 CpsGetROMs(bool bLoad)
} else {
nCpsQSamLen += ri.nLen;
}
i++;
}

if ((ri.nType & 0x0f) == CPS2_QSND_SIMM) {
Expand All @@ -2066,17 +2058,15 @@ static INT32 CpsGetROMs(bool bLoad)
} else {
nCpsQSamLen += ri.nLen;
}
i++;
}

if ((ri.nType & 0x0f) == CPS2_QSND_SIMM_BYTESWAP) {
if (bLoad) {
BurnLoadRom(CpsQSamLoad + 1, i + 0, 2);
BurnLoadRom(CpsQSamLoad + 0, i + 1, 2);
i += 2;
nLoadedRoms = 2;
} else {
nCpsQSamLen += ri.nLen;
i++;
}
}

Expand All @@ -2087,8 +2077,9 @@ static INT32 CpsGetROMs(bool bLoad)
} else {
nCpsKeyLen += ri.nLen;
}
i++;
}
i += nLoadedRoms;

} while (ri.nLen);

if (bLoad) {
Expand Down
6 changes: 3 additions & 3 deletions src/burn/drv/capcom/d_cps1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5170,7 +5170,7 @@ STDDIPINFOEXT(SlammastQS, Slammast, SlammastQSound)
STDDIPINFOEXT(Captcommhs, Captcomm, Captcommhs )
STDDIPINFOEXT(Dinohs, Dino, Dinohs )
STDDIPINFOEXT(Ffighths, Ffight, Ffighths )
STDDIPINFOEXT(Knightshs, Knights, Knightshs )
STDDIPINFOEXT(Knightshs, Knights, Knightshs )
STDDIPINFOEXT(Punisherhs, Punisher, Punisherhs )
STDDIPINFOEXT(Wofhs, Wof, Wofhs )

Expand Down Expand Up @@ -26079,8 +26079,8 @@ static struct BurnRomInfo CaptcommhsRomDesc[] = {
/* Incubus - 20230224 */
{ "cce_my.bin", 0x300000, 0x13c0c791, BRF_ESS | BRF_PRG }, // 23 CPS1_68K_PROGRAM_NO_BYTESWAP

/* Unlimited Bullet - 20210428 */
{ "cce_wx.bin", 0x300000, 0x765ad7bf, BRF_ESS | BRF_PRG }, // 24 CPS1_68K_PROGRAM_NO_BYTESWAP
/* Unlimited Bullet - 20230903 */
{ "cce_wx.bin", 0x300000, 0xfd52ec4d, BRF_ESS | BRF_PRG }, // 24 CPS1_68K_PROGRAM_NO_BYTESWAP

/* Journey - 20201211 */
{ "cce_zt.bin", 0x300000, 0x84746744, BRF_ESS | BRF_PRG }, // 25 CPS1_68K_PROGRAM_NO_BYTESWAP
Expand Down
5 changes: 1 addition & 4 deletions src/burn/drv/capcom/d_cps2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7387,11 +7387,8 @@ STD_ROM_PICK(Ssf2u)
STD_ROM_FN(Ssf2u)

static struct BurnRomInfo Ssf2us2RomDesc[] = {
#if !defined ROM_VERIFY
{ "ssfu.03a", 0x080000, 0x72f29c33, BRF_OPT }, // has the standard ROM
{ "super stf 2 super ii rom-08 usa", 0x080000, 0xd48d35c9, CPS2_PRG_68K | BRF_ESS | BRF_PRG }, // the bootleg one seems to be overlayed
# else
{ "ssfu.03a", 0x080000, 0x72f29c33, CPS2_PRG_68K | BRF_ESS | BRF_PRG }, // has the standard ROM
#endif
{ "ssfu.04a", 0x080000, 0x935cea44, CPS2_PRG_68K | BRF_ESS | BRF_PRG },
{ "ssfu.05", 0x080000, 0xa0acb28a, CPS2_PRG_68K | BRF_ESS | BRF_PRG },
{ "ssfu.06", 0x080000, 0x47413dcf, CPS2_PRG_68K | BRF_ESS | BRF_PRG },
Expand Down
Loading

0 comments on commit 023fed9

Please sign in to comment.