#pragma once
#include "BKHDDTool.h"

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

void CopyString2Sys(BYTE *dst, const CString &str, int max_len);
void CreateHDISector(IMGFormat *imgf, BYTE *bufSector);
CString GenerateSerialNumber();

