Re: Fast copy routine needed

From: Spiro Trikaliotis <ml-cbmhackers_at_trikaliotis.net>
Date: Sat, 22 Aug 2015 21:07:01 +0200
Message-ID: <20150822190701.GA31222@hermes.local.trikaliotis.net>
Hello,

adding to what Per said:

* On Sat, Aug 22, 2015 at 10:35:15AM +0200 Ruud@Baltissen.org wrote:
 
> Who has experience in reading (and writing) sectors as fast as 
> possible and is willing to share his knowledge, preferably his 
> source codes as well?

d64copy (from OpenCBM) in warp mode just reads the next sector that
happens to be under the R/W head, as long as that one has not been read
yet.

That is, the drive code handles a bitmap for every sector of the track.
On start, it reads everything as unread.

As soon as a sector header arrives under the R/W head, it is read and
decoded. If the sector is not yet read (bit in the bitmap = 0), the
block is read and send over to the PC.

If the sector was already read, the drive code just waits for the next
sector header and repeats the process, until all blocks are read.

Additionally, in warp mode, no GCR decoding is done in the floppy. The
rationale is that the PC is much faster then the 6502. Note that noone
ever did calculations if it would be better to do some calculations on
the 6502 side in order to reduce the amount of bytes to be transferred.

For writing in warp mode, I am currently not sure what is done. It has
been some years since I looked at the code.

This whole process of the warp mode was implemented by Michael before I
took over OpenCBM, and he took it from the Star Commander, which already
implemented it. As far as I know, the idea was from Wolfgang Moser.

Note that if your transfer is fast enough (for example with the 6526
shift register on the 1570/1571, or with a parallel connection), the
fastest way would be to just read a complete track on the floppy and to
transfer it "as is" to the PC - that is, like a nibble. Note that the PC
side must be fast enough and is not allowed to miss any single byte.
Also, beware of the SYNC marks, which must be transferred, too.

Regards,
Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/

       Message was sent through the cbm-hackers mailing list
Received on 2015-08-22 20:00:07

Archive generated by hypermail 2.2.0.