SCSI Driver

The SCSI Driver is an open software interface (API) for accessing any kind of peripheral, not only SCSI devices. Also SATA drives for optical media like DVDs and BDs use the SCSI command set. For other hardware interfaces, e.g. IDE or USB, SCSI commands can be emulated, like HDDRIVER does it for IDE and SATA hard drives. All in all with SCSI Drivers one can send any SCSI command to almost any interface.
The sources of the software on this page are available on GitHub.

HDDRIVER's usage of SCSI Drivers

HDDRIVER exclusively accesses devices through the SCSI Driver layer. This way any device interface can be seamlessly integrated. The SCSI Driver can be one of HDDRIVER's built-in SCSI Drivers (for ACSI/SCSI/IDE/ATAPI/SATA), a third-party SCSI Driver, e.g. for USB, or any combination. If when launching HDDRIVER there is already a SCSI Driver for bus 0 (ACSI), 1 (SCSI) or 2 (IDE), for this bus HDDRIVER automatically uses the existing SCSI Driver instead of its own, similar to CBHD.
A Milan with PCI SCSI card provides a good example: For SCSI accesses HDDRIVER uses the Milan's PCI SCSI Driver, which is already available when HDDRIVER is launched. For IDE accesses HDDRIVER uses its own SCSI Driver for Milan IDE/ATAPI/SATA. With MagiCMac, MagicPC, Hatari and ARAnyM it is similar, provided that HDDRIVER is launched after the SCSI Driver for the respective platform/hardware.

Standard SCSI Driver Interface

HDDRIVER fully supports the current version 1.01 of the SCSI Driver interface. The documentation is available in ST GUIDE format and includes C and Modula-2 bindings.

Download SCSI Driver Documentation SCSI Driver documentation

A minor weak point of the SCSI Driver interface is the limitation to the LUNs 0-7 (SCSI sub-units) per device, even though SCSI (but not ACSI) permits 32 LUNs. With a small, backwards compatible extension for the SCSI Driver interface since HDDRIVER 12 you can access all 32 LUNs.

Target Interface

HDDRIVER is the only driver that supports the SCSI Driver target interface: A TT or Falcon are detected as SCSI devices by other computers (also non-Ataris) and can execute standardized or customized SCSI commands.

SCSI Target Interface
The screenshot shows the device check of a TT, with a Falcon on the same bus. The TT (SCSI ID 7) is running HDDRIVER 11.06, the Falcon (SCSI ID 6) is running HDDRIVER 11.05. Both computers "see" each other, and one can execute SCSI commands sent by the other.

Sample code in C for implementing custom SCSI commands is provided on GitHub. In order for the target interface to work faultlessly any software accessing SCSI peripherals has to use the SCSI Driver interface.

In the HDDRUTIL settings you can configure whether HDDRIVER shall be installed with or without target interface support. Without target support (the standard interface remains available) HDDRIVER allocates about 3 KiB less RAM.


Fully functional SCSI Drivers are available for the following hardware interfaces and emulators:

Interface/Emulator Software Package Author
Uwe Seimet
Claus Brod, Steffen Engel
Milan SCSI Milan PCI SCSI Driver Michael Schwingen
MagiCMac CBHD/MM_SCSI.PRG Steffen Engel, Thomas Tempelmann
Hatari 2.x (Linux SCSI/IDE/ATAPI/SATA/USB) NF_SCSI, see below Uwe Seimet
ARAnyM 1.1 (Linux SCSI/IDE/ATAPI/SATA/USB) NF_SCSI, see below Uwe Seimet, Thorsten Otto

There are also other, potentially incomplete implementations with unknown status (e.g. for USB), which are not listed here. Unfortunately the SCSI Driver of the FireBee has known bugs and thus cannot be used by HDDRIVER and HDDRUTIL.
When implementing a new SCSI Driver it is recommended to not only read the SCSI Driver specification but also the official SCSI standards. Information on the SCSI Driver interface is also provided by some of my papers for the German ST Computer magazine.

SCSI Driver for Hatari and ARAnyM

Download NF_SCSI SCSI Driver NF_SCSI 1.21

With Linux this SCSI Driver provides direct access to storage devices. The webpage on emulators provides more information.

SCSI Driver Monitor

Download SCSI_MON SCSI Driver Monitor 1.50

SCSI_MON logs SCSI Driver calls, which helps to analyze errors or when implementing a new SCSI Driver. SCSI_MON also helps to understand the SCSI and SATA software protocols.

SCSI Driver and Firmware Testsuite

Download SCSI Driver and Firmware Testsuite SCSI Driver and Firmware Testsuite 2.80

This archive contains several tools for testing SCSI firmware/emulations (in particular SCSI-2 and newer) and some SCSI Driver functions, also for SCSI Drivers that support IDE/SATA drives or USB devices. What is tested is the compatibility with SCSI-2, not with HDDRIVER. The latter results from SCSI-2 compatibility, though.
The sample logfile shows the data of devices passing all tests: An IBM DDRS-39130 hard drive, a hard drive emulated by SCSI2Pi and the target interface of HDDRIVER.

Sample Logfile Sample logfile