jgharston wrote:KayjayUK wrote:I suppose I'm being dumb again but why a singlesequential and a double sidedinterleaved disk for the same file set or are they different ? JGHCPM1 and JGHCPM1d
JGHCPM1 is a standard sequential disk image, where sector N is at offset N*B into the image, where sector N+1 is always and invariably immediately after sector N. JGHCPM1d is an interleaved disk image where sector N is at offset ((N MOD 10)+((N DIV 10) MOD 80)*20+(N DIV 800)*10)*B into the image, where sector N+1 is sometimes immediately after sector N and sometimes is N+10 sectors further on, and sometimes is N-800 sectors behind. Some people prefer interleaved disk images.
Whilst no doubt correct, that does strike me as being a little non-obvious. So, if I understand correctly, this is about interleaving the tracks from the sides of a disk so for other's benefit.....
Acorn DFS and CP/M both treat double-sided disks as two single-sided disks, assigning a separate drive ID to each and files do not span sides.
Acorn ADFS and DOS as implemented on the iBM PC treat the two sides of a double sided floppy as one medium but in slightly different ways. Imagine you have a freshly formatted ADFS disk and you go to save a file that is longer than one disk side. In this case ADFS will start writing on track 0 of the first side, immediately after the free space map and root catalogue and when it reaches the end of track 0 it will step the disk head and continue on track one. That will continue until the end of track 79 (for an 80 track drive) and then it will reposition the head back to track 0 and start writing on the second side of the disk. This arrangement is "sequential sides".
If you did the same on an IBM PC with a freshly formatted disk, writing would begin on track 0 of the first side immediately after the FAT but upon reaching the end of track 0 on that side instead of stepping the head to track 1 writing continues on track 0 of the second side. Only when that track is full would then head be moved to track 1 and writing would continue on the first side again. That would then carry on for as many tracks as necessary. This arrangement is "interleaved sides".
The Acorn ADFS arrangement has the advantage that the catalogue and some files may be readable from a double-sided disk even in a single sided drive. The IBM PC arrangement has the advantage that it is faster for reading/writing large files of several tracks because there is less head movement.
The snag comes when you decide to read all the data from a floppy as raw sectors and store it in a single file (on a hard disk) for archiving. If you want the archiver program, i.e. the one reading the floppy and writing to the image file on hard disk to run as fast as possible, which you do if you have a stack of them to do, you read the floppies using the IBM interleaved sides approach (80 head movements per double sided disk, compared to 240 with the Acorn approach) but if the source floppy is an Acorn disk and you write the sectors to the image file on the hard disk in the same order they are being read from floppy you end up with an image file with the sides interleaved which is a good archive, in that it can be written back to a real floppy fast, but is sub-optimal for use with emulators running on relatively old hardware because with emulator access confined to one side, for example on a DFS disk image, the emulator's host OS has to move the hard disk head further than if the sides had been stored in the image file consecutively (sequentially).
Possibly for that reason, JGH prefers sequential sided (SSD) image files. I don't know the full history but I suspect a significant archiving operation pre-dates the availability of good emulators on the PC so elsewhere (other than JGH's excellent mdfs.net) the interleaved side (DSD) image file is commonplace and is supported by modern emulators.
It is possible to convert between the two formats and Steve Harris's 'beeb' is one utility which has that feature. There are no doubt others too.