Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!alberta!ccu!shad04 From: shad04@ccu.umanitoba.ca (Dan Fandrich) Newsgroups: comp.sys.cbm Subject: Re: disk drive comparisons Message-ID: <1990Feb15.091120.19625@ccu.umanitoba.ca> Date: 15 Feb 90 09:11:20 GMT Reply-To: shad04@ccu.UManitoba.CA (Dan Fandrich) Organization: University of Manitoba, Winnipeg, Manitoba, Canada Lines: 95 I received two responses to my query about CBM floppy disk formats (from Marcel LeBlanc and Romulis ). I am posting it on behalf of all those 1581 and other "oddball" drive owners who are teed off at C64 programmers who think that all disk directories are located on track 18, sector 1 (on device 8 at that!). (Before you flame, I mean oddball drives, not oddball owners!) This summary should allow programs to be written with a measure of device independence when they access floppy disk sectors directly. The type of disk drive attached may be detected by reading the error channel (15) after sending the command "UJ" and waiting a moment. The resulting pseudo error code 73 should be searched, looking for the drive type while ignoring version numbers and copyright notices. Following is my summary of disk formats used for various Commodore disk drives. Questions marks take the place of any information I don't have. My thanks to Marcel and Romulis for their input. 1540, 1541, 1571 (in 1541 mode), 2031, 2040, 4040: -------------------------------------------------- 1 side 35 tracks trks 1-17: 21 sectors/trk trks 18-24: 19 sectors/trk trks 25-30: 18 sectors/trk trks 31-35: 17 sectors/trk Directory header at t18 s0 (pointer to start of directory at bytes 0 & 1) BAM starts at t18 s0 BAM takes up 1 sector Directory starts at t18 s1 Directory takes up 18 sectors Free blocks: 664 Power-on message (for 1541): 73,CBM DOS V2.6 1541,00,00 Power-on message (for 1540): ? Power-on message (for 1571): ? Power-on message (for 2031): ? Power-on message (for 2040): ? Power-on message (for 4040): ? 1581: -------------------------------------------------- 1 logical side (2 physical sides) 80 tracks trks 1-80: 40 logical sectors/trk (sectors 20-39 are on physical side 2) Directory header at t40 s0 (pointer to start of directory at bytes 0 & 1) BAM starts at t40 s1 BAM takes up 2 sectors Directory starts at t40 s3 Directory takes up 37 sectors Free blocks: 3160 Power-on message: 73,COPYRIGHT CBM DOS V10 1581,00,00 8050: -------------------------------------------------- 1 side 77 tracks trks 1-39: 29 sectors/trk trks 40-53: 27 sectors/trk trks 54-64: 25 sectors/trk trks 65-77: 23 sectors/trk Directory header at ? BAM starts at t38 s? BAM takes up ? sectors Directory starts at t39 s? Directory takes up ? sectors Free blocks: 2052 Power-on message: ? 8250, SFD-1001 (?): -------------------------------------------------- 1 logical side (2 physical sides) 154 tracks (77 tracks/side x 2 sides) trks 1-39: 29 sectors/trk (on physical side 1) trks 40-53: 27 sectors/trk " " " " trks 54-64: 25 sectors/trk " " " " trks 65-77: 23 sectors/trk " " " " trks 78-116: 29 sectors/trk (on physical side 2) trks 117-130: 27 sectors/trk " " " " trks 131-141: 25 sectors/trk " " " " trks 142-154: 23 sectors/trk " " " " Directory header at ? BAM starts at t38 s? BAM takes up ? sectors Directory starts at t39 s? Directory takes up ? sectors Free blocks: 4133 Power-on message (for 8250): ? Power-on message (for SFD-1001): ? -- >>> Dan Fandrich CDNnet: shad04@ccu.umanitoba.ca Compu$erve: 72365,306