CONTENTSPREVNEXTHOME
HDToolBox Patch

HDToolBox is Commodore's utility for partitioning and formatting SCSI storage devices such as hard disks, and is supplied on the AmigaOS Install disk.

HDToolBox cannot be properly used with an MO drive that is set to "optical memory device" mode, as opposed to "direct access device", which is normal for hard disks. The same applies to Panasonic's PD rewriteable drive.

HDToolBox checks the device type, and if non-zero refuses to read data from the drive. Type 0 is direct access, type 7 is optical memory. This is not a major problem as MO drives typically have a DIP switch to set the device type. Nevertheless, it would be nice to use HDToolBox with an MO drive in optical memory device mode.

That is what the following patch allows. It modifies HDToolBox to work with both devices of type 0 and type 7. Luckily, because HDToolBox is written in C, there were just enough spare instructions so that I didn't have to alter the program size.

I have created patches for five versions of HDToolBox:

Use a binary file editor such as Hex to make the changes to the HDToolBox executable. All numbers are in hexadecimal.

HDToolBox 2.2 and 2.22 patch Offset Change From Change To $004602 102D FEF7 4A00 7000 102D FEF7 $00460A 7200 1200 2001 0C00 0007 6712 HDToolBox 39.12 patch Offset Change From Change To $0042A6 102D FEF7 4A00 7000 102D FEF7 $0042AE 7200 1200 2001 0C00 0007 6712 HDToolBox 40.3 patch Offset Change From Change To $005444 102D FEF7 4A00 7000 102D FEF7 $00544C 7200 1200 2001 0C00 0007 6712 HDToolBox 40.4 patch Offset Change From Change To $005430 102D FEF7 4A00 7000 102D FEF7 $005438 7200 1200 2001 0C00 0007 6712

Alternatively, I have created patch files for use in conjunction with GPatch. You can use these to patch your HDToolBox executable if you prefer not to apply the patch manually. The filenames are HDToolBox2.2_MO.gpch, HDToolBox2.22_MO.gpch, HDToolBox39.12_MO.gpch, HDToolBox40.3_MO.gpch and HDToolBox40.4_MO.gpch for versions 2.2, 2.22, 39.12, 40.3 and 40.4 respectively.

For example, to use GPatch to patch your HDToolBox 40.4 executable, you would use commands like:

Rename HDToolBox HDToolBox.orig GPatch HDToolBox.orig HDToolBox40.4_MO.gpch HDToolBox

CONTENTSPREVNEXTHOME