void RunZ80(int cycles) { // I emulate the YM2612 synced to Z80 clock, for better or worse. // So we still need to keep the Z80 cycle count accurate even if the Z80 isn't running. if (Z80Runnable) { SoundCPU.ExecuteCycles(cycles); } else { SoundCPU.TotalExecutedCycles += cycles; } }
public void ExecFrame(bool render) { int scanlinesPerFrame = DisplayType == DisplayType.NTSC ? 262 : 313; SpriteLimit = Sms.Settings.SpriteLimit; for (ScanLine = 0; ScanLine < scanlinesPerFrame; ScanLine++) { RenderCurrentScanline(render); ProcessFrameInterrupt(); ProcessLineInterrupt(); Cpu.ExecuteCycles(IPeriod); if (ScanLine == scanlinesPerFrame - 1) { ProcessGGScreen(); } } }
public void FrameAdvance(bool render, bool rendersound) { lagged = true; //I eyeballed this speed for (int i = 0; i < 5; i++) { onPressed = Controller.IsPressed("ON"); //and this was derived from other emus cpu.ExecuteCycles(10000); cpu.Interrupt = true; } Frame++; if (lagged) { lagCount++; isLag = true; } else { isLag = false; } }