diff --git a/.idea/.idea.DiscImageChef/.idea/contentModel.xml b/.idea/.idea.DiscImageChef/.idea/contentModel.xml
index 2dafa9b32..870870f23 100644
--- a/.idea/.idea.DiscImageChef/.idea/contentModel.xml
+++ b/.idea/.idea.DiscImageChef/.idea/contentModel.xml
@@ -326,6 +326,8 @@
+
+
@@ -1827,6 +1829,9 @@
+
+
+
diff --git a/DiscImageChef.CommonTypes/Metadata/DeviceReportV2.cs b/DiscImageChef.CommonTypes/Metadata/DeviceReportV2.cs
index a621a3018..886b759ff 100644
--- a/DiscImageChef.CommonTypes/Metadata/DeviceReportV2.cs
+++ b/DiscImageChef.CommonTypes/Metadata/DeviceReportV2.cs
@@ -1032,6 +1032,8 @@ namespace DiscImageChef.CommonTypes.Metadata
public bool SupportsWriteInhibitDCB { get; set; }
public bool SupportsWriteProtectPAC { get; set; }
public ushort? VolumeLevels { get; set; }
+ public byte[] BinaryData { get; set; }
+
[JsonIgnore]
public short? BlocksPerReadableUnitSql
{
diff --git a/DiscImageChef.Core/Devices/Report/MMC.cs b/DiscImageChef.Core/Devices/Report/MMC.cs
index 68fa74a88..2292d8091 100644
--- a/DiscImageChef.Core/Devices/Report/MMC.cs
+++ b/DiscImageChef.Core/Devices/Report/MMC.cs
@@ -42,6 +42,26 @@ namespace DiscImageChef.Core.Devices.Report
{
public partial class DeviceReport
{
+ static byte[] ClearMmcFeatures(byte[] response)
+ {
+ uint offset = 8;
+
+ while(offset + 4 < response.Length)
+ {
+ ushort code = (ushort)((response[offset + 0] << 8) + response[offset + 1]);
+
+ if(code != 0x0108) continue;
+
+ byte[] data = new byte[response[offset + 3] + 4];
+
+ if(data.Length + offset > response.Length) data = new byte[response.Length - offset];
+ Array.Copy(data, 4, response, offset + 4, data.Length - 4);
+ offset += (uint)data.Length;
+ }
+
+ return response;
+ }
+
public MmcFeatures ReportMmcFeatures()
{
DicConsole.WriteLine("Querying MMC GET CONFIGURATION...");
@@ -52,7 +72,7 @@ namespace DiscImageChef.Core.Devices.Report
Features.SeparatedFeatures ftr = Features.Separate(buffer);
if(ftr.Descriptors == null || ftr.Descriptors.Length <= 0) return null;
- MmcFeatures report = new MmcFeatures();
+ MmcFeatures report = new MmcFeatures {BinaryData = ClearMmcFeatures(buffer)};
foreach(Features.FeatureDescriptor desc in ftr.Descriptors)
switch(desc.Code)
{
diff --git a/DiscImageChef.Database/DiscImageChef.Database.csproj b/DiscImageChef.Database/DiscImageChef.Database.csproj
index 9e8ca2896..8998c6f58 100644
--- a/DiscImageChef.Database/DiscImageChef.Database.csproj
+++ b/DiscImageChef.Database/DiscImageChef.Database.csproj
@@ -86,6 +86,8 @@
+
+
diff --git a/DiscImageChef.Database/Migrations/20181225152947_StoreMmcGetConfigurationResponse.Designer.cs b/DiscImageChef.Database/Migrations/20181225152947_StoreMmcGetConfigurationResponse.Designer.cs
new file mode 100644
index 000000000..de45a8225
--- /dev/null
+++ b/DiscImageChef.Database/Migrations/20181225152947_StoreMmcGetConfigurationResponse.Designer.cs
@@ -0,0 +1,1427 @@
+//
+using System;
+using DiscImageChef.Database;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+namespace DiscImageChef.Database.Migrations
+{
+ [DbContext(typeof(DicContext))]
+ [Migration("20181225152947_StoreMmcGetConfigurationResponse")]
+ partial class StoreMmcGetConfigurationResponse
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "2.1.4-rtm-31024");
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Ata", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Identify");
+
+ b.Property("ReadCapabilitiesId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ReadCapabilitiesId");
+
+ b.ToTable("Ata");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.BlockDescriptor", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BlockLength");
+
+ b.Property("BlockLengthSql");
+
+ b.Property("Blocks");
+
+ b.Property("BlocksSql");
+
+ b.Property("Density");
+
+ b.Property("ScsiModeId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ScsiModeId");
+
+ b.ToTable("BlockDescriptor");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Chs", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Cylinders");
+
+ b.Property("CylindersSql");
+
+ b.Property("Heads");
+
+ b.Property("HeadsSql");
+
+ b.Property("Sectors");
+
+ b.Property("SectorsSql");
+
+ b.HasKey("Id");
+
+ b.ToTable("Chs");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.DensityCode", b =>
+ {
+ b.Property("Code")
+ .ValueGeneratedOnAdd();
+
+ b.Property("SscSupportedMediaId");
+
+ b.HasKey("Code");
+
+ b.HasIndex("SscSupportedMediaId");
+
+ b.ToTable("DensityCode");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.FireWire", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Manufacturer");
+
+ b.Property("Product");
+
+ b.Property("ProductID");
+
+ b.Property("ProductIDSql");
+
+ b.Property("RemovableMedia");
+
+ b.Property("VendorID");
+
+ b.Property("VendorIDSql");
+
+ b.HasKey("Id");
+
+ b.ToTable("FireWire");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Mmc", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("FeaturesId");
+
+ b.Property("ModeSense2AData");
+
+ b.HasKey("Id");
+
+ b.HasIndex("FeaturesId");
+
+ b.ToTable("Mmc");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.MmcFeatures", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AACSVersion");
+
+ b.Property("AGIDs");
+
+ b.Property("BinaryData");
+
+ b.Property("BindingNonceBlocks");
+
+ b.Property("BlocksPerReadableUnit");
+
+ b.Property("BlocksPerReadableUnitSql");
+
+ b.Property("BufferUnderrunFreeInDVD");
+
+ b.Property("BufferUnderrunFreeInSAO");
+
+ b.Property("BufferUnderrunFreeInTAO");
+
+ b.Property("CPRMVersion");
+
+ b.Property("CSSVersion");
+
+ b.Property("CanAudioScan");
+
+ b.Property("CanEject");
+
+ b.Property("CanEraseSector");
+
+ b.Property("CanExpandBDRESpareArea");
+
+ b.Property("CanFormat");
+
+ b.Property("CanFormatBDREWithoutSpare");
+
+ b.Property("CanFormatCert");
+
+ b.Property("CanFormatFRF");
+
+ b.Property("CanFormatQCert");
+
+ b.Property("CanFormatRRM");
+
+ b.Property("CanGenerateBindingNonce");
+
+ b.Property("CanLoad");
+
+ b.Property("CanMuteSeparateChannels");
+
+ b.Property("CanOverwriteSAOTrack");
+
+ b.Property("CanOverwriteTAOTrack");
+
+ b.Property("CanPlayCDAudio");
+
+ b.Property("CanPseudoOverwriteBDR");
+
+ b.Property("CanReadAllDualR");
+
+ b.Property("CanReadAllDualRW");
+
+ b.Property("CanReadBD");
+
+ b.Property("CanReadBDR");
+
+ b.Property("CanReadBDRE1");
+
+ b.Property("CanReadBDRE2");
+
+ b.Property("CanReadBDROM");
+
+ b.Property("CanReadBluBCA");
+
+ b.Property("CanReadCD");
+
+ b.Property("CanReadCDMRW");
+
+ b.Property("CanReadCPRM_MKB");
+
+ b.Property("CanReadDDCD");
+
+ b.Property("CanReadDVD");
+
+ b.Property("CanReadDVDPlusMRW");
+
+ b.Property("CanReadDVDPlusR");
+
+ b.Property("CanReadDVDPlusRDL");
+
+ b.Property("CanReadDVDPlusRW");
+
+ b.Property("CanReadDVDPlusRWDL");
+
+ b.Property("CanReadDriveAACSCertificate");
+
+ b.Property("CanReadHDDVD");
+
+ b.Property("CanReadHDDVDR");
+
+ b.Property("CanReadHDDVDRAM");
+
+ b.Property("CanReadLeadInCDText");
+
+ b.Property("CanReadOldBDR");
+
+ b.Property("CanReadOldBDRE");
+
+ b.Property("CanReadOldBDROM");
+
+ b.Property("CanReadSpareAreaInformation");
+
+ b.Property("CanReportDriveSerial");
+
+ b.Property("CanReportMediaSerial");
+
+ b.Property("CanTestWriteDDCDR");
+
+ b.Property("CanTestWriteDVD");
+
+ b.Property("CanTestWriteInSAO");
+
+ b.Property("CanTestWriteInTAO");
+
+ b.Property("CanUpgradeFirmware");
+
+ b.Property("CanWriteBD");
+
+ b.Property("CanWriteBDR");
+
+ b.Property("CanWriteBDRE1");
+
+ b.Property("CanWriteBDRE2");
+
+ b.Property("CanWriteBusEncryptedBlocks");
+
+ b.Property("CanWriteCDMRW");
+
+ b.Property("CanWriteCDRW");
+
+ b.Property("CanWriteCDRWCAV");
+
+ b.Property("CanWriteCDSAO");
+
+ b.Property("CanWriteCDTAO");
+
+ b.Property("CanWriteCSSManagedDVD");
+
+ b.Property("CanWriteDDCDR");
+
+ b.Property("CanWriteDDCDRW");
+
+ b.Property("CanWriteDVDPlusMRW");
+
+ b.Property("CanWriteDVDPlusR");
+
+ b.Property("CanWriteDVDPlusRDL");
+
+ b.Property("CanWriteDVDPlusRW");
+
+ b.Property("CanWriteDVDPlusRWDL");
+
+ b.Property("CanWriteDVDR");
+
+ b.Property("CanWriteDVDRDL");
+
+ b.Property("CanWriteDVDRW");
+
+ b.Property("CanWriteHDDVDR");
+
+ b.Property("CanWriteHDDVDRAM");
+
+ b.Property("CanWriteOldBDR");
+
+ b.Property("CanWriteOldBDRE");
+
+ b.Property("CanWritePackedSubchannelInTAO");
+
+ b.Property("CanWriteRWSubchannelInSAO");
+
+ b.Property("CanWriteRWSubchannelInTAO");
+
+ b.Property("CanWriteRaw");
+
+ b.Property("CanWriteRawMultiSession");
+
+ b.Property("CanWriteRawSubchannelInTAO");
+
+ b.Property("ChangerIsSideChangeCapable");
+
+ b.Property("ChangerSlots");
+
+ b.Property("ChangerSupportsDiscPresent");
+
+ b.Property("DBML");
+
+ b.Property("DVDMultiRead");
+
+ b.Property("EmbeddedChanger");
+
+ b.Property("ErrorRecoveryPage");
+
+ b.Property("FirmwareDate");
+
+ b.Property("LoadingMechanismType");
+
+ b.Property("Locked");
+
+ b.Property("LogicalBlockSize");
+
+ b.Property("LogicalBlockSizeSql");
+
+ b.Property("MultiRead");
+
+ b.Property("PhysicalInterfaceStandardNumber");
+
+ b.Property("PhysicalInterfaceStandardNumberSql");
+
+ b.Property("PreventJumper");
+
+ b.Property("SupportsAACS");
+
+ b.Property("SupportsBusEncryption");
+
+ b.Property("SupportsC2");
+
+ b.Property("SupportsCPRM");
+
+ b.Property("SupportsCSS");
+
+ b.Property("SupportsDAP");
+
+ b.Property("SupportsDeviceBusyEvent");
+
+ b.Property("SupportsHybridDiscs");
+
+ b.Property("SupportsModePage1Ch");
+
+ b.Property("SupportsOSSC");
+
+ b.Property("SupportsPWP");
+
+ b.Property("SupportsSWPP");
+
+ b.Property("SupportsSecurDisc");
+
+ b.Property("SupportsSeparateVolume");
+
+ b.Property("SupportsVCPS");
+
+ b.Property("SupportsWriteInhibitDCB");
+
+ b.Property("SupportsWriteProtectPAC");
+
+ b.Property("VolumeLevels");
+
+ b.Property("VolumeLevelsSql");
+
+ b.HasKey("Id");
+
+ b.ToTable("MmcFeatures");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.MmcSd", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("CID");
+
+ b.Property("CSD");
+
+ b.Property("ExtendedCSD");
+
+ b.Property("OCR");
+
+ b.Property("SCR");
+
+ b.HasKey("Id");
+
+ b.ToTable("MmcSd");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Pcmcia", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("CIS");
+
+ b.Property("CardCode");
+
+ b.Property("CardCodeSql");
+
+ b.Property("Compliance");
+
+ b.Property("Manufacturer");
+
+ b.Property("ManufacturerCode");
+
+ b.Property("ManufacturerCodeSql");
+
+ b.Property("ProductName");
+
+ b.HasKey("Id");
+
+ b.ToTable("Pcmcia");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Scsi", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("InquiryData");
+
+ b.Property("ModeSense10Data");
+
+ b.Property("ModeSense6Data");
+
+ b.Property("ModeSenseId");
+
+ b.Property("MultiMediaDeviceId");
+
+ b.Property("ReadCapabilitiesId");
+
+ b.Property("SequentialDeviceId");
+
+ b.Property("SupportsModeSense10");
+
+ b.Property("SupportsModeSense6");
+
+ b.Property("SupportsModeSubpages");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ModeSenseId");
+
+ b.HasIndex("MultiMediaDeviceId");
+
+ b.HasIndex("ReadCapabilitiesId");
+
+ b.HasIndex("SequentialDeviceId");
+
+ b.ToTable("Scsi");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.ScsiMode", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BlankCheckEnabled");
+
+ b.Property("BufferedMode");
+
+ b.Property("DPOandFUA");
+
+ b.Property("MediumType");
+
+ b.Property("Speed");
+
+ b.Property("WriteProtected");
+
+ b.HasKey("Id");
+
+ b.ToTable("ScsiMode");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.ScsiPage", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ScsiId");
+
+ b.Property("ScsiModeId");
+
+ b.Property("page");
+
+ b.Property("subpage");
+
+ b.Property("value");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ScsiId");
+
+ b.HasIndex("ScsiModeId");
+
+ b.ToTable("ScsiPage");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Ssc", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BlockSizeGranularity");
+
+ b.Property("MaxBlockLength");
+
+ b.Property("MaxBlockLengthSql");
+
+ b.Property("MinBlockLength");
+
+ b.Property("MinBlockLengthSql");
+
+ b.HasKey("Id");
+
+ b.ToTable("Ssc");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.SscSupportedMedia", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Description");
+
+ b.Property("Length");
+
+ b.Property("LengthSql");
+
+ b.Property("MediumType");
+
+ b.Property("Name");
+
+ b.Property("Organization");
+
+ b.Property("SscId");
+
+ b.Property("TestedSequentialMediaId");
+
+ b.Property("Width");
+
+ b.Property("WidthSql");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SscId");
+
+ b.HasIndex("TestedSequentialMediaId");
+
+ b.ToTable("SscSupportedMedia");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.SupportedDensity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BitsPerMm");
+
+ b.Property("BitsPerMmSql");
+
+ b.Property("Capacity");
+
+ b.Property("CapacitySql");
+
+ b.Property("DefaultDensity");
+
+ b.Property("Description");
+
+ b.Property("Duplicate");
+
+ b.Property("Name");
+
+ b.Property("Organization");
+
+ b.Property("PrimaryCode");
+
+ b.Property("SecondaryCode");
+
+ b.Property("SscId");
+
+ b.Property("TestedSequentialMediaId");
+
+ b.Property("Tracks");
+
+ b.Property("TracksSql");
+
+ b.Property("Width");
+
+ b.Property("WidthSql");
+
+ b.Property("Writable");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SscId");
+
+ b.HasIndex("TestedSequentialMediaId");
+
+ b.ToTable("SupportedDensity");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.TestedMedia", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AtaId");
+
+ b.Property("BlockSize");
+
+ b.Property("BlockSizeSql");
+
+ b.Property("Blocks");
+
+ b.Property("BlocksSql");
+
+ b.Property("CHSId");
+
+ b.Property("CanReadAACS");
+
+ b.Property("CanReadADIP");
+
+ b.Property("CanReadATIP");
+
+ b.Property("CanReadBCA");
+
+ b.Property("CanReadC2Pointers");
+
+ b.Property("CanReadCMI");
+
+ b.Property("CanReadCorrectedSubchannel");
+
+ b.Property("CanReadCorrectedSubchannelWithC2");
+
+ b.Property("CanReadDCB");
+
+ b.Property("CanReadDDS");
+
+ b.Property("CanReadDMI");
+
+ b.Property("CanReadDiscInformation");
+
+ b.Property