Add DiscImageChef format version 1.

This commit is contained in:
2018-01-26 22:32:58 +00:00
parent 2c700d1798
commit e3d27298d5
2 changed files with 416 additions and 200 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -3,16 +3,16 @@
// //
// File: dicformat.bt // File: dicformat.bt
// Authors: Natalia Portillo // Authors: Natalia Portillo
// Version: 0.0 // Version: 1.0
// Purpose: DiscImageChef format // Purpose: DiscImageChef format
// Category: Misc // Category: Misc
// File Mask: *.dicf // File Mask: *.dicf
// ID Bytes: 44 49 43 44 44 46 4D 54 // DICDDFMT // ID Bytes: 44 49 43 4D 46 52 4D 54 // DICMFRMT
// History: // History:
// 0.0 2018-01-25 Natalia Portillo: Initial release // 1.0 2018-01-26 Natalia Portillo: Initial release
//------------------------------------------------ //------------------------------------------------
#define DIC_MAGIC 0x544D464444434944 #define DIC_MAGIC 0x544D52464D434944
enum <uint> MediaType enum <uint> MediaType
{ {
@@ -620,12 +620,19 @@ enum <ushort> DataType
enum <uint> BlockType enum <uint> BlockType
{ {
DataBlock = 0x484B4C42, DataBlock = 0x4B4C4244,
DeDuplicationTable = 0x48544444, DeDuplicationTable = 0X2A544444,
Index = 0x48584449, Index = 0X58444E49,
GeometryBlock = 0x4D4F4547, GeometryBlock = 0x4D4F4547,
MetadataBlock = 0x5444545D, MetadataBlock = 0x4154454D,
TracksBlock = 0x534B5254 TracksBlock = 0x534B5254,
CicmBlock = 0x4D434943,
ChecksumBlock = 0x4D534B43,
DataPositionMeasurementBlock = 0x2A4D5044,
SnapshotBlock = 0x50414E53,
ParentBlock = 0x50524E54,
DumpHardwareBlock = 0x2A504D44,
TapeFileBlock = 0x454C4654
}; };
enum <byte> TrackType enum <byte> TrackType
@@ -767,16 +774,16 @@ for(i = 0; i < index.entries; i++)
FSeek(index.items[i].offset); FSeek(index.items[i].offset);
switch(index.items[i].blockType) switch(index.items[i].blockType)
{ {
case 0x484B4C42: case 0x4B4C4244:
BlockHeader dataBlock; BlockHeader dataBlock;
break; break;
case 0x48544444: case 0x2A544444:
DdtHeader deduplicationTable; DdtHeader deduplicationTable;
break; break;
case 0x4D4F4547: case 0x4D4F4547:
GeometryBlock geometry; GeometryBlock geometry;
break; break;
case 0x5444545D: case 0x4154454D:
MetadataBlock metadata; MetadataBlock metadata;
if(metadata.creatorOffset > 0) if(metadata.creatorOffset > 0)
{ {