keirf / amiga-stuff

The Unlicense
259 stars 26 forks source link

ATK-Feature request: provide "simple" format routine for whole disks #62

Closed fook42 closed 5 months ago

fook42 commented 2 years ago

suggestion: implementation of a simple format routine to verify disk-writes and detect broken floppy-heads. open points:

keirf commented 2 years ago

The existing write test writes a whole track to each head. Is that insufficient?

fook42 commented 2 years ago

i know, but it will only write to the last track.. so when you want to "test" the seeking of heads and track-steps, then you'll need a formated disk to check whether the sector-ids match the addressed track or not. of course, if the drive is misaligned, then this write would also be misaligned... so the format procedure should happen to a "known" good drive.. then the disk will be swapped and the read-test can confirm your drive-under-test is working correctly. with this, you wont need to step out of ATK to format the disk.

its just the procedure everyone does, when testing disk-drives: you use a formated disk, read it back, format the disk again with the drive and read it back on the "known-good"... currently i'm using Xcopy for this...

fook42 commented 2 years ago

to support you, i can maybe enhance your write-test procedure on my own and commit a pull-request. ?

keirf commented 2 years ago

I don't know whether I care to support it. You just need any known good Amiga disk eg professionally mastered, and do read test on that? If you want to make your own from a known good drive you can do it in workbench. It's not a test.

fook42 commented 2 years ago

but how can you test a drive, without knowing that the data on the media is correctly written in the way the ATK read-test expects it? e.g. using a PC formated disk will lead to lots of errors even on a 100% perfectly working drive, because ATK expects a certain (=AmigaDOS) format.

sorry.. but this argument is a bit weak; for testing memory you also implemented "write" routines... not only read-tests... same situation; you can state that writing to a memory-block can be done with some non-ATK tool and inside ATK you would just read back whether the memory is containing the right data. but what if the outside-tool writes 1s instead of zeros, as you expect it?

okay.. lets put it that way; writing and reading sector-by-sector is actually "testing the media" inside a floppy drive.. so this would cover the "test"-requirement... and why not write a correctly sync'ed structure to the disk which would then be able to pass the head-alignment test as well? could you support this, maybe?

keirf commented 2 years ago

ATK test expects an AmigaDOS disk. If you run ATK from disk you already have a suitable disk (the ATK disk). If you run ATK via HDD and Workbench, you can format a disk in Workbench. Most users of ATK will in fact have a pile of AmigaDOS disks.