public void executeFps() { for (int i = 0; i < 2822; i++) { for (int j = 0; j < 100; j++) { cpu.Run(); } //cpu.handleInterrupts(); bus.tick(200); } }
private void EXECUTE() { Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.High; Thread.CurrentThread.Priority = ThreadPriority.Highest; var timer = new System.Timers.Timer(1000); timer.Elapsed += OnTimedEvent; timer.Enabled = true; try { while (true) { for (int j = 0; j < 100; j++) { cpu.Run(); //cpu.handleInterrupts(); counter++; } bus.tick(200); cpu.handleInterrupts(); } } catch (Exception e) { Console.WriteLine(e.ToString()); } }
public void RunFrame() { //A lame mainloop with a workaround to be able to underclock. for (int i = 0; i < SYNC_LOOPS; i++) { for (int j = 0; j < SYNC_CYCLES; j++) { cpu.Run(); //cpu.handleInterrupts(); } bus.tick(SYNC_CYCLES * MIPS_UNDERCLOCK); cpu.handleInterrupts(); } }
public void RunFrame() { //A lame mainloop with a workaround to be able to underclock. int cyclesPerFrame = PSX_MHZ / 60; int syncLoops = (cyclesPerFrame / (SYNC_CYCLES * MIPS_UNDERCLOCK)) + 1; for (int i = 0; i < syncLoops; i++) { for (int j = 0; j < SYNC_CYCLES; j++) { cpu.Run(); //cpu.handleInterrupts(); } bus.tick(SYNC_CYCLES * MIPS_UNDERCLOCK); cpu.handleInterrupts(); } }
public void RunFrame() { //A lame mainloop with a workaround to be able to underclock. int cyclesPerFrame = PSX_MHZ / 60; int syncLoops = (cyclesPerFrame / (SYNC_CYCLES * MIPS_UNDERCLOCK)) + 1; for (int i = 0; i < syncLoops; i++) { for (int j = 0; j < SYNC_CYCLES; j++) { cpu.Run(); //cpu.handleInterrupts(); } bus.tick(SYNC_CYCLES * MIPS_UNDERCLOCK); cpu.handleInterrupts(); } Globals.frameCounter++; // this is where to figure out frame numbers for tools that need it if (Globals.GTEprecapture) { Globals.frameCounter = 0; Globals.capturingGTE = true; Globals.GTEprecapture = false; } if (Globals.GPUprecapture) { Globals.frameCounter = 0; Globals.capturingGPU = true; Globals.GPUprecapture = false; } if (Globals.frameCounter == Globals.capframes) { if (Globals.capturingGTE) { Globals.capturingGTE = false; } if (Globals.capturingGPU) { Globals.capturingGPU = false; } } }