Does anyone know how slow a hard drive has to be in order for Xenix to work?
I don't, but there's two ways you could find out:
1. look at what change the patch for Xenix does and what the previous code expects.
from:
http://sigmasevensystems.com/xpf_xenix.html c) To assert CMD after BSY interrupt is enabled and accept fast response
Sectors: $22 (#34), $CF (#207), $183 (#387)
Search: 0200 0002 0C00 0002 6680
Replace: 4E71 08EB 0004 0001 6080 (change 9 bytes)
2. time an actual ProFile or Widget drive by reading from it. You could attach a scope to the ProFile while you use BLU to do a dump, or boot an OS and run tar to /dev/null or dd to /dev/null, and see how fast the data streams through between sectors.
3. estimate. Likely the rotational speed between two consecutive sectors is what they're after, and not track seek time. I think they're 3600 or so RPM, likely the Widget ERD has that info also.
a. Maybe divide the RPMs (3600) by number of sectors per track, this gives 57, so you're looking at reading 57 sectors/minute, so somewhat less than 1 sector/second.
I don't know if this applies to the ProFile, but the ST506 when MFM formatted used 63 sectors per track.
Now it's possible to not read sequentially, but instead read in parallel across the heads (I think the ST506 might have had 8 heads, but not sure), so perhaps start with a multiple of 1sector/sec upto maybe 8 or 16 and then slow down from that until it starts to work.
b. Another way to measure: off the top of my head it takes about 30mins or so to transfer a whole ProFile over BLU, I may be off here, but that could be used to divide the number of sectors by that time, however, the question is, is 57.6kbps the limit or the parallel interface? Likely the serial port is the bottle neck, so that's not going to be a great estimate, but it could be a starting point, and then ratchet up from there.
This would be 9728 sectors / ( 30mins*60s)=5.4 sectors/sec?
So that's quite the range from ~1sector/second to 5.4, so the math here is off here somewhere, but yeah, it's a start.
One thought, perhaps it might be best to not have to force the user to rename the hard drive ahead of time - you could detect their presence of UniPlus or Xenix it by reading the boot block, and then, if it's Xenix, figure out where the speed patch gets carried to onto the ProFile hard drive, and detect if it's been patched or not, and adjust the speed accordingly - likely it's in a fixed place after it's installed (possibly the boot loader, and certainly the "xenix" kernel file) and use that value to decide whether or not you should slow down the interface.
X/ProFile doesn't requires patching UniPlus for speed, only Xenix, so likely that's the more sensitive of the two, so you could go at least as fast as the X/ProFile for UniPlus and only slow down if unpatched needed for Xenix, unless your device is significantly faster than the X/ProFile, if in which case: Woo Hoo!