mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Move partitions plugins to a separate library.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2015-10-05 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* DiscImageChef.sln:
|
||||||
|
Move partitions plugins to a separate library.
|
||||||
|
|
||||||
2015-10-05 Natalia Portillo <claunia@claunia.com>
|
2015-10-05 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* DiscImageChef.sln:
|
* DiscImageChef.sln:
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
// "TS", old entry magic
|
// "TS", old entry magic
|
||||||
const UInt16 APM_OLDENT = 0x5453;
|
const UInt16 APM_OLDENT = 0x5453;
|
||||||
|
|
||||||
public AppleMap(PluginBase Core)
|
public AppleMap()
|
||||||
{
|
{
|
||||||
Name = "Apple Partition Map";
|
Name = "Apple Partition Map";
|
||||||
PluginUUID = new Guid("36405F8D-4F1A-07F5-209C-223D735D6D22");
|
PluginUUID = new Guid("36405F8D-4F1A-07F5-209C-223D735D6D22");
|
||||||
@@ -106,7 +106,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
{
|
{
|
||||||
sector_size = 512;
|
sector_size = 512;
|
||||||
APMFromHDDOnCD = true;
|
APMFromHDDOnCD = true;
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
Console.WriteLine("DEBUG (Apple Partition Map Plugin): PM sector size is 512 bytes, but device's 2048");
|
Console.WriteLine("DEBUG (Apple Partition Map Plugin): PM sector size is 512 bytes, but device's 2048");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -55,7 +55,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
const UInt32 TypeNetBSD = 0x004E4244;
|
const UInt32 TypeNetBSD = 0x004E4244;
|
||||||
const UInt32 TypeNetBSDSwap = 0x004E4253;
|
const UInt32 TypeNetBSDSwap = 0x004E4253;
|
||||||
|
|
||||||
public AtariPartitions(PluginBase Core)
|
public AtariPartitions()
|
||||||
{
|
{
|
||||||
Name = "Atari partitions";
|
Name = "Atari partitions";
|
||||||
PluginUUID = new Guid("d1dd0f24-ec39-4c4d-9072-be31919a3b5e");
|
PluginUUID = new Guid("d1dd0f24-ec39-4c4d-9072-be31919a3b5e");
|
||||||
@@ -102,7 +102,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
table.badLength = BigEndianBitConverter.ToUInt32(sector, 506);
|
table.badLength = BigEndianBitConverter.ToUInt32(sector, 506);
|
||||||
table.checksum = BigEndianBitConverter.ToUInt16(sector, 510);
|
table.checksum = BigEndianBitConverter.ToUInt16(sector, 510);
|
||||||
|
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
{
|
{
|
||||||
Checksums.SHA1Context sha1Ctx = new Checksums.SHA1Context();
|
Checksums.SHA1Context sha1Ctx = new Checksums.SHA1Context();
|
||||||
sha1Ctx.Init();
|
sha1Ctx.Init();
|
||||||
@@ -145,7 +145,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
|
|
||||||
if (table.entries[i].start <= imagePlugin.GetSectors())
|
if (table.entries[i].start <= imagePlugin.GetSectors())
|
||||||
{
|
{
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
{
|
{
|
||||||
if ((table.entries[i].start + table.entries[i].length) > imagePlugin.GetSectors())
|
if ((table.entries[i].start + table.entries[i].length) > imagePlugin.GetSectors())
|
||||||
Console.WriteLine("DEBUG (Atari plugin): WARNING: End of partition goes beyond device size");
|
Console.WriteLine("DEBUG (Atari plugin): WARNING: End of partition goes beyond device size");
|
||||||
@@ -225,7 +225,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
validTable = true;
|
validTable = true;
|
||||||
if (extendedTable.entries[j].start <= imagePlugin.GetSectors())
|
if (extendedTable.entries[j].start <= imagePlugin.GetSectors())
|
||||||
{
|
{
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
{
|
{
|
||||||
if ((extendedTable.entries[j].start + extendedTable.entries[j].length) > imagePlugin.GetSectors())
|
if ((extendedTable.entries[j].start + extendedTable.entries[j].length) > imagePlugin.GetSectors())
|
||||||
Console.WriteLine("DEBUG (Atari plugin): WARNING: End of partition goes beyond device size");
|
Console.WriteLine("DEBUG (Atari plugin): WARNING: End of partition goes beyond device size");
|
||||||
@@ -296,7 +296,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
{
|
{
|
||||||
if (table.icdEntries[i].start <= imagePlugin.GetSectors())
|
if (table.icdEntries[i].start <= imagePlugin.GetSectors())
|
||||||
{
|
{
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
{
|
{
|
||||||
if ((table.icdEntries[i].start + table.icdEntries[i].length) > imagePlugin.GetSectors())
|
if ((table.icdEntries[i].start + table.icdEntries[i].length) > imagePlugin.GetSectors())
|
||||||
Console.WriteLine("DEBUG (Atari plugin): WARNING: End of partition goes beyond device size");
|
Console.WriteLine("DEBUG (Atari plugin): WARNING: End of partition goes beyond device size");
|
||||||
12
DiscImageChef.Partitions/ChangeLog
Normal file
12
DiscImageChef.Partitions/ChangeLog
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
2015-10-05 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* MBR.cs:
|
||||||
|
* RDB.cs:
|
||||||
|
* NeXT.cs:
|
||||||
|
* Atari.cs:
|
||||||
|
* AppleMap.cs:
|
||||||
|
* PartPlugin.cs:
|
||||||
|
* Properties/AssemblyInfo.cs:
|
||||||
|
* DiscImageChef.Partitions.csproj:
|
||||||
|
Move partitions plugins to a separate library.
|
||||||
|
|
||||||
64
DiscImageChef.Partitions/DiscImageChef.Partitions.csproj
Normal file
64
DiscImageChef.Partitions/DiscImageChef.Partitions.csproj
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProductVersion>8.0.30703</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<RootNamespace>DiscImageChef.Partitions</RootNamespace>
|
||||||
|
<AssemblyName>DiscImageChef.Partitions</AssemblyName>
|
||||||
|
<ReleaseVersion>2.2</ReleaseVersion>
|
||||||
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<ConsolePause>false</ConsolePause>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release</OutputPath>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<ConsolePause>false</ConsolePause>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="AppleMap.cs" />
|
||||||
|
<Compile Include="Atari.cs" />
|
||||||
|
<Compile Include="MBR.cs" />
|
||||||
|
<Compile Include="NeXT.cs" />
|
||||||
|
<Compile Include="PartPlugin.cs" />
|
||||||
|
<Compile Include="RDB.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\DiscImageChef.CommonTypes\DiscImageChef.CommonTypes.csproj">
|
||||||
|
<Project>{F2B84194-26EB-4227-B1C5-6602517E85AE}</Project>
|
||||||
|
<Name>DiscImageChef.CommonTypes</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\DiscImageChef.Helpers\DiscImageChef.Helpers.csproj">
|
||||||
|
<Project>{F8BDF57B-1571-4CD0-84B3-B422088D359A}</Project>
|
||||||
|
<Name>DiscImageChef.Helpers</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\DiscImageChef.DiscImages\DiscImageChef.DiscImages.csproj">
|
||||||
|
<Project>{74032CBC-339B-42F3-AF6F-E96C261F3E6A}</Project>
|
||||||
|
<Name>DiscImageChef.DiscImages</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\DiscImageChef.Checksums\DiscImageChef.Checksums.csproj">
|
||||||
|
<Project>{CC48B324-A532-4A45-87A6-6F91F7141E8D}</Project>
|
||||||
|
<Name>DiscImageChef.Checksums</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -47,7 +47,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
{
|
{
|
||||||
const UInt16 MBRSignature = 0xAA55;
|
const UInt16 MBRSignature = 0xAA55;
|
||||||
|
|
||||||
public MBR(PluginBase Core)
|
public MBR()
|
||||||
{
|
{
|
||||||
Name = "Master Boot Record";
|
Name = "Master Boot Record";
|
||||||
PluginUUID = new Guid("5E8A34E8-4F1A-59E6-4BF7-7EA647063A76");
|
PluginUUID = new Guid("5E8A34E8-4F1A-59E6-4BF7-7EA647063A76");
|
||||||
@@ -56,7 +56,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
// 180
|
// 180
|
||||||
const UInt16 disktabEntrySize = 0x2C;
|
const UInt16 disktabEntrySize = 0x2C;
|
||||||
// 44
|
// 44
|
||||||
public NeXTDisklabel(PluginBase Core)
|
public NeXTDisklabel()
|
||||||
{
|
{
|
||||||
Name = "NeXT Disklabel";
|
Name = "NeXT Disklabel";
|
||||||
PluginUUID = new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9");
|
PluginUUID = new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9");
|
||||||
27
DiscImageChef.Partitions/Properties/AssemblyInfo.cs
Normal file
27
DiscImageChef.Partitions/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
|
// Information about this assembly is defined by the following attributes.
|
||||||
|
// Change them to the values specific to your project.
|
||||||
|
|
||||||
|
[assembly: AssemblyTitle("DiscImageChef.Partitions")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("Claunia.com")]
|
||||||
|
[assembly: AssemblyProduct("")]
|
||||||
|
[assembly: AssemblyCopyright("© Claunia.com")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
|
||||||
|
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
|
||||||
|
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
|
||||||
|
|
||||||
|
[assembly: AssemblyVersion("1.0.*")]
|
||||||
|
|
||||||
|
// The following attributes are used to specify the signing key for the assembly,
|
||||||
|
// if desired. See the Mono documentation for more information about signing.
|
||||||
|
|
||||||
|
//[assembly: AssemblyDelaySign(false)]
|
||||||
|
//[assembly: AssemblyKeyFile("")]
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
const UInt32 FlagsNoAutomount = 0x00000002;
|
const UInt32 FlagsNoAutomount = 0x00000002;
|
||||||
|
|
||||||
public AmigaRigidDiskBlock(PluginBase Core)
|
public AmigaRigidDiskBlock()
|
||||||
{
|
{
|
||||||
Name = "Amiga Rigid Disk Block";
|
Name = "Amiga Rigid Disk Block";
|
||||||
PluginUUID = new Guid("8D72ED97-1854-4170-9CE4-6E8446FD9863");
|
PluginUUID = new Guid("8D72ED97-1854-4170-9CE4-6E8446FD9863");
|
||||||
@@ -904,12 +904,12 @@ namespace DiscImageChef.PartPlugins
|
|||||||
byte[] tmpSector = imagePlugin.ReadSector(RDBBlock);
|
byte[] tmpSector = imagePlugin.ReadSector(RDBBlock);
|
||||||
UInt32 magic = BigEndianBitConverter.ToUInt32(tmpSector, 0);
|
UInt32 magic = BigEndianBitConverter.ToUInt32(tmpSector, 0);
|
||||||
|
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): Possible magic at block {0} is 0x{1:X8}", RDBBlock, magic);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): Possible magic at block {0} is 0x{1:X8}", RDBBlock, magic);
|
||||||
|
|
||||||
if (magic == RigidDiskBlockMagic)
|
if (magic == RigidDiskBlockMagic)
|
||||||
{
|
{
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): Found RDB magic at block {0}", RDBBlock);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): Found RDB magic at block {0}", RDBBlock);
|
||||||
|
|
||||||
foundRDB = true;
|
foundRDB = true;
|
||||||
@@ -1001,7 +1001,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
RDB.reserved24 = BigEndianBitConverter.ToUInt32(sector, 0xF8);
|
RDB.reserved24 = BigEndianBitConverter.ToUInt32(sector, 0xF8);
|
||||||
RDB.reserved25 = BigEndianBitConverter.ToUInt32(sector, 0xFC);
|
RDB.reserved25 = BigEndianBitConverter.ToUInt32(sector, 0xFC);
|
||||||
|
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
{
|
{
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): RDB.magic = 0x{0:X8}", RDB.magic);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): RDB.magic = 0x{0:X8}", RDB.magic);
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): RDB.size = {0} longs, {1} bytes", RDB.size, RDB.size * 4);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): RDB.size = {0} longs, {1} bytes", RDB.size, RDB.size * 4);
|
||||||
@@ -1067,7 +1067,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
nextBlock = RDB.badblock_ptr;
|
nextBlock = RDB.badblock_ptr;
|
||||||
while (nextBlock != 0xFFFFFFFF)
|
while (nextBlock != 0xFFFFFFFF)
|
||||||
{
|
{
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): Going to block {0} in search of a BadBlock block", nextBlock);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): Going to block {0} in search of a BadBlock block", nextBlock);
|
||||||
|
|
||||||
sector = imagePlugin.ReadSector(nextBlock);
|
sector = imagePlugin.ReadSector(nextBlock);
|
||||||
@@ -1076,7 +1076,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
if (magic != BadBlockListMagic)
|
if (magic != BadBlockListMagic)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): Found BadBlock block");
|
Console.WriteLine("DEBUG (Amiga RDB plugin): Found BadBlock block");
|
||||||
|
|
||||||
BadBlockList chainEntry = new BadBlockList();
|
BadBlockList chainEntry = new BadBlockList();
|
||||||
@@ -1090,7 +1090,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
ulong entries = (chainEntry.size - 6) / 2;
|
ulong entries = (chainEntry.size - 6) / 2;
|
||||||
chainEntry.blockPairs = new BadBlockEntry[entries];
|
chainEntry.blockPairs = new BadBlockEntry[entries];
|
||||||
|
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
{
|
{
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): chainEntry.magic = 0x{0:X8}", chainEntry.magic);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): chainEntry.magic = 0x{0:X8}", chainEntry.magic);
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): chainEntry.size = {0} longs, {1} bytes", chainEntry.size, chainEntry.size * 4);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): chainEntry.size = {0} longs, {1} bytes", chainEntry.size, chainEntry.size * 4);
|
||||||
@@ -1105,7 +1105,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
chainEntry.blockPairs[i].badBlock = BigEndianBitConverter.ToUInt32(sector, (int)(0x18 + i * 8 + 0));
|
chainEntry.blockPairs[i].badBlock = BigEndianBitConverter.ToUInt32(sector, (int)(0x18 + i * 8 + 0));
|
||||||
chainEntry.blockPairs[i].goodBlock = BigEndianBitConverter.ToUInt32(sector, (int)(0x18 + i * 8 + 4));
|
chainEntry.blockPairs[i].goodBlock = BigEndianBitConverter.ToUInt32(sector, (int)(0x18 + i * 8 + 4));
|
||||||
|
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): Bad block at {0} replaced with good block at {1}",
|
Console.WriteLine("DEBUG (Amiga RDB plugin): Bad block at {0} replaced with good block at {1}",
|
||||||
chainEntry.blockPairs[i].badBlock, chainEntry.blockPairs[i].goodBlock);
|
chainEntry.blockPairs[i].badBlock, chainEntry.blockPairs[i].goodBlock);
|
||||||
}
|
}
|
||||||
@@ -1119,7 +1119,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
nextBlock = RDB.partition_ptr;
|
nextBlock = RDB.partition_ptr;
|
||||||
while (nextBlock != 0xFFFFFFFF)
|
while (nextBlock != 0xFFFFFFFF)
|
||||||
{
|
{
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): Going to block {0} in search of a PartitionEntry block", nextBlock);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): Going to block {0} in search of a PartitionEntry block", nextBlock);
|
||||||
|
|
||||||
sector = imagePlugin.ReadSector(nextBlock);
|
sector = imagePlugin.ReadSector(nextBlock);
|
||||||
@@ -1128,7 +1128,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
if (magic != PartitionBlockMagic)
|
if (magic != PartitionBlockMagic)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): Found PartitionEntry block");
|
Console.WriteLine("DEBUG (Amiga RDB plugin): Found PartitionEntry block");
|
||||||
|
|
||||||
PartitionEntry partEntry = new PartitionEntry();
|
PartitionEntry partEntry = new PartitionEntry();
|
||||||
@@ -1183,7 +1183,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
partEntry.dosEnvVec.control = BigEndianBitConverter.ToUInt32(sector, 0xC8);
|
partEntry.dosEnvVec.control = BigEndianBitConverter.ToUInt32(sector, 0xC8);
|
||||||
partEntry.dosEnvVec.bootBlocks = BigEndianBitConverter.ToUInt32(sector, 0xCC);
|
partEntry.dosEnvVec.bootBlocks = BigEndianBitConverter.ToUInt32(sector, 0xCC);
|
||||||
|
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
{
|
{
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): partEntry.magic = 0x{0:X8}", partEntry.magic);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): partEntry.magic = 0x{0:X8}", partEntry.magic);
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): partEntry.size = {0} longs, {1} bytes", partEntry.size, partEntry.size * 4);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): partEntry.size = {0} longs, {1} bytes", partEntry.size, partEntry.size * 4);
|
||||||
@@ -1245,7 +1245,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
nextBlock = RDB.fsheader_ptr;
|
nextBlock = RDB.fsheader_ptr;
|
||||||
while (nextBlock != 0xFFFFFFFF)
|
while (nextBlock != 0xFFFFFFFF)
|
||||||
{
|
{
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): Going to block {0} in search of a FileSystemHeader block", nextBlock);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): Going to block {0} in search of a FileSystemHeader block", nextBlock);
|
||||||
|
|
||||||
sector = imagePlugin.ReadSector(nextBlock);
|
sector = imagePlugin.ReadSector(nextBlock);
|
||||||
@@ -1254,7 +1254,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
if (magic != FilesystemHeaderMagic)
|
if (magic != FilesystemHeaderMagic)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): Found FileSystemHeader block");
|
Console.WriteLine("DEBUG (Amiga RDB plugin): Found FileSystemHeader block");
|
||||||
|
|
||||||
FileSystemHeader FSHD = new FileSystemHeader();
|
FileSystemHeader FSHD = new FileSystemHeader();
|
||||||
@@ -1282,7 +1282,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
FSHD.dnode.seglist_ptr = BigEndianBitConverter.ToUInt32(sector, 0x48);
|
FSHD.dnode.seglist_ptr = BigEndianBitConverter.ToUInt32(sector, 0x48);
|
||||||
FSHD.dnode.global_vec = BigEndianBitConverter.ToUInt32(sector, 0x4C);
|
FSHD.dnode.global_vec = BigEndianBitConverter.ToUInt32(sector, 0x4C);
|
||||||
|
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
{
|
{
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): FSHD.magic = 0x{0:X8}", FSHD.magic);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): FSHD.magic = 0x{0:X8}", FSHD.magic);
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): FSHD.size = {0} longs, {1} bytes", FSHD.size, FSHD.size * 4);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): FSHD.size = {0} longs, {1} bytes", FSHD.size, FSHD.size * 4);
|
||||||
@@ -1313,7 +1313,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
sha1Ctx.Init();
|
sha1Ctx.Init();
|
||||||
while (nextBlock != 0xFFFFFFFF)
|
while (nextBlock != 0xFFFFFFFF)
|
||||||
{
|
{
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): Going to block {0} in search of a LoadSegment block", nextBlock);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): Going to block {0} in search of a LoadSegment block", nextBlock);
|
||||||
|
|
||||||
sector = imagePlugin.ReadSector(nextBlock);
|
sector = imagePlugin.ReadSector(nextBlock);
|
||||||
@@ -1322,7 +1322,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
if (magicSeg != LoadSegMagic)
|
if (magicSeg != LoadSegMagic)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): Found LoadSegment block");
|
Console.WriteLine("DEBUG (Amiga RDB plugin): Found LoadSegment block");
|
||||||
|
|
||||||
thereAreLoadSegments = true;
|
thereAreLoadSegments = true;
|
||||||
@@ -1335,7 +1335,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
loadSeg.loadData = new byte[(loadSeg.size - 5) * 4];
|
loadSeg.loadData = new byte[(loadSeg.size - 5) * 4];
|
||||||
Array.Copy(sector, 0x14, loadSeg.loadData, 0, (loadSeg.size - 5) * 4);
|
Array.Copy(sector, 0x14, loadSeg.loadData, 0, (loadSeg.size - 5) * 4);
|
||||||
|
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
{
|
{
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): loadSeg.magic = 0x{0:X8}", loadSeg.magic);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): loadSeg.magic = 0x{0:X8}", loadSeg.magic);
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): loadSeg.size = {0} longs, {1} bytes", loadSeg.size, loadSeg.size * 4);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): loadSeg.size = {0} longs, {1} bytes", loadSeg.size, loadSeg.size * 4);
|
||||||
@@ -1352,7 +1352,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
if (thereAreLoadSegments)
|
if (thereAreLoadSegments)
|
||||||
{
|
{
|
||||||
string loadSegSHA1 = sha1Ctx.End();
|
string loadSegSHA1 = sha1Ctx.End();
|
||||||
if (MainClass.isDebug)
|
//if (MainClass.isDebug)
|
||||||
Console.WriteLine("DEBUG (Amiga RDB plugin): LoadSegment data SHA1: {0}", loadSegSHA1);
|
Console.WriteLine("DEBUG (Amiga RDB plugin): LoadSegment data SHA1: {0}", loadSegSHA1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -15,6 +15,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.DiscImages",
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.CommonTypes", "DiscImageChef.CommonTypes\DiscImageChef.CommonTypes.csproj", "{F2B84194-26EB-4227-B1C5-6602517E85AE}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.CommonTypes", "DiscImageChef.CommonTypes\DiscImageChef.CommonTypes.csproj", "{F2B84194-26EB-4227-B1C5-6602517E85AE}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.Partitions", "DiscImageChef.Partitions\DiscImageChef.Partitions.csproj", "{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|x86 = Debug|x86
|
Debug|x86 = Debug|x86
|
||||||
@@ -39,6 +41,10 @@ Global
|
|||||||
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Debug|x86.Build.0 = Debug|Any CPU
|
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Release|x86.ActiveCfg = Release|Any CPU
|
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Release|x86.Build.0 = Release|Any CPU
|
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Debug|x86.ActiveCfg = Debug|Any CPU
|
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Debug|x86.Build.0 = Debug|Any CPU
|
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Release|x86.ActiveCfg = Release|Any CPU
|
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
2015-10-05 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* Plugins.cs:
|
||||||
|
* PartPlugins/MBR.cs:
|
||||||
|
* PartPlugins/RDB.cs:
|
||||||
|
* PartPlugins/NeXT.cs:
|
||||||
|
* DiscImageChef.csproj:
|
||||||
|
* PartPlugins/Atari.cs:
|
||||||
|
* PartPlugins/AppleMap.cs:
|
||||||
|
* PartPlugins/PartPlugin.cs:
|
||||||
|
Move partitions plugins to a separate library.
|
||||||
|
|
||||||
2015-10-05 Natalia Portillo <claunia@claunia.com>
|
2015-10-05 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* Plugins.cs:
|
* Plugins.cs:
|
||||||
|
|||||||
@@ -47,12 +47,8 @@
|
|||||||
<Compile Include="Plugins\Opera.cs" />
|
<Compile Include="Plugins\Opera.cs" />
|
||||||
<Compile Include="Plugins\AppleHFS.cs" />
|
<Compile Include="Plugins\AppleHFS.cs" />
|
||||||
<Compile Include="Plugins\FAT.cs" />
|
<Compile Include="Plugins\FAT.cs" />
|
||||||
<Compile Include="PartPlugins\PartPlugin.cs" />
|
|
||||||
<Compile Include="PartPlugins\AppleMap.cs" />
|
|
||||||
<Compile Include="Plugins\FFS.cs" />
|
<Compile Include="Plugins\FFS.cs" />
|
||||||
<Compile Include="Plugins\AppleHFSPlus.cs" />
|
<Compile Include="Plugins\AppleHFSPlus.cs" />
|
||||||
<Compile Include="PartPlugins\MBR.cs" />
|
|
||||||
<Compile Include="PartPlugins\NeXT.cs" />
|
|
||||||
<Compile Include="Plugins\BFS.cs" />
|
<Compile Include="Plugins\BFS.cs" />
|
||||||
<Compile Include="Plugins\HPFS.cs" />
|
<Compile Include="Plugins\HPFS.cs" />
|
||||||
<Compile Include="Plugins\NTFS.cs" />
|
<Compile Include="Plugins\NTFS.cs" />
|
||||||
@@ -80,9 +76,7 @@
|
|||||||
<Compile Include="Decoders\BD.cs" />
|
<Compile Include="Decoders\BD.cs" />
|
||||||
<Compile Include="Decoders\DVD.cs" />
|
<Compile Include="Decoders\DVD.cs" />
|
||||||
<Compile Include="Plugins\ProDOS.cs" />
|
<Compile Include="Plugins\ProDOS.cs" />
|
||||||
<Compile Include="PartPlugins\RDB.cs" />
|
|
||||||
<Compile Include="Plugins\AmigaDOS.cs" />
|
<Compile Include="Plugins\AmigaDOS.cs" />
|
||||||
<Compile Include="PartPlugins\Atari.cs" />
|
|
||||||
<Compile Include="Commands\Entropy.cs" />
|
<Compile Include="Commands\Entropy.cs" />
|
||||||
<Compile Include="Decoders\Floppy.cs" />
|
<Compile Include="Decoders\Floppy.cs" />
|
||||||
<Compile Include="DetectImageFormat.cs" />
|
<Compile Include="DetectImageFormat.cs" />
|
||||||
@@ -199,5 +193,9 @@
|
|||||||
<Project>{F2B84194-26EB-4227-B1C5-6602517E85AE}</Project>
|
<Project>{F2B84194-26EB-4227-B1C5-6602517E85AE}</Project>
|
||||||
<Name>DiscImageChef.CommonTypes</Name>
|
<Name>DiscImageChef.CommonTypes</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\DiscImageChef.Partitions\DiscImageChef.Partitions.csproj">
|
||||||
|
<Project>{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}</Project>
|
||||||
|
<Name>DiscImageChef.Partitions</Name>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -60,7 +60,9 @@ namespace DiscImageChef
|
|||||||
|
|
||||||
public void RegisterAllPlugins()
|
public void RegisterAllPlugins()
|
||||||
{
|
{
|
||||||
Assembly assembly = Assembly.GetAssembly(typeof(ImagePlugin));
|
Assembly assembly;
|
||||||
|
|
||||||
|
assembly = Assembly.GetAssembly(typeof(ImagePlugin));
|
||||||
|
|
||||||
foreach (Type type in assembly.GetTypes())
|
foreach (Type type in assembly.GetTypes())
|
||||||
{
|
{
|
||||||
@@ -78,6 +80,24 @@ namespace DiscImageChef
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assembly = Assembly.GetAssembly(typeof(PartPlugin));
|
||||||
|
|
||||||
|
foreach (Type type in assembly.GetTypes())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (type.IsSubclassOf(typeof(PartPlugin)))
|
||||||
|
{
|
||||||
|
PartPlugin plugin = (PartPlugin)type.GetConstructor(Type.EmptyTypes).Invoke(new object[] { });
|
||||||
|
RegisterPartPlugin(plugin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
|
{
|
||||||
|
Console.WriteLine(exception);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
assembly = Assembly.GetExecutingAssembly();
|
assembly = Assembly.GetExecutingAssembly();
|
||||||
|
|
||||||
foreach (Type type in assembly.GetTypes())
|
foreach (Type type in assembly.GetTypes())
|
||||||
@@ -89,12 +109,6 @@ namespace DiscImageChef
|
|||||||
Plugin plugin = (Plugin)type.GetConstructor(new [] { typeof(PluginBase) }).Invoke(new object[] { this });
|
Plugin plugin = (Plugin)type.GetConstructor(new [] { typeof(PluginBase) }).Invoke(new object[] { this });
|
||||||
RegisterPlugin(plugin);
|
RegisterPlugin(plugin);
|
||||||
}
|
}
|
||||||
else if (type.IsSubclassOf(typeof(PartPlugin)))
|
|
||||||
{
|
|
||||||
PartPlugin partplugin = (PartPlugin)type.GetConstructor(new [] { typeof(PluginBase) }).Invoke(new object[] { this });
|
|
||||||
RegisterPartPlugin(partplugin);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user