Skip to content

Commit

Permalink
[#40] Track Map: General improvements and bugfixes (Part 13: Making P…
Browse files Browse the repository at this point in the history
…art 3 more accurate by marking sectors "Deleted" instead of corrupting their CRC)
  • Loading branch information
tomas-nestorovic committed Aug 15, 2020
1 parent e5e9cf7 commit 959fa17
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Main/src/Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@

const TFdcStatus TFdcStatus::WithoutError;
const TFdcStatus TFdcStatus::SectorNotFound( FDC_ST1_DATA_ERROR, FDC_ST2_CRC_ERROR_IN_DATA );
const TFdcStatus TFdcStatus::DeletedDam( FDC_ST1_NO_DATA, FDC_ST2_DELETED_DAM );

TFdcStatus::TFdcStatus()
// ctor
Expand Down
1 change: 1 addition & 0 deletions Main/src/Image.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
typedef const struct TFdcStatus sealed{
static const TFdcStatus WithoutError;
static const TFdcStatus SectorNotFound;
static const TFdcStatus DeletedDam;

BYTE reg1,reg2;

Expand Down
2 changes: 1 addition & 1 deletion Main/src/ViewTrackMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@
if (const TStdWinError err=IMAGE->UnformatTrack( chs.cylinder, chs.head ))
return Utils::FatalError( _T("Can't unformat"), err );
}else if (Utils::QuestionYesNo(_T("Make this sector unreadable?"),MB_DEFBUTTON1))
if (const TStdWinError err=IMAGE->MarkSectorAsDirty( chs, nSectorsToSkip, &TFdcStatus::SectorNotFound ))
if (const TStdWinError err=IMAGE->MarkSectorAsDirty( chs, nSectorsToSkip, &TFdcStatus::DeletedDam ))
return Utils::FatalError( _T("Can't make unreadable"), err );
Invalidate();
}
Expand Down

0 comments on commit 959fa17

Please sign in to comment.