keirf / greaseweazle

Tools for accessing a floppy drive at the raw flux level
The Unlicense
993 stars 100 forks source link

Issues reading and writing SCP files to 640KB CP/M disk #414

Closed sbelectronics closed 8 months ago

sbelectronics commented 8 months ago

I have some 5.25" CP/M disks that I believe are 80 track, 256 bytes sector, 16 sectors, at 250 Kbps. I can read these from a high density floppy drive with the following:

gw read disk.scp --drive a --raw

Inspecting the image in HxCFloppyEmulator's track analyzer, the image looks fine and appears with the sector count that I expected. Then I write them back out to a blank floppy with the following:

gw write disk.scp --drive a

and read it back in:

gw read readback.scp --drive a.

The image in 'readback.scp' is nonsensical. Viewing it in HxCFloppyEmulator, the readback appears to be 9 sectors/track, 80 tracks, 512 bytes/sector. Only the even tracks are present. When the drive is writing, it also sounds like it's seeking "too fast". About twice as fast as when reading.

Thanks, Scott

sbelectronics commented 8 months ago

Another piece of information -- Track 0.0 is IBM.FM, 128 bytes/sector, 16 sectors, 125 kbps. All the other tracks (including 0.1) are MFM. Kind of like an Olivetti M20, but maybe a little different because first sector starts at 1, whereas if I'm reading diskdefs right, first sector on the Olivetti M20 starts at 0.

The following diskdefs will work with it for reading, but suffers similar issues as the raw scp file when attempting to write, including an inability to verify:

disk ipds
    cyls = 80
    heads = 2
    tracks 0.0 ibm.fm
        secs = 16
        bps = 128
        id = 1
        rate = 125
    end
    tracks * ibm.mfm
        secs = 16
        bps = 256
        id = 1
        rate = 250
    end
end
sbelectronics commented 8 months ago

Okay, I feel like an idiot... I didn't have the write jumper installed in the greaseweazle. I was reading back the original disk (which happened to be a reused DOS disk).