Modules (since HDDRIVER 11) are similar to programs for the AUTO folder, but are executed before HDDRIVER at boot time. This allows for special applications that are not possible with programs for the AUTO folder, as they are launched too late in the boot process.
To give HDDRIVER access to additional hardware interfaces (e.g. USB), the corresponding SCSI Drivers must be launched before HDDRIVER. Only then will HDDRIVER have access to the hardware supported by these drivers during the boot process. This is where modules come into play: They are loaded and executed before HDDRIVER.SYS is started.
A module does not necessarily have to be a SCSI Driver. A driver for a USB keyboard is another example. In this case, you can select the boot drive by pressing a key on the USB keyboard, which does not work when launching the USB drivers from the AUTO folder.
A module only makes sense if the same functionality cannot be achieved by a program in the AUTO folder.
Modules can be implemented in a way that they can also be launched as regular programs. They are stored in the root directory of the boot partition and are named HDDRMODn.SYS, where n is a digit from 0-9. These numbers determine the order of execution. After the last module has been started HDDRIVER.SYS is executed. Modules do not have access to hard disk partitions because HDDRIVER has not yet been loaded at the time of module execution.
Whether modules and HDDRIVER run in Fast-RAM is configured with HDDRUTIL under "Preferences". Do not forget to re-install HDDRIVER after changing the respective setting.
Detailed information on HDDRIVER modules (especially for developers) as well as code examples are available on GitHub.
This is a sample module that after displaying a message simply waits for a key to be pressed before the boot process proceeds. To try it out, just copy it to the root directory of the boot partition. You will notice that the keypress is expected before HDDRIVER is booted. This would not be possible with a program for the AUTO folder.
With the USB modules for Lightning VME and Lightning ST HDDRIVER can access USB drives like any other drive, as if USB support was integrated directly into HDDRIVER. Therefore, for example, the settings under "Devices and Partitions" can also be used for USB drives, as can the selection of the boot partition for the AUTO folder and the ACCs by pressing a key on a USB keyboard. Even GPT partitions with USB drives are possible this way. HDDRIVER itself can of course only be booted from the interfaces supported by TOS, i.e. ACSI, SCSI or IDE.
On the SCSI Driver page you can download another module, namely the SCSI Driver NF_SCSI for Hatari and ARAnyM. With this driver HDDRIVER, HDDRUTIL and other tools can directly access devices managed by Linux.
HDDRIVER modules can also be created with the stripex tool for MiNT.