On 04/04/2020 09:11, James Harris wrote:
...
> On a 1.8GHz PC via USB it took 15 seconds.
...
> Hence it would read only one sector per rotation.
Just checking the maths of that, floppy rotation rate 300 RPM is 5
revolutions per second meaning 200ms per revolution. Then 80 revolutions
would take 80 * 0.2s = 16 seconds ... which matches the timing above. I
think that confirms a latency problem.
There are some interesting findings here.
The good news is that a floppy bootloader could load an OS as simply as
possible, i.e. a sector at a time, and still get maximum load speed.
But the bad news is that where there's a chance that the floppy could be
connected via USB a machine could be turgidly slow.
How slow? Scaling the above up let's say the image which has to be
loaded is 400k in size or 800 sectors. Loading it would take 160 seconds
or more than two minutes. :-(
So a floppy bootloader would really need to read a track at a time. And
if the boot sector at 512 bytes doesn't have enough space to do that
then it would have to load another program which in turn would load the
OS image.
As a well-behaved loader will follow the FAT chain the consecutive
sectors of the image may not be in consecutive sectors on the diskette.
So there is really a caching function being carried out. In particular,
once a track has been loaded it's best to keep it in memory in case a
later sector is on that track.
And the challenges increase in that in real mode the memory available
for caching will decrease as the image is loaded!
But maybe there is an even wider point that goes beyond the initial
load. Since any floppy could be connected via USB a running OS should
probably nearly always read floppies a track at a time. The only
exception might be if there's a need to read just one sector and/or if a
certain track has a damaged sector on it.
Challenges aplenty!
--
James Harris