Image Map Image Map
Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: reading single-sided format floppies in a PC with a 5.25 inch 1.2 Mbyte drive?

  1. #1
    Join Date
    Aug 2009
    Location
    Oslo, Norway
    Posts
    1,248
    Blog Entries
    3

    Question reading single-sided format floppies in a PC with a 5.25 inch 1.2 Mbyte drive?

    In general: is a normal PC (vintage enough to have a built in floppy controller) equipped with a normal 5.25 inch 1.2 MByte floppy drive also able to read floppies that are single-sided?
    Or is there some kind of (hardware) limitation (FDC? floppy drive? or both?) that prevent you from doing that?

    My "floppy imager" machine is a Dell OptiPlex GX300, it has a 3.5 inch 1.44 MB (A:) drive and a 5.25 inch 1.2 MB (B:) drive. It runs FreeBSD and works great for imaging double-sided floppies. I also have a few floppies that are labeled single-sided, and I'm unable to read any of those.
    Of course, it could be that these floppies are all bad (but I suspect not). It could also be that I haven't figured out the correct parameters, or it could be that this combo just won't work.
    Torfinn

  2. #2

    Default

    Reading should be fine... I've read 360k disks in my 1.2mb drive...

  3. #3
    Join Date
    Jan 2013
    Location
    Marietta, GA
    Posts
    3,146

    Default

    FreeBSD? I doubt that knows about anything besides standard 360k/1.2mb floppy disks formats. *nix or NT based OSes always expect a valid bios parameter block in the boot sector. DOS formatted 160k/320k/180k disks will rarely have valid bios parameter blocks because DOS 1.x didn't have those yet, and DOS 2.x had bugs. Even WinImage can't handle DOS 1.x disks.

    You need to boot to DOS and use a tool like ImageDisk that analyzes tracks for any possible sector layout, and stores images in a "structured" image format. (Even Win9x DOS 7.1 will work, and usually can even read files directly from DOS formatted 160k/320k/180k disks.)

    For IBM PC formatted disks, you don't need to worry about disk encoding as IBM PC always used MFM. Some controllers can also read FM (single density) encoding, but you would need to run ImageDisk's TestFDC to find out.

    Either that or get a Kryoflux or SuperCard Pro - which can read ANY format as long as the media matches the drive, and they can handle copy protection.

  4. #4
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    31,481
    Blog Entries
    20

    Default

    What FreeBSD tool do you use for reading those floppies? Generally, low-level drivers in BSD are pretty flexible, if you know the magic incantation.

  5. #5
    Join Date
    Aug 2009
    Location
    Oslo, Norway
    Posts
    1,248
    Blog Entries
    3

    Default

    I use fdcontrol(8) to set parameters, then I just use dd(1) to read the file off /dev/fdN. FreeBSD's fdc(4) is quite flexible.
    Last edited by tingo; March 21st, 2018 at 02:43 PM. Reason: disable smiles in this post
    Torfinn

  6. #6
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    31,481
    Blog Entries
    20

    Default

    ...and it doesn't work? That would surprise me.

  7. #7
    Join Date
    Aug 2009
    Location
    Oslo, Norway
    Posts
    1,248
    Blog Entries
    3

    Default

    Well, reading this double-sided format works:
    Code:
    # fdcontrol -vF /dev/fd1
    /dev/fd1: 1232 KB media type
       Format:        8,1024,0xff,0x35,77,500,2,0x74,1,0,+mfm
       Sector size:    1024
       Sectors/track:    8
       Heads/cylinder:    2
       Cylinders/disk:    77
       Transfer rate:    500 kbps
       Sector gap:    53
       Format gap:    116
       Interleave:    1
       Side offset:    0
       Flags        <MFM>
    and the "normal" PC format also works
    Code:
    # fdcontrol -vF /dev/fd1
    /dev/fd1: 1200 KB media type
       Format:        15,512,0xff,0x1b,80,500,2,0x54,1,0,+mfm,+auto
       Sector size:    512
       Sectors/track:    15
       Heads/cylinder:    2
       Cylinders/disk:    80
       Transfer rate:    500 kbps
       Sector gap:    27
       Format gap:    84
       Interleave:    1
       Side offset:    0
       Flags        <MFM,AUTO>
    However, my attempts at setting up single-sided formats doesn't work.
    Torfinn

  8. #8
    Join Date
    Aug 2009
    Location
    Oslo, Norway
    Posts
    1,248
    Blog Entries
    3

    Default Attempts at single-side format

    What I'm trying to achieve is to read what is called "format 0b" on NDwiki's ND floppy disks page. Those reading that page closely will figure out
    a) I'm successful in reading "format 17b"
    b) any given format could used on both 8 inch and 5.25 inch media (within physical limits)
    c) one ND "page" is 2048 bytes.
    d) there is probably not enough information on that page to specify all parameters needed for fdcontrol
    So far I have tried
    Code:
    root@kg-t2# fdcontrol -s 8,512,0xFF,0x35,77,500,1,0x74,1,0,+mfm /dev/fd1
    root@kg-t2# fdcontrol -vF /dev/fd1
    /dev/fd1: 308 KB media type
        Format:        8,512,0xff,0x35,77,500,1,0x74,1,0,+mfm
        Sector size:    512
        Sectors/track:    8
        Heads/cylinder:    1
        Cylinders/disk:    77
        Transfer rate:    500 kbps
        Sector gap:    53
        Format gap:    116
        Interleave:    1
        Side offset:    0
        Flags        <MFM>
    and
    Code:
    root@kg-t2# fdcontrol -s 8,512,0xFF,0x35,77,250,1,0x74,1,0,+mfm /dev/fd1
    root@kg-t2# fdcontrol -vF /dev/fd1
    /dev/fd1: 308 KB media type
        Format:        8,512,0xff,0x35,77,250,1,0x74,1,0,+mfm
        Sector size:    512
        Sectors/track:    8
        Heads/cylinder:    1
        Cylinders/disk:    77
        Transfer rate:    250 kbps
        Sector gap:    53
        Format gap:    116
        Interleave:    1
        Side offset:    0
        Flags        <MFM>
    and
    Code:
    root@kg-t2# fdcontrol -vF /dev/fd1
    /dev/fd1: 308 KB media type
        Format:        8,512,0xff,0x35,77,300,1,0x74,1,0,+mfm
        Sector size:    512
        Sectors/track:    8
        Heads/cylinder:    1
        Cylinders/disk:    77
        Transfer rate:    300 kbps
        Sector gap:    53
        Format gap:    116
        Interleave:    1
        Side offset:    0
        Flags        <MFM>
    I even tried this
    Code:
    root@kg-t2# fdcontrol -s 8,512,0xFF,0x35,77,1000,1,0x74,1,0,+mfm /dev/fd1
    fdcontrol: bad speed 1000
    not that I expected it to work.
    But no, I don't really know what I am doing here.
    Last edited by tingo; March 21st, 2018 at 03:12 PM. Reason: fixed a spelling error
    Torfinn

  9. #9
    Join Date
    Mar 2013
    Location
    Chaffee, MO
    Posts
    1,143

    Default

    Tingo,
    I think you need the flag for Single Density set = -mfm

    The second form to specify a device density uses -s fmtstr to explicitly
    specify each parameter in detail. The argument fmtstr is a comma-sepa-
    rated list of values of the form:

    sectrac,secsize,datalen,gap,ncyls,speed,heads,f_ga p,f_inter,offs2,flags

    The meaning of the parameters is:

    sectrac The number of sectors per track.

    secsize The sector size code, 0 = 128 bytes (or less), 1 = 256 bytes, 2
    = 512 bytes, 3 = 1024 bytes.

    datalen The actual sector size if the size code is 0, or the (ignored)
    value 0xFF for larger size codes.

    gap The length of the gap 3 parameter for read/write operations.

    ncyls The number of cylinders.

    speed The transfer speed in kilobytes per second. Can be 250, 300,
    500, or 1000, but each drive type only supports a subset of
    these values.

    heads The number of heads.

    f_gap The length of the gap 3 when formatting media.

    f_inter The sector interleave to be applied when formatting. 0 means no
    interleave, 1 means 1:1 etc.

    offs2 The offset of the sector numbers on side 2 (i.e., head number
    1). Normally, sector numbering on both sides starts with 1.

    flags A list from one of the following flag values:

    +mfm Use MFM encoding.
    -mfm Use FM (single-density) encoding.
    +2step Use 2 steps per each cylinder (for accessing 40-cylin-
    der media in 80-cylinder drives).
    -2step Do not use 2 steps per cylinder, i.e., access each
    physical cylinder of the drive.
    +perpend Use perpendicular recording (for 2.88 MB media, cur-
    rently not supported).
    -perpend Use longitudinal recording.

    For any missing parameter, the current value will be used, so only actual
    changes need to be specified. Thus to turn off a flag bit (like +mfm
    which is the default for all drive types), the form with a leading minus
    sign must explicitly be used.

    Larry

  10. #10
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    31,481
    Blog Entries
    20

    Default

    Two things: Format 0b is indeed single-density/FM. Assuming it's an 8" drive, you also need an FM-capable FDC (check that out with Dave Dunfield's testfdc utility).

    So the parameters to the fdcontrol should be 8,2,0xff,40,77,500,1,80,0,0,-mfm

    The gap lengths are approximate and really only matter if you're reading or formatting the disk. The deficiency in fdcontrol and its corresponding Linux command is that it assumes standard address ID conventions (e.g. first sector is 1, first side head ID is 0, etc.).

    While that's true of most IBM formats, it's not true in general for all floppies.
    Last edited by Chuck(G); March 21st, 2018 at 05:47 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •