void EmulateCyclesWith1541()
{
thread_running = true;
while (!quit_thyself)
{
// The order of calls is important here
if (TheVIC.EmulateCycle())
TheSID.EmulateLine();
TheCIA1.CheckIRQs();
TheCIA2.CheckIRQs();
TheCIA1.EmulateCycle();
TheCIA2.EmulateCycle();
TheCPU.EmulateCycle();
TheCPU1541.CountVIATimers(1);
if (!TheCPU1541.Idle)
TheCPU1541.EmulateCycle();
CycleCounter++;
}
}