Updated disk I/O drivers: http://mdfs.net/Software/Flex/BBC/
The code will access disks where sectors are counted from 1 instead of from 0, but it doesn't yet examine the disk to decide what starting sector to use, currently, physical sectors count from 0 as with DFS disks.
The code has disk density flags, but currently doesn't yet make double-density disk access calls.
danielj wrote:Just out of interest, what's the sector layout on side 1 track 0? Same as side 0? I'd assume it'd have to be...
The sectors on side 1 are numbered the same as on side 0. The logical sector numbers Flex passes to the disk drivers for an interleaved disk count the sectors on side 1 continue on from the end of side 0.
For instance, Flex would have 20 logical sector per track, logical sectors 1-10 would be physical sectors 1-10 on side 0, logical sectors 11-20 would be physical sectors 1-10 on side 1 (assuming physical sectors are numbers from 1. 0-9 and 0-9 if numbered from 0, etc.).
danielj wrote:Does FLEX use the physical sector numbers on the track, or does it apply "logical" ones?
Flex uses logical sectors counting from 1 upwards and logical tracks counting from 0 upwards. The disk drivers convert these numbers to the physical sector and track numbers on the actual disk. For instance, you could have a single-sided disk with 20 logical sectors per track, but 10 physical sectors per track, so then logical track 0 would be physical track 0 and physical track 1, with logical sectors 1-10 being the ten physical sectors on track 0 and logical sectors 11-20 being the ten physical sectors on track 1. With appropriate drivers, the physical sector numbering can be anything, 0-9, 1-10, even &41-&4A and &C1-&CA as with the Amstrad CPC.
danielj wrote:Adventure loads and runs. It's a touch slow loading, is that to be expected?
Because Flex holds all the disk sectors as a linked list, it has to load sectors one at a time as it has to read a sector to find out what the next sector it is it has to load. That means it loses any ability to optimise disk access by doing multiple-sector transfers. Disk access can be sped up with physical disks by formatting tracks with the sectors interleaved, so instead of formatting 0,1,2,3,4,5,6,7,8,9 the usual layout is to format the sectors 0,7,4,1,8,5,2,9,6,3. So, after reading sector 0 and processing it, by the time sector 1 is wanted it is about to pass the disk read head instead of it having already wizzed past and having to wait for a full disk rotation for it.