Skip to content

Commit

Permalink
[#80] Support for HxC Floppy Emulator *.HFE images (Part 13.1: Fixed)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-nestorovic committed Dec 8, 2024
1 parent 7e32bb2 commit 21bdc7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Main/src/HFE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ formatError: ::SetLastError(ERROR_BAD_FORMAT);
PCBYTE p=bytes,const pLast=bytes.end();
TLogTime tCell=GetCellTime( header.dataBitRate*1000 );
TLogTime tCurr=0;
for( BYTE nFollowingDataBitsToSkip=0,fuzzyQuot=100; p<pLast; )
for( BYTE nFollowingDataBitsToSkip=0,fuzzyQuot=0; p<pLast; )
switch (BYTE b=*p++){
case TOpCode::SETINDEX:
trw.AddIndexTime( tCurr );
Expand All @@ -354,7 +354,7 @@ formatError: ::SetLastError(ERROR_BAD_FORMAT);
break;
case TOpCode::RANDOM:
b=::rand()&0x54; // constant adopted from HxC2001 emulator
fuzzyQuot=146; // let fluxes be at the very edge of neighboring cells
fuzzyQuot=46; // let fluxes be at the very edge of neighboring cells
//fallthrough ('b' is now smaller than 'TOpCode::NOP')
default:
if (b>=TOpCode::NOP){ // invalid OpCode ?
Expand All @@ -367,7 +367,7 @@ formatError: ::SetLastError(ERROR_BAD_FORMAT);
if ((char)data<0)
trw.AddTime( tCurr + i*tCell+tFuzzy );
tCurr+=tSpan;
nFollowingDataBitsToSkip=0, fuzzyQuot=100;
nFollowingDataBitsToSkip = fuzzyQuot = 0;
break;
}
if (trw.GetIndexCount()<1)
Expand Down

0 comments on commit 21bdc7e

Please sign in to comment.