Ejemplo n.º 1
0
static int DrvFrame()
{
	int nInterleave = 10;
	int nSoundBufferPos = 0;

	if (DrvReset) DrvDoReset();

	DrvMakeInputs();

	nCyclesTotal[0] = 28638000 / 60;
	nCyclesDone[0] = 0;

	for (int i = 0; i < nInterleave; i++) {
		int nCurrentCPU, nNext;

		nCurrentCPU = 0;
		Sh2Open(0);
		nNext = (i + 1) * nCyclesTotal[nCurrentCPU] / nInterleave;
		nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
		nCyclesDone[nCurrentCPU] += Sh2Run(nCyclesSegment);
		if (i == 5) Sh2SetIRQLine(1, SH2_IRQSTATUS_AUTO);
		if (i == 9) Sh2SetIRQLine(5, SH2_IRQSTATUS_AUTO);
		Sh2Close();
	}
	
	if (pBurnDraw) DrvDraw();

	return 0;
}
Ejemplo n.º 2
0
static int s1945iiFrame()
{
	if (DrvReset)														// Reset machine
		DrvDoReset();
		
	if (bRecalcPalette) {
		// for(int i=0;i<0x4000;i++) CalcCol(i);
		bRecalcPalette = 0;
	}
	
	Sh2Run(28636350 / 60);

//	Sh2SetIRQLine(4, SH2_IRQSTATUS_AUTO);
	
//	Sh2SetIRQLine(12, SH2_IRQSTATUS_AUTO);
		
//	bprintf(0, _T("PC: %08x\n"), Sh2GetPC(0));
	
	//Sh2Run(1000);
	
	if (pBurnDraw) DrvDraw();

	return 0;
}