From 6c4187006eccc6f7e460994b5be883cb4080d267 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 8 Jan 2018 19:36:09 +0000 Subject: [PATCH] Add Alcohol 120% template. --- templates/Alcohol.bt | 115 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 templates/Alcohol.bt diff --git a/templates/Alcohol.bt b/templates/Alcohol.bt new file mode 100644 index 00000000..48d78049 --- /dev/null +++ b/templates/Alcohol.bt @@ -0,0 +1,115 @@ +//------------------------------------------------ +//--- 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 Vasyl Tsvirkunov: 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 = 0xAC, + Mode2F2 = 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];