VS Block Breaker / Saru-Kani lives!!
This commit is contained in:
parent
efe4401e77
commit
80d9e93fb6
|
@ -11,7 +11,6 @@
|
|||
#define HARDWARE_KANEKO_SKNS HARDWARE_KANEKO_MISC
|
||||
#endif
|
||||
|
||||
|
||||
static UINT8 *AllMem;
|
||||
static UINT8 *MemEnd;
|
||||
static UINT8 *AllRam;
|
||||
|
@ -78,6 +77,7 @@ static UINT32 speedhack_address = ~0;
|
|||
static UINT32 speedhack_pc[2] = { 0, 0 };
|
||||
static UINT8 m_region = 0; /* 0 Japan, 1 Europe, 2 Asia, 3 USA, 4 Korea */
|
||||
static UINT32 draw_layer_speedhack = 0;
|
||||
static UINT32 Vblokbrk = 0;
|
||||
static struct BurnRomInfo emptyRomDesc[] = {
|
||||
{ "", 0, 0, 0 },
|
||||
};
|
||||
|
@ -933,10 +933,15 @@ static int DrvDoReset()
|
|||
memset (DrvTmpScreenBuf, 0xff, 0x8000);
|
||||
|
||||
Sh2Open(0);
|
||||
Sh2Reset( *(UINT32 *)(DrvSh2ROM + 0), *(UINT32 *)(DrvSh2ROM + 4) );
|
||||
if (sprite_kludge_y == -272) // sengekistriker
|
||||
Sh2SetVBR(0x6000000);
|
||||
else Sh2SetVBR(0x4000000);
|
||||
if (Vblokbrk) {
|
||||
Sh2Reset(); // VS Block Breaker / Saru Kani must run through the Super Kaneko BIOS for nvram to work!
|
||||
draw_layer_speedhack = 0; // this gets enabled after the BIOS runs through its intro.
|
||||
} else { // Run everything else directly, bypassing the bios.
|
||||
Sh2Reset( *(UINT32 *)(DrvSh2ROM + 0), *(UINT32 *)(DrvSh2ROM + 4) );
|
||||
if (sprite_kludge_y == -272) // sengekistriker
|
||||
Sh2SetVBR(0x6000000);
|
||||
else Sh2SetVBR(0x4000000);
|
||||
}
|
||||
Sh2Close();
|
||||
|
||||
YMZ280BReset();
|
||||
|
@ -1068,7 +1073,7 @@ static int DrvInit(INT32 bios)
|
|||
|
||||
YMZ280BInit(16666666, NULL);
|
||||
|
||||
if (strstr(BurnDrvGetTextA(DRV_NAME), "pan")) {
|
||||
if (strstr(BurnDrvGetTextA(DRV_NAME), "pan") || strstr(BurnDrvGetTextA(DRV_NAME), "saruk") || strstr(BurnDrvGetTextA(DRV_NAME), "vblok")) {
|
||||
// Disable draw_layer() speed hack for Panic Street & Gals Panic 2,3,4etc
|
||||
draw_layer_speedhack = 0;
|
||||
} else {
|
||||
|
@ -1099,6 +1104,7 @@ static int DrvExit()
|
|||
AllMem = NULL;
|
||||
|
||||
suprnova_alt_enable_background = 0;
|
||||
Vblokbrk = 0;
|
||||
|
||||
speedhack_address = ~0;
|
||||
memset (speedhack_pc, 0, 2 * sizeof(int));
|
||||
|
@ -1611,6 +1617,10 @@ static int DrvFrame()
|
|||
DrvInputs[2] = 0xffffffff;
|
||||
}
|
||||
|
||||
if (Vblokbrk && Sh2TotalCycles() >= 398084698) {
|
||||
draw_layer_speedhack = 1; // Turn on the speedhack after the SKNS Bios is done with its intro
|
||||
}
|
||||
|
||||
//INT32 nSoundBufferPos = 0;
|
||||
INT32 nTotalCycles = 28638000 / 60;
|
||||
INT32 nInterleave = 262;
|
||||
|
@ -1628,21 +1638,21 @@ static int DrvFrame()
|
|||
Sh2SetIRQLine(5, SH2_IRQSTATUS_AUTO);
|
||||
Sh2Run(0);
|
||||
Sh2SetIRQLine(5, SH2_IRQSTATUS_NONE);
|
||||
}
|
||||
{ // fire irq9 every interleave iteration.
|
||||
}
|
||||
{ // fire irq9 every interleave iteration.
|
||||
Sh2SetIRQLine(9, SH2_IRQSTATUS_AUTO);
|
||||
Sh2Run(0);
|
||||
Sh2SetIRQLine(9, SH2_IRQSTATUS_NONE);
|
||||
if (i%125==0 && i!=0) { //125 = every 8 ms (per 261 interleave)
|
||||
Sh2SetIRQLine(11, SH2_IRQSTATUS_AUTO);
|
||||
Sh2Run(0);
|
||||
Sh2SetIRQLine(11, SH2_IRQSTATUS_NONE);
|
||||
}
|
||||
if (i%31==0 && i!=0) { //31=every 2 ms
|
||||
Sh2SetIRQLine(15, SH2_IRQSTATUS_AUTO);
|
||||
Sh2Run(0);
|
||||
Sh2SetIRQLine(15, SH2_IRQSTATUS_NONE);
|
||||
}
|
||||
if (i%125==0 && i!=0) { //125 = every 8 ms (per 261 interleave)
|
||||
Sh2SetIRQLine(11, SH2_IRQSTATUS_AUTO);
|
||||
Sh2Run(0);
|
||||
Sh2SetIRQLine(11, SH2_IRQSTATUS_NONE);
|
||||
}
|
||||
if (i%31==0 && i!=0) { //31=every 2 ms
|
||||
Sh2SetIRQLine(15, SH2_IRQSTATUS_AUTO);
|
||||
Sh2Run(0);
|
||||
Sh2SetIRQLine(15, SH2_IRQSTATUS_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
/*if (pBurnSoundOut && (i & 1)) {
|
||||
|
@ -2791,16 +2801,17 @@ static int VblokbrkInit()
|
|||
sprite_kludge_x = -1;
|
||||
sprite_kludge_y = -1;
|
||||
suprnova_alt_enable_background = 1;
|
||||
Vblokbrk = 1;
|
||||
|
||||
return DrvInit(2 /*Asia*/);
|
||||
}
|
||||
|
||||
struct BurnDriver BurnDrvVblokbrk = {
|
||||
"vblokbrk", NULL, "skns", NULL, "1997",
|
||||
"VS Block Breaker (Asia)\0", "imperfect inputs", "Kaneko / Mediaworks", "Miscellaneous",
|
||||
"VS Block Breaker (Asia)\0", NULL, "Kaneko / Mediaworks", "Miscellaneous",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING, 2, HARDWARE_KANEKO_SKNS, GBF_BALLPADDLE, 0,
|
||||
NULL, vblokbrkRomInfo, vblokbrkRomName, NULL, NULL, VblokbrkInputInfo, VblokbrkDIPInfo, //VblokbrkInputInfo, VblokbrkDIPInfo,
|
||||
NULL, vblokbrkRomInfo, vblokbrkRomName, NULL, NULL, VblokbrkInputInfo, VblokbrkDIPInfo,
|
||||
VblokbrkInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
|
||||
320, 240, 4, 3
|
||||
};
|
||||
|
@ -2828,16 +2839,17 @@ static int SarukaniInit()
|
|||
sprite_kludge_x = -1;
|
||||
sprite_kludge_y = -1;
|
||||
suprnova_alt_enable_background = 1;
|
||||
Vblokbrk = 1;
|
||||
|
||||
return DrvInit(0 /*Japan*/);
|
||||
}
|
||||
|
||||
struct BurnDriver BurnDrvSarukani = {
|
||||
"sarukani", "vblokbrk", "skns", NULL, "1997",
|
||||
"Saru-Kani-Hamu-Zou (Japan)\0", "imperfect inputs", "Kaneko / Mediaworks", "Miscellaneous",
|
||||
"Saru-Kani-Hamu-Zou (Japan)\0", NULL, "Kaneko / Mediaworks", "Miscellaneous",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_KANEKO_SKNS, GBF_BALLPADDLE, 0,
|
||||
NULL, sarukaniRomInfo, sarukaniRomName, NULL, NULL, VblokbrkInputInfo, VblokbrkDIPInfo, //VblokbrkInputInfo, VblokbrkDIPInfo,
|
||||
NULL, sarukaniRomInfo, sarukaniRomName, NULL, NULL, VblokbrkInputInfo, VblokbrkDIPInfo,
|
||||
SarukaniInit, DrvExit, DrvFrame, DrvDraw, DrvScan, NULL, 0x8000,
|
||||
320, 240, 4, 3
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue