Skip to content

Commit 2d96230

Browse files
committed
Add track write margin for SuperCard Pro
Rather than scaling to the measured track time we now allow a 1ms margin to account for variations in rotation speed. Without this we may overwrite the start of the track, which could be important. This fixes the occasional missing sector 1 on 11-sector ST disks.
1 parent f037dfc commit 2d96230

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/types/scp_dev.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ class SCPDevDisk final : public DemandDisk
8686
throw util::exception(m_supercardpro->GetErrorStatusText());
8787

8888
track_time_ns = std::accumulate(flux_rev[0].begin(), flux_rev[0].end(), 0ULL);
89+
90+
constexpr auto write_margin_ns = 1'000'000; // 1ms
91+
track_time_ns -= write_margin_ns;
8992
}
9093

9194
auto total_time_ns = std::accumulate(flux_times.begin(), flux_times.end(), 0ULL);

0 commit comments

Comments
 (0)