public override int GetHashCode() { var hashCode = -2077317876; hashCode = hashCode * -1521134295 + DiskDriveMaker.GetHashCode(); hashCode = hashCode * -1521134295 + DiskDriveType.GetHashCode(); hashCode = hashCode * -1521134295 + InformationSize.GetHashCode(); return(hashCode); }
public DiskDriveInfoEx(Id <DiskDriveInfoEx> diskDriveId, Id <DiskDriveInfoEx> diskDriveDbId, DiskDriveMaker diskDriveMaker, string serialNumber, DiskDriveType diskDriveType, int?driveNumber, PartitionInfoExs partitionInfoExs, IList <Exception> exceptions) { DiskDriveId = diskDriveId; DiskDriveDbId = diskDriveDbId; DiskDriveMaker = diskDriveMaker; SerialNumber = serialNumber ?? throw new ArgumentNullException(nameof(serialNumber)); DiskDriveType = diskDriveType; DriveNumber = driveNumber; PartitionInfoExs = partitionInfoExs ?? throw new ArgumentNullException(nameof(partitionInfoExs)); Exceptions = exceptions ?? throw new ArgumentNullException(nameof(exceptions)); }
private void InitRoms(DiskDriveType diskDriveType) { _board.BasicRom.Flash(GetFirmware(0x2000, "Basic")); _board.KernalRom.Flash(GetFirmware(0x2000, "Kernal")); _board.CharRom.Flash(GetFirmware(0x1000, "Chargen")); switch (diskDriveType) { case DiskDriveType.Commodore1541: _board.DiskDrive.DriveRom.Flash(GetFirmware(0x4000, "Drive1541")); break; case DiskDriveType.Commodore1541II: _board.DiskDrive.DriveRom.Flash(GetFirmware(0x4000, "Drive1541II")); break; } }
private void InitRoms(DiskDriveType diskDriveType) { var basicRom = GetFirmware(0x2000, "Basic"); var charRom = GetFirmware(0x1000, "Chargen"); var kernalRom = GetFirmware(0x2000, "Kernal"); _board.BasicRom.Flash(basicRom); _board.KernalRom.Flash(kernalRom); _board.CharRom.Flash(charRom); if (diskDriveType == DiskDriveType.Commodore1541) { var diskRom = GetFirmware(0x4000, "Drive1541II", "Drive1541"); _board.DiskDrive.DriveRom.Flash(diskRom); } }
public override int GetHashCode() { var hashCode = 1057818730; hashCode = hashCode * -1521134295 + EqualityComparer <Id <DiskDriveInfoEx> > .Default.GetHashCode(DiskDriveId); hashCode = hashCode * -1521134295 + EqualityComparer <Id <DiskDriveInfoEx> > .Default.GetHashCode(DiskDriveDbId); hashCode = hashCode * -1521134295 + DiskDriveMaker.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(SerialNumber); hashCode = hashCode * -1521134295 + DiskDriveType.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <int?> .Default.GetHashCode(DriveNumber); hashCode = hashCode * -1521134295 + EqualityComparer <PartitionInfoExs> .Default.GetHashCode(PartitionInfoExs); hashCode = hashCode * -1521134295 + EqualityComparer <IList <Exception> > .Default.GetHashCode(Exceptions); return(hashCode); }
private void Init(VicType initRegion, BorderType borderType, SidType sidType, TapeDriveType tapeDriveType, DiskDriveType diskDriveType) { // Force certain drive types to be available depending on ROM type var rom = _roms.First(); switch (C64FormatFinder.GetFormat(rom)) { case C64Format.D64: case C64Format.G64: case C64Format.X64: if (diskDriveType == DiskDriveType.None) { diskDriveType = DiskDriveType.Commodore1541; } break; case C64Format.T64: case C64Format.TAP: if (tapeDriveType == TapeDriveType.None) { tapeDriveType = TapeDriveType.Commodore1530; } break; case C64Format.CRT: // Nothing required. break; case C64Format.Unknown: if (rom.Length >= 0xFE00) { throw new Exception("The image format is not known, and too large to be used as a PRG."); } if (diskDriveType == DiskDriveType.None) { diskDriveType = DiskDriveType.Commodore1541; } break; default: throw new Exception("The image format is not yet supported by the Commodore 64 core."); } _board = new Motherboard(this, initRegion, borderType, sidType, tapeDriveType, diskDriveType); InitRoms(diskDriveType); _board.Init(); }
private void Init(VicType initRegion, BorderType borderType, SidType sidType, TapeDriveType tapeDriveType, DiskDriveType diskDriveType) { // Force certain drive types to be available depending on ROM type foreach (var rom in Roms) { switch (C64FormatFinder.GetFormat(rom)) { case C64Format.D64: case C64Format.G64: case C64Format.X64: if (diskDriveType == DiskDriveType.None) diskDriveType = DiskDriveType.Commodore1541; break; case C64Format.T64: case C64Format.TAP: if (tapeDriveType == TapeDriveType.None) { tapeDriveType = TapeDriveType.Commodore1530; } break; case C64Format.CRT: // Nothing required. break; case C64Format.Unknown: if (rom.Length >= 0xFE00) { throw new Exception("The image format is not known, and too large to be used as a PRG."); } if (diskDriveType == DiskDriveType.None) diskDriveType = DiskDriveType.Commodore1541; break; default: throw new Exception("The image format is not yet supported by the Commodore 64 core."); } } _board = new Motherboard(this, initRegion, borderType, sidType, tapeDriveType, diskDriveType); InitRoms(diskDriveType); _board.Init(); // configure video CoreComm.VsyncDen = _board.Vic.CyclesPerFrame; CoreComm.VsyncNum = _board.Vic.CyclesPerSecond; }
private void Init(VicType initRegion, BorderType borderType, SidType sidType, TapeDriveType tapeDriveType, DiskDriveType diskDriveType) { // Force certain drive types to be available depending on ROM type switch (_inputFileInfo.Extension.ToUpper()) { case @".D64": case @".G64": if (diskDriveType == DiskDriveType.None) { diskDriveType = DiskDriveType.Commodore1541; } break; case @".TAP": if (tapeDriveType == TapeDriveType.None) { tapeDriveType = TapeDriveType.Commodore1530; } break; } _board = new Motherboard(this, initRegion, borderType, sidType, tapeDriveType, diskDriveType); InitRoms(diskDriveType); _board.Init(); InitMedia(); // configure video CoreComm.VsyncDen = _board.Vic.CyclesPerFrame; CoreComm.VsyncNum = _board.Vic.CyclesPerSecond; }
public DiskDriveSignil(DiskDriveMaker diskDriveMaker, DiskDriveType diskDriveType, Information informationSize) { DiskDriveMaker = diskDriveMaker; DiskDriveType = diskDriveType; InformationSize = informationSize; }