jakethompson1 wrote on 2023-09-01, 21:25:
An "AT-IDE" would be for those situations where there is no built in BIOS support for IDE (more correctly WD1003-compatible) like the PS/2 30-286 and also no support for shadowing (or support for system/video BIOS shadowing but not arbitrary option ROMs). In those cases you would want the 16-bit wide option ROM.
OK, I understand that. There is another possibility with its own drawbacks: You could copy the Int 13 handler for the AT-IDE card to the top of the base memory and decrement 40:13 (number of KB of base memory). That's how the Tekram Caching IDE controllers implemented the BIOS choice "Tekram Int13 copied to RAM". This will drop the conventional memory available, but will allow execution at full speed.
jakethompson1 wrote on 2023-09-01, 21:25:
The description of the VGA BIOS degrading to 8-bit access if an 8-bit card is in the system makes sense, but I wonder why that didn't crop up enough to hit period FAQs and so forth as something to watch out for.
Looking at the EISA specification you already cited, I see that MEMCS16# (they call it M16#) is sampled twice. Once at a time where the SA lines are not yet guaranteed to be valid for a minimal amount of time "at the end of the address phase", and a second time half a clock (~60ns) later. As I read the specification, if you assert MEMCS16# at the later time, your forfeit getting the MEMR# and MEMW# signals (just getting SMEMR# and SMEMW# half a clock later), and you likely forfeit the opportunity of getting 0WS honored. But the cycle should still be performed as 16-bit 1WS cycle. While it is specified this way in the EISA specification book, I have no idea how this works on actual 286-class machines, so your AT-IDE shouldn't rely on this method.
You can try decoding MEMCS16# from LA and SA, gated with BALE (so you do not decode SA before it is ready), but you need to find a method to make sure to stop driving MEMCS16# before the next pipelined cycle starts (e.g. by using a flip-flop that ensures MEMCS16# is only driven for one bus clock). This method should be optional, though, for example by a jumper interrupting MEMCS16#. If this way of disabling data steering on the board doesn't work, you need to provide the high byte on D0-D7 yourself, so I can't estimate whether the idea is worth the trouble.
jakethompson1 wrote on 2023-09-01, 21:25:
The IDE side seems like it can be boiled down to: 74F521 comparators to derive CS1FX# and CS3FX#, a 74LS244 for the 3F7 case, two 74LS245s for all other cases, and one 74LS10 NAND and one 74LS32 OR to compute the output enables for the 244/245 chips.
Do you have any practical use for 3F7? As I understand it, that's a legacy status port that's supported by old IDE drives only for WD1003 compatiblility. If you provide your own IDE BIOS on the AT-IDE card, you can write it as everyone else does it today, and never access 3F7. Omitting this port might simplify your logic design. Furthermore, the split 3F7 only works if the floppy controller does not drive the low 7 bits of 3F7h. Are you sure this is the case on the PS/2 Model 30-286?
jakethompson1 wrote on 2023-09-01, 21:25:
Low244_1G# = Low244_2G# = CS3FX# OR IOR# OR (A0 NAND A1 NAND A2)
Low245_OE# = Low244_1G NAND (CS1FX# NAND CS3FX#) = (NOT Low244_1G#) OR (CS1FX# AND CS3FX#)
High245_OE# = IOCS16# OR CS1FX#
Looks good. The whole address decoding logic (both 521s, the NAND and the OR) could also be implemented in a single PAL/GAL. You would need 11 inputs (A0-A9, IOCS16#) and provide 3 outputs. This will fit even in the most basic PAL16L8. Using discrete logic on the other hand makes building that card as a hobby project easier, as not everyone owns a PAL/GAL programmer.