ROAST_LEXICAL_FIXSTR(str_CD001, "CD001")
ROAST_LEXICAL_FIXSTR(str_ELTORITOSPEC, "EL TORITO SPECIFICATION") // 23byte
+ // Zero Padding Sector
+ typedef soft_repeat< unibyte<0>, 2048 > zero_padding_sector;
+
// _volume_desc
typedef seq<
unibyte<0>, // Volume Descriptor Type
// System Descriptor (32byte)
str_ELTORITOSPEC, // String 23byte
+ /*
soft_repeat< unibyte<0>, 9 >, // Zero Padding (9byte)
// Volume Discriminator - Zero Padding (32byte)
soft_repeat< unibyte<0>, 32 >,
+ */
+ soft_repeat< unibyte<0>, 9 + 32 >,
// [El Torito Only] Boot Record Volume Descriptor
- fixed_uint< fixed_little_endian<unsigned int, 18 >::value > // 18 Sector
+ fixed_uint< fixed_little_endian<unsigned int, 18>::value >, // Boot Record Volume is No.18 Sector
+
+ // Zero Padding Sector Rest
+ soft_repeat< unibyte<0>, 2048 - 0x4B >
> _volume_desc;
+ // Boot Record Volume Descriptor
+ typedef seq<
+ unibyte<1>, // Volume Descriptor Type -> 1(PVD)
+ unibyte<0>, // 0:80x86
+ hard_repeat< unibyte<0>, 2 >, // reserved
+ soft_repeat< unibyte<0>, 24 >, // auther
+
+ fixed_ushort< fixed_little_endian<unsigned short, 0x55AA >::value >, // Checksum (0x000-0x01f, Volume Descriptor Type - auther)
+ unibyte<0x55>, // Signature
+ unibyte<0xAA>, // Signature
+
+ unibyte<0x88>, // 0x88:Bootable, 0x00:Not Bootable
+
+ unibyte<0x02>, // 0: NO Emulation,
+ // 1: 1.2MB FDD Emulate,
+ // 2: 1.44MB FDD Emulate,
+ // 3: 2.88MB FDD Emulate,
+ // 4: HDD Emulate
+
+ fixed_ushort< 0x0000 >, // Read Segment: 0 is Default (0x07c0)
+ fixed_ushort< 0x0001 >, // Boost Sector Count
+ fixed_uint<20>, // Boost Sector No.
+
+ // Zero Padding Sector Rest
+ soft_repeat< unibyte<0>, 2048 - 0x2B >
+ > _boot_record_volume_desc;
+
// rule
typedef seq<
- soft_repeat< unibyte<0>, 0x8800 >, // Zero Padding 17 Sectors (1 Sector = 2048byte)
- _volume_desc
+ soft_repeat< zero_padding_sector, 17 >, // Zero Padding 17 Sectors
+ _volume_desc,
+ _boot_record_volume_desc
> rule;
>>>>>>> 63d7ba7... eltorito.hpp: とりあえず「Boot Record Volume Descriptor」の手前まで
}