Archives
- November 2025
- October 2025
- September 2025
- August 2025
- July 2025
- June 2025
- May 2025
- April 2025
- March 2025
- February 2025
- January 2025
- December 2024
- November 2024
- October 2024
- September 2024
- August 2024
- July 2024
- June 2024
- May 2024
- April 2024
- March 2024
- February 2024
- January 2024
- October 2023
- September 2023
- August 2023
- July 2023
- June 2023
- May 2023
- April 2023
- March 2023
- January 2023
- December 2022
- November 2022
- October 2022
- September 2022
- July 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
- June 2021
- May 2021
- April 2021
- March 2021
- February 2021
- January 2021
- December 2020
- November 2020
- October 2020
- September 2020
- August 2020
- July 2020
- June 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- October 2019
- September 2019
- August 2019
- July 2019
- June 2019
- May 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- August 2018
- July 2018
- June 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- January 2011
- November 2010
- October 2010
- August 2010
- July 2010
Learn Something Old Every Day, Part IX: AHA-154xB and ASPI4DOS.SYS
The other day I had a pressing “need” to examine the behavior of Adaptec 154x and compatible SCSI HBAs and their DOS drivers. I found the hard way that the AHA-154xB does not work with Adaptec’s last DOS drivers from circa 1999. That includes the drivers still available for download (ASPI4DOS.SYS version 3.36), as well as the driver shipped with OEM versions of Windows 98SE (ASPI4DOS.SYS version 3.36S).
The error message is far from enlightening; effectively the driver acts as if there were no HBA at all.
Quite unsurprisingly, this problem has been noticed before. It has been also observed that ASPI4DOS.SYS version 3.35 works fine, as do older versions. But why is the 3.36 driver really not working with AHA-154xB?
First of all, it’s not because the AHA-154xB is not supposed to be supported. The README.TXT file in the latest driver package clearly lists Adaptec AHA-1540B/1542B as supported, together with the newer ‘C’, ‘CF’, and ‘CP’ variants. It’s obvious that Adaptec didn’t actually test the driver on an AHA-154xB board… which is not hugely surprising since the 3.36 driver is from December 1998, and the ‘B’ variant was obsoleted by the much more modern ‘C’ in February 1993. Six or so years later, Adaptec probably barely had any of the ‘B’ variants left.
Note that the even older AHA-1540A/1542A and the original AHA-1540 (with no suffix) are not listed as supported. Those models were probably never very widespread and were replaced in 1990 with a cheaper, more capable ‘B’ variant, which did sell in significant quantities.
The reason for the ASPI4DOS.SYS failure is quite interesting. The AHA-154x interface was relatively simple and well designed for the time (circa 1987), became more or less an industry standard, and therefore became the target of cloning (notably by BusLogic). In their own drivers, Adaptec wanted to distinguish its own boards from clones.
Both Adaptec and BusLogic drivers used the I/O port at offset 3 from the I/O base (e.g. port 333h for a HBA configured at I/O base 330h) as part of their clone detection logic. This register was not documented by either Adaptec and BusLogic, and therefore many drivers shipped with operating systems didn’t use it, but Adaptec’s and BusLogic’s own drivers did.
On the Adaptec AHA-154xB (and presumably older variants as well), the register actually does not exist. Reads always return FFh and writing has no effect. On the BusLogic HBAs, the register is always present, is writable by the host (but normally never written), and the high bit is set if the HBA is configured to support disks larger than 1 GB.
On the AHA-154xC, Adaptec changed the behavior and made the register return ASCII letters ‘ADAP’ in a round-robin fashion.
Needless to say, ASPI4DOS.SYS version 3.36 checks for this behavior. It does not assume a known initial state, and therefore expects that reading the register four times might return ‘ADAP’, but also ‘DAPA’ or ‘APAD’ or ‘PADA’. To work around the ambiguity, the driver reads the register four times, adds the values together, and checks if the sum equals 16h. If not, it declares the HBA ‘not an Adaptec’ and ignores it. And that is the bug—the check will fail on an AHA-1540B.
No known driver shipped with an OS reads the ‘ADAP’ signature. But for example Adaptec’s DOS-based SCSIFMT.EXE utility version 1.33 uses the signature to distinguish between the AHA-154xC and earlier variants.
ASPI4DOS.SYS version 3.36 incorrectly insists that the ‘ADAP’ signature must be present and therefore fails to work with AHA-154xB adapters. It is pretty clear why Adaptec didn’t catch the bug (the ‘B’ variant was rather old at the time), although it’s much less clear why the driver logic was changed in the first place.
It should not be difficult to patch out the ‘ADAP’ signature check from ASPI4DOS.SYS, but for an AHA-154xB one might as well use ASPI4DOS.SYS version 3.35 or earlier and forget that version 3.36 ever existed.
7 Responses to Learn Something Old Every Day, Part IX: AHA-154xB and ASPI4DOS.SYS
Interesting find! If anyone patches out the check it would be interesting to know which other manufacturers card the drivers would work with.
Sorry that this probably is a repeat of what I’ve been saying many times before, but: If you ever feel like investigating how some other driver is locked to specific hardware you could have a go at all those ATAPI DOS CD drivers that all were locked to the vendors own hardware (except CPQIDECD.SYS). π
Another thing that might be worth examining is how those “EIDE” ISA cards (by Promise IIRC?) locked their bios to their own hardware. Although today it would mostly be of academical interest to know how they did it, back in the days before XTIDE Unversal BIOS it would actually had been useful for vintage computer enthusiasts to be able to use a copy of the BIOS of those cards with any generic IDE card (using for example the boot rom socket of a network card to hold the BIOS chip).
If you can tell me exactly where to download the relevant binaries, I can have a look.
Does this also affect the MCA only AHA1640?
I have no idea. Maybe? It does use ASPI4DOS.SYS as well, but the detection logic may be different. I can’t test that myself.
I have fuzzy memories that I encountered problems with the AHA-1640 and loading an ASPI driver. This was a long time ago though and I basically gave up on using the card in a Model 50Z. I have no way to reproduce it now though as I no longer have Microchannel machines to try the card in. I still have the card if I ever encounter another MCA machine.
Forgot to reply, sorry.
I think that more or less all the drivers I’m thinking about are included when you tell Windows 98 to create a boot disk. The one that tries to load loads of different cd-rom drivers, each vendor locked to the vendors own atapi cd/dvd units.
Not that there would be much benefit, if any, as compared to running the non-vendor locked CPQIDECD.SYS from Compaq, but it would kind of be interesting to once and for all “crack” those vendor specific drivers and prove that a Mitsumi driver actually would work with a Panasonic CD-ROM and vice versa, if you can get the drivers to load.
Not _all_ CD-ROM drivers were strictly locked. My old Win98-based "universal boot floppy" sported only three drivers and worked with most (if not all) of the ATAPI drives back in the day:
MTMCDAI.SYS (Mitsumi V 1.55 / 26.02.1997) 11k RAM
TEAC_CDI.SYS (Teac 1.27q / 1996) 13k RAM
Toshv218.sys (Toshiba Version 2.16 / 1997) 6k RAM
All in combination with mscdex.exe (2.25 / 1995).
A quick test with two modern LG and one Panasonic drive reveals: all of them recognize the drives… So yeah, those aren’t very picky. For some reason I also preferred them to oakcdrom.sys from Win98SE (to my knowledge the only ATAPI driver on the emergency/setup floppy?); I just don’t remember if it was for compatibility reasons, or maybe because that one alone used up 36k of RAM…?
Anyway – I added CPQIDECD.SYS V1.23 (9k RAM) today; the first change in over 20 years to my trusted boot floppy π
Maybe of some interest:
Compaq and Mitsumi tell the IRQ, I/O address, and Master or Slave.
Teac tells the channel and Master or Slave, plus model and firmware.
So I think I’ll still keep the Teac driver active, just for the information strings. But the Mitsumi and Toshiba (even if it needs the lowest RAM) can go.
This site uses Akismet to reduce spam. Learn how your comment data is processed.