mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
* commandline:
* DiscImageChef.Metadata/MediaType.cs: * DiscImageChef.CommonTypes/MediaType.cs: Added Jaguar CD, Super CD-ROM² and 3DO discs. * DiscImageChef.Metadata/Dimensions.cs: Add dimensions for CDs and family. * DiscImageChef/Commands/DumpMedia.cs: Added creation of IBG logs. Added filesystem and partitions detection (does not work with raw).
This commit is contained in:
@@ -3,6 +3,11 @@
|
|||||||
* commandline:
|
* commandline:
|
||||||
|
|
||||||
|
|
||||||
|
2016-02-04 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* commandline:
|
||||||
|
|
||||||
|
|
||||||
2016-02-03 Natalia Portillo <claunia@claunia.com>
|
2016-02-03 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* commandline:
|
* commandline:
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
2016-02-04 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* MediaType.cs:
|
||||||
|
Added Jaguar CD, Super CD-ROM² and 3DO discs.
|
||||||
|
|
||||||
2016-01-16 Natalia Portillo <claunia@claunia.com>
|
2016-01-16 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* MediaType.cs:
|
* MediaType.cs:
|
||||||
|
|||||||
@@ -229,11 +229,22 @@ namespace DiscImageChef.CommonTypes
|
|||||||
SATURNCD,
|
SATURNCD,
|
||||||
/// <summary>Sega/Yamaha Gigabyte Disc</summary>
|
/// <summary>Sega/Yamaha Gigabyte Disc</summary>
|
||||||
GDROM,
|
GDROM,
|
||||||
/// <summary>Sega/Yamaha recordable Gigabyte Disc}}</summary>
|
/// <summary>Sega/Yamaha recordable Gigabyte Disc</summary>
|
||||||
GDR,
|
GDR,
|
||||||
SegaCard,
|
SegaCard,
|
||||||
#endregion Sega game media
|
#endregion Sega game media
|
||||||
|
|
||||||
|
#region Other game media
|
||||||
|
/// <summary>PC-Engine / TurboGrafx cartridge</summary>
|
||||||
|
HuCard,
|
||||||
|
/// <summary>PC-Engine / TurboGrafx CD</summary>
|
||||||
|
SuperCDROM2,
|
||||||
|
/// <summary>Atari Jaguar CD</summary>
|
||||||
|
JaguarCD,
|
||||||
|
/// <summary>3DO CD</summary>
|
||||||
|
ThreeDO,
|
||||||
|
#endregion Other game media
|
||||||
|
|
||||||
#region Apple standard floppy format
|
#region Apple standard floppy format
|
||||||
/// <summary>5.25", SS, DD, 35 tracks, 13 spt, 256 bytes/sector, GCR</summary>
|
/// <summary>5.25", SS, DD, 35 tracks, 13 spt, 256 bytes/sector, GCR</summary>
|
||||||
Apple32SS,
|
Apple32SS,
|
||||||
@@ -753,7 +764,6 @@ namespace DiscImageChef.CommonTypes
|
|||||||
Flextra3225,
|
Flextra3225,
|
||||||
HiTC1,
|
HiTC1,
|
||||||
HiTC2,
|
HiTC2,
|
||||||
HuCard,
|
|
||||||
LT1,
|
LT1,
|
||||||
MiniCard,
|
MiniCard,
|
||||||
Orb,
|
Orb,
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
2016-02-04 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* Dimensions.cs:
|
||||||
|
Add dimensions for CDs and family.
|
||||||
|
|
||||||
|
* MediaType.cs:
|
||||||
|
Added Jaguar CD, Super CD-ROM² and 3DO discs.
|
||||||
|
|
||||||
2016-01-16 Natalia Portillo <claunia@claunia.com>
|
2016-01-16 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* Dimensions.cs:
|
* Dimensions.cs:
|
||||||
|
|||||||
@@ -807,6 +807,7 @@ namespace DiscImageChef.Metadata
|
|||||||
dmns.WidthSpecified = true;
|
dmns.WidthSpecified = true;
|
||||||
dmns.Thickness = 25.4;
|
dmns.Thickness = 25.4;
|
||||||
return dmns;
|
return dmns;
|
||||||
|
case CommonTypes.MediaType.LD:
|
||||||
case CommonTypes.MediaType.LDROM:
|
case CommonTypes.MediaType.LDROM:
|
||||||
case CommonTypes.MediaType.LDROM2:
|
case CommonTypes.MediaType.LDROM2:
|
||||||
case CommonTypes.MediaType.MegaLD:
|
case CommonTypes.MediaType.MegaLD:
|
||||||
@@ -816,6 +817,81 @@ namespace DiscImageChef.Metadata
|
|||||||
dmns.Thickness = 2.5;
|
dmns.Thickness = 2.5;
|
||||||
return dmns;
|
return dmns;
|
||||||
|
|
||||||
|
#region CD/DVD/BD
|
||||||
|
case CommonTypes.MediaType.CDDA:
|
||||||
|
case CommonTypes.MediaType.CDG:
|
||||||
|
case CommonTypes.MediaType.CDEG:
|
||||||
|
case CommonTypes.MediaType.CDI:
|
||||||
|
case CommonTypes.MediaType.CDROM:
|
||||||
|
case CommonTypes.MediaType.CDROMXA:
|
||||||
|
case CommonTypes.MediaType.CDPLUS:
|
||||||
|
case CommonTypes.MediaType.CDMO:
|
||||||
|
case CommonTypes.MediaType.CDR:
|
||||||
|
case CommonTypes.MediaType.CDRW:
|
||||||
|
case CommonTypes.MediaType.CDMRW:
|
||||||
|
case CommonTypes.MediaType.VCD:
|
||||||
|
case CommonTypes.MediaType.SVCD:
|
||||||
|
case CommonTypes.MediaType.PCD:
|
||||||
|
case CommonTypes.MediaType.SACD:
|
||||||
|
case CommonTypes.MediaType.DDCD:
|
||||||
|
case CommonTypes.MediaType.DDCDR:
|
||||||
|
case CommonTypes.MediaType.DDCDRW:
|
||||||
|
case CommonTypes.MediaType.DTSCD:
|
||||||
|
case CommonTypes.MediaType.CDMIDI:
|
||||||
|
case CommonTypes.MediaType.CDV:
|
||||||
|
case CommonTypes.MediaType.CD:
|
||||||
|
case CommonTypes.MediaType.DVDROM:
|
||||||
|
case CommonTypes.MediaType.DVDR:
|
||||||
|
case CommonTypes.MediaType.DVDRW:
|
||||||
|
case CommonTypes.MediaType.DVDPR:
|
||||||
|
case CommonTypes.MediaType.DVDPRW:
|
||||||
|
case CommonTypes.MediaType.DVDPRWDL:
|
||||||
|
case CommonTypes.MediaType.DVDRDL:
|
||||||
|
case CommonTypes.MediaType.DVDPRDL:
|
||||||
|
case CommonTypes.MediaType.DVDRAM:
|
||||||
|
case CommonTypes.MediaType.DVDRWDL:
|
||||||
|
case CommonTypes.MediaType.DVDDownload:
|
||||||
|
case CommonTypes.MediaType.HDDVDROM:
|
||||||
|
case CommonTypes.MediaType.HDDVDRAM:
|
||||||
|
case CommonTypes.MediaType.HDDVDR:
|
||||||
|
case CommonTypes.MediaType.HDDVDRW:
|
||||||
|
case CommonTypes.MediaType.HDDVDRDL:
|
||||||
|
case CommonTypes.MediaType.HDDVDRWDL:
|
||||||
|
case CommonTypes.MediaType.BDROM:
|
||||||
|
case CommonTypes.MediaType.BDR:
|
||||||
|
case CommonTypes.MediaType.BDRE:
|
||||||
|
case CommonTypes.MediaType.BDRXL:
|
||||||
|
case CommonTypes.MediaType.BDREXL:
|
||||||
|
case CommonTypes.MediaType.PS1CD:
|
||||||
|
case CommonTypes.MediaType.PS2CD:
|
||||||
|
case CommonTypes.MediaType.PS2DVD:
|
||||||
|
case CommonTypes.MediaType.PS3DVD:
|
||||||
|
case CommonTypes.MediaType.PS3BD:
|
||||||
|
case CommonTypes.MediaType.PS4BD:
|
||||||
|
case CommonTypes.MediaType.XGD:
|
||||||
|
case CommonTypes.MediaType.XGD2:
|
||||||
|
case CommonTypes.MediaType.XGD3:
|
||||||
|
case CommonTypes.MediaType.XGD4:
|
||||||
|
case CommonTypes.MediaType.MEGACD:
|
||||||
|
case CommonTypes.MediaType.SATURNCD:
|
||||||
|
case CommonTypes.MediaType.GDROM:
|
||||||
|
case CommonTypes.MediaType.GDR:
|
||||||
|
case CommonTypes.MediaType.SuperCDROM2:
|
||||||
|
case CommonTypes.MediaType.JaguarCD:
|
||||||
|
case CommonTypes.MediaType.ThreeDO:
|
||||||
|
case CommonTypes.MediaType.WOD:
|
||||||
|
case CommonTypes.MediaType.WUOD:
|
||||||
|
dmns.Diameter = 120;
|
||||||
|
dmns.DiameterSpecified = true;
|
||||||
|
dmns.Thickness = 1.2;
|
||||||
|
return dmns;
|
||||||
|
case CommonTypes.MediaType.GOD:
|
||||||
|
dmns.Diameter = 80;
|
||||||
|
dmns.DiameterSpecified = true;
|
||||||
|
dmns.Thickness = 1.2;
|
||||||
|
return dmns;
|
||||||
|
#endregion CD/DVD/BD
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -636,10 +636,22 @@ namespace DiscImageChef.Metadata
|
|||||||
DiscType = "3.5\" magneto-optical";
|
DiscType = "3.5\" magneto-optical";
|
||||||
DiscSubType = "ECMA-201";
|
DiscSubType = "ECMA-201";
|
||||||
break;
|
break;
|
||||||
case DiscImageChef.CommonTypes.MediaType.FlashDrive:
|
case CommonTypes.MediaType.FlashDrive:
|
||||||
DiscType = "USB flash drive";
|
DiscType = "USB flash drive";
|
||||||
DiscSubType = "USB flash drive";
|
DiscSubType = "USB flash drive";
|
||||||
break;
|
break;
|
||||||
|
case CommonTypes.MediaType.SuperCDROM2:
|
||||||
|
DiscType = "CD";
|
||||||
|
DiscSubType = "Super CD-ROM²";
|
||||||
|
break;
|
||||||
|
case CommonTypes.MediaType.JaguarCD:
|
||||||
|
DiscType = "CD";
|
||||||
|
DiscSubType = "Atari Jaguar CD";
|
||||||
|
break;
|
||||||
|
case CommonTypes.MediaType.ThreeDO:
|
||||||
|
DiscType = "CD";
|
||||||
|
DiscSubType = "3DO";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
DiscType = "Unknown";
|
DiscType = "Unknown";
|
||||||
DiscSubType = "Unknown";
|
DiscSubType = "Unknown";
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
2016-02-04 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* Commands/DumpMedia.cs:
|
||||||
|
Added creation of IBG logs.
|
||||||
|
Added filesystem and partitions detection (does not work with
|
||||||
|
raw).
|
||||||
|
|
||||||
2016-02-04 Natalia Portillo <claunia@claunia.com>
|
2016-02-04 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* Core/MHDDLog.cs:
|
* Core/MHDDLog.cs:
|
||||||
|
|||||||
@@ -39,10 +39,12 @@ using System;
|
|||||||
using DiscImageChef.Console;
|
using DiscImageChef.Console;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using DiscImageChef.Devices;
|
using DiscImageChef.Devices;
|
||||||
using System.Text;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Schemas;
|
using Schemas;
|
||||||
using DiscImageChef.CommonTypes;
|
using DiscImageChef.CommonTypes;
|
||||||
|
using DiscImageChef.ImagePlugins;
|
||||||
|
using DiscImageChef.PartPlugins;
|
||||||
|
using DiscImageChef.Plugins;
|
||||||
|
|
||||||
namespace DiscImageChef.Commands
|
namespace DiscImageChef.Commands
|
||||||
{
|
{
|
||||||
@@ -51,6 +53,7 @@ namespace DiscImageChef.Commands
|
|||||||
static bool aborted;
|
static bool aborted;
|
||||||
static FileStream dataFs;
|
static FileStream dataFs;
|
||||||
static Core.MHDDLog mhddLog;
|
static Core.MHDDLog mhddLog;
|
||||||
|
static Core.IBGLog ibgLog;
|
||||||
// TODO: Implement dump map
|
// TODO: Implement dump map
|
||||||
|
|
||||||
public static void doDumpMedia(DumpMediaSubOptions options)
|
public static void doDumpMedia(DumpMediaSubOptions options)
|
||||||
@@ -78,6 +81,7 @@ namespace DiscImageChef.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
mhddLog = null;
|
mhddLog = null;
|
||||||
|
ibgLog = null;
|
||||||
|
|
||||||
Device dev = new Device(options.DevicePath);
|
Device dev = new Device(options.DevicePath);
|
||||||
|
|
||||||
@@ -276,6 +280,7 @@ namespace DiscImageChef.Commands
|
|||||||
byte scsiMediumType = 0;
|
byte scsiMediumType = 0;
|
||||||
byte scsiDensityCode = 0;
|
byte scsiDensityCode = 0;
|
||||||
bool containsFloppyPage = false;
|
bool containsFloppyPage = false;
|
||||||
|
ushort currentProfile = 0x0001;
|
||||||
|
|
||||||
CICMMetadataType sidecar = new CICMMetadataType();
|
CICMMetadataType sidecar = new CICMMetadataType();
|
||||||
|
|
||||||
@@ -290,6 +295,7 @@ namespace DiscImageChef.Commands
|
|||||||
if (!sense)
|
if (!sense)
|
||||||
{
|
{
|
||||||
Decoders.SCSI.MMC.Features.SeparatedFeatures ftr = Decoders.SCSI.MMC.Features.Separate(cmdBuf);
|
Decoders.SCSI.MMC.Features.SeparatedFeatures ftr = Decoders.SCSI.MMC.Features.Separate(cmdBuf);
|
||||||
|
currentProfile = ftr.CurrentProfile;
|
||||||
|
|
||||||
switch (ftr.CurrentProfile)
|
switch (ftr.CurrentProfile)
|
||||||
{
|
{
|
||||||
@@ -1195,7 +1201,9 @@ namespace DiscImageChef.Commands
|
|||||||
|
|
||||||
initDataFile(options.OutputPrefix + ".bin");
|
initDataFile(options.OutputPrefix + ".bin");
|
||||||
mhddLog = new Core.MHDDLog(options.OutputPrefix + ".mhddlog.bin", dev, blocks, blockSize, blocksToRead);
|
mhddLog = new Core.MHDDLog(options.OutputPrefix + ".mhddlog.bin", dev, blocks, blockSize, blocksToRead);
|
||||||
|
ibgLog = new Core.IBGLog(options.OutputPrefix + ".ibg", 0x0008);
|
||||||
|
|
||||||
|
start = DateTime.UtcNow;
|
||||||
for (ulong i = 0; i < blocks; i += blocksToRead)
|
for (ulong i = 0; i < blocks; i += blocksToRead)
|
||||||
{
|
{
|
||||||
if (aborted)
|
if (aborted)
|
||||||
@@ -1223,6 +1231,7 @@ namespace DiscImageChef.Commands
|
|||||||
if (!sense && !dev.Error)
|
if (!sense && !dev.Error)
|
||||||
{
|
{
|
||||||
mhddLog.Write(i, cmdDuration);
|
mhddLog.Write(i, cmdDuration);
|
||||||
|
ibgLog.Write(i, currentSpeed * 1024);
|
||||||
writeToDataFile(readBuffer);
|
writeToDataFile(readBuffer);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1243,12 +1252,16 @@ namespace DiscImageChef.Commands
|
|||||||
mhddLog.Write(i, 65535);
|
mhddLog.Write(i, 65535);
|
||||||
else
|
else
|
||||||
mhddLog.Write(i, cmdDuration);
|
mhddLog.Write(i, cmdDuration);
|
||||||
|
|
||||||
|
ibgLog.Write(i, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
currentSpeed = ((double)2448 * blocksToRead / (double)1048576) / (cmdDuration / (double)1000);
|
currentSpeed = ((double)2448 * blocksToRead / (double)1048576) / (cmdDuration / (double)1000);
|
||||||
}
|
}
|
||||||
DicConsole.WriteLine();
|
DicConsole.WriteLine();
|
||||||
|
end = DateTime.UtcNow;
|
||||||
mhddLog.Close();
|
mhddLog.Close();
|
||||||
|
ibgLog.Close(dev, blocks, blockSize, (end - start).TotalSeconds, currentSpeed * 1024, (((double)blockSize * (double)(blocks + 1)) / 1024) / (totalDuration / 1000), options.DevicePath);
|
||||||
|
|
||||||
dataChk = new Core.Checksum();
|
dataChk = new Core.Checksum();
|
||||||
dataFs.Seek(0, SeekOrigin.Begin);
|
dataFs.Seek(0, SeekOrigin.Begin);
|
||||||
@@ -1299,8 +1312,8 @@ namespace DiscImageChef.Commands
|
|||||||
sidecar.OpticalDisc[0].Image.Value = options.OutputPrefix + ".bin";
|
sidecar.OpticalDisc[0].Image.Value = options.OutputPrefix + ".bin";
|
||||||
sidecar.OpticalDisc[0].Sessions = 1;
|
sidecar.OpticalDisc[0].Sessions = 1;
|
||||||
sidecar.OpticalDisc[0].Tracks = new []{1};
|
sidecar.OpticalDisc[0].Tracks = new []{1};
|
||||||
sidecar.OpticalDisc[0].Track = new TrackType[1];
|
sidecar.OpticalDisc[0].Track = new Schemas.TrackType[1];
|
||||||
sidecar.OpticalDisc[0].Track[0] = new TrackType();
|
sidecar.OpticalDisc[0].Track[0] = new Schemas.TrackType();
|
||||||
sidecar.OpticalDisc[0].Track[0].BytesPerSector = (int)blockSize;
|
sidecar.OpticalDisc[0].Track[0].BytesPerSector = (int)blockSize;
|
||||||
sidecar.OpticalDisc[0].Track[0].Checksums = sidecar.OpticalDisc[0].Checksums;
|
sidecar.OpticalDisc[0].Track[0].Checksums = sidecar.OpticalDisc[0].Checksums;
|
||||||
sidecar.OpticalDisc[0].Track[0].EndSector = (long)(blocks - 1);
|
sidecar.OpticalDisc[0].Track[0].EndSector = (long)(blocks - 1);
|
||||||
@@ -1673,6 +1686,7 @@ namespace DiscImageChef.Commands
|
|||||||
DicConsole.WriteLine("Reading {0} sectors at a time.", blocksToRead);
|
DicConsole.WriteLine("Reading {0} sectors at a time.", blocksToRead);
|
||||||
|
|
||||||
mhddLog = new Core.MHDDLog(options.OutputPrefix + ".mhddlog.bin", dev, blocks, blockSize, blocksToRead);
|
mhddLog = new Core.MHDDLog(options.OutputPrefix + ".mhddlog.bin", dev, blocks, blockSize, blocksToRead);
|
||||||
|
ibgLog = new Core.IBGLog(options.OutputPrefix + ".ibg", currentProfile);
|
||||||
initDataFile(options.OutputPrefix + ".bin");
|
initDataFile(options.OutputPrefix + ".bin");
|
||||||
|
|
||||||
start = DateTime.UtcNow;
|
start = DateTime.UtcNow;
|
||||||
@@ -1750,6 +1764,7 @@ namespace DiscImageChef.Commands
|
|||||||
if (!sense && !dev.Error)
|
if (!sense && !dev.Error)
|
||||||
{
|
{
|
||||||
mhddLog.Write(i, cmdDuration);
|
mhddLog.Write(i, cmdDuration);
|
||||||
|
ibgLog.Write(i, currentSpeed * 1024);
|
||||||
writeToDataFile(readBuffer);
|
writeToDataFile(readBuffer);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1770,12 +1785,16 @@ namespace DiscImageChef.Commands
|
|||||||
mhddLog.Write(i, 65535);
|
mhddLog.Write(i, 65535);
|
||||||
else
|
else
|
||||||
mhddLog.Write(i, cmdDuration);
|
mhddLog.Write(i, cmdDuration);
|
||||||
|
|
||||||
|
ibgLog.Write(i, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
currentSpeed = ((double)blockSize * blocksToRead / (double)1048576) / (cmdDuration / (double)1000);
|
currentSpeed = ((double)blockSize * blocksToRead / (double)1048576) / (cmdDuration / (double)1000);
|
||||||
}
|
}
|
||||||
|
end = DateTime.UtcNow;
|
||||||
DicConsole.WriteLine();
|
DicConsole.WriteLine();
|
||||||
mhddLog.Close();
|
mhddLog.Close();
|
||||||
|
ibgLog.Close(dev, blocks, blockSize, (end - start).TotalSeconds, currentSpeed * 1024, (((double)blockSize * (double)(blocks + 1)) / 1024) / (totalDuration / 1000), options.DevicePath);
|
||||||
|
|
||||||
#region Error handling
|
#region Error handling
|
||||||
if (unreadableSectors.Count > 0 && !aborted)
|
if (unreadableSectors.Count > 0 && !aborted)
|
||||||
@@ -2000,6 +2019,117 @@ namespace DiscImageChef.Commands
|
|||||||
closeDataFile();
|
closeDataFile();
|
||||||
end = DateTime.UtcNow;
|
end = DateTime.UtcNow;
|
||||||
|
|
||||||
|
PluginBase plugins = new PluginBase();
|
||||||
|
plugins.RegisterAllPlugins();
|
||||||
|
ImagePlugin _imageFormat;
|
||||||
|
_imageFormat = ImageFormat.Detect(options.OutputPrefix + ".bin");
|
||||||
|
PartitionType[] xmlFileSysInfo = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!_imageFormat.OpenImage(options.OutputPrefix + ".bin"))
|
||||||
|
_imageFormat = null;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_imageFormat = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_imageFormat != null)
|
||||||
|
{
|
||||||
|
List<Partition> partitions = new List<Partition>();
|
||||||
|
|
||||||
|
foreach (PartPlugin _partplugin in plugins.PartPluginsList.Values)
|
||||||
|
{
|
||||||
|
List<Partition> _partitions;
|
||||||
|
|
||||||
|
if (_partplugin.GetInformation(_imageFormat, out _partitions))
|
||||||
|
{
|
||||||
|
partitions = _partitions;
|
||||||
|
Core.Statistics.AddPartition(_partplugin.Name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (partitions.Count > 0)
|
||||||
|
{
|
||||||
|
xmlFileSysInfo = new PartitionType[partitions.Count];
|
||||||
|
for (int i = 0; i < partitions.Count; i++)
|
||||||
|
{
|
||||||
|
xmlFileSysInfo[i] = new PartitionType();
|
||||||
|
xmlFileSysInfo[i].Description = partitions[i].PartitionDescription;
|
||||||
|
xmlFileSysInfo[i].EndSector = (int)(partitions[i].PartitionStartSector + partitions[i].PartitionSectors - 1);
|
||||||
|
xmlFileSysInfo[i].Name = partitions[i].PartitionName;
|
||||||
|
xmlFileSysInfo[i].Sequence = (int)partitions[i].PartitionSequence;
|
||||||
|
xmlFileSysInfo[i].StartSector = (int)partitions[i].PartitionStartSector;
|
||||||
|
xmlFileSysInfo[i].Type = partitions[i].PartitionType;
|
||||||
|
|
||||||
|
List<FileSystemType> lstFs = new List<FileSystemType>();
|
||||||
|
|
||||||
|
foreach (Plugin _plugin in plugins.PluginsList.Values)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (_plugin.Identify(_imageFormat, partitions[i].PartitionStartSector, partitions[i].PartitionStartSector + partitions[i].PartitionSectors - 1))
|
||||||
|
{
|
||||||
|
string foo;
|
||||||
|
_plugin.GetInformation(_imageFormat, partitions[i].PartitionStartSector, partitions[i].PartitionStartSector + partitions[i].PartitionSectors - 1, out foo);
|
||||||
|
lstFs.Add(_plugin.XmlFSType);
|
||||||
|
Core.Statistics.AddFilesystem(_plugin.XmlFSType.Type);
|
||||||
|
|
||||||
|
if (_plugin.XmlFSType.Type == "Opera")
|
||||||
|
dskType = MediaType.ThreeDO;
|
||||||
|
if (_plugin.XmlFSType.Type == "PC Engine filesystem")
|
||||||
|
dskType = MediaType.SuperCDROM2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
//DicConsole.DebugWriteLine("Dump-media command", "Plugin {0} crashed", _plugin.Name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lstFs.Count > 0)
|
||||||
|
xmlFileSysInfo[i].FileSystems = lstFs.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
xmlFileSysInfo = new PartitionType[1];
|
||||||
|
xmlFileSysInfo[0] = new PartitionType();
|
||||||
|
xmlFileSysInfo[0].EndSector = (int)(blocks - 1);
|
||||||
|
xmlFileSysInfo[0].StartSector = 0;
|
||||||
|
|
||||||
|
List<FileSystemType> lstFs = new List<FileSystemType>();
|
||||||
|
|
||||||
|
foreach (Plugin _plugin in plugins.PluginsList.Values)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (_plugin.Identify(_imageFormat, (blocks - 1), 0))
|
||||||
|
{
|
||||||
|
string foo;
|
||||||
|
_plugin.GetInformation(_imageFormat, (blocks - 1), 0, out foo);
|
||||||
|
lstFs.Add(_plugin.XmlFSType);
|
||||||
|
Core.Statistics.AddFilesystem(_plugin.XmlFSType.Type);
|
||||||
|
|
||||||
|
if (_plugin.XmlFSType.Type == "Opera")
|
||||||
|
dskType = MediaType.ThreeDO;
|
||||||
|
if (_plugin.XmlFSType.Type == "PC Engine filesystem")
|
||||||
|
dskType = MediaType.SuperCDROM2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
//DicConsole.DebugWriteLine("Create-sidecar command", "Plugin {0} crashed", _plugin.Name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lstFs.Count > 0)
|
||||||
|
xmlFileSysInfo[0].FileSystems = lstFs.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (opticalDisc)
|
if (opticalDisc)
|
||||||
{
|
{
|
||||||
sidecar.OpticalDisc[0].Checksums = dataChk.End().ToArray();
|
sidecar.OpticalDisc[0].Checksums = dataChk.End().ToArray();
|
||||||
@@ -2023,8 +2153,8 @@ namespace DiscImageChef.Commands
|
|||||||
//sidecar.OpticalDisc[0].Layers = new LayersType();
|
//sidecar.OpticalDisc[0].Layers = new LayersType();
|
||||||
sidecar.OpticalDisc[0].Sessions = 1;
|
sidecar.OpticalDisc[0].Sessions = 1;
|
||||||
sidecar.OpticalDisc[0].Tracks = new []{1};
|
sidecar.OpticalDisc[0].Tracks = new []{1};
|
||||||
sidecar.OpticalDisc[0].Track = new TrackType[1];
|
sidecar.OpticalDisc[0].Track = new Schemas.TrackType[1];
|
||||||
sidecar.OpticalDisc[0].Track[0] = new TrackType();
|
sidecar.OpticalDisc[0].Track[0] = new Schemas.TrackType();
|
||||||
sidecar.OpticalDisc[0].Track[0].BytesPerSector = (int)blockSize;
|
sidecar.OpticalDisc[0].Track[0].BytesPerSector = (int)blockSize;
|
||||||
sidecar.OpticalDisc[0].Track[0].Checksums = sidecar.OpticalDisc[0].Checksums;
|
sidecar.OpticalDisc[0].Track[0].Checksums = sidecar.OpticalDisc[0].Checksums;
|
||||||
sidecar.OpticalDisc[0].Track[0].EndSector = (long)(blocks - 1);
|
sidecar.OpticalDisc[0].Track[0].EndSector = (long)(blocks - 1);
|
||||||
@@ -2038,6 +2168,8 @@ namespace DiscImageChef.Commands
|
|||||||
sidecar.OpticalDisc[0].Track[0].Sequence.TrackNumber = 1;
|
sidecar.OpticalDisc[0].Track[0].Sequence.TrackNumber = 1;
|
||||||
sidecar.OpticalDisc[0].Track[0].Size = (long)(blocks * blockSize);
|
sidecar.OpticalDisc[0].Track[0].Size = (long)(blocks * blockSize);
|
||||||
sidecar.OpticalDisc[0].Track[0].StartSector = 0;
|
sidecar.OpticalDisc[0].Track[0].StartSector = 0;
|
||||||
|
if (xmlFileSysInfo != null)
|
||||||
|
sidecar.OpticalDisc [0].Track [0].FileSystemInformation = xmlFileSysInfo;
|
||||||
switch (dskType)
|
switch (dskType)
|
||||||
{
|
{
|
||||||
case MediaType.DDCD:
|
case MediaType.DDCD:
|
||||||
@@ -2106,6 +2238,8 @@ namespace DiscImageChef.Commands
|
|||||||
sidecar.BlockMedia[0].Model = dev.Model;
|
sidecar.BlockMedia[0].Model = dev.Model;
|
||||||
sidecar.BlockMedia[0].Serial = dev.Serial;
|
sidecar.BlockMedia[0].Serial = dev.Serial;
|
||||||
sidecar.BlockMedia[0].Size = (long)(blocks * blockSize);
|
sidecar.BlockMedia[0].Size = (long)(blocks * blockSize);
|
||||||
|
if (xmlFileSysInfo != null)
|
||||||
|
sidecar.BlockMedia[0].FileSystemInformation = xmlFileSysInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user