From 7e32bb20983f09db31909aa907cbefcaabdaab0d Mon Sep 17 00:00:00 2001 From: tomascz Date: Sun, 8 Dec 2024 11:30:34 +0100 Subject: [PATCH] [#80] Support for HxC Floppy Emulator *.HFE images (Part 13: Must place fuzzy bits in fuzzy positions to reproduce them on a real disk) --- Main/src/HFE.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Main/src/HFE.cpp b/Main/src/HFE.cpp index fa2b3cb..926bad6 100644 --- a/Main/src/HFE.cpp +++ b/Main/src/HFE.cpp @@ -335,8 +335,8 @@ formatError: ::SetLastError(ERROR_BAD_FORMAT); CTrackReaderWriter trw( bytes.GetCount()*CHAR_BIT, params.fluxDecoder, params.resetFluxDecoderOnIndex ); PCBYTE p=bytes,const pLast=bytes.end(); TLogTime tCell=GetCellTime( header.dataBitRate*1000 ); - TLogTime tCurr=0; - for( BYTE nFollowingDataBitsToSkip=0; p=TOpCode::NOP){ // invalid OpCode ? @@ -361,19 +362,19 @@ formatError: ::SetLastError(ERROR_BAD_FORMAT); break; // skip it } const BYTE nBits=CHAR_BIT-nFollowingDataBitsToSkip; - const TLogTime tSpan=nBits*tCell; + const TLogTime tSpan=nBits*tCell, tFuzzy=tCell*fuzzyQuot/100; for( BYTE data=b<