Jump to content
Sign in to follow this  
Larry

Fastest Way to Verify Writes?

Recommended Posts

What would be the fastest way to verify sector writes? I suspect there is a trade-off of speed versus the degree of verification -- such as a simple checksum versus a rotating checksum or such? Any thoughts?

Thanks,

Larry

Share this post


Link to post
Share on other sites

Just reading the sectors back.

 

Atari drives do a CRC anyway - not sure which algorithm, but the 1050 "source" that's floating around should have it.

 

Or compute your own CRC as each sector is written. Maybe read back and verify after each complete track - that would minimise head movement and mean less RAM needed to hold the CRCs.

In that case though, you then need to know which density you're on - SIO status command should provide that info.

 

 

As it is, Checksums are reasonably robust. You have the 1/256 or so chance of an error not being detected.

Pretty sure (I've checked) that if you try to write a sector but give the wrong checksum that the drive will reject it outright.

 

 

No chance of bytes being accidentally written in the wrong order unless you have some wild dodgy firmware.

Edited by Rybags

Share this post


Link to post
Share on other sites

do they?

what for?

according to sio specification device or host has to provide checksum, but algo of computing that is not crc, its just addition with carry over the same 8 bit data, so one my get valid checksum for pretty random data

this is not CRC

Share this post


Link to post
Share on other sites

Pretty sure you can issue Status command after a Read and it returns if it had a CRC error.

 

Field Service Manual for the 810 has the disk structure....

 

* Per track. ** Per sector

 

*

256 bytes 00

1 byte FC (index mark)

11 bytes 0 or FF

 

**

6 bytes 00

1 byte FE

1 byte Track Number (00-27)

1 byte 00

1 byte Sector Number (01-12)

1 byte 00

1 byte CRC byte 2

1 byte CRC byte 1

17 bytes 00 or 11 bytes FF + 6 bytes 00

1 byte FB (data address mark)

128 bytes Data (FF for blank fill)

1 byte CRC byte 2

1 byte CRC byte 1

11 bytes 00 or FF

Share this post


Link to post
Share on other sites
Just reading the sectors back.

 

Atari drives do a CRC anyway - not sure which algorithm, but the 1050 "source" that's floating around should have it.

 

Or compute your own CRC as each sector is written. Maybe read back and verify after each complete track - that would minimise head movement and mean less RAM needed to hold the CRCs.

In that case though, you then need to know which density you're on - SIO status command should provide that info.

 

 

As it is, Checksums are reasonably robust. You have the 1/256 or so chance of an error not being detected.

Pretty sure (I've checked) that if you try to write a sector but give the wrong checksum that the drive will reject it outright.

 

 

No chance of bytes being accidentally written in the wrong order unless you have some wild dodgy firmware.

 

Thanks, Rybags. I always value your counsel!

 

-Larry

Share this post


Link to post
Share on other sites
Pretty sure you can issue Status command after a Read and it returns if it had a CRC error.

You don't even need the Status command. If the FDC detects a (data) CRC error when reading a sector, the floppy returns a command error ("E") instead of a command complete ("C") and the SIOV return status is != 1.

 

But you should also compare the data you read back from the drive with your original data. The floppy might have written wrong data, but this wrong data still might have a correct CRC (the CRC is calculated by the FDC). This might happen if there are undetected SIO transmission errors (the SIO checksum is very simple and weak), defective RAM in the floppy drive or a bug in the floppy ROM - the Happy 1050 bug with highspeed and not enabling fast writes comes to my mind.

 

so long,

 

Hias

Share this post


Link to post
Share on other sites
Pretty sure you can issue Status command after a Read and it returns if it had a CRC error.

You don't even need the Status command. If the FDC detects a (data) CRC error when reading a sector, the floppy returns a command error ("E") instead of a command complete ("C") and the SIOV return status is != 1.

 

But you should also compare the data you read back from the drive with your original data. The floppy might have written wrong data, but this wrong data still might have a correct CRC (the CRC is calculated by the FDC). This might happen if there are undetected SIO transmission errors (the SIO checksum is very simple and weak), defective RAM in the floppy drive or a bug in the floppy ROM - the Happy 1050 bug with highspeed and not enabling fast writes comes to my mind.

 

so long,

 

Hias

 

Thanks, Hias!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...