missing sector/syncs status.

This commit is contained in:
Jean-François DEL NERO
2025-09-24 08:02:44 +02:00
parent e691b0f541
commit cfcac3f37f
2 changed files with 27 additions and 0 deletions
@@ -90,7 +90,18 @@ typedef struct h17_Parm_
typedef struct h17_sect_metadata_
{
uint32_t Offset;
// Sector_Status bits :
// 0 Missing Header Sync
// 1 Wrong Track
// 2 Invalid Sector
// 3 Invalid Header Checksum
// 4 Missing Data Sync
// 5 Invalid Data Checksum
// 6 Sector was unreadable
// 7 Reserved
uint8_t Sector_Status;
uint8_t HSync;
uint8_t Volume;
uint8_t Track;
@@ -390,6 +390,22 @@ int H17_libLoad_DiskFile(HXCFE_IMGLDR * imgldr_ctx,HXCFE_FLOPPY * floppydisk,cha
sectorconfig[k].use_alternate_data_crc = 0x02;
sectorconfig[k].data_crc = sect_meta->Data_Checksum;
if( sect_meta->Sector_Status & 0x01 )
{
sectorconfig[k].alternate_addressmark = 0x00;
}
if( sect_meta->Sector_Status & 0x10 )
{
sectorconfig[k].alternate_datamark = 0x00;
}
if( sect_meta->Sector_Status & 0x40 )
{
sectorconfig[k].alternate_addressmark = 0x00;
sectorconfig[k].alternate_datamark = 0x00;
}
fseek (f , BIGENDIAN_DWORD(sect_meta->Offset) , SEEK_SET);
hxc_fread(&trackdata[k*sectorsize],sectorsize,f);