Floppy controller questions
dave04a at dunfield.com
Wed Aug 24 09:09:02 CDT 2005
>>I did polled drivers on the 09 and it worked well. One thing I did find was
>>that I had to connect a select to the TC pin so that I could pulse it to end
>>a transfer - I did not find a way to cleanly end a transfer in polled mode
>>without TC. I can give you the 6809 driver code as well if you want it.
>There is a way to stop the transfer with out TC. When programming the FDC
>command bytes for single sector transfer simply put that sector in as N and
>also as EOT. Since the FDC stops reading at EOT it will stop after one sector.
Now that I know the 765 better - makes perfect sense. This is a good example
of the problems I had with the NEC documention when I originally wrote the 6809
driver (mid 80's - my first experience with the 765). There are very few
references to polled transfers. Under "READ DATA", the datasheet says:
"After completion of the read operation from the current sector, the Sector Number
is incremented by one and the data from the next sector is read and output on the
data bus. This continued read function is called a Multi-Sector Read Operation. The
Read Data command may be terminated by the receipt of a Terminal Count signal. ..."
Write Data has a similar statement. There is no mention whatever of the EOT parameter.
The use of TC is the only means described under the READ DATA and WRITE DATA commands
to terminate the transfer.
There only mention of EOT is a definition in a different section, which reads:
"EOT stands for the final Sector number on a Cylinder. During Read or Write operation
FDC will stop data transfer after a sector is equal to EOT".
I interpreted this as "this should always have the highest sector number on the
cylinder" and was used only to guarantee that multi-sector reads stop at the end
of the track (which I thought would be an error condition). So I tried what the
docs indicated, hit TC and it worked.
When I did the 765 drivers in ImageDisk, they use DMA, and TC is generated automaticlly
by the DMA controller - I remember thinking "ah .. how nice - this is how they really
intended the system to work" - It always bothered me that I needed an extra select to
use it in polled mode. Thanks - this cleans up another little bit of the picture.
dave04a (at) Dave Dunfield
dunfield (dot) Firmware development services & tools: www.dunfield.com
com Collector of vintage computing equipment:
More information about the cctalk