I would like to replace the ST502 MFM disk controller in my Schneider Target PC 7640 (about which I asked earlier) with an ATA (IDE) controller as it gets harder and harder to find replacement MFM disks.

Fortunately, the MFM controller is on a daughterboard, the proprietary connector to which provides access to almost the entire AT (ISA) bus and certainly to enough signals to implement an ATA controller.

Can someone give me an example circuit for an ATA controller for the AT bus which I can adapt into a custom disk controller card for the computer?

To clarify: an ATA controller in the sense of this question is the circuitry that adapts the AT (ISA) bus into an ATA (IDE) port. A BIOS extension ROM circuit is not needed as the system's own BIOS has code to drive a standard WD-brand ST502 controller to which ATA disks are backwards compatible.

Note: I am aware of XT-IDE and related projects. These are not conventional IDE controllers and are irrelevant for this question.

  • 3
    An ATA controller on the PC side is just something that extends the ISA bus on to a 40-pin cable. All it needs is a couple of cheap 74 series chips, and maybe some DIP switches to select ports and interrupts. On the drive side it's an actual HD controller, but one that doesn't have to do much more than emulate an ST-502 controller. I'm not really sure what you're trying to accomplish though. Why not use a normal IDE controller with easier to find IDE drives? – Ross Ridge Jul 15 at 16:00
  • @RossRidge The controller card needs to be custom made because it has a special form factor (it's the big card in the middle with the two cables coming from it). More pictures. I am aware that the circuitry is quite simple, but I am not that good of an electrical engineer and it would be a lot easier for me to simply copy a known working circuit than to guess and make beginner mistakes. – fuz Jul 15 at 16:06
  • @RossRidge And I don't quite understand what you mean by “Why not use a normal IDE controller with easier to find IDE drives?” A home-built ATA controller should work with standard ATA (IDE) disks just fine. – fuz Jul 15 at 16:09
  • I was wondering why you weren't just using an easy to find ISA IDE controller, but I guess this is a laptop without ISA slots. IDE cards are simple enough that if you have one you should be able to workout the schematic just by following the traces. – Ross Ridge Jul 15 at 16:10
  • @RossRidge I do have a bunch, but they are all highly integrated giving me no way to reverse-engineer their function. – fuz Jul 15 at 16:12

A proper ISA IDE interface is quite simple, but not as easy as it might sound. There are some strange corner cases you should consider for full AT compatibility. You can find schematics for ISA IDE interface adapters in service manuals of computers slightly newer than you MFM portable computer. For example, check volume II of the Compaq Deskpro 386 technical reference manual, as found here. It has the schematics for the multi I/O-board on pages 98 to 103. I do not reproduce the schematics here as I am unsure about copyright issues. While this board does use a highly integrated custom chip, that chip is nearly unneeded for the IDE port, and more importantly, the single function it does for IDE is quite straightforward.

First, I am going to give an overview on the contents of the 6 pages:

  • Page 1: It has the ISA connector (and documentation and unused gates)
  • Page 2: It has the I/O address decode logic and ISA buffers needed to implement a proper IDE interface (the fine print of proper is layed out later)
  • Page 3 is irrelevant (it contains the FDD bit rate oscillator and the parallel port data output latch)
  • Page 4 is mostly irrelevant (it contains the custom logic chip, the floppy controller and parts of the parallel port)
  • Page 5 is irrelevant (it contains the serial port and the 24MHz reference oscillator for the FDD)
  • Page 6: It has the IDE connector and IDE LED connector (it also has the FDD connector and the parallel port).

So all the interesting stuff is on page 2, which I will describe in detail in the remaining part of the answer.

The two bidirectional 8-bit data buffers U31 and U27 make the 16-bit ISA/IDE data buffer. There is a special case, though, which is handled by U22, a separate 8 bit line driver that only drives seven lines on the ISA bus, D0-D6, but not D7. This is meant for port 0x3F7, which has 7 bits from the IDE cable on the low 7 bits, but the disk change line on the top bit. This top bit is driven from the floppy controller. In case of the Compaq Multi I/O board, the driver for bit 7 of port 0x3F7 is U7. They separated Bit 7 from the other bits, because there is a provision to disable the hard drive interface part, but the floppy interface (which you can't disable) still needs to drive bit 7. This special handling of port 3F7 is what seperates a proper IDE interface card from a cheap one. I have no idea whether port 3F7 is actually needed though, or you can get away with not responding to 3F7 at all (which the cheap IDE CD-ROM interfaces most likely do). This 3F7 thing is the most complicated thing on the board. The bidirectional buffer U34 is not used for the IDE interface, as well as U19 (pins 11/12/13) and U17 (pins 11/12/13). U18 (pin 4/5/6), U18 (11/12/13) and U35 (11/12/13) are only needed to suppress driver enable signals in case the IDE port is disabled (by opening SW1, so WINEN* gets high). They can be replaced by short between U18 (pin 4->6), U18 (pin 13->11) and U34 (pin 5->6).

U26 is used to decode the 3Fx (or 37x) area, whereas U21 is used the 1Fx (or 17x) area. Both are needed for IDE. U25 decodes the serial port address range and U33 decodes the parallel port address range - they are unrelated for the IDE function of this card. U20 is a line driver for IDE control signals.

U25/U33 are used to buffer the ISA address lines, because the discrete decoding logic puts a considerable load on them. U32 (as inverting buffer) is used to provide the inverted form of some address lines for decoding 0 bits inside address ranges while decoding them, with a AND/NAND gate. U8 (8/9) and U2 (3/4) are open-collector inverters with pull-ups. I don't see any reason for that construction (compared to just using a totem-pole inverter), and I guess they used this construction, because they still had some spare open-collector inverters in their hex inverter chips.

U35 (1/2/3) is simple - it enables the high-byte driver on 16-bit-accesses (IO16CS* is asserted) to the 1Fx/17x range (CS1Fx* is asserted, too). U18 (1/2/3), U18 (8/9/10) and U2 (3/4) are used to detect the pattern: CS3Fx* asserted AND A0 low AND A1 high. This is intended to catch accesses to 3F6, but as A2 is not decoded, also catches accesses to 3F2 (which seems to do no harm). The output of said gates is merged with CS1Fx* by U17(8/9/10) to provide the enable signal for the low ISA/IDE data buffer.

U19 (8/9/10) performs a very important function one might miss on ones own ISA/IDE interface design: It masks A4 (which is set in all valid IDE addresses) using the inverted AEN signal from the ISA bus, to make sure that valid IDE ports are only recognized when AEN is high. This is needed to avoid false decodes during ISA DMA cycles. Of course, it is not significant how false decodes while AEN low are avoided, munging A4 is just an implementation detail, but it is significant that AEN low causes the I/O address decoders to not respond, no matter what the address lines are.

This closes the discussion of page 2. The gates U19 (1/2/3) and U19 (4/5/6) as well as U9 (8/9) and U9 (5/6) are used for floppy controller DMA interfacing and of no concern for the IDE implementation.

The LSI chip is needed to provide the 3x7RD* signal (active low, asserted on I/O reads in the 37x/3Fx area when all of A0,A1 and A2 are high). This is actually nothing more than a 3-input OR function over CS3Fx*, BIOR* (buffered IOR* from the ISA bus) and the result of a 3-input NAND over A0, A1 and A2. It can be substituted as such in a custom design.

Hints for reading the schematic:

The schematic uses AND and OR gates with inversion circles at the inputs and output at some places. An AND gate with inversion at the input and ouptut just is an OR gate. The symbol is meant to indicate that the signals handled by the gate are acutally active low (both the input and the output), so OR gate actually generates an "active-low and" of the two active-low inputs. It gets a moment to get used to it, but for me it starts making sense.

Furthermore it is helpful to know that the quadruple 2-input 74xx logic chips all have their four gates arranged like input 1/2 -> output 3; input 4/5 -> output 6, input 9/10 -> output 8 and input 12/13 -> output 11. While not every pin number in small print is readable, limiting the possiblities to these 4 sets always gets a unique valid interpretation.

| improve this answer | |

How to build an ATA controller for the AT bus?

You can't, as there isn't any.

You want to connect IDE-Drives, right? IDE stands for Integrated Device Electronics. Which simply means that the full host controller is already part of the drive. It contains everything that is on your MFM controller, except for bus-buffering, address selection and extension ROM. as these parts are considered machine specific.

The connector can be seen as a simplified 16 bit ISA slot, reduced to what the bare drive controller needs. It's called an IDE port or ATA-connector, as in AT-Attachment, where AT stands for the 16 bit ISA bus. With the introduction of SATA (Serial ATA) the term PATA for Parallel ATA came into use.

If an IDE port is not part of the chipset or mainboard, a bus adaptor card was used. This card did three rather simple things:

  • Do address decoding (primary 01F0h, secondary 0170h) so the only access to the port(s) selected is forwarded to the IDE drive
  • Optional buffer all signals to reduce bus load and 'sharpen' signals.
  • Optional offer socket and decoding (C800h) for an extension ROM (*1)

Everything else is, as said, already on the drive.

All you need do do for your Schneider laptop is to decode the bus connector (*2) layout to make a little board doing address decoding and forwarding the needed lines to the IDE connector. There is no secret, just match the lines on either connector.

[Yes, it is that simple and I guess by now it's clear why Ross Ridge ad a hard time to write more than he did]

Chances are good that your BIOS will be already able to handle a basic IDE drive, as it's interface is exactly the one of an IBM MFM controller - assuming the controller used at the moment is a compatible design.

This straight relation is BTW the reason why Compact Flash is so common with old hardware, as it is as well a straight AT bus.

Note: I am aware of XT-IDE and related projects. These are not conventional IDE controllers and are irrelevant for this question.

Don't tell this to any company building and selling them back in the days. Unlike you may assume, 8 bit IDE isn't a new or retro thing, but was as well a product back then. After all, XT were sold until the 90s as low end machines and thus especially in need of cheap drives. There were 8 bit IDE controllers in form of dedicated or multi function cards.

*1 - Usually only 8 bit adaptor cards featured the socket, as AT class machines made the HD-ROM part of the standard BIOS.

*2 - That's the interesting connector on the lower right side. I pretty sure it's a standard AT bus. Have you checked that?

| improve this answer | |
  • I am aware of everything you wrote in this answer. I wrote the question because I am not sufficiently experienced in electrical engineering to cook up a circuit for that myself. I believe I would likely make some sort of trivial mistake that an experienced engineer would find easily. That's why I specifically asked for a sample circuit. – fuz Jul 15 at 21:43
  • @fuz You won't find any, as the job is simply too basic for anyone to care. Now, if you think you're not able to connect data line 1 on one connector to the same on the other side, the whole project might be above your league - if not hardware in general, don't you think so? Also, errors while trying is the very base of learning, isn't it? – Raffzahn Jul 15 at 21:54
  • I am able to do that. But I fear I'm going to make some mistakes with the parts that are not obvious, like what parts to choose to meet the timing constraints and so on. I could just experiment with this and spend hours working towards a solution that may or may not work reliably, or I can just ask someone who is experienced to help me. I am surprised you have such a reputation giving your downright condescending attitude. – fuz Jul 15 at 22:04
  • And yes: I acknowledge my lack of skill. I am by no means a hardware person. I am not experienced in designing extension cards for the AT bus and have absolutely no idea what to pay attention to. So even if this looks trivial to you, it is by no means trivial for me. If you don't want to write a useful answer, that's fine. Perhaps someone else will. – fuz Jul 15 at 22:10
  • 2
    @fuz please understand this is not meant in a negative way. But I see no way to answer in more detail short of doing the job for you. There is no hidden non-trivial issue to look for. It's a simple AT-BUS to reduced AT-BUS connection. You're profile implies you'e not new to basic research, so I assume you already have drawn them up, side by side, to compare. Right? Connecting all similar signals eliminated the easy ones, leaving you with whatever is 'special'. Most of them are self explanatory or easy to research. If not, they for sure make fine, detailed question, don't you think so? – Raffzahn Jul 15 at 22:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.