Page 1 of 3
Physically byte-swapped IDE [AKA twisted cable]
Posted: 21 Mar 2023 12:32
by Badwolf
Afternoon all,
I've been experimenting with physically byte swapping the IDE interface in my Falcon such that the I can access the partitions directly on other systems without slow-down on the Falcon from logical byteswapping.
All works brilliantly with EmuTOS -- as you'd expect, EmuTOS always works ;) -- but neither HDDriver or my PPutnik software can detect the drive properly. HDDriver goes so far as to stop the floppy working after boot!
I assume this is because not only is the data byte-swapped, but all the IDE control channels too.
Has anyone played with physical byte-swapping before and know of any tricks to logically swap the control information being fed into the drivers? Any option I'm not seeing?
I know HDDriver has a Suska variant, which I presume allows for fully swapped information, but I don't know how to trigger that.
Am I correct in my assumption it's the control data being swapped that's the issue?
Cheers,
BW
Re: Physically byte-swapped IDE
Posted: 21 Mar 2023 12:37
by Steve
This might be worth asking directly on the HD Driver forum, Uwe is usually very receptive to questions on his driver.
Re: Physically byte-swapped IDE
Posted: 21 Mar 2023 12:52
by exxos
@Badwolf
I was fighting with this a while back as well and gave up in the end
https://exxosforum.co.uk/forum/viewtopi ... 322#p94322
I was trying to make the CF card Falcon and PC compatible so I could transfer larger stuff over.
Re: Physically byte-swapped IDE
Posted: 21 Mar 2023 13:05
by Badwolf
Yeah, that was logical byte-swapping though, I think. That works, but you can't boot from it.
Here, the physical (ie. on the connector) high and low bytes are swapped.
HDDriver just detects gibberish. My guess is because everything (all the drive meta data included) is inverted to what HDDriver is expecting.
I'm trying to find a reference manual for the IDE specification circa 1992 such that I can verify that. Anyone know where to look?
BW
Re: Physically byte-swapped IDE
Posted: 21 Mar 2023 13:07
by Badwolf
Steve wrote: 21 Mar 2023 12:37
This might be worth asking directly on the HD Driver forum, Uwe is usually very receptive to questions on his driver.
One thing I've learned is to only go there when you already know the answer and can prove it. ;)
I'm trying to thoroughly research how the IDE protocol actually works at low level before I even consider that.
BW
Re: Physically byte-swapped IDE
Posted: 21 Mar 2023 13:07
by exxos
Badwolf wrote: 21 Mar 2023 13:05
HDDriver just detects gibberish. My guess is because everything (all the drive meta data included) is inverted to what HDDriver is expecting.
Yep had that happen when I developed Trudie. I really don't know how anyone ever got a physical cable swap to ever work.
Re: Physically byte-swapped IDE
Posted: 21 Mar 2023 13:48
by Badwolf
exxos wrote: 21 Mar 2023 13:07
Badwolf wrote: 21 Mar 2023 13:05
HDDriver just detects gibberish. My guess is because everything (all the drive meta data included) is inverted to what HDDriver is expecting.
Yep had that happen when I developed Trudie. I really don't know how anyone ever got a physical cable swap to ever work.
So I'm looking at
https://web.archive.org/web/20120321035 ... -ATA-1.pdf
And
http://cd.textfiles.com/ataricompendium ... PPENDB.PDF
And I'm seeing a lot of byte commands -- which will be on the wrong half of the bus. Those feel eminently patchable.
Reading more...
BW
Re: Physically byte-swapped IDE
Posted: 21 Mar 2023 13:50
by stephen_usher
Of course you also have the issues of whether the drive supports 8 bit transfers/ 16 bit transfers, UDMA or sync I/O etc. and which level of the ATA/IDE procotols. (ATA being the mark 2 protocol which is mostly backwards compatible with IDE.)
I have a CF card which just gives garbage when the TF536 talks to it, byte swapping the cable stops it working. It works on a PC with the same adapter, but it looks like it's 16 bit only.
Re: Physically byte-swapped IDE
Posted: 21 Mar 2023 15:50
by alexh
I've never tried on on the Atari Falcon 030 but I've done it on my STe with Mario Becroft IDE interface.
I used the "special" PPera HDD driver for "twisted" cables.
https://atari.8bitchip.info/idepc.htm
I believe the latest "Paid" driver has HW byte-swap support too.
Re: Physically byte-swapped IDE
Posted: 21 Mar 2023 17:02
by mfro
Badwolf wrote: 21 Mar 2023 12:32
I assume this is because not only is the data byte-swapped, but all the IDE control channels too.
Sure. IDE registers ($F00000-$F00039) aren't located somewhere on the Falcon PCB, but on the disk itself.
Consequently, if you twist the cables, you also swap hardware registers and software that isn't designed for that will not be able to do anything meaningful to them anymore.