#pragma once
#include "BKHDDTool.h"

#pragma pack(push)
#pragma pack(1)
struct SYS_SECTOR
{
	uint16_t    main_config;            //0
	uint16_t    cylinders;              //1
	uint16_t    reserved2;              //2
	uint16_t    heads;                  //3
	uint16_t    raw_bytes_per_track;    //4
	uint16_t    raw_bytes_per_sector;   //5
	uint16_t    sectors;                //6
	uint16_t    reserved7[3];           //7,8,9
	uint8_t     serial_number[20];      //10
	uint16_t    buffer_type;            //20
	uint16_t    buffer_size_in_sectors; //21
	uint16_t    ecc_bytes_num;          //22
	uint8_t     fw_version[8];          //23
	uint8_t     model_name[40];         //27
	uint16_t    word47;                 //47
	uint16_t    word48;                 //48
	uint16_t    capabilities1;          //49
	uint16_t    capabilities2;          //50
	uint16_t    reserved51[6];          //51
	uint32_t    capacity_in_sectors;    //57,58
	uint16_t    reserved59;             //59
	uint32_t    total_used_sectors;     //60,61
	uint16_t    reserved62[194];        //62
};
#pragma pack(pop)

void CopyString2Sys(uint8_t *dst, const wstring &str, size_t max_len);
void CreateHDISector(IMGFormat *imgf, uint8_t *bufSector);
wstring GenerateSerialNumber();

