Skip to content

Commit 041f921

Browse files
d_powerins.cpp: implement socd
1 parent 247af02 commit 041f921

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/burn/drv/pst90s/d_powerins.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ static INT32 game_drv = 0;
5454
static INT32 nCyclesDone[2], nCyclesTotal[2];
5555
static INT32 nCyclesSegment;
5656

57+
static ClearOpposite<2, UINT8> clear_opposite;
58+
5759
inline static void CalcCol(INT32 idx)
5860
{
5961
/* RRRR GGGG BBBB RGBx */
@@ -716,6 +718,8 @@ static INT32 DrvDoReset()
716718
tile_bank = 0;
717719
soundlatch = 0;
718720

721+
clear_opposite.reset();
722+
719723
HiscoreReset();
720724

721725
return 0;
@@ -1366,6 +1370,9 @@ static INT32 powerinsFrame()
13661370
DrvInput[0] |= (DrvButton[i] & 1) << i;
13671371
}
13681372

1373+
for (INT32 i = 0; i < 2; i++)
1374+
clear_opposite.check(i, DrvInput[i+2], 0x08, 0x04, 0x02, 0x01, nSocd[i]);
1375+
13691376
nCyclesTotal[0] = (INT32)((INT64)12000000 * nBurnCPUSpeedAdjust / (0x0100 * 56));
13701377
if (game_drv == GAME_POWERINB) nCyclesTotal[0] = (INT32)((INT64)12000000 * nBurnCPUSpeedAdjust / (0x0100 * 60));
13711378
nCyclesTotal[1] = 6000000 / 60;
@@ -1485,6 +1492,8 @@ static INT32 powerinsScan(INT32 nAction, INT32 *pnMin)
14851492
if (nAction & ACB_WRITE) {
14861493
if (game_drv == GAME_POWERINA) MSM6295SetBank(0, MSM6295ROM + 0x30000 + 0x10000*oki_bank, 0x30000, 0x3ffff);
14871494
}
1495+
1496+
clear_opposite.scan();
14881497
}
14891498

14901499
return 0;

0 commit comments

Comments
 (0)