Beispiel #1
0
		private void GenVolumeDescriptorTerminator() // ISO 9660 - 8.3
		{
			var vdt = new FieldValidator(generator);
			vdt.Byte(255, 1); // Volume Descriptor Type ( 8.3.1 )
			vdt.AString("CD001", 2, 6); // Standard Identifier ( 8.4.2 )
			vdt.Byte(1, 7); // Volume Descriptor Version ( 8.4.3 )
			generator.FinishBlock();
		}
Beispiel #2
0
		private void GenBootRecordDescriptor() // ( ISO 9660 - 8.2, El Torito Figure 7 )
		{
			var br = new FieldValidator(generator);
			br.Byte(0, 1); // Volume Descriptor Type ( 8.2.1 ), Boot Record Indicator - must be 0 ( offset 0x00 )
			br.AString("CD001", 2, 6); // Standard Identifier ( 8.2.2 ), ( offset 0x01-0x05 )
			br.Byte(1, 7); // Volume Descriptor Version ( 8.2.3 ), must be 1 for El Torito also ( offset 0x06 )
			br.AString("EL TORITO SPECIFICATION", 8, 39, '\0'); // Boot System Identifier ( 8.2.4 ), ( offset 0x07-0x26 )
			br.Zero(40, 71); // Boot Identifier ( 8.2.5 ), Unused - must be 0 ( offset 0x27-0x46 )
			br.IntLSB(BootCatalog, 72, 75); // Boot System Use ( 8.2.6 ), Absolute Pointer to first sector of Boot Catalog ( offset 0x47-0x4A )
			generator.FinishBlock();
		}
Beispiel #3
0
		private void GenPrimaryVolumeDescriptor() // ( 8.4 )
		{
			PrimaryVolumeDescriptor = generator.Index / LogicalBlockSize;
			var pvd = new FieldValidator(generator);
			pvd.Byte(1, 1); // Volume Descriptor Type ( 8.4.1 )
			pvd.AString("CD001", 2, 6); // Standard Identifier ( 8.4.2 )
			pvd.Byte(1, 7); // Volume Descriptor Version ( 8.4.3 )
			pvd.Zero(8, 8); // Unused Field ( 8.4.4 )
			pvd.AString("?", 9, 40); // System Identifier ( 8.4.5 )
			pvd.DString(volumeLabel, 41, 72); // Volume Identifier ( 8.4.6 )
			pvd.Zero(73, 80); // Unused Field ( 8.4.7 )
			pvd.IntLSBMSB((TotalSize + LogicalBlockSize - 1) / LogicalBlockSize, 81, 88); // Volume Space Size ( 8.4.8 )
			pvd.Zero(89, 120); // Unused Field ( 8.4.9 )
			pvd.ShortLSBMSB(1, 121, 124); // Volume Set Size ( 8.4.10 )
			pvd.ShortLSBMSB(1, 125, 128); // Volume Sequence Number ( 8.4.11 )
			pvd.ShortLSBMSB(LogicalBlockSize, 129, 132); // Logical Block Size ( 8.4.12 )
			pvd.IntLSBMSB(PathTableSize, 133, 140); // Path Table Size ( 8.4.13 )
			pvd.IntLSB(LPathTable, 141, 144); // L Path Table ( 8.4.14 )
			pvd.IntLSB(0, 145, 148); // Optional L Path Table ( 8.4.15 )
			pvd.IntMSB(MPathTable, 149, 152); // M Path Table ( 8.4.16 )
			pvd.IntMSB(0, 153, 156); // Optional M Path Table ( 8.4.17 )
			pvd.BeginField(157);
			DirectoryRecord(".", isoRoot, 1); // Directory Record for Root Directory ( 8.4.18 )
			pvd.EndField(190);
			pvd.DupByte(0x20, 191, 318); // Volume Set Identifier ( 8.4.19 )
			pvd.DupByte(0x20, 319, 446); // Publisher Identifier ( 8.4.20 )
			pvd.DupByte(0x20, 447, 574); // Data Preparer ( 8.4.21 )
			pvd.DupByte(0x20, 575, 702); // Application Identifier ( 8.4.22 )
			pvd.DupByte(0x20, 703, 739); // Copyright File Identifier ( 8.4.23 )
			pvd.DupByte(0x20, 740, 776); // Abstract File Identifier ( 8.4.24 )
			pvd.DupByte(0x20, 777, 813); // Bibliographic File Identifier ( 8.4.25 )
			System.DateTime now = System.DateTime.Now;
			pvd.AnsiDateTime(now, 814, 830); // Volume Creation Date and Time ( 8.4.26 )
			pvd.AnsiDateTime(now, 831, 847); // Volume Modification Date and Time ( 8.4.27 )
			pvd.Zero(848, 864); // Volume Expiration Date and Time ( 8.4.28 )
			pvd.Zero(865, 881); // Volume Effective Date and Time ( 8.4.29 )
			pvd.Byte(1, 882); // File Structure Version ( 8.4.30 )
			pvd.Zero(883, 883); // Reserved ( 8.4.31 )
			pvd.Zero(884, 1395); // Application Use ( 8.4.32 )
			pvd.Zero(1396, 2048); // Reserved for Future Standardization ( 8.4.33 )
		}