Page 23 of 62
Re: XT-IDE on PCjr
Posted: Fri Jun 03, 2011 12:35 pm
by jmetal88
alanh wrote:The danger of programmable devices is you can easily get carried away. The 22V10s are ~$2.50 each so they are not cheap and adding the second just to reduce the chip count by 2 is probably not cost effective. But it helps layout and power, allows the I/O address selection to be non-linear, and half the traditional circuit can now be changed simply by popping in a new PLD with different fuses. Could even consolidate both 22V10s into a single CPLD in a PLCC-44 socket and save an additional $2. But I'm not sure how far this path should be taken. For example with the CPLD design, the XT-IDE mk.2 speed improvement could have been made with a text editor instead of a soldering iron. However it may still be worthwhile to roll things back to all 74xx so users are more self sufficient. It's a tough call.
The cost of batching PLDs to program is fairly negligible. It's not like PCBs where NRE significantly varies the cost per quantity ordered. If jmetal88 goes that route, I'll order enough for a dozen boards or so, batch program them and send them to you for kits. Whenever they sell out, just pay the original purchase cost back then and rinse/repeat. Even 10 boards with 2 PLDs is < $50.
I did a layout of the 2 PLD board to see how things stacked up and the routing turned out pretty simple. Only needed a half dozen vias. I even went to 24mil traces across half the board (rest 16 mil). While doing it, I looked at the first XT-IDE PCB it looked like someone ball-parked the placement of chips and let the auto-router fly. I really don't like doing that. My only problem is I only have the non-commercial standard version of Eagle which will not do a full sidecar PCB and I am unfamiliar with KiCad. I plan on upgrading Eagle at some point, but not sure when that will be. And I certainly don't want to step on anyone toes. So jmetal88 is going to be the man for final layout.
Schematic
Pre-lim layout
I ordered lots of stuff from Mouser this weekend including PLDs of different flavors, a mix of 74xx DIPs, sockets and perf board. I planned on wiring up the XT-IDE mk.2 decode circuit, the PLD equivalent circuit, and logic testing them both with a micro. Hopefully next weekend. I just want to make sure WinCUPL isn't lying to me.
So who's all in on orders? I'm down for one (only have 1 Jr).
And what's the outlook on side car connectors? Gut an existing side car?
Sorry I didn't respond to this one sooner. I'll start importing your schematic into KiCAD in a little bit. I actually have both versions saved to my hard drive, though - one discrete and one PLD. I figure I might as well do layouts for both of them before I decide which one works better.
Also, I'll go ahead and do your manual routing I guess.

It's time consuming, but I guess it does generally give better results.
Re: XT-IDE on PCjr
Posted: Fri Jun 03, 2011 1:43 pm
by jmetal88
Hey, I notice you removed some of the pull-up/pull-down resistors on the IDE socket. Can you tell me what your thoughts are there?
I mean, I can see immediately why you removed the resistor from D7 (I have no idea why you'd need one on that data line anyway, I just copied that from the original design), but I guess I don't know enough about the IDE interface to understand the rest.
Re: XT-IDE on PCjr
Posted: Fri Jun 03, 2011 2:48 pm
by alanh
First I'm not sure why the XT-IDE schematic had them the way they did. There must have been a reason and until I find out why, I'm uncomfortable with my choices. They were pulling up/down outputs from the drive that were not connected on the controller end like DMA request. I don't see how that does anything but waist power. I only pulled up/down pins that we're inputs to the drive like DMA ack; eg. things the drive will examine that you don't want floating. Actually that schematic is incorrect. DMA ack should just be grounded and so should A14 on the ROM. The pull-downs to ground on something that will never be driven high are not needed.
I thought I remembered something from the ATA spec at one point that mentioned the significance of D7 during drive selection/sequencing, but now I can't find it. Until those issues can be clarified, I'd stick with the proven circuit from XT-IDE. (still remove the pull-down on ROM-A14).
Re: XT-IDE on PCjr
Posted: Fri Jun 03, 2011 3:34 pm
by jmetal88
alanh wrote:First I'm not sure why the XT-IDE schematic had them the way they did. There must have been a reason and until I find out why, I'm uncomfortable with my choices. They were pulling up/down outputs from the drive that were not connected on the controller end like DMA request. I don't see how that does anything but waist power. I only pulled up/down pins that we're inputs to the drive like DMA ack; eg. things the drive will examine that you don't want floating. Actually that schematic is incorrect. DMA ack should just be grounded and so should A14 on the ROM. The pull-downs to ground on something that will never be driven high are not needed.
I thought I remembered something from the ATA spec at one point that mentioned the significance of D7 during drive selection/sequencing, but now I can't find it. Until those issues can be clarified, I'd stick with the proven circuit from XT-IDE. (still remove the pull-down on ROM-A14).
OK.
Do you mean DMARQ should be grounded? You've named pin 21 on your schematic DMACK, but it's actually DMARQ (according to the info I have). Or should they both be grounded? DMACK is pin 29.
EDIT: Well, since you said inputs to the drive, I assume you do mean DMACK, but the info I have does say that's on pin 29 rather than 21. Actually, other info I've found says both are not connected.
Re: XT-IDE on PCjr
Posted: Fri Jun 03, 2011 3:42 pm
by alanh
You are right, I had 29/21 flipped incorrectly. But yes DMACK should be grounded since it's an input to the drive.
Re: XT-IDE on PCjr
Posted: Fri Jun 03, 2011 8:58 pm
by jmetal88
Gotcha.
You know what? I'm looking at the data sheet and application manual for this Epson clock chip, and I think I'd much rather have it hooked directly to the data bus rather than via an 8255. It'll take up 16 bytes of space as opposed to the four it would take up on the 8255 (and I'd have to write a driver from scratch), but the circuit design would be much, much simpler.
Maybe I could do something like connect it across a '245 with half of its lines connected to ground to get the 4 bits across without interfering with anything else... Yeah, I think that would work.
Re: XT-IDE on PCjr
Posted: Fri Jun 03, 2011 10:57 pm
by jmetal88
Hey Mike - I'm thinking about adding this clock in ROM space, right on top of the XT-IDE BIOS. If I give you enough details on how I have it hooked up and how it's programmed, do you think you could add an extension to the XT-IDE BIOS so it could be accessed in the same way the clock on an AT is accessed? DOS would have built in support for the clock, that way (as long as it's a new enough version). I have the details on the BIOS calls to the AT clock here somewhere, too.
EDIT: Well, I don't think we could get DOS automatic support to work, since apparently we'd need the byte 0xFC stored at ROM address F000:FFFE while DOS is booting, but I think the file clock.sys which is included with DOS 5 will allow DOS to access an AT-style BIOS clock interface without having the 0xFC byte in place.
Re: XT-IDE on PCjr
Posted: Mon Jun 06, 2011 6:48 am
by Hargle
Code for a custom clock/calendar can be easily written and added into a .sys file for bootup.
I think the problem with lots of the old C/C drivers (and possibly clock.sys) is that they are not Y2k compliant, so writing something custom may be the best choice anyway.
If you add it, we'll write some software for it.
Re: XT-IDE on PCjr
Posted: Mon Jun 06, 2011 12:29 pm
by jmetal88
OK, well, BIOS support was just a thought. I know I'd be able to come up with a small .COM or .EXE which could handle a clock myself, but if one of you wants to come up with a .SYS file for me (I'm still not that great at coding anything), for more transparent operation, that would be great!
I need to finish designing the thing into the system first, though, of course.
Re: XT-IDE on PCjr
Posted: Mon Jun 06, 2011 4:22 pm
by Brutman
Hi guys ..
I'm not ignoring you.

Trying to get acquainted with the IDE spec from the ground up so that I can make an intelligent review of the current schematics ...
Mike