Managed to get half an hour in here. Making the code a bit more analytical. It now tells me if a SYNC word was found mid-sector and also reports how many non-sector bytes were discarded before a sync work was found. It’s looking exactly as I expected:
Sync Marker found
** 4889 junk bits found inbetween sectors
FMT: 255 TRK: 0 SEC: 3 REM: 8
Stored header csum: 0x00000004
Calculated header csum: 0x00000004
Stored data csum: 0x15441114
Calculated data csum: 0x15441114
[...deleted...]
Sync Marker found
** 5400 junk bits found inbetween sectors
FMT: 255 TRK: 0 SEC: 0 REM: 11
Stored header csum: 0x00000004
Calculated header csum: 0x00000004
Stored data csum: 0x54151100
Calculated data csum: 0x54151100
As you can see we have junk in 2 places. Firstly at the very start of the capture which is not surprising since we started reading in a completely random place. Then secondly the is junk right before sector 0, which is the gap. This code is going to get more interesting once I start stepping the heads – we will start to see more of this junk (but correctly so).
Still need to tidy the code so I must tackle that next before I get side-tracked.