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(); Sms.ProcessLineControls(); //Console.Write(Cpu.cur_instr.Length); //Console.Write(" "); //Console.WriteLine(Cpu.instr_pntr); for (int j = 0; j < IPeriod; j++) { Cpu.ExecuteOne(); } if (ScanLine == scanlinesPerFrame - 1) { ProcessGGScreen(); ProcessOverscan(); } } }
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(); Sms.ProcessLineControls(); Cpu.ExecuteCycles(IPeriod); if (ScanLine == scanlinesPerFrame - 1) { ProcessGGScreen(); ProcessOverscan(); } } }