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++; } }
public void Reset() { TheCPU.AsyncReset(); TheCPU1541.AsyncReset(); TheSID.Reset(); TheCIA1.Reset(); TheCIA2.Reset(); TheIEC.Reset(); }
public void Run() { TheCPU.Reset(); TheSID.Reset(); TheCIA1.Reset(); TheCIA2.Reset(); TheCPU1541.Reset(); // Patch kernal IEC routines orig_kernal_1d84 = Kernal[0x1d84]; orig_kernal_1d85 = Kernal[0x1d85]; patch_kernel(GlobalPrefs.ThePrefs.FastReset, GlobalPrefs.ThePrefs.Emul1541Proc); Events.Quit += new QuitEventHandler(Events_Quit); // Start the machine main loop MainLoop(); }
public void NewPrefs(Prefs prefs) { open_close_joysticks(GlobalPrefs.ThePrefs.Joystick1On, GlobalPrefs.ThePrefs.Joystick2On, prefs.Joystick1On, prefs.Joystick2On); patch_kernel(prefs.FastReset, prefs.Emul1541Proc); TheDisplay.NewPrefs(prefs); TheIEC.NewPrefs(prefs); TheJob1541.NewPrefs(prefs); TheREU.NewPrefs(prefs); TheSID.NewPrefs(prefs); // Reset 1541 processor if turned on if (!GlobalPrefs.ThePrefs.Emul1541Proc && prefs.Emul1541Proc) { TheCPU1541.AsyncReset(); } }