//------------------------------------------------ //--- 010 Editor v8.0.1 Binary Template // // File: Alcohol.bt // Authors: Natalia Portillo // Version: 0.1 // Purpose: Alcohol 120% media descriptor. // Category: Misc // File Mask: *.mds // ID Bytes: 4D 45 44 49 41 20 44 45 53 43 52 49 50 54 4F 52 // MEDIA DESCRIPTOR // History: // 0.1 2018-01-08 Natalia Portillo: Initial release //------------------------------------------------ enum AlcoholMediumType { CD = 0x00, CDR = 0x01, CDRW = 0x02, DVD = 0x10, DVDR = 0x12 }; enum AlcoholTrackMode { NoData = 0x00, Data = 0x02, Audio = 0xA9, Mode1 = 0xAA, Mode2 = 0xAB, Mode2F1 = 0xEC, Mode2F2 = 0xED, Mode2F1Alt = 0xAC, Mode2F2Alt = 0xAD, }; enum AlcoholSubchannelMode { None = 0x00, Interleaved = 0x08 }; typedef struct { char signature[16]; unsigned byte majorVersion; unsigned byte minorVersion; AlcoholMediumType type; unsigned short sessions; unsigned short unknown1[2]; unsigned short bcaLength; unsigned int unknown2[2]; unsigned int bcaOffset; unsigned int unknown3[6]; unsigned int structuresOffset; unsigned int unknown4[3]; unsigned int sessionOffset; unsigned int dpmOffset; } AlcoholHeader; typedef struct { uint pregap; uint sectors; } AlcoholTrackExtra; typedef struct { AlcoholTrackMode mode; AlcoholSubchannelMode subMode; byte adrCtl; byte tno; byte point ; byte min; byte sec; byte frame; byte zero; byte pmin; byte psec; byte pframe; uint extraOffset; ushort sectorSize; byte unknown[18]; uint startLba; uint64 startOffset; uint files; uint footerOffset; byte unknown2[24]; } AlcoholTrack; typedef struct { int sessionStart; int sessionEnd; ushort sessionSequence; byte allBlocks; byte nonTrackBlocks; ushort firstTrack; ushort lastTrack; uint unknown; uint trackOffset; FSeek(this.trackOffset); AlcoholTrack tracks[this.allBlocks]; } AlcoholSession; typedef struct { uint filenameOffset; uint widechar; uint unknown1; uint unknown2; } AlcoholFooter; LittleEndian(); AlcoholHeader header; FSeek(header.sessionOffset); AlcoholSession sessions[header.sessions];