KryoFlux - Results!


Another possibility arose that would save a few more cycles on the interrupt, but sadly an “optimisation” in the compiler kills all attempts at making it work - the resulting code is too short (!) and merged with the next few instructions... The responsible optimisation could be turned off, but that would produce slow code for the rest of the function, so we had to abandon it.

Once again, writing assembly code is not an option as we want to keep this maintainable and portable as much as possible. The previous version remains.

The data transfer itself has now been rewritten to use the data produced by the new encoding scheme.

The system now also supports timeout for forced transfers - this is useful when a track does not contain much data, but the host side would timeout as if there was nothing to receive. We’ll see how all the new things works in practice...

One thing worth mentioning is that even by faking the samples for a worst-case read (and slowing down the interrupt doing it) we got maximum around 860 KiB throughput for HD disks (on average only 450 KiB is needed). Also, by pretty much trying any DD disk we could, we finally found one that pushed the transfer to 970 KiB... but only after sending each encoded flux change duplicated four times over. :) So we’d say the new version is working great. In fact it’s so good that we are tempted to create a checksum and send it over just to be sure. Unless we used a really small buffer and an HD disk with worst case encoding, we never once got a buffer overflow!

Let us just say that one more time - this thing now works great for HD as well as DD disks on the low-end boards we have be researching all this time. Result!

Queue champagne!