Beispiel #1
0
        public void NewPrefs(Prefs prefs)
        {
            // Delete and recreate all changed drives
            for (int i = 0; i < 4; i++)
            {
                if ((GlobalPrefs.ThePrefs.DriveType[i] != prefs.DriveType[i]) || GlobalPrefs.ThePrefs.DrivePath[i] != prefs.DrivePath[i] || GlobalPrefs.ThePrefs.Emul1541Proc != prefs.Emul1541Proc)
                {
                    drive[i] = null;    // Important because UpdateLEDs is called from drive constructors (via set_error())
                    if (!prefs.Emul1541Proc)
                    {
                        if (prefs.DriveType[i] == DriveType.DRVTYPE_DIR)
                        {
                            drive[i] = new FSDrive(this, prefs.DrivePath[i]);
                        }
                        else if (prefs.DriveType[i] == DriveType.DRVTYPE_D64)
                        {
                            drive[i] = new D64Drive(this, prefs.DrivePath[i]);
                        }
                        else
                        {
                            drive[i] = new T64Drive(this, prefs.DrivePath[i]);
                        }
                    }
                }
            }

            UpdateLEDs();
        }
Beispiel #2
0
        public IEC(C64Display display)
        {
            the_display = display;

            int i;

            // Create drives 8..11
            for (i = 0; i < drive.Length; i++)
            {
                drive[i] = null;        // Important because UpdateLEDs is called from the drive constructors (via set_error)
            }
            if (!GlobalPrefs.ThePrefs.Emul1541Proc)
            {
                DriveType[] prefDrives = GlobalPrefs.ThePrefs.DriveType;

                for (i = 0; i < prefDrives.Length; i++)
                {
                    if (prefDrives[i] == DriveType.DRVTYPE_DIR)
                    {
                        drive[i] = new FSDrive(this, GlobalPrefs.ThePrefs.DrivePath[i]);
                    }
                    else if (prefDrives[i] == DriveType.DRVTYPE_D64)
                    {
                        drive[i] = new D64Drive(this, GlobalPrefs.ThePrefs.DrivePath[i]);
                    }
                    else
                    {
                        drive[i] = new T64Drive(this, GlobalPrefs.ThePrefs.DrivePath[i]);
                    }
                }
            }

            listener_active = talker_active = false;
            listening       = false;
        }
Beispiel #3
0
        public IEC(C64Display display)
        {
            the_display = display;

            int i;

            // Create drives 8..11
            for (i = 0; i < drive.Length; i++)
                drive[i] = null;	// Important because UpdateLEDs is called from the drive constructors (via set_error)

            if (!GlobalPrefs.ThePrefs.Emul1541Proc)
            {
                DriveType[] prefDrives = GlobalPrefs.ThePrefs.DriveType;

                for (i = 0; i < prefDrives.Length; i++)
                {
                    if (prefDrives[i] == DriveType.DRVTYPE_DIR)
                        drive[i] = new FSDrive(this, GlobalPrefs.ThePrefs.DrivePath[i]);
                    else if (prefDrives[i] == DriveType.DRVTYPE_D64)
                        drive[i] = new D64Drive(this, GlobalPrefs.ThePrefs.DrivePath[i]);
                    else
                        drive[i] = new T64Drive(this, GlobalPrefs.ThePrefs.DrivePath[i]);
                }
            }

            listener_active = talker_active = false;
            listening = false;
        }
Beispiel #4
0
        public void NewPrefs(Prefs prefs)
        {
            // Delete and recreate all changed drives
            for (int i = 0; i < 4; i++)
                if ((GlobalPrefs.ThePrefs.DriveType[i] != prefs.DriveType[i]) || GlobalPrefs.ThePrefs.DrivePath[i] != prefs.DrivePath[i] || GlobalPrefs.ThePrefs.Emul1541Proc != prefs.Emul1541Proc)
                {
                    drive[i] = null;	// Important because UpdateLEDs is called from drive constructors (via set_error())
                    if (!prefs.Emul1541Proc)
                    {
                        if (prefs.DriveType[i] == DriveType.DRVTYPE_DIR)
                            drive[i] = new FSDrive(this, prefs.DrivePath[i]);
                        else if (prefs.DriveType[i] == DriveType.DRVTYPE_D64)
                            drive[i] = new D64Drive(this, prefs.DrivePath[i]);
                        else
                            drive[i] = new T64Drive(this, prefs.DrivePath[i]);
                    }
                }

            UpdateLEDs();
        }