//------------------------------------------------ //--- 010 Editor v7.0dev1 Binary Template // // File: ElTorito.bt // Authors: A Kochkov // Version: 1.1 // Purpose: View the file system headers in an El Torito bootable cd image. // Category: Drives // File Mask: // ID Bytes: // History: // 1.1 2016-02-12 SweetScape Software: Updated header for repository submission. // 1.0 A Kochkov: Initial release. //------------------------------------------------ BitfieldRightToLeft(); BitfieldDisablePadding(); #define BLOCK_SIZE 2048 #define BOOT_RECORD_OFFSET 2048 * 16 #define ELTORITO_OFFSET 2048 * 17 typedef struct { ubyte BootIndicator; char IsoId[5]; ubyte Version; char Identifier[32]; ubyte Unused[32]; uint32 BootCatalog; ubyte Unused2[5]; uint32 VolSpaceSize[2]; } BOOT_RECORD_DESC; typedef union { struct { ubyte HeaderId; ubyte PlatformId; uint16 Res0; char Id[24]; uint16 Checksum ; uint16 Sig ; // 0xaa55 } ValEntry; struct { enum { BOOTABLE=0x88, NOT_BOOTABLE=0x0 } BootId ; enum { NO_EMULATION=0x0, DISKETTE_1_2=0x1, DISKETTE_1_44=0x2, DISKETTE_2_88=0x3, HARDDISK=0x4 } MediaType ; uint16 LoadSegment ; ubyte SystemType; ubyte Unused; uint16 SectorCount; uint32 LoadLba; } DefaultEntry; struct { enum { NOT_LAST_HEADER=0x90, LAST_HEADER=0x91 } HeaderId ; enum { PC_80x86=0x0, POWERPC=0x1, MAC=0x2 } PlatformId ; uint16 NumSectionEntries; char IdString[28]; } SecHeader; struct { enum { SECTION_BOOTABLE=0x88, SECTION_NOT_BOOTABLE=0x0 } BootId ; enum { SEC_NO_EMULATION=0x0, SEC_DISKETTE_1_2=0x1, SEC_DISKETTE_1_44=0x2, SEC_DISKETTE_2_88=0x3, SEC_HARDDISK=0x4 } MediaType ; uint16 LoadSegment ; ubyte SystemType; ubyte Unused; uint16 SectorCount; uint32 LoadLba; enum { NO_SELECTION_CRITERIA=0x0, LANGUAGE_AND_VERSION=0x1 } SelectionType; ubyte Criteria[19]; } SecEntry; } EL_TORITO_ENTRIES; LittleEndian(); FSeek(ELTORITO_OFFSET); BOOT_RECORD_DESC boot_record; FSeek(boot_record.BootCatalog * BLOCK_SIZE); EL_TORITO_ENTRIES el_torito[BLOCK_SIZE / sizeof(EL_TORITO_ENTRIES) - 1];