Skip to content

Commit

Permalink
[#80] Support for HxC Floppy Emulator *.HFE images (Part 15: Fixed wo…
Browse files Browse the repository at this point in the history
…rking with flippy disks)
  • Loading branch information
tomas-nestorovic committed Dec 29, 2024
1 parent 2374669 commit 7ea5c62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Main/src/CapsBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,7 @@
}
// - retrieving currently inserted Medium zeroth Track
const CTrackTempReset ritInserted( internalTracks[cyl][0] ); // forcing a new scanning
const CTrackTempReset resetHead1( internalTracks[cyl][1] ); // dispose eventually changed Head 1 Track (e.g. in *.HFE that loads whole cylinders at once)
ScanTrack(cyl,0);
if (ritInserted==nullptr)
if (properties->IsRealDevice())
Expand Down
3 changes: 2 additions & 1 deletion Main/src/HFE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ formatError: ::SetLastError(ERROR_BAD_FORMAT);
if (!cylInfos[cyl].IsValid()) // maybe an error during Image creation?
return CTrackReaderWriter::Invalid;
internalTracks[cyl][0]=BytesToTrack( ReadTrackBytes(cyl,0) );
internalTracks[cyl][1]=BytesToTrack( ReadTrackBytes(cyl,1) );
if (!params.flippyDisk) // flippy disks not known to be represented backwards in *.HFE, hence always fail if this flag is set
internalTracks[cyl][1]=BytesToTrack( ReadTrackBytes(cyl,1) );
const PInternalTrack &rit=internalTracks[cyl][head];
return rit ? *rit : CTrackReaderWriter::Invalid;
}
Expand Down

0 comments on commit 7ea5c62

Please sign in to comment.