KyroFlux - Problems with HD


Transfer is working in DD mode, but the encoding takes too much time for HD - it might fail under some specific conditions. It’s already highly optimised lockless code, so there is nothing that can be improved with the current solution. We’ll try a slightly different approach, as bottlenecks have been identified, to see which strategy is best with HD in mind.

Once that is done, we can do some real-life tests with HD disks and see how well it works. Probably not too many HD disks have tracks that contain almost entirely zeros (most dense bitcell pattern in MFM, thus producing the most flux transitions), but it is possible.

The main bottleneck is where we ensure that the actual sample being processed is a valid one and not something that has been overwritten, or one that has not yet been written at the time of sampling. The sampling runs in a ring buffer independently of the data transfer. We could remove the checks and it would work without any problem... we just wouldn’t know whether a buffer overflow has happened... so that’s not an option.

We might be able to address the problem by moving the costly operations to the sampler itself. It is costly now because it is knowledge that the encoder/transfer routine cannot know without updating information constantly from the sampler. When moved to the sampler, it would be cheap, as it is data that the sampler can be aware of at the time.