QubIDE media layer query
Re: QubIDE media layer query
Except getting incompatible to older versions of Amiga QDOS Classic, I wouldn't see a problem if Mark's driver would de-swap the data. QubIDE occupies a whole harddisk anyway, so that would not collide with other Amiga use. It would make an actual harddisk compatible to the QL and simplify data interchange with UAE images. SMSQ/E on Q68/Qzero/QIMSI Gold directly supports QubIDE images, so a UAE image on SD card should immediately work with those. At least if the UAE image depicts the IDE drive 1:1 - not sure about that.
Re: QubIDE media layer query
With Atari TOS (that stores IDE data "in wrong byte order" from a PC POV), there are drivers that byte-swap HD images for PC compatibility (The famous HDDRIVER is an example) on the fly. Those drivers are known to receive a significant performance penalty when operating in PC compatibility mode, i.e. do the byte swap.
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: QubIDE media layer query
I thought the same, and remember a discussion with Richard about it in the Q60 context, but he insisted it was neglegible. We tried, Richard was right. "Significant penalty" probably refers to a 68000 or so. Not sure how important that is as a QDOS Classic target, and what loss we are actually talking about.tofro wrote: Sat Aug 16, 2025 11:27 am Those drivers are known to receive a significant performance penalty when operating in PC compatibility mode, i.e. do the byte swap.
- Mark Swift
- Brittle Membrane
- Posts: 100
- Joined: Fri Jul 18, 2014 9:13 am
- Location: Blackpool, Lancs, UK
- Contact:
Re: QubIDE media layer query
So your test shows that drives present differently to dd depending on whether you are running a big-endian or little-endian version of linux. That would seem to imply that on a big-endian linux, a QL QubIDE drive would correctly report "QLW1" and not "LQ1W"Peter wrote: Sat Aug 16, 2025 10:18 am Yes, I run RedHat + Shoestring Linux on Q60 and Debian 12 on a PC. Both pull the same image from an attached IDE drive, if swab is used on the PC but not on the Q60.
I was expecting that there would be an abstraction layer between the hardware and the upper OS to make sure that the byte-stream read from the same disk remained the same between linux versions. Seems not.
Yes, the Amiga QubIDE code adjusts for these hardware differences.Peter wrote: Sat Aug 16, 2025 10:36 am It's not easy to see due to the poor schematics, but the Amiga IDE interface does indeed byte-swap as Graeme suggested:
https://www.amigawiki.org/dnl/schematics/A4000_Rb.pdf
Atari and Q40/Q60 interfaces do not byte-swap.
The original QubIDE core is left as-is but on the Amiga version; words are byte-swapped just before a word is sent and just after a word is read from the IDE controller.
Since Amiga, Q60 and QL are all big-endian, a drive will have the same physical byte-stream order between all QubIDE systems.Peter wrote: Sat Aug 16, 2025 11:00 am ...I wouldn't see a problem if Mark's driver would de-swap the data ...It would make an actual harddisk compatible to the QL
So the physical QubIDE drive on Amiga QDOS Classic should already be compatible with a real QL...
...It's just the disk images in UAE that are weird.
I suppose I could create a UAE-only version of the QubIDE driver that de-swaps when handling sector buffer data ; to ensure that UAE images are compatible with images from existing systems. I was just hoping for a cleaner solution.
Re: QubIDE media layer query
That is correct.Mark Swift wrote: Sat Aug 16, 2025 1:41 pm That would seem to imply that on a big-endian linux, a QL QubIDE drive would correctly report "QLW1" and not "LQ1W"
So it could be corrected with a (probably neglegible) speed advantage instead of the penalty Tobias mentioned.Mark Swift wrote: Sat Aug 16, 2025 1:41 pm The original QubIDE core is left as-is but on the Amiga version; words are byte-swapped just before a word is sent and just after a word is read from the IDE controller.
At first I thought it is not compatible, but you are probably right.Mark Swift wrote: Sat Aug 16, 2025 1:41 pm So the physical QubIDE drive on Amiga QDOS Classic should already be compatible with a real QL...
Maybe just document the issue and leave the driver as it is. Not a big deal to use external scripts swapping the data.Mark Swift wrote: Sat Aug 16, 2025 1:41 pm I suppose I could create a UAE-only version of the QubIDE driver that de-swaps when handling sector buffer data ; to ensure that UAE images are compatible with images from existing systems. I was just hoping for a cleaner solution.
Is the UAE harddisk image a direct drive image or does it contain "extras"?
- Mark Swift
- Brittle Membrane
- Posts: 100
- Joined: Fri Jul 18, 2014 9:13 am
- Location: Blackpool, Lancs, UK
- Contact:
Re: QubIDE media layer query
The UAE QubIDE harddisk image wasn't copied from a physical drive; and there's no extras.Peter wrote: Sat Aug 16, 2025 2:44 pm Is the UAE harddisk image a direct drive image or does it contain "extras"?
It was originally just an blank 64 Mb file. After booting into UAE/QDOS Classic, I formatted the resultant empty drive via "format win1_Name" selecting all cylinders "(0=all)". I can't remember what block size I chose.