PDA

View Full Version : XT-IDE rev 4 Development



glitch
August 15th, 2017, 10:01 AM
I've been working on revision 4 of the Hargle/N8VEM open source XT-IDE design. It started off with the following changes, mostly suggested by users here and on IRC:


Better parts numbering (U1 is top left, U2 to its right, et c.)
Thicker/more consistent silkscreen (some board houses produced illegible/broken silkscreen on some labels and symbols)
Larger pads around some of the jumper headers
Better pin 1 indication for ICs
Rotate IC part number text (e.g. 74LS688) to match typical orientation on ICs
Change bypass cap values to match parts kit (changed to C instead of a uF value)


I also added better test points with labels on both the front and the back to make the Slot 8 Support mod board easier to install, and routed *CARDSEL through the last DIP position on the I/O address switches. The status LED got flipped so that I can use some right-angle LEDs I've got in stock on personal builds, too.

During the process, I ran into Alan Hightower (eeguru) at VCF East, who is working on the NetPi-IDE Raspberry Pi interface. He'd ran into a timing problem with how the high byte is latched on the XT-IDE and had to work around it with his FPGA design. He described the problem to me, which seemed to be a race condition on the read side of things: when *IOR de-asserted from the ISA bus, a sufficiently fast ATA device, like his NetPi-IDE board, would present invalid data to the high byte latch before it could de-assert and latch the data. This is due to the propagation delay in the logic on the original Hargle/N8VEM design, which I think is worth keeping as it preserves BIOS compatibility with the older BIOSes. The solution is to slow down the *IOR signal a little. I hooked up the HP 1650A logic analyzer to take a look:

http://i.imgur.com/nZ7tc4f.gif

IORISA is the *IOR strobe essentially directly off of the ISA bus. IORIDE is the same signal after passing through four sections of a 74LS04 inverter, this adds around 20 nS of gate delay. HI RD is the latch strobe to U1, the high byte read latch that stores the upper 8 bits of the ATA device's output data during a read, so we can grab it later. As seen in the timing diagram, where HI RD used to lag IORISA by 10 nS, it now leads by 10 nS due to the 20 nS delay chain. This means the latch stores its value 10 nS before the ATA device stops outputting valid data, which is well within the spec for even the 74LS573 latch (the kits typically come with 74F573 latches, because I have a supply of them).

I decided to go ahead and check out the write timing as well, though it hadn't been pointed out as a problem:

http://i.imgur.com/1QFmEME.gif

IOWIDE is the *IOW signal essentially directly off of the ISA bus. HI WR is the latch strobe for storing the upper byte before doing a 16-bit write to the ATA device. HI OUT is the delayed "2 signal" from the XT-IDE logic (I've since relabeled it *HI_BYTE_OUT on the schematic, which I think is clearer). It was delayed by running it through two sections of a 74LS04 inverter and one section of a 74LS32 OR gate, with one input of the OR gate tied to ground. As seen in the timing diagram, *HI_BYTE_OUT now de-asserts 10 nS after the *IOW line, ensuring that data is presented to the ATA device for 10 nS past the end of the ATA write operation. I'm not sure if many (or any) ATA devices are this picky about the timing, but correcting it at the same time as making other rev 4 changes didn't require any spare gates.

All of this was breadboarded on an old XT-IDE rev 3 prototype board from the initial rev 3 design, with a 74LS04 dead-bugged onto the circuit board and wired in. I made the read delay chain modifications and had some more prototypes run. Alan has one of them, which he used to confirm that the read timing was fixed. I modified a second with a socket for the 74LS04 so that I could test faster devices, as well as adding in the high byte output delay. I tested 74S04, 74LS04, 7404, and 74F04 devices, to make sure that whatever got stuck in there by someone assembling an XT-IDE would provide sufficient delay. All provided sufficient delay, the 7404 was the only measurable difference, providing around 25 nS instead of 20 nS, which is fine.

I've ordered production boards for the XT-IDE rev 4, since I'm almost out of XT-IDE rev 3 boards from the last run. They'll look approximately like this:

http://i.imgur.com/vQ81TIj.png

http://i.imgur.com/YSe1V0u.png

Those are from the earlier prototype order, since then I've switched the OSHW logo to a copper/solder mask relief, and moved the identification text back toward the OSHW logo. There have been some routing tweaks as well, but nothing major, other than adding in the hi byte output delay. Probably the biggest change people will notice is the extra 74LS04, and the switch to custom IC silkscreen legends from the stupid defaults included in newer KiCad releases. I'd stuck with the older KiCad 2.x style IC silkscreens on the rev 3 board because I thought the pin 1 designations were really, truly awful on KiCad 4.x default libraries.

eeguru
August 15th, 2017, 10:08 AM
James Pierce also noticed the same and added a similar fix to his boards. I noticed it when testing a memory mapped port of JR-IDE to ISA. I think it will make many more ATA devices work with the board.

Thanks for your hard work!

1ST1
August 15th, 2017, 10:20 AM
Two more wishes:
- A 16 BIT AT version also would be welcome.
- Enable/Disable Olivetti M24 / AT&T 6300 compatibiliy mode by jumper for the 8 bit version - or even better: special M24 16 bit version ...

lyonadmiral
August 15th, 2017, 11:13 AM
I second the notions of kudos for your engineering skill and hard work. I sure as hell couldn't do it. :)

lutiana
August 15th, 2017, 11:55 AM
Two more wishes:
- A 16 BIT AT version also would be welcome.

Just use a regular 16 bit IDE controller with the XT-IDE Universal BIOS housed in a free ROM socket (network card are great for this). Works perfectly.

pearce_jj
August 15th, 2017, 12:03 PM
Yes, the lo-tech 8-bit MUX honours the timing spec in both directions as well.

bobba84
August 15th, 2017, 02:45 PM
This is awesome! Great work man. My rev3 board is a wonder, I don't know what I did without it! Looking forward to the new rev.

Bobby.

glitch
August 15th, 2017, 03:47 PM
Thanks, everyone! Again, there's no reason to upgrade from an earlier board if your board is doing what you need -- these changes just increase ATA device compatibility, which seems to already be pretty good. If you were planning on doing a Slot 8 Support modification, the rev 4 makes that slightly easier.


Two more wishes:
- A 16 BIT AT version also would be welcome.
- Enable/Disable Olivetti M24 / AT&T 6300 compatibiliy mode by jumper for the 8 bit version - or even better: special M24 16 bit version ...

As mentioned, you can use a regular 16-bit ISA IDE card if your machine has a 16-bit ISA bus, with the XUB on a network card or something else with a ROM socket (you could even use an XT-IDE board with only the ROM parts populated).

I'm not sure what you mean by M24/6300 compatibility mode. Part of the reason that the Compatibility/Chuck Mod mode jumpers were retained (rather than doing a permanent Chuck Mod) was to keep the board compatible with M24/6300 systems. Is there something more required? I don't have one to test with.

1ST1
August 15th, 2017, 09:18 PM
Just use a regular 16 bit IDE controller with the XT-IDE Universal BIOS housed in a free ROM socket (network card are great for this). Works perfectly.

Yes, possible, but with disadvantages:
a) needs an regular 16 bit IDE controller. Hard to get...
b) needs a free ROM socket

glitch
August 16th, 2017, 05:23 AM
Yes, possible, but with disadvantages:
a) needs an regular 16 bit IDE controller. Hard to get...
b) needs a free ROM socket

You can also use a 16-bit IDE channel on a sound card, if you have one with real IDE on it (some cards have a manufacturer-specific header that only works with a handful of CD drives). I could certainly lay out a 16-bit IDE board, there's not much more than some buffers and decode logic to it, but the board would probably be $15-20 for the bare board due to the larger number of gold-plated edge contacts and size increase. At that point, you might as well buy a vintage 16-bit IDE board -- if people are having a hard time finding these, I have several to go through, test, and sell. Most are multi-IO, too, so you get floppy and often serial/parallel.

If there's enough interest in a 16-bit IDE card with ROM socket, I'll add it to the list of things to be laid out and run, but it just seems that they're way too common/cheap currently to really justify spending the time and money on running boards.

W.R.T. the ROM socket, a network card is, as mentioned, a popular option, since most people want Ethernet on their vintage PCs nowadays anyway. You can also use an XT-IDE board with only the ROM circuitry populated, which has the added benefit of being able to program its own EEPROM. If anyone is having a hard time finding a 16-bit controller/ROM board combination, PM me and I'd be happy to put something together from my surplus parts!

lutiana
August 16th, 2017, 08:07 AM
Yes, possible, but with disadvantages:
a) needs an regular 16 bit IDE controller. Hard to get...
b) needs a free ROM socket

A - Hard to get? Really? Searching for "ISA IDE Controller" results in at least 66 results, with prices varying from $5 up to $60, but most seem to be around $20. Not necessarily plentiful, but certainly not hard to get.

B - Just about any NIC card has a ROM slot that can be used, but any card that allows for a ROM chip to be used would work. This can vary from Sound Cards to networks cards to even a free ROM socket on the motherboard, but personally I'd just stick with the NIC, because the added ability to get a vintage machine on the web via DOS TCP/IP can come in very handy.

glitch
August 16th, 2017, 08:14 AM
A - Hard to get? Really? Searching for "ISA IDE Controller" results in at least 66 results, with prices varying from $5 up to $60, but most seem to be around $20. Not necessarily plentiful, but certainly not hard to get.

Do keep in mind that they're cheap/easy to get in the United States -- overseas shipping is an instant $15-25 penalty for something the size of an ISA card.

Malc
August 16th, 2017, 08:39 AM
-- overseas shipping is an instant $15-25 penalty for something the size of an ISA card.

That's the deal killer, Shipping + Import charges :-(

lutiana
August 16th, 2017, 08:51 AM
Do keep in mind that they're cheap/easy to get in the United States -- overseas shipping is an instant $15-25 penalty for something the size of an ISA card.

Fair point, but then that means the shipping on a community made 16bit ISA card would also be increased if it were coming from the USA. On top of that, of the 66 listings on ebay, there were about 15 or 20 that were european listings, Bulgaria and Ukraine for some reason has quite a few. My point was that they are not hard to get, even if the cost to get them maybe higher in other countries.

Xacalite
August 17th, 2017, 02:17 AM
Around here, you can have 16-bit IDE/FDC/LPT/COM/GAME cards for pennies.
3c509 NICs with ROM sockets are very cheap as well.

But I can see one reason to have a 16-bit counterpart to XT-IDE: most of those multi-I/O cards are hardwired for primary IDE address and IRQ 14, some allow for secondary IDE address but still IRQ 14.
Now, if you have a 286 box with an MFM HDD, and you want to leave the original HDD, adding an IDE HDD/DOM/CF as the second drive, you need a controller that can co-exist with the original one.

Such controllers do exist, and they aren't rare nor expensive - you can find them on many late-ISA sound cards.

So, no need for a 16-bit XT-IDE for me, but who knows, perhaps it would appeal to those who are too lazy to search and experiment with piles of various old sound cards?

hargle
August 17th, 2017, 05:57 AM
As one of the the great great gandfathers of this project, I am supremely happy that it lives on. I may have to pick one up myself!

glitch
August 17th, 2017, 07:02 AM
As one of the the great great gandfathers of this project, I am supremely happy that it lives on. I may have to pick one up myself!

I'll be happy to send you one for free :) We owe it to you, without your initial work on the first version, it likely would've taken much longer to have such a nice solution available to hobbyists at a fair price.

Rev 4 preserves the original register map, so your BIOS should still work with it in compatibility mode!

Valerio
August 20th, 2017, 02:21 AM
Great to hear about the rev 4 development! Pls retain compatibility with the Olivetti M24!

Thank you!

glitch
September 1st, 2017, 05:51 AM
Great to hear about the rev 4 development! Pls retain compatibility with the Olivetti M24!

Thank you!

My design will never break compatibility with the Olivetti M24/AT&T 6300, retaining compatibility with the original Hargle/N8VEM design is important, in my opinion.

Finally got an estimated delivery time from the shipper -- boards should be in next Tuesday, 2017-09-05!

1ST1
September 1st, 2017, 09:33 PM
I think M24 compatibility is only a software (IDE-BIOS) issue.

glitch
September 4th, 2017, 05:37 AM
I think M24 compatibility is only a software (IDE-BIOS) issue.

It's incompatible with "Chuck Mod" mode, from what I understand. I don't know if there's any XUB build that doesn't do the double read for anything other than a board in XT-IDE rev 1 compatibility mode.

Valerio
September 4th, 2017, 04:45 PM
Finally got an estimated delivery time from the shipper -- boards should be in next Tuesday, 2017-09-05!

Count me in for an order as soon as they are ready!

glitch
November 23rd, 2017, 12:26 PM
Finally had time to do a writeup on the board:

http://www.glitchwrks.com/2017/11/23/xt-ide-rev4

Still working on the manual, I was hoping to have time to wrap it up over Thanksgiving, but I'm currently chasing a coolant leak in our car!

lutiana
November 23rd, 2017, 12:42 PM
Count me in for an order as soon as they are ready!

Yep, me too!

glitch
November 23rd, 2017, 01:38 PM
They've been ready for a while, you can PM me to buy whatever, or use the Tindie store link in my signature or on the writeup page.

8008guy
November 23rd, 2017, 08:13 PM
Just a note to say that I got my rev 4 board going today in my 515O. I went through every cf card I had, but the last one I tried booted. Really nice job!

Thanks.

Len

8008guy
November 24th, 2017, 06:41 PM
I saw references, but no difinative answer. Does a list of compatable cf cards exist?

Out of a half dozen I only found one of my cf cards that would boot.

ibmapc
November 24th, 2017, 07:42 PM
I saw references, but no difinative answer. Does a list of compatable cf cards exist?

Out of a half dozen I only found one of my cf cards that would boot.

On the ones that didn't boot, you may have some issues with partition data i.e. you need to zero out the partition data before trying to re-partition. Also, did you make the primary dos partition "active"? Or, maybe after "Format c:/s", you may need to execute "fdisk/mbr" to re-write the master boot record.

8008guy
November 25th, 2017, 08:14 AM
On the ones that didn't boot, you may have some issues with partition data i.e. you need to zero out the partition data before trying to re-partition. Also, did you make the primary dos partition "active"? Or, maybe after "Format c:/s", you may need to execute "fdisk/mbr" to re-write the master boot record.

I started by deleting the existing partitions, rebooted, fdisk to create the partition, fidisk /mbr, and format c: /s

Is there an order to the format and fdisk /mbr? How ever I did it on my last card it worked, I thought I was consistent.

How do I zero out the partition data?

Cheers,

len

ibmapc
November 25th, 2017, 10:01 AM
I started by deleting the existing partitions, rebooted, fdisk to create the partition, fidisk /mbr, and format c: /s

Is there an order to the format and fdisk /mbr? How ever I did it on my last card it worked, I thought I was consistent.

I usually run Fdisk(delete then create partition and make it active), Format c:/s, Fdisk/mbr (Only if it won't boot)


How do I zero out the partition data?

Try This (https://www.lo-tech.co.uk/wiki/WipeDisk)

8008guy
November 26th, 2017, 01:58 PM
I usually run Fdisk(delete then create partition and make it active), Format c:/s, Fdisk/mbr (Only if it won't boot)



Try This (https://www.lo-tech.co.uk/wiki/WipeDisk)


I got some time to play with this today. So far no luck with the 1G Trancend.

I zero'd the card, fdisk, formated, it hung at "Boot sector found". It does format showing badblocks. I ran the card through a linux badblock check and it passed all four patterns. Under dos I redid everything but only used 90% of the disk. THis time I got: Boot menu callback via INT 18h

I will try using a smaller portion of the CF card, but it's curious that linux says it is fine.

The CF card that works for me is a 4GB Sandisk Ultra.

I'll check another card next to see if it works after being zerod.

len

8008guy
November 26th, 2017, 02:29 PM
Well, tested all the cards again.

Only the SanDisks worked. Non of the Trancend's booted DOS. All card tested using linux badblocks as having no errors.

Malc
November 26th, 2017, 09:26 PM
I've never used linux but they may well have no errors, It might be that there is some corrupt data or other still written to the card and DOS thinks it's bad, You may find if you zero out the whole card may fix the problem. I've had it before.

glitch
November 27th, 2017, 07:03 AM
Interesting results. Transcend cards usually work pretty well in IDE applications. Wonder what the hangup is on them?

Trixter
November 27th, 2017, 08:30 AM
I zero'd the card, fdisk, formated, it hung at "Boot sector found". It does format showing badblocks. I ran the card through a linux badblock check and it passed all four patterns. Under dos I redid everything but only used 90% of the disk. THis time I got: Boot menu callback via INT 18h

The correct sequence for this sort of thing is:

zero the card (optional)
fdisk /mbr
fdisk (erase all partitions, create a primary partition, answer "yes" to "create a single partition and make it active")
format c: /s

If you're not doing it in that order, you are likely not creating bootable media.

I've used Transcend and Sandisk Ultra cards without trouble on all of my XTIDE variants. I've also used some microdrives (IBM, Seagate) on 16-bit IDE cards with adapters without issues.

Malc
November 27th, 2017, 09:53 AM
You shouldn't need to use "fdisk /mbr" on a new install, Format c: /s or sys c: should suffice, Sometimes fdisk /mbr can cause more problems if used unnecessarily.

8008guy
November 27th, 2017, 02:52 PM
You shouldn't need to use "fdisk /mbr" on a new install, Format c: /s or sys c: should suffice, Sometimes fdisk /mbr can cause more problems if used unnecessarily.

I tried both ways. Using exactly the same process I can get the Snadisk CF cards to work, none of the trancends do... I've orders a few more sandisk cards.

Krille
November 28th, 2017, 08:20 AM
You know, a newer version of the XTIDE Universal BIOS (http://www.xtideuniversalbios.org/binaries) just might improve things. Maybe.

glitch
November 28th, 2017, 08:28 AM
You know, a newer version of the XTIDE Universal BIOS (http://www.xtideuniversalbios.org/binaries) just might improve things. Maybe.

Or might introduce random partition corruption now and then. Maybe :) Happy to start shipping these things with newer versions when existing complaints are addressed.

Shouldn't make a difference to the card how LBA translation is being done.

Are you using the ubiquitous black Chinese CF adapters? I've been through dozens of those, and it's been my experience that some work with some cards and others don't work with the same cards. I haven't looked into it too deeply since I mostly use industrial Flash modules nowadays, but I've had other folks report that some of the cheapie adapters use a few diodes in series to effect a 3.3Vish "universal" supply to allow both 3.3V and 5V cards to be used in the same socket with no jumpers.

Krille
November 28th, 2017, 09:21 AM
Or might introduce random partition corruption now and then. Maybe :) Happy to start shipping these things with newer versions when existing complaints are addressed.
I am only aware of two issues regarding data corruption;

1. The incompatibility with the IBM PC/AT 5170 BIOSes which, AFAIK, affects all versions of XUB, including v1.1.5.

2. The problem ibmapc has with r589 or newer when using his AST HotShot 286 Accelerator.

Are you aware of other people with problems using newer versions?

FWIW, I've spent a considerable amount of time on these two problems.


Shouldn't make a difference to the card how LBA translation is being done.
There is absolutely zero support for LBA in v1.1.5. Could that be a factor? Maybe.

glitch
November 28th, 2017, 10:05 AM
I've had a number of people experience corruption issues and other weirdness with various 2.x releases of the XUB, on machines ranging from true blue IBM PCs and XTs to Soviet bloc clones. In 100% of these cases, switching back to v1.1.5 fixed their issues. I advise them to please report here or email the XUB folks directly, whether they do or not, I don't know. Right now, my current recommendation to everyone who buys a kit and asks is start with v1.1.5, and after proving the board out on their system, then consider switching to r591 IF they feel like they need a faster disk controller (Chuck Mod mode) or want serial boot or something.

Thanks for your work, I do appreciate it, and I hope the rest of the community does as well, but I'm not the only one who feels like reported issues are sometimes blown off.

8008guy
November 29th, 2017, 07:18 PM
Or might introduce random partition corruption now and then. Maybe :) Happy to start shipping these things with newer versions when existing complaints are addressed.

Shouldn't make a difference to the card how LBA translation is being done.

Are you using the ubiquitous black Chinese CF adapters? I've been through dozens of those, and it's been my experience that some work with some cards and others don't work with the same cards. I haven't looked into it too deeply since I mostly use industrial Flash modules nowadays, but I've had other folks report that some of the cheapie adapters use a few diodes in series to effect a 3.3Vish "universal" supply to allow both 3.3V and 5V cards to be used in the same socket with no jumpers.

Not sure if they are the ubiquitious ones or not. Tomorrow I can pull it and let you know what type it is. It seemed to work ok with my pdp8 sbc. I have several more of the same kind on order as well as two more sandisk cf cards, like the one taht works. i plan to order another XtIde card for my 5155 from you soon.

I do know the cf cards are getting zero'd under linux. Dd if=/dev/zero .... After which I dd the imade back off and see a wiped card. I will change the order of the fdisk /mbr upfront and see if that changes things.

I bought the card from you off ebay a few weeks ago, not sure of the fw version without looking. Do you suggest I flash something newer on it? Or wait for the fix you refered to above?

Len

Malc
November 29th, 2017, 11:27 PM
.....Are you using the ubiquitous black Chinese CF adapters?.....
I've had a couple of the black cheapo crappy Chinese CF adapters fail, On both occasions it resulted in file corruption, I don't buy the cheap Chinese adapters any more.

Also when setting up a CF card or Flash drive from scratch, I don't use DOS to partition and format as i have found it can often get it wrong and can cause error's like " Non system disk or disk error ", " Unable to load operating system " etc or it gets to " Starting MS-DOS... " and hangs for ever. Once the CF card or Flash drive is setup properly and working DOS will happily format the partition and install system files if needed and get it right.

Krille
November 30th, 2017, 03:07 AM
I've had a number of people experience corruption issues and other weirdness with various 2.x releases of the XUB, on machines ranging from true blue IBM PCs and XTs to Soviet bloc clones. In 100% of these cases, switching back to v1.1.5 fixed their issues.
Can you please forward these messages to me (by PM or e-mail)? I would very much like to know every detail regarding any data corruption issues, especially if it involves any of the newer revisions (like r588 and newer). As for "other weirdness", I have a feeling a lot of that comes from people using the beta 3 version from Google Code which really was a dud. Or from using other very old v2 revisions.


I advise them to please report here or email the XUB folks directly, whether they do or not, I don't know. Right now, my current recommendation to everyone who buys a kit and asks is start with v1.1.5, and after proving the board out on their system, then consider switching to r591 IF they feel like they need a faster disk controller (Chuck Mod mode) or want serial boot or something.
Which means that every second I spend on improving the BIOS is just wasted effort. You could just as well recommend trying the latest version first and IF a problem is found then try using the older v1.1.5 version to rule out hardware problems. That way people won't have to repartition, reformat and reinstall their OS and other software when they decide they want to use their new hardware to its fullest potential.


Thanks for your work, I do appreciate it, and I hope the rest of the community does as well, but I'm not the only one who feels like reported issues are sometimes blown off.
I have never blown anyone off (LOL) but this is just a hobby so I'm not getting paid to do it and I do have a job which means my free time is limited. With that said, I will ignore people who obviously haven't put even the slightest effort into reading up on the subject. Also, last but not least, sometimes I don't have a clue as to what the problem is and I realize that that might cause some people to think their problem is being ignored.

MrArgent
December 21st, 2017, 03:25 PM
So, I recently snagged a new XT-IDE card for my PC-XT and it's having trouble booting - producing garbage most of the time (but not always) on multiple (https://photos.app.goo.gl/n35gSvuUAwqKVCD02) systems (https://photos.app.goo.gl/yB43qrD3OrgO5r5A2) (5160 and 5170 respectively) when trying to boot off media my PC-AT's XT-IDE ROMs handle with gusto. Any troubleshooting pointers? It doesn't seem to be an address conflict and since the card was bought assembled I can likely assume it's configured properly.

Trixter
December 21st, 2017, 07:50 PM
Based on your screenshot, I'm guessing you have an older XUB flashed on your card, which supported the media differently than the newer XUB. If your media was formatted with the newer one, it won't read in the older one. Have you tried setting up your media from scratch? (boot from a boot disk, fdisk /mbr, fdisk, format c: /s)

MrArgent
December 21st, 2017, 08:37 PM
Yup... Sadly it won't boot most of the time even when set up natively. Media's known to boot fine on my previous foray with XT-IDE ROMs, my PC-AT. Conflicts have all been ruled out. Glitch is sending me a known good minimal boot card for testing purposes.

Trixter
December 21st, 2017, 08:47 PM
Assuming you have an AMI BIOS in your PC-AT, instead of the stock BIOS.

MrArgent
December 21st, 2017, 09:24 PM
Yup! Swapped 'em out while trying to see if i could get it to play ball with a Boca IDE Plus alone. That alone didn't do it, sadly, but XT-IDE ROMs as a supplement worked excellently!

Malc
December 21st, 2017, 11:44 PM
Yup... Sadly it won't boot most of the time even when set up natively. Media's known to boot fine on my previous foray with XT-IDE ROMs, my PC-AT. Conflicts have all been ruled out. Glitch is sending me a known good minimal boot card for testing purposes.

I've had similar problems in the past with my 5160 using CF, Sometimes it would boot fine and others it wouldn't and garbage was displayed on the screen, It turned out to be the cheap chinese CF adapter i was using, A new cf adapter solved the problem.

glitch
December 22nd, 2017, 06:56 AM
I've had similar problems in the past with my 5160 using CF, Sometimes it would boot fine and others it wouldn't and garbage was displayed on the screen, It turned out to be the cheap chinese CF adapter i was using, A new cf adapter solved the problem.

Yeah, we'd been discussing this on IRC and that seems to be the common link between them, since they're good quality CF cards. I've sent him a 64 MB DOM to test with.

MrArgent
December 22nd, 2017, 07:34 AM
There a more reliable brand out there I can work with? I like the convenience of being able to just sneakernet the card over to my desktop to drop files in it when i need to, which is why i haven't looked too closely into DOMs or traditional IDE disks yet.

Malc
December 22nd, 2017, 08:47 AM
I've had good luck with [ these (https://pcengines.ch/cf1eh.htm) ], I've got several which i've had for a few years now and not had any problems, And more recently about 6 months or so i got a couple of [ these (https://www.ebay.co.uk/sch/obiwookie/m.html?_nkw=&_armrs=1&_ipg=&_from=) ], I also like these
42606
Opinions vary greatly though.

glitch
December 22nd, 2017, 10:08 AM
I'm working on a converter that'll replace the metal bracket on the XT-IDE and add an externally accessible CF slot. It should work on any of the XT-IDE revisions that use the Keystone metal bracket (including the Lo-Tech boards that use it). Partly because I think it'll be fun to design/build, partly because I'm tired of having to order 5 or so CF adapters to ensure I get one definitely working one for day-job projects!

I've had good luck with the StarTech 3.5" bay converters, but that probably won't work for your needs.

Malc
December 22nd, 2017, 10:32 AM
That'll be handy, Will it be possible to still have 2 drives, 1 internal and 1 external

glitch
December 22nd, 2017, 10:50 AM
That'll be handy, Will it be possible to still have 2 drives, 1 internal and 1 external

With the right cabling, yes -- the converter will just plug onto an IDE ribbon.

Malc
December 22nd, 2017, 11:14 AM
Excellent, I look forward to seeing it, I assume the R4 XT-IDE and new CF adapter can occupy the same slot space, ie: slot 8 in an XT

glitch
December 22nd, 2017, 11:52 AM
Excellent, I look forward to seeing it, I assume the R4 XT-IDE and new CF adapter can occupy the same slot space, ie: slot 8 in an XT

That's precisely the idea :)

DDS
December 22nd, 2017, 12:06 PM
I'm in the process of equipping my 5160 with two CF card holders mounted in the right hand drive bay. The final setup will have two IDE-CF adapters mounted in 3.5 inch holders which are in turn mounted in 3.5 inch to 5.25 inch drive bay adapters. In the process I've had one heck of a time finding IDE-CF adapters that will function as the slave drive in a standard IDE master/slave setup. Neither of my IDE-CF cards, one from Lo-Tech and one from Glitch Works, recognized any CF card I put in an Addonics IDE-CF adapter. Syba IDE-CF adapters worked fine as a master but identified any CF card as master regardless of whether the adapter's option jumper was set to master, slave, or removed entirely. I was able to verify that the IDE-CF adapters marked HXP-2108P worked as either master or slave with two adapters on the cable provided that I used quality CF cards that were formatted properly.

https://www.adverts.ie/other-cables/new-compact-flash-cf-to-3-5-ide-ata-39-pin-adapter-converter-40-pin/1469803

Then my 5160 let out the magic smoke and I've had to put that particular project to the side.

I hope this will help anyone going down the path I'm on.

MrArgent
December 26th, 2017, 12:58 PM
Got myself a 60gb Maxtor drive of (Relatively) recent manufacture as a known quantity for diagnostic purposes; unfortunately it seems to be having the same issues my 64mb cF card does in spite of my usual WIPEDISK, FDISK and FORMAT /s process passing muster. Dang.

pearce_jj
December 29th, 2017, 07:39 AM
Master slave config is as simple as a single line pulled down or not. However, many CF Cards do not implement this functionality correctly, I can’t really see how the adapters could get it wrong TBH.

MrArgent
January 2nd, 2018, 02:08 PM
Diagnostic DOM (I mixed up when i said it was a cF card earlier) made it in; Strangely FDISK doesn't want to create partitions on it at all. It acts like it succeeded, but when i reboot the system there's just nothing there. As an update, in my 486 it partitions, formats and boots off the mechanical HDD just fine...and cF casrds, even in cheapo adapters. Doesn't want to format /s the 64mb IDE DOM, though, citing issues writing BOOT.

The card behaves reliably in my 486, essentially, but reflashing with the XT BIOS didn't fix the issues i was having.

aesis
January 11th, 2018, 12:26 PM
Hi guys, for a few days I received the XT-IDE Rev4 card
I installed it in my IBM XT 8088 clone but I can not get my hard drive working!
I'm using a Maxtor 13.5GB as a Master, when I start the PC is recognized and once loaded the operating system Ms-Dos 3.30 I go to Debug G = C800: 5 the system crashes!
I tried several times changing all the jumpers that are on the board and also all the combination switching but I could not get anything.
I tried to do also Fdisk but after sending the command here also the system crashes, even if with Fdisk I did not test the jumper and switching.
What's the problem with you?

3pcedev
January 11th, 2018, 12:36 PM
Running the DEBUG code is to initiate a low level format on an MFM drive. This definitely wont work and will crash the machine.

Since your using an IDE drive just use FDISK to partition the drive and then format as usual.

DOS 3.3 FDISK will take forever, and I mean forever, to calculate the free space on a 13GB drive if you used the 'maximum size available' for the partition. Remember DOS 3.3 has a maximum partition size of around 40mb; it's not ideal to be running a 13GB HDD. I would either use a smaller drive or switch to DOS 5 which has larger maximum partitions.

aesis
January 11th, 2018, 12:46 PM
Thanks 8008 for the answer!

Ok I did not know..
In fact, he tells me that the disk is only 1024 cylinders but actually has 16383...
Could you partition with a modern PC and then reinsert it in XT?
I tried to start the pc with a MS-DOS 5 floppy but it tells me that the disk is not system-based, replace the disk!
I managed to run Fdisk but on all 3 operations that can be executed by error, 1 tells me that there is already a partition but if I delete it I can not delete the partition because it is not there, if I tell it to do a nova tells me that there is not enough disk space....,I'm going crazy!
Help! :sick:

Malc
January 11th, 2018, 01:47 PM
.....Could you partition with a modern PC and then reinsert it in XT?
No it won't work, I assume your R4 card has V 1.1.5 XUB, You are better off partitioning and formatting on the XT. Dos 3.3 only supports 32Mb partitions, I would use DOS 6.22 or if you prefer DOS 5 and you'll be able to have larger partitions upto 2GB, Or You could also get a small CF card and adapter as an alternative.

DDS
January 11th, 2018, 02:52 PM
Master slave config is as simple as a single line pulled down or not. However, many CF Cards do not implement this functionality correctly, I can’t really see how the adapters could get it wrong TBH.

I did a lot of reading trying to figure out what I was seeing. One site said that the CF standard was designed to be an IDE pass through. Master/Slave is supposed to be determined by cable leads 39 (DASP -- Drive Active / Slave Present) and 28 (CSEL -- Cable Select) and how the "drives" connected to the cable respond to what's on those leads. In a physical hard drive, that determination would be made by the control logic integrated in the drive itself, but since you may have two drives on the cable, it may well be complicated by how the firmware in the two drives respond to the option settings and the cable.

In the case where you're using a CF card to emulate a traditional hard drive, one would think that the card(s) would act like a hard drive would and handle which CF is Master and which is Slave. But some apparently don't. And then there's the question of why there are Master/Slave jumpers on IDE/CF adapters if the Master/Slave configuration is handled by the CF card(s) and the cable. Apparently the logic in the CF card has to read the option jumper on the IDE/CF adapter before it can configure itself as either Master or Slave.

Further, if the CF/IDE is configured as a pass through, why would you need any active logic on the IDE/CF adapter at all? The adapters I found to work in either the Master or Slave capacity, labeled as HXSP-2108P, have no identifiable logic on board while the Syba and Addonics adapters have pretty good sized SMT chips on them (about 1/2" square on the Syba and 3/4" square on the Addonics). What would those chips be doing on what is supposed to be a pass through setup?

To recap:

I was not able to get either of my lo-tech or my Glitchworks XT-IDE cards to recognize any CF card placed in an Addonics IDE/CF adapter regardless of how the options on the Addonics card were set.

Any CF card in the Syba IDE/CF adapter was recognized as Master regardless of the adapter's position on either a 40 lead CS cable, 80 lead CS cable, or on a straight through old style 40 lead cable. The position of the Master/Slave jumper on the adapter had no observable effect in either of the two positions or when it was removed entirely. As long as you're only interested in having one CF card on the cable, this will work. But I wanted two.

Most of the CF cards I have worked like a charm in the HXSP-2108P adapters in either a Master alone or Master/Slave configuration. I say "most" because I bought some CF cards that are apparently recycled over labeled (and miss labeled IMHO) cards from MemoryPartner.com. I bought five each of two sizes labeled as 1.0G and 2.0G cards. But in the system they show as various sizes and some are apparently set up as LBA and others as CHS. They're cheap but they're not worth your time IMHO. Save yourself some headaches and stay with a known brand. I'm perfectly happy with some cards from Samsung.

Essentially, through a lot of trial and error I came up with a configuration that "just worked" with MSDOS 6.22 on a CF card acting as the C: drive and another CF card acting as the D: drive. Both IDE/CF card holders were in cardboard half height drive bay mock-ups in the right hand drive bay of my 5160 and were swappable from the front with the system powered down. I was working on mounting the adapters in 3.5" drive bay adapters and took a break for the night. In the morning, I noticed the unmistakable smell of "magic smoke" and the system will no longer power up.

Things have been a little hectic around here but I hope to be able to get back to this project shortly.

Trixter
January 11th, 2018, 09:09 PM
I tried to start the pc with a MS-DOS 5 floppy but it tells me that the disk is not system-based, replace the disk!

Get a different/better disk. If you boot your system with DOS 4 or later, you'll be able to partition and use the entire drive just fine.

aesis
January 11th, 2018, 11:20 PM
Where can I find ms-dos 5 bootable on a working floppy 720?

HoJoPo
January 12th, 2018, 07:50 AM
Where can I find ms-dos 5 bootable on a working floppy 720?

There's this site called... Win World? You might check there... I'm sure they have MS-DOS 5.0 on a 720k disk.

aesis
January 12th, 2018, 02:18 PM
I managed to get the machine to run with Ms-Dos 5 but I have the same problem with Ms-Dos 3.3 ie if I try to make a primary or extended partition it tells me that it is not possible because a partition already exists, if I try to delete the partition tells me that there is no partition of the disk because ??
I'm in big trouble maybe there's a problem with the setting?
Please help me.

Trixter
January 13th, 2018, 07:23 PM
Try running "FDISK /MBR" and then run FDISK again. You must delete all partitions that already exist before you can create a new one.

glitch
January 13th, 2018, 07:31 PM
Try running "FDISK /MBR" and then run FDISK again. You must delete all partitions that already exist before you can create a new one.

And you may have a hard time if the partitions are non-DOS or created by a version of DOS newer than the one you're using. Might run WIPEDISK against the drive first.

aesis
January 14th, 2018, 06:44 AM
Perfect now everything works fine thank you !!

First I limited my hard drive to 4096 with a jumper, now 13GB became 2GB.

I was able to make the partition with FDISK and everything went ok, unfortunately I will not be able to install the original MS-DOS 3.30 floppies tell me if I'm not mistaken?

Now I installed Ms-Dos 4.01 and it's all ok !!!

I wanted to ask you one last thing ..., is it possible to disable the board menu with the choice of floppy or hard disk at startup?

I would like it to load C: directly.

glitch
January 14th, 2018, 07:49 AM
You can install MS-DOS 3.30 but you'll be limited to 32 MB partitions. Usually not a problem on the sort of machine you want to run DOS 3.30 on anyway :) You'll have to run WIPEDISK on it as MS-DOS 3.30 can't delete later DOS's partitions (it shows them as non-DOS and won't delete them).

Yes, you can disable the configuration menu and just boot C: or have it do the typical try A: then C: -- you'll need to run the XT-IDE Universal BIOS configuration program and reprogram the board's EEPROM (it of course can do this in-board, so you don't need an EPROM programmer).

aesis
January 14th, 2018, 08:17 AM
Yes, you can disable the configuration menu and just boot C: or have it do the typical try A: then C: -- you'll need to run the XT-IDE Universal BIOS configuration program and reprogram the board's EEPROM (it of course can do this in-board, so you don't need an EPROM programmer).[/QUOTE]

Thanks Glitch for the answer but I do not understand this passage ..., how do I get into the card's universal bios?

glitch
January 14th, 2018, 01:36 PM
Use the configuration tool that comes with whichever version of the BIOS you're using. It's something you have to run from DOS, the configuration part is not part of the XT-IDE Universal BIOS that you see when the machine boots.

aesis
January 15th, 2018, 01:35 PM
Excuse me, I did not understand, maybe because I use the google translator !!

Can the Glitch menu be removed from DOS?

aesis
January 21st, 2018, 12:41 AM
I'll ask you the last question and then I'll leave you alone! :mrgreen:

I inserted the HD LED cable from the XT-IDE card to the PC but I noticed that inserting it in one position the LED light stays on fixed, if you invert the poles the light as soon as you turn on the PC remains on weak and when it starts working the light works but in the opposite way, when the hard disk works, the light tends to go off while when the hard disk is no longer working, it remains lit but always weak.
Do I have to change any switches on the XT-IDE card?
Or does the PC LED work only if the LED on the XT-IDE card is not there?

Malc
January 21st, 2018, 01:55 AM
I'll ask you the last question and then I'll leave you alone! :mrgreen:
It's always best to ask if you're not sure, That's what these forums are for after all :-)


I inserted the HD LED cable from the XT-IDE card to the PC but I noticed that inserting it in one position the LED light stays on fixed, if you invert the poles the light as soon as you turn on the PC remains on weak and when it starts working the light works but in the opposite way, when the hard disk works, the light tends to go off while when the hard disk is no longer working, it remains lit but always weak.
Do I have to change any switches on the XT-IDE card?
Or does the PC LED work only if the LED on the XT-IDE card is not there?
No and No

Easiest thing to do is connect up another LED to the pins on the R4 card and see if it works as it should. I don't own any XT Clones but it might be the way the HD LED is wired on your machine, ie: On a circuit board ?. I've come across this issue before.

Chuckster_in_Jax
January 21st, 2018, 06:24 AM
You'll have to run WIPEDISK on it as MS-DOS 3.30 can't delete later DOS's partitions (it shows them as non-DOS and won't delete them).

Where did you get WIPEDISK. All I can find is Disk Wipe and it isn't a DOS utility.

Malc
January 21st, 2018, 06:41 AM
It's on the Lo-Tech site: WipeDisk (https://www.lo-tech.co.uk/wiki/WipeDisk)

Chuckster_in_Jax
January 21st, 2018, 06:49 AM
It's on the Lo-Tech site: WipeDisk (https://www.lo-tech.co.uk/wiki/WipeDisk)

Thanks!

aesis
January 22nd, 2018, 06:24 AM
It's always best to ask if you're not sure, That's what these forums are for after all :-)


No and No

Easiest thing to do is connect up another LED to the pins on the R4 card and see if it works as it should. I don't own any XT Clones but it might be the way the HD LED is wired on your machine, ie: On a circuit board ?. I've come across this issue before.

Ok Ok tried as I was told, I inserted an LED directly to the XT-IDE card is working perfectly !!
I have to understand why the led that I have in front of the pc has a resistance, probably it is the one that gives problems.

Piquito
March 12th, 2018, 07:19 AM
I got some time to play with this today. So far no luck with the 1G Trancend.

I zero'd the card, fdisk, formated, it hung at "Boot sector found". It does format showing badblocks. I ran the card through a linux badblock check and it passed all four patterns. Under dos I redid everything but only used 90% of the disk. THis time I got: Boot menu callback via INT 18h

I will try using a smaller portion of the CF card, but it's curious that linux says it is fine.

The CF card that works for me is a 4GB Sandisk Ultra.

I'll check another card next to see if it works after being zerod.

len

THE SOLUTION FOR -----> Boot menu callback via INT 18h -----> SET THE PARTITION ACTIVE (option 2 in FDISK menu)

and I have checked that is necessary the Hard Disk board to can boot from the CF card ( or any IDE)

lowlytech
July 9th, 2018, 06:33 PM
Diagnostic DOM (I mixed up when i said it was a cF card earlier) made it in; Strangely FDISK doesn't want to create partitions on it at all. It acts like it succeeded, but when i reboot the system there's just nothing there. As an update, in my 486 it partitions, formats and boots off the mechanical HDD just fine...and cF casrds, even in cheapo adapters. Doesn't want to format /s the 64mb IDE DOM, though, citing issues writing BOOT.

The card behaves reliably in my 486, essentially, but reflashing with the XT BIOS didn't fix the issues i was having.

I am having this exact same symptom with my partitions being created then after rebooting having no partitions. Tried with 540MB IDE drive and with several sandisk CF 1/2GB cards. Bought the glitchworks parts kit rev 4, with 1.1.5 UB included about 2 months ago. Using dos 3.31 in an IBM 5160. Curious if you got your issues figured out or not.

MrArgent
July 9th, 2018, 07:55 PM
I am having this exact same symptom with my partitions being created then after rebooting having no partitions. Tried with 540MB IDE drive and with several sandisk CF 1/2GB cards. Bought the glitchworks parts kit rev 4, with 1.1.5 UB included about 2 months ago. Using dos 3.31 in an IBM 5160. Curious if you got your issues figured out or not.

My issues were specifically tied to a bad run of components Glitchworks had gotten; check your 573 latch...If memory serves.

lowlytech
July 9th, 2018, 09:00 PM
My issues were specifically tied to a bad run of components Glitchworks had gotten; check your 573 latch...If memory serves.

Thanks for the suggestion MrArgent. I would have probably never suspected bad components since I bought it from glitchworks directly. When you say check your 573 latch I assume you just mean replace the two IC's in question @ U1 + U2? Here is a pic of my card..

46613

EDIT... I googled the 573 failure and came across a user that had a conflict with an AST VGA card. I am temporarily using this same card til I get my CGA monitor squared away. I swapped out video cards with a CL VGA ISA I have. The partition sticks, but when I try to format c: I get an "invalid drive specification". Seems like I would get inconsistent behavior prior to this, so I will go ahead and plan to swap out the 573 IC's.

Malc
July 9th, 2018, 10:07 PM
Yes it sounds like you have a bad 573 in U1 or U2 but just double check your solder joints are good first, Unfortunately it happens to the best of suppliers sometimes, I had the same problem with one of my R1 boards a long time ago. I'm sure glitch will be happy to help if you send him a PM.

glitch
July 10th, 2018, 05:13 AM
That's a very recent build from the looks (the orange Sprague capacitors are a recent part switch), you shouldn't have latch issues, that was a very limited issue. Is your board from a kit, or did I assemble it? If it was assembled here, it was tested in my IBM 5160 PC/XT, so the latch issue would've been caught anyway.

lowlytech
July 10th, 2018, 09:12 AM
That's a very recent build from the looks (the orange Sprague capacitors are a recent part switch), you shouldn't have latch issues, that was a very limited issue. Is your board from a kit, or did I assemble it? If it was assembled here, it was tested in my IBM 5160 PC/XT, so the latch issue would've been caught anyway.

It was a kit I assembled. I purchased it on your ebay store back in the middle of may. I double checked the solder joints and they looked really good. At this point I am not too worried about it. I have already ordered 2 TI 573 IC's from mouser that should be in probably tomorrow so I will report back once I get them installed.

lowlytech
July 14th, 2018, 06:24 AM
I got the 573 IC's installed yesterday. The partitions seem to stick now pretty consistently between reboots, but I am still getting the invalid drive specification when trying to format the drive even though FDISK shows the partition as D:. I am booting off a 42MB RLL drive as drive C if that makes a difference, but I have tried disconnecting it and booting from a 3.31 floppy. Maybe it is from using this 3.31 version of DOS. I may try DOS 4.01 just to see if it does the same thing, I would love to use 3.3 if I could get more than 32MB partitions.

glitch
July 14th, 2018, 06:33 AM
You should probably run WIPEDISK against your drive first, and then do another FDISK and FORMAT. Here's WipeDisk:

https://www.lo-tech.co.uk/wiki/WipeDisk

lowlytech
July 15th, 2018, 06:59 AM
I created a bootable floppy and ran WIPEDISK. Afterword it did the same thing with this Sandisk extreme iii 2GB flash, the partition will stick, but I get invalid drive specification everytime I try to format. I did all this with the RLL drive + controller removed from the system.

I managed to get a sandisk extreme ii 512MB CF card and this seems to work perfectly. One funny thing I noticed is both the 512MB and 2GB cards show 993 total cylinders in FDISK (v3.31).

So to sum up, I don't know if the XT-IDE ever had a hardware issue,but I do remember scratching my head a few times cause my partitions would disappear after rebooting, but maybe it was the CF cards as I have about 15 or so cards, but 2GB was my smallest one I had til I got this 512MB.

Trixter
July 15th, 2018, 09:11 PM
Maybe it is from using this 3.31 version of DOS. I may try DOS 4.01 just to see if it does the same thing, I would love to use 3.3 if I could get more than 32MB partitions.

What's wrong with using MS-DOS 6.22? You get the same FAT16 structure and less bugs. Is there a reason you're limiting yourself to Compaq DOS 3.31?

lowlytech
July 17th, 2018, 10:54 AM
Just wanted the authentic feel of an os from the late 80's, but still wanted large partition support. To me nothing beats 6.22, but for an 8088, i kinda like the feel of an older dos version.

Valerio
November 18th, 2018, 10:35 AM
I have a question on the XT-IDE rev4 schematics (http://minuszerodegrees.net/xtide/rev_4/XT-IDE%20Rev%204%20-%20schematic%20diagram%20-%20at%2015MAR2018.pdf): why is D7 (from the IDE connector) pulled down to ground through a 10k resistor?

49411

eeguru
November 18th, 2018, 01:04 PM
So when there are no drives / nothing driving the data bus during register reads, the IDE status register busy bit (bit 7) will be pulled to deterministic level.

Valerio
November 18th, 2018, 01:14 PM
So when there are no drives / nothing driving the data bus during register reads, the IDE status register busy bit (bit 7) will be pulled to deterministic level.

Thanks!

glitch
November 18th, 2018, 02:43 PM
I don't know if this is the case for your particular card, but sometime around 2007 I had to stop using SanDisk Extreme CF cards in embedded builds due to SanDisk intentionally crippling the native IDE mode on them. I forget which cards it specifically included, but apparently they didn't like that people were using their high-end consumer CF cards as SSDs, instead of buying their much more expensive IDE SSDs or "industrial" rated CF cards.

You can find a lot of reports from the embedded Linux/homebrew router community at the time.

Valerio
November 18th, 2018, 03:24 PM
I don't know if this is the case for your particular card, but sometime around 2007 I had to stop using SanDisk Extreme CF cards in embedded builds due to SanDisk intentionally crippling the native IDE mode on them. I forget which cards it specifically included, but apparently they didn't like that people were using their high-end consumer CF cards as SSDs, instead of buying their much more expensive IDE SSDs or "industrial" rated CF cards.

You can find a lot of reports from the embedded Linux/homebrew router community at the time.

I see. Is the D7 pull-down a way to circumvent this crippling?

glitch
November 18th, 2018, 05:21 PM
I see. Is the D7 pull-down a way to circumvent this crippling?

No, it's part of the ATA/IDE spec.

Krille
January 25th, 2019, 05:52 AM
I guess this thread is as good as any so here goes nothing;

With XT-IDE cards in High Speed mode, writes are done with two 8-bit OUTs and reads are done with a single 16-bit IN.

Question: can reads be done using two 8-bit INs? Something like this;


%ifdef USE_186 ; INS instruction available
insb ; Load low byte from port DX to [ES:DI]
inc dx ; IDE Data Reg to XTIDE Data High Reg
insb ; Load high byte from port DX to [ES:DI]
dec dx ; Restore to IDE Data Register
%else ; If 8088/8086
in al, dx ; Load low byte from port
inc dx ; IDE Data Reg to XTIDE Data High Reg
stosb ; Store byte to [ES:DI]
in al, dx ; Load high byte from port
dec dx ; Restore to IDE Data Register
stosb ; Store byte to [ES:DI]
%endif

If possible, then this would allow for slightly faster reads on Olivetti M24 and friends.

Trixter
January 25th, 2019, 08:57 AM
I'm lacking some context here -- isn't 2 8-bit reads and 2 8-bit writes how the bios normally works if not configured for anything faster? How would this make things faster?

M24 background: M24 and clones don't handle 16-bit operations on the bus properly without hardware modification to the M24; search this forum for research into the "bus conversion kit"). I remember (nearly a decade ago) when I tried, my KINGSTON CF card showed up as "IKGNTSNO" and of course nothing worked past that. Reconfiguring for plain XT got everything working on the M24.

pearce_jj
January 25th, 2019, 10:01 AM
The issue is to do with the byte ordering to trigger the command pass through to the media.

Iirc in the Olivetti, the bus ordering of the 16 bit commands when made to an 8 bit device is reversed. But I don’t really follow the question, about using two commands instead of one?

Krille
January 25th, 2019, 02:49 PM
I'm lacking some context here -- isn't 2 8-bit reads and 2 8-bit writes how the bios normally works if not configured for anything faster? How would this make things faster?


But I don’t really follow the question, about using two commands instead of one?

OK, I guess I'm being clear as mud. :)

Since it's not possible to reliably do 16-bit I/O on the M24, people with XT-IDE rev 2+ cards must use Compatibility mode and configure the XUB as if it was an XT-IDE rev 1.

This is what the code looks like when doing reads on this controller;


%ifdef USE_186 ; INS instruction available
insb ; Load low byte from port DX to [ES:DI]
xor dl, bl ; IDE Data Reg to XTIDE Data High Reg
insb ; Load high byte from port DX to [ES:DI]
xor dl, bl ; Restore to IDE Data Register
%else ; If 8088/8086
in al, dx ; Load low byte from port
xor dl, bl ; IDE Data Reg to XTIDE Data High Reg
stosb ; Store byte to [ES:DI]
in al, dx ; Load high byte from port
xor dl, bl ; Restore to IDE Data Register
stosb ; Store byte to [ES:DI]
%endif

Switching between the low and high data registers is done using XOR instructions because the registers are 8 bytes apart. When the controller is configured for High Speed mode the registers are next to each other and thus can be read with a single 16-bit input instruction (which is the whole point of the Chuck mod).

But we can't do that on the M24 so my idea is to use 8-bit input instructions but replace the 2-byte XOR instructions with 1-byte INC/DEC instructions. While this optimization won't be as fast as the real High Speed mode it will at least be faster than Compatibility mode. Think of it as XT-IDE 1.5 mode. :)

That is assuming it works of course. I have already done the necessary changes in code so it's ready for testing if anyone feel up to it. I just wanted to ask if this has any chance of working before possibly wasting someones time on doing tests.

pearce_jj
January 25th, 2019, 10:46 PM
Ah I see now! Yes that should work. Read the low byte first as this trigger the command to the media, then retrieve the cached (high) byte second. And of course the reverse for writes.

pearce_jj
January 25th, 2019, 10:58 PM
Incidentally it would be possible to modify the board for the machine to reverse the port mapping to alleviate this problem.

Krille
January 26th, 2019, 04:41 AM
Ah I see now! Yes that should work. Read the low byte first as this trigger the command to the media, then retrieve the cached (high) byte second. And of course the reverse for writes.
Don't you mean the opposite of what you wrote (reading the high byte makes the next word available on the bus)?


Incidentally it would be possible to modify the board for the machine to reverse the port mapping to alleviate this problem.

Not sure what you mean here? Reversing the port mapping would allow for 16-bit writes (on regular machines, not the M24 and friends) but would also prevent 16-bit reads - not very useful. Or am I missing something?

Krille
January 27th, 2019, 08:06 AM
If this new transfer mode works then future revisions of the XT-IDE card could simplify the design by dropping the Compatibilty/High Speed jumper altogether as it's only really needed on the M24. Though I realise that would prevent people from using older versions of the BIOS so might not be what everyone wants. Still, it would be an option.

glitch
January 27th, 2019, 12:04 PM
I'll at least be leaving the jumpers on to allow folks to use the older revisions of the XUB and Hargle's BIOS, though being able to use the newer BIOS in an 8-bit mode even in high speed/Chuck Mod mode will make configuration a lot simpler for newcomers!

I don't see why doing 8-bit I/O on a card in high speed mode wouldn't work. Happy to test, though I don't have any of the "we did it in the wrong byte order" machines on hand.

hwarin
March 27th, 2019, 02:54 AM
Hi Peace & Krille

I have a M24, just next to me, with a Rev2 XT-IDE board (currently running R566) and a 128Mb CF that would be happy to help in testings.

Regards - Hervé