Skip to content

Commit

Permalink
update hack games & etc (#1564)
Browse files Browse the repository at this point in the history
  • Loading branch information
taoenwen authored Sep 16, 2023
1 parent 36b731b commit 4b817b1
Show file tree
Hide file tree
Showing 5 changed files with 188 additions and 120 deletions.
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
208 changes: 137 additions & 71 deletions src/burn/drv/konami/d_tmnt.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// FB Alpha Teenage Mutant Ninja Turtle driver module
// FB Neo Teenage Mutant Ninja Turtle driver module
// Based on MAME driver by Nicola Salmoria

#include "tiles_generic.h"
Expand Down Expand Up @@ -102,6 +102,8 @@ static const eeprom_interface thndrx2_eeprom_interface =
0
};

static UINT8 VerSwitcher = 0; // Fake Dip

static struct BurnInputInfo TmntInputList[] =
{
{"P1 Coin" , BIT_DIGITAL , DrvInputPort0 + 0, "p1 coin" },
Expand Down Expand Up @@ -280,6 +282,12 @@ static struct BurnInputInfo Ssriders4pInputList[] =

STDINPUTINFO(Ssriders4p)

static struct BurnInputInfo VerSwitchInputList[] = {
{"Dip Ex" , BIT_DIPSWITCH , &VerSwitcher , "dip" }, // 22
};

STDINPUTINFOEXT(Ssriders4pVerSw, Ssriders4p, VerSwitch)

static struct BurnInputInfo SsridersInputList[] =
{
{"P1 Coin" , BIT_DIGITAL , DrvInputPort0 + 0, "p1 coin" },
Expand Down Expand Up @@ -552,6 +560,21 @@ static inline void SsridersMakeInputs()
//if (DrvInputPort5[7]) DrvInput[5] -= 0x80;
}

static struct BurnDIPInfo SsridershsDIPList[] =
{
DIP_OFFSET(0x22)

// Fake DIPs
{0x00, 0xff, 0xff, 0x00, NULL }, // 1v4

{0, 0xfe, 0, 3, "Version change (Must reload)" },
{0x00, 0x01, 0x03, 0x00, "1v4" },
{0x00, 0x01, 0x03, 0x01, "Firepower" },
{0x00, 0x01, 0x03, 0x02, "Second Round" },
};

STDDIPINFO(Ssridershs)

static struct BurnDIPInfo TmntDIPList[]=
{
// Default Values
Expand Down Expand Up @@ -4646,19 +4669,23 @@ static void CuebrickYM2151IrqHandler(INT32 Irq)
CuebrickSndIrqFire = Irq;
}

#define BurnAllocMemIndexEx(Name) do { \
Mem = NULL; \
Name##MemIndex(); \
INT32 nLen = MemEnd - (UINT8 *)0; \
if ((Mem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1; \
memset(Mem, 0, nLen); \
Name##MemIndex(); \
} while (0)

static INT32 TmntInit()
{
GenericTilesInit();

INT32 nRet = 0, nLen;
INT32 nRet = 0;

// Allocate and Blank all required memory
Mem = NULL;
TmntMemIndex();
nLen = MemEnd - (UINT8 *)0;
if ((Mem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
memset(Mem, 0, nLen);
TmntMemIndex();
BurnAllocMemIndexEx(Tmnt);

K052109Init(DrvTileRom, DrvTiles, 0x0fffff);
K052109SetCallback(K052109TmntCallback);
Expand Down Expand Up @@ -4761,15 +4788,10 @@ static INT32 MiaInit()
{
GenericTilesInit();

INT32 nRet = 0, nLen;
INT32 nRet = 0;

// Allocate and Blank all required memory
Mem = NULL;
MiaMemIndex();
nLen = MemEnd - (UINT8 *)0;
if ((Mem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
memset(Mem, 0, nLen);
MiaMemIndex();
BurnAllocMemIndexEx(Mia);

K052109Init(DrvTileRom, DrvTiles, 0x03ffff);
K052109SetCallback(K052109MiaCallback);
Expand Down Expand Up @@ -4857,15 +4879,10 @@ static INT32 CuebrickInit()
{
GenericTilesInit();

INT32 nRet = 0, nLen;
INT32 nRet = 0;

// Allocate and Blank all required memory
Mem = NULL;
CuebrickMemIndex();
nLen = MemEnd - (UINT8 *)0;
if ((Mem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
memset(Mem, 0, nLen);
CuebrickMemIndex();
BurnAllocMemIndexEx(Cuebrick);

K052109Init(DrvTileRom, DrvTiles, 0x03ffff);
K052109SetCallback(K052109CuebrickCallback);
Expand Down Expand Up @@ -4925,15 +4942,10 @@ static INT32 BlswhstlInit()
{
GenericTilesInit();

INT32 nRet = 0, nLen;
INT32 nRet = 0;

// Allocate and Blank all required memory
Mem = NULL;
BlswhstlMemIndex();
nLen = MemEnd - (UINT8 *)0;
if ((Mem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
memset(Mem, 0, nLen);
BlswhstlMemIndex();
BurnAllocMemIndexEx(Blswhstl);

K052109Init(DrvTileRom, DrvTiles, 0x0fffff);
K052109SetCallback(K052109BlswhstlCallback);
Expand Down Expand Up @@ -5015,15 +5027,10 @@ static INT32 SsridersInit()
{
GenericTilesInit();

INT32 nRet = 0, nLen;
INT32 nRet = 0;

// Allocate and Blank all required memory
Mem = NULL;
SsridersMemIndex();
nLen = MemEnd - (UINT8 *)0;
if ((Mem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
memset(Mem, 0, nLen);
SsridersMemIndex();
BurnAllocMemIndexEx(Ssriders);

K052109Init(DrvTileRom, DrvTiles, 0x0fffff);
K052109SetCallback(K052109TmntCallback);
Expand Down Expand Up @@ -5102,15 +5109,10 @@ static INT32 Thndrx2Init()
{
GenericTilesInit();

INT32 nRet = 0, nLen;
INT32 nRet = 0;

// Allocate and Blank all required memory
Mem = NULL;
Thndrx2MemIndex();
nLen = MemEnd - (UINT8 *)0;
if ((Mem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
memset(Mem, 0, nLen);
Thndrx2MemIndex();
BurnAllocMemIndexEx(Thndrx2);

K052109Init(DrvTileRom, DrvTiles, 0x0fffff);
K052109SetCallback(K052109TmntCallback);
Expand Down Expand Up @@ -5186,15 +5188,10 @@ static INT32 LgtnfghtInit()
{
GenericTilesInit();

INT32 nRet = 0, nLen;
INT32 nRet = 0;

// Allocate and Blank all required memory
Mem = NULL;
LgtnfghtMemIndex();
nLen = MemEnd - (UINT8 *)0;
if ((Mem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
memset(Mem, 0, nLen);
LgtnfghtMemIndex();
BurnAllocMemIndexEx(Lgtnfght);

K052109Init(DrvTileRom, DrvTiles, 0x0fffff);
K052109SetCallback(K052109TmntCallback);
Expand Down Expand Up @@ -5273,15 +5270,10 @@ static INT32 Tmnt2Init()
{
GenericTilesInit();

INT32 nRet = 0, nLen;
INT32 nRet = 0;

// Allocate and Blank all required memory
Mem = NULL;
Tmnt2MemIndex();
nLen = MemEnd - (UINT8 *)0;
if ((Mem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
memset(Mem, 0, nLen);
Tmnt2MemIndex();
BurnAllocMemIndexEx(Tmnt2);

K052109Init(DrvTileRom, DrvTiles, 0x0fffff);
K052109SetCallback(K052109TmntCallback);
Expand Down Expand Up @@ -5368,15 +5360,10 @@ static INT32 QgakumonInit()
{
GenericTilesInit();

INT32 nRet = 0, nLen;
INT32 nRet = 0;

// Allocate and Blank all required memory
Mem = NULL;
Tmnt2MemIndex();
nLen = MemEnd - (UINT8 *)0;
if ((Mem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
memset(Mem, 0, nLen);
Tmnt2MemIndex();
BurnAllocMemIndexEx(Tmnt2);

K052109Init(DrvTileRom, DrvTiles, 0x0fffff);
K052109SetCallback(K052109TmntCallback);
Expand Down Expand Up @@ -5459,15 +5446,10 @@ static INT32 PunkshotInit()
{
GenericTilesInit();

INT32 nRet = 0, nLen;
INT32 nRet = 0;

// Allocate and Blank all required memory
Mem = NULL;
PunkshotMemIndex();
nLen = MemEnd - (UINT8 *)0;
if ((Mem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
memset(Mem, 0, nLen);
PunkshotMemIndex();
BurnAllocMemIndexEx(Punkshot);

K052109Init(DrvTileRom, DrvTiles, 0x07ffff);
K052109SetCallback(K052109TmntCallback);
Expand Down Expand Up @@ -5535,6 +5517,8 @@ static INT32 PunkshotInit()
return 0;
}

#undef BurnAllocMemIndexEx

static INT32 CommonExit()
{
SekExit();
Expand Down Expand Up @@ -7065,3 +7049,85 @@ struct BurnDriver BurnDrvPunkshotj = {
PunkshotInit, PunkshotExit, PunkshotFrame, PunkshotDraw, Thndrx2aScan,
NULL, 0x800, 288, 224, 4, 3
};

// -----------------------------------------------------------------------------
// Sunset Riders Hack Series
// -----------------------------------------------------------------------------

static struct BurnRomInfo SsridershsRomDesc[] = {
/* 1v4 - 20190729 */
{ "064eac02_1v4.8e", 0x040000, 0xf6bce510, BRF_ESS | BRF_PRG }, // 0 68000 Program Code
{ "064eac03_1v4.8g", 0x040000, 0x9e998ebe, BRF_ESS | BRF_PRG }, // 1
{ "064eab04_1v4.10e", 0x020000, 0x06755c89, BRF_ESS | BRF_PRG }, // 2
{ "064eab05_1v4.10g", 0x020000, 0x0aad4619, BRF_ESS | BRF_PRG }, // 3

{ "064e01.2f", 0x010000, 0x44b9bc52, BRF_ESS | BRF_PRG }, // 4 Z80 Program

{ "064e12.16k", 0x080000, 0xe2bdc619, BRF_GRA }, // 5 Tiles
{ "064e11.12k", 0x080000, 0x2d8ca8b0, BRF_GRA }, // 6

{ "064e09.7l", 0x100000, 0x4160c372, BRF_GRA }, // 7 Sprites
{ "064e07.3l", 0x100000, 0x64dd673c, BRF_GRA }, // 8

{ "064e06.1d", 0x100000, 0x59810df9, BRF_SND }, // 9 K053260 Samples

{ "ssriders_eac.nv", 0x000080, 0xf6d641a7, BRF_OPT }, // 10

/* Firepower - 20220627 */
{ "064eac02_fp.8e", 0x040000, 0xec967819, BRF_ESS | BRF_PRG }, // 11 68000 Program Code
{ "064eac03_fp.8g", 0x040000, 0x11437187, BRF_ESS | BRF_PRG }, // 12
{ "064eab04_fp.10e", 0x020000, 0xf21e4481, BRF_ESS | BRF_PRG }, // 13
{ "064eab05_fp.10g", 0x020000, 0x81de0fd8, BRF_ESS | BRF_PRG }, // 14

/* Second Round - 20190420 */
{ "064eac02_sr.8e", 0x040000, 0x734f4b4c, BRF_ESS | BRF_PRG }, // 15 68000 Program Code
{ "064eac03_sr.8g", 0x040000, 0xd50e01fd, BRF_ESS | BRF_PRG }, // 16
{ "064eab04_sr.10e", 0x020000, 0x56bb2e75, BRF_ESS | BRF_PRG }, // 17
// { "064eab05_sr.10g", 0x020000, 0x0aad4619, BRF_ESS | BRF_PRG }, // 18
};

STD_ROM_PICK(Ssridershs)
STD_ROM_FN(Ssridershs)

static INT32 SsridershsInit()
{
nBurnDrvSubActive = (VerSwitcher & 0x03);

switch (nBurnDrvSubActive) {
case 0x00:
pszCustomNameA = "Sunset Riders - 1v4 (Hack)\0";
break;

case 0x01:
pszCustomNameA = "Sunset Riders - Firepower (Hack)\0";
break;

case 0x02:
pszCustomNameA = "Sunset Riders - Second Round (Hack)\0";
}

INT32 nRet = SsridersInit();

if ((0 == nRet) && nBurnDrvSubActive) {
INT32 nIndex = (0x01 == nBurnDrvSubActive) ? 11 : 15;
memset(Drv68KRom, 0, 0x0c0000);
// Load and byte-swap 68000 Program roms
if (0 != BurnLoadRom(Drv68KRom + 0x000001, nIndex + 0, 2)) return 1;
if (0 != BurnLoadRom(Drv68KRom + 0x000000, nIndex + 1, 2)) return 1;
if (0 != BurnLoadRom(Drv68KRom + 0x080001, nIndex + 2, 2)) return 1;
if (0x02 == nBurnDrvSubActive) nIndex = 0; // 064eab05_sr.10g == 064eab05_1v4.10g
if (0 != BurnLoadRom(Drv68KRom + 0x080000, nIndex + 3, 2)) return 1;
}

return nRet;
}

struct BurnDriver BurnDrvSsridershs = {
"ssridershs", "ssriders", NULL, NULL, "2019-2020",
"Sunset Riders (Hack Series)\0", "Other versions are selected in the dipswitch", "hack", "GX064",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_HACK | BDF_HISCORE_SUPPORTED, 4, HARDWARE_KONAMI_68K_Z80, GBF_RUNGUN, 0,
NULL, SsridershsRomInfo, SsridershsRomName, NULL, NULL, NULL, NULL, Ssriders4pVerSwInputInfo, SsridershsDIPInfo,
SsridershsInit, BlswhstlExit, SsridersFrame, BlswhstlDraw, SsridersScan,
NULL, 0x810, 288, 224, 4, 3
};
Loading

0 comments on commit 4b817b1

Please sign in to comment.