private void _MainCycle() { MicroStopwatch mw = new MicroStopwatch(); int cycToGo = 0; while (true) { mw.Start(); for (int i = 0; i < 4; i++) { HandleInterrupts(); if (cycToGo == 0) { cycToGo = Cpu.ExecuteOp() - 1; } else { cycToGo--; } Video.ModeClock++; HandleVideo(); } timer.Tick(); Audio.Tick(); while (mw.ElapsedMicroseconds == 0) ; mw.Reset(); } }