mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Naming fixes.
This commit is contained in:
@@ -122,79 +122,79 @@ namespace Aaru.DiscImages
|
||||
decodedImage.Write(track, 0, tracksize);
|
||||
}
|
||||
|
||||
imageInfo.Application = "CisCopy";
|
||||
imageInfo.CreationTime = imageFilter.GetCreationTime();
|
||||
imageInfo.LastModificationTime = imageFilter.GetLastWriteTime();
|
||||
imageInfo.MediaTitle = imageFilter.GetFilename();
|
||||
imageInfo.ImageSize = (ulong)(stream.Length - 2 - trackBytes.Length);
|
||||
imageInfo.SectorSize = 512;
|
||||
_imageInfo.Application = "CisCopy";
|
||||
_imageInfo.CreationTime = imageFilter.GetCreationTime();
|
||||
_imageInfo.LastModificationTime = imageFilter.GetLastWriteTime();
|
||||
_imageInfo.MediaTitle = imageFilter.GetFilename();
|
||||
_imageInfo.ImageSize = (ulong)(stream.Length - 2 - trackBytes.Length);
|
||||
_imageInfo.SectorSize = 512;
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case DiskType.MD1DD8:
|
||||
imageInfo.MediaType = MediaType.DOS_525_SS_DD_8;
|
||||
imageInfo.Sectors = 40 * 1 * 8;
|
||||
imageInfo.Heads = 1;
|
||||
imageInfo.Cylinders = 40;
|
||||
imageInfo.SectorsPerTrack = 8;
|
||||
_imageInfo.MediaType = MediaType.DOS_525_SS_DD_8;
|
||||
_imageInfo.Sectors = 40 * 1 * 8;
|
||||
_imageInfo.Heads = 1;
|
||||
_imageInfo.Cylinders = 40;
|
||||
_imageInfo.SectorsPerTrack = 8;
|
||||
|
||||
break;
|
||||
case DiskType.MD2DD8:
|
||||
imageInfo.MediaType = MediaType.DOS_525_DS_DD_8;
|
||||
imageInfo.Sectors = 40 * 2 * 8;
|
||||
imageInfo.Heads = 2;
|
||||
imageInfo.Cylinders = 40;
|
||||
imageInfo.SectorsPerTrack = 8;
|
||||
_imageInfo.MediaType = MediaType.DOS_525_DS_DD_8;
|
||||
_imageInfo.Sectors = 40 * 2 * 8;
|
||||
_imageInfo.Heads = 2;
|
||||
_imageInfo.Cylinders = 40;
|
||||
_imageInfo.SectorsPerTrack = 8;
|
||||
|
||||
break;
|
||||
case DiskType.MD1DD:
|
||||
imageInfo.MediaType = MediaType.DOS_525_SS_DD_9;
|
||||
imageInfo.Sectors = 40 * 1 * 9;
|
||||
imageInfo.Heads = 1;
|
||||
imageInfo.Cylinders = 40;
|
||||
imageInfo.SectorsPerTrack = 9;
|
||||
_imageInfo.MediaType = MediaType.DOS_525_SS_DD_9;
|
||||
_imageInfo.Sectors = 40 * 1 * 9;
|
||||
_imageInfo.Heads = 1;
|
||||
_imageInfo.Cylinders = 40;
|
||||
_imageInfo.SectorsPerTrack = 9;
|
||||
|
||||
break;
|
||||
case DiskType.MD2DD:
|
||||
imageInfo.MediaType = MediaType.DOS_525_DS_DD_9;
|
||||
imageInfo.Sectors = 40 * 2 * 9;
|
||||
imageInfo.Heads = 2;
|
||||
imageInfo.Cylinders = 40;
|
||||
imageInfo.SectorsPerTrack = 9;
|
||||
_imageInfo.MediaType = MediaType.DOS_525_DS_DD_9;
|
||||
_imageInfo.Sectors = 40 * 2 * 9;
|
||||
_imageInfo.Heads = 2;
|
||||
_imageInfo.Cylinders = 40;
|
||||
_imageInfo.SectorsPerTrack = 9;
|
||||
|
||||
break;
|
||||
case DiskType.MF2DD:
|
||||
imageInfo.MediaType = MediaType.DOS_35_DS_DD_9;
|
||||
imageInfo.Sectors = 80 * 2 * 9;
|
||||
imageInfo.Heads = 2;
|
||||
imageInfo.Cylinders = 80;
|
||||
imageInfo.SectorsPerTrack = 9;
|
||||
_imageInfo.MediaType = MediaType.DOS_35_DS_DD_9;
|
||||
_imageInfo.Sectors = 80 * 2 * 9;
|
||||
_imageInfo.Heads = 2;
|
||||
_imageInfo.Cylinders = 80;
|
||||
_imageInfo.SectorsPerTrack = 9;
|
||||
|
||||
break;
|
||||
case DiskType.MD2HD:
|
||||
imageInfo.MediaType = MediaType.DOS_525_HD;
|
||||
imageInfo.Sectors = 80 * 2 * 15;
|
||||
imageInfo.Heads = 2;
|
||||
imageInfo.Cylinders = 80;
|
||||
imageInfo.SectorsPerTrack = 15;
|
||||
_imageInfo.MediaType = MediaType.DOS_525_HD;
|
||||
_imageInfo.Sectors = 80 * 2 * 15;
|
||||
_imageInfo.Heads = 2;
|
||||
_imageInfo.Cylinders = 80;
|
||||
_imageInfo.SectorsPerTrack = 15;
|
||||
|
||||
break;
|
||||
case DiskType.MF2HD:
|
||||
imageInfo.MediaType = MediaType.DOS_35_HD;
|
||||
imageInfo.Sectors = 80 * 2 * 18;
|
||||
imageInfo.Heads = 2;
|
||||
imageInfo.Cylinders = 80;
|
||||
imageInfo.SectorsPerTrack = 18;
|
||||
_imageInfo.MediaType = MediaType.DOS_35_HD;
|
||||
_imageInfo.Sectors = 80 * 2 * 18;
|
||||
_imageInfo.Heads = 2;
|
||||
_imageInfo.Cylinders = 80;
|
||||
_imageInfo.SectorsPerTrack = 18;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
imageInfo.XmlMediaType = XmlMediaType.BlockMedia;
|
||||
decodedDisk = decodedImage.ToArray();
|
||||
_imageInfo.XmlMediaType = XmlMediaType.BlockMedia;
|
||||
_decodedDisk = decodedImage.ToArray();
|
||||
|
||||
decodedImage.Close();
|
||||
|
||||
AaruConsole.VerboseWriteLine("CisCopy image contains a disk of type {0}", imageInfo.MediaType);
|
||||
AaruConsole.VerboseWriteLine("CisCopy image contains a disk of type {0}", _imageInfo.MediaType);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -203,16 +203,16 @@ namespace Aaru.DiscImages
|
||||
|
||||
public byte[] ReadSectors(ulong sectorAddress, uint length)
|
||||
{
|
||||
if(sectorAddress > imageInfo.Sectors - 1)
|
||||
if(sectorAddress > _imageInfo.Sectors - 1)
|
||||
throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found");
|
||||
|
||||
if(sectorAddress + length > imageInfo.Sectors)
|
||||
if(sectorAddress + length > _imageInfo.Sectors)
|
||||
throw new ArgumentOutOfRangeException(nameof(length), "Requested more sectors than available");
|
||||
|
||||
byte[] buffer = new byte[length * imageInfo.SectorSize];
|
||||
byte[] buffer = new byte[length * _imageInfo.SectorSize];
|
||||
|
||||
Array.Copy(decodedDisk, (int)sectorAddress * imageInfo.SectorSize, buffer, 0,
|
||||
length * imageInfo.SectorSize);
|
||||
Array.Copy(_decodedDisk, (int)sectorAddress * _imageInfo.SectorSize, buffer, 0,
|
||||
length * _imageInfo.SectorSize);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user