Maker Pro
Maker Pro

Floppy Drive Interface Tinkering

J

joseph2k

Jan 1, 1970
0
FyberOptic said:
Looks like I ended up with more responses than I figured for such a
short time, so I'll condense my reply to one post before I get behind.

I went and found the service manual to the Commodore 1581 and skimmed
through it, which is starting to reinforce the idea that I'm probably
going to need a floppy controller IC. In the case of the 1581, which
runs off its own 6502 cpu, it uses the WD1770 controller. Since I own
an old dead Atari 810 floppy drive (whichs runs/ran from a 6507), I dug
up some schematics for it as well, and found it uses a WD1771
controller. Despite having not looked at the datasheets yet, I would
assume these are nearly identical.

In the case of the Apple II though, I had always heard how Woz
implemented such a simple controller based more around the main cpu,
which is what prompted me to think I could use something like the
parallel port in the first place, since it gave me the false impression
that it was easy to work with a floppy drive. So much does one learn
in a day's time which proves otherwise!

In things I've found since my initial post, and things written here, I
have a somewhat better understanding of how it's done, at least.
Though even if I did manage to put something together to read bits
accurately from the drive, I still come across the problem of reading
whole sectors. It'd be kind of pointless to have an interface which
was incapable of reading any floppies I wrote elsewhere, after all.
While from the programmer's standpoint we always see the sectors as 512
bytes (as far as PC floppy disks go), I'm sure there's probably some
extra bytes for each sector for error checking, and I have yet to find
any reference for what the structure actually is.

So again, it looks like doing all of this "manually" would require way
more support circuitry than I'd have room for on a breadboard. Even
using an IC might end up taking a bunch of space. But a quick glance
through the WD FD1771 datasheet says it can handle 512 byte sectors, so
I would assume this IC might be okay to read PC floppy disks, though
I'm unsure how compatible it is with whichever was actually used in
PCs.

The reason I mention using the 1771 is because I have that one
available in the 810 disk drive as mentioned above, and unless by some
small chance I got the drive itself going again, I'd be more likely to
just remove the chip (and possibly some other components) for my own
use, assuming it's not burnt out.

Having a chip write out the preamble, data block, crc and terminator as well
as time the inter record gaps and help with the interleave is a big
advantage.
 
J

jasen

Jan 1, 1970
0
Luhan wrote:

Floppy interface never did go IDE, not complicated enough.

unless you count oddball stuff like LS120

Bye.
Jasen
 
M

Michael Black

Jan 1, 1970
0
joseph2k said:
Actually when 320Kb and 360Kb were standard Apple has 400Kb. Of course by
then they were using FPGA tech in the FDD and FDC.
That's misleading, since you're comparing the non-Apple 5.25" disks with
the Apple 3.5" disks. We are talking about Apple's 5.25" disks, as seen
on the Apple II which came about years before the Macintosh arrived. Michael
is right, those Apple floppies had pretty lousy capacity.

But, your statement is also misleading, because that 400KB disk was
a 3.5" floppy, and when other computers made use of them, they fitted
720K on them. Same when the shift to double-sided 3.5" disks, Apple
had 800KB capacity, everyone else had 1.44MB capacity.

The only time Apple had comparable floppy disk capacity was when
they went for compatibility with the rest of the world, and and dropped
their out of the mainstream scheme.

I should reinforce the point that higher integration had nothing
to do with leaping forward to 400KB floppy capacity. It was the
same basic arrangement used on the original Apple II floppy system,
just integrated into a single package, and the introduction of 3.5"
floppy drives made that big leap forward.

Michael
 
M

Michael A. Terrell

Jan 1, 1970
0
joseph2k said:
Floppy interface never did go IDE, not complicated enough.


How about LS-120 type drives? They are IDE and read/write 1.44 Mb
floppies.


--
Service to my country? Been there, Done that, and I've got my DD214 to
prove it.
Member of DAV #85.

Michael A. Terrell
Central Florida
 
J

joseph2k

Jan 1, 1970
0
jasen said:
unless you count oddball stuff like LS120

Bye.
Jasen

Bernoulli type high density flexible media drives started out as expensive
SCSI equipment. The later items like LS120 also turned out to be niche
markets, as did the Sygate 1.5 GB cartridge drives.
 
J

joseph2k

Jan 1, 1970
0
Michael said:
How about LS-120 type drives? They are IDE and read/write 1.44 Mb
floppies.

They may read them, but i doubt it; physical media encapsulation issues. Do
you remember "stringy floppies"?
 
M

Michael Black

Jan 1, 1970
0
joseph2k said:
They may read them, but i doubt it; physical media encapsulation issues. Do
you remember "stringy floppies"?
What in the world does "stringy floppies" have to do with it? They were
tape drives, with the tapes about the level of a microcassette tape,
intended to be an improvement over using cassette recorders to save
programs, but not nearly as expensive as floppy drives.

The LS-120s were a hybrid between a floppy and an optical drive, which
is why they were commonly called floptical drives. They used a laser
to get more precise placement of the read/write head, so the density
could increase greatly, while leaving the disks the same size as 3.5"
floppies.

And yes, they could read and write 1.44meg floppies, which was the point.
You could replace an existing floppy drive with one, giving you far
greater storage capacity, but not lose the ability to deal with floppy
disks.

Michael
 
M

Michael A. Terrell

Jan 1, 1970
0
joseph2k said:
They may read them, but i doubt it; physical media encapsulation issues. Do
you remember "stringy floppies"?


AKA "Exatron"? I had a couple, and some of the micro tapes that they
used.


Do you remember the IOMEGA 20 MB "Floptical" drive? I have a new
one, still sealed in the original retail display box.

--
Service to my country? Been there, Done that, and I've got my DD214 to
prove it.
Member of DAV #85.

Michael A. Terrell
Central Florida
 
F

FyberOptic

Jan 1, 1970
0
Avoiding the entire building of a floppy controller aspect, I've
decided to just use an ISA multi I/O card in my project. Though I
figured I'd better learn how to operate it via its registers first in a
PC before I go and try to make one work standalone. Since I don't have
any systems with an ISA slot handy though, I'm testing code on my
laptop. And I've run into a problem.

I've opted to not use DMA if at all possible, since that's just more
components. So after much effort, I managed to get my laptop to
properly initialize its floppy controller and complete a read operation
of the first sector. The problem, however, is that even though I've
read an entire 512 bytes, it's still resulting in an error code from
status register 0, which translates to: "command execution started but
terminated abnormally". Status 1 has bit 7 set, which translates to
"end of cylinder; sector# greater than sectors/track".

Short of posting a mess of code here, I thought someone might know what
I'm missing from prior experience. For the record, my IRQ 6 handler
acknowledges the IRQ to the interrupt controller and increments an IRQ
count variable (which I use to track when an interrupt hits), though
once I go into the read loop, I pretty much ignore the interrupt and
poll via the status register bits (though my handler still takes care
of resetting the interrupt controller of course). I'm thinking I can
probably ignore the IRQ altogether whenever I use an ISA card
stand-alone by just polling for everything. I can't seem to ever get
reliable interrupts to happen anyway. One time I test my program I'll
get'em, the next time I won't in some places, yet the program generally
works either way (since my wait_for_irq routine is set to timeout after
so long if it detects none).

Anyhoo, the 512 bytes it reads are the actual intact data that they
ought to be, so there's no problems getting it from the disk. After
it's done reading, I'm reading out the seven result bytes like I
should. So I'm not understanding why I'm getting an error when I have
the data I requested. Is there something that needs to be done to
complete the read or something?

One thing that confuses me is when I'm sending the End of Track value
in the read command. The way I understood it is that this meant to put
the last sector on the track, which in my case would be 18, though I
noticed that when I put 18, it reads off all 18 sectors. So I ended up
using 1 for this, which I can only assume is correct.

Anyway if posting code is necessary I can, I just didn't want to
clutter up this post anymore than my ramblings already have. ;)
Thanks!
 
M

Michael A. Terrell

Jan 1, 1970
0
FyberOptic said:
Avoiding the entire building of a floppy controller aspect, I've
decided to just use an ISA multi I/O card in my project. Though I
figured I'd better learn how to operate it via its registers first in a
PC before I go and try to make one work standalone. Since I don't have
any systems with an ISA slot handy though, I'm testing code on my
laptop. And I've run into a problem.

I've opted to not use DMA if at all possible, since that's just more
components. So after much effort, I managed to get my laptop to
properly initialize its floppy controller and complete a read operation
of the first sector. The problem, however, is that even though I've
read an entire 512 bytes, it's still resulting in an error code from
status register 0, which translates to: "command execution started but
terminated abnormally". Status 1 has bit 7 set, which translates to
"end of cylinder; sector# greater than sectors/track".

Short of posting a mess of code here, I thought someone might know what
I'm missing from prior experience. For the record, my IRQ 6 handler
acknowledges the IRQ to the interrupt controller and increments an IRQ
count variable (which I use to track when an interrupt hits), though
once I go into the read loop, I pretty much ignore the interrupt and
poll via the status register bits (though my handler still takes care
of resetting the interrupt controller of course). I'm thinking I can
probably ignore the IRQ altogether whenever I use an ISA card
stand-alone by just polling for everything. I can't seem to ever get
reliable interrupts to happen anyway. One time I test my program I'll
get'em, the next time I won't in some places, yet the program generally
works either way (since my wait_for_irq routine is set to timeout after
so long if it detects none).

Anyhoo, the 512 bytes it reads are the actual intact data that they
ought to be, so there's no problems getting it from the disk. After
it's done reading, I'm reading out the seven result bytes like I
should. So I'm not understanding why I'm getting an error when I have
the data I requested. Is there something that needs to be done to
complete the read or something?

One thing that confuses me is when I'm sending the End of Track value
in the read command. The way I understood it is that this meant to put
the last sector on the track, which in my case would be 18, though I
noticed that when I put 18, it reads off all 18 sectors. So I ended up
using 1 for this, which I can only assume is correct.

Anyway if posting code is necessary I can, I just didn't want to
clutter up this post anymore than my ramblings already have. ;)
Thanks!


How about the laptops that let you use a special cable to plug a
floppy drive into the printer port?


--
Service to my country? Been there, Done that, and I've got my DD214 to
prove it.
Member of DAV #85.

Michael A. Terrell
Central Florida
 
F

FyberOptic

Jan 1, 1970
0
Michael said:
How about the laptops that let you use a special cable to plug a
floppy drive into the printer port?


I actually thought about finding a mostly external drive already, but
a.) it defeats part of the fun aspect of making something myself, and
b.) without the proper laptop to test it on, I might not know for
surely if it's working properly. My own laptop is a Thinkpad 600e,
which can use its floppy drive externally through the special port on
the side, but I generally just swap out the dvd-rom for the floppy when
doing my testing, so it's plugged in directly. I have no idea what the
signals/protocol for dealing with it in its external caddy would be,
though it might be interesting to find out, especially since I'm sure
it doesn't require 12v to run its motors like a normal one does.
 
J

Joel Kolstad

Jan 1, 1970
0
Michael,

Michael A. Terrell said:
How about the laptops that let you use a special cable to plug a
floppy drive into the printer port?

The one time I looked, those floppy drives are actually electrically identical
to a standard 26-pin "normal" floppy drive (they just omit a ground pin or
something -- I don't recall). ...and presumably one of the "parallel port
mode" pins is used to detect that it's a floppy rather than a print, and mux
all the signals over to the floppy drive controller rather than the printer
latch.

---Joel
 
P

Piotr Piatek

Jan 1, 1970
0
How about the laptops that let you use a special cable to plug a
floppy drive into the printer port?

In my old Toshiba T2100 laptop the LPT connector goes via a
multiplexer either to the printer interface or to the uPD765 floppy
controller. The function is selected by a toggle switch. I don't think
that any laptop uses an ordinary standard printer port for this
purpose.

Piotr
 
J

Joel Kolstad

Jan 1, 1970
0
Piotr Piatek said:
I don't think
that any laptop uses an ordinary standard printer port for this
purpose.

Same here, although I wouldn't be surprised if such a thing existed. I've
seen both parallel to SCSI converters and SCSI 3.5" floppy drives, so strictly
as an exercise in nerdiness it probably could be done.

And of course there used to be many parallel port to CD ROM drive adapters out
there...
 
M

Michael A. Terrell

Jan 1, 1970
0
Joel said:
Same here, although I wouldn't be surprised if such a thing existed. I've
seen both parallel to SCSI converters and SCSI 3.5" floppy drives, so strictly
as an exercise in nerdiness it probably could be done.

And of course there used to be many parallel port to CD ROM drive adapters out
there...


I've still got a couple that were donated, without the driver
software. Of course, they only worked with win 95, so they are just
collector's items these days. I also have a couple SCSI external CDR
drives, but I wasn't able to find the driver software for the oddball
SCSI interface cards that came with them. I just picked up a HP sheet
fed scanner with a SCSI interface that I'd like to get up and running to
scan old manuals with.


--
Service to my country? Been there, Done that, and I've got my DD214 to
prove it.
Member of DAV #85.

Michael A. Terrell
Central Florida
 
J

jasen

Jan 1, 1970
0
They may read them, but i doubt it; physical media encapsulation issues.

The LS120 media was the same shape as regular floppies and the drives would
read ordinary floppies at an accelerated rate. I never tried to write a
floppy in one.
Do you remember "stringy floppies"?

wafadrive, microdrive?

Bye.
Jasen
 
M

Michael A. Terrell

Jan 1, 1970
0
jasen said:
The LS120 media was the same shape as regular floppies and the drives would
read ordinary floppies at an accelerated rate. I never tried to write a
floppy in one.


wafadrive, microdrive?

Bye.
Jasen


Exatron "Stringy floppie drive"


--
Service to my country? Been there, Done that, and I've got my DD214 to
prove it.
Member of DAV #85.

Michael A. Terrell
Central Florida
 
R

Rich Grise

Jan 1, 1970
0
The LS120 media was the same shape as regular floppies and the drives
would read ordinary floppies at an accelerated rate. I never tried to
write a floppy in one.


wafadrive, microdrive?

Magnetic tape, a la cassettes.

Cheers!
Rich
 
S

Smaug Ichorfang

Jan 1, 1970
0
jasen said:
The LS120 media was the same shape as regular floppies and the drives
would read ordinary floppies at an accelerated rate. I never tried to
write a floppy in one.
The magnetic media is identical between the "standard" floppy and the
"super floppy" or LS-120. The difference is that the super floppies have
concentric rings of "pits" burned into them by a laser during the
manufacturing process. This allows for optical tracking and closer spacing
of tracks. It's an adaptation of CD technology. LS-120 IDE drives read
and write to "normal" floppies at a much higher rate because 1) the heads
are designed to be able to do this, and 2) the interface allows higher data
transfer rates.
 
Top