d_gng.cpp: Ghouls n Ghosts: buffer the sprites at the right time to fix sprite lag (notice the gravestones while walking), on first boot: fill the palette with something to see the boot messages
This commit is contained in:
parent
4183730172
commit
5eea09129b
|
@ -862,6 +862,16 @@ void __fastcall DrvGngZ80Write(UINT16 a, UINT8 d)
|
|||
}
|
||||
}
|
||||
|
||||
static void DrvRandPalette()
|
||||
{ // On first boot we fill the palette with some arbatrary values to see the boot-up messages
|
||||
DrvPaletteRam1[0] = 0x00;
|
||||
DrvPaletteRam2[0] = 0x00;
|
||||
for (INT32 i = 1; i < 0x100; i++) {
|
||||
DrvPaletteRam1[i] = 0xaf;
|
||||
DrvPaletteRam2[i] = 0x5a;
|
||||
}
|
||||
}
|
||||
|
||||
static INT32 CharPlaneOffsets[2] = { 4, 0 };
|
||||
static INT32 CharXOffsets[8] = { 0, 1, 2, 3, 8, 9, 10, 11 };
|
||||
static INT32 CharYOffsets[8] = { 0, 16, 32, 48, 64, 80, 96, 112 };
|
||||
|
@ -977,6 +987,7 @@ static INT32 DrvInit()
|
|||
BurnYM2203SetRoute(1, BURN_SND_YM2203_AY8910_ROUTE_3, 0.40, BURN_SND_ROUTE_BOTH);
|
||||
|
||||
GenericTilesInit();
|
||||
DrvRandPalette();
|
||||
|
||||
// Reset the driver
|
||||
DrvDoReset();
|
||||
|
@ -1371,6 +1382,7 @@ static INT32 DrvFrame()
|
|||
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
|
||||
nCyclesDone[nCurrentCPU] += M6809Run(nCyclesSegment);
|
||||
if (i == 22) {
|
||||
memcpy(DrvSpriteRamBuffer, DrvSpriteRam, 0x200);
|
||||
M6809SetIRQLine(0, CPU_IRQSTATUS_AUTO);
|
||||
}
|
||||
M6809Close();
|
||||
|
@ -1394,8 +1406,6 @@ static INT32 DrvFrame()
|
|||
|
||||
if (pBurnDraw) DrvDraw();
|
||||
|
||||
memcpy(DrvSpriteRamBuffer, DrvSpriteRam, 0x200);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue