Amiga Foreverby Cloanto

Amiga SCSI and IDE Devices: Disk Image Files and Direct Access



Q: Can an Amiga hard disk partition (SCSI, IDE, USB, etc.) be mounted directly in the emulation? Is it possible to also access Amiga SCSI devices such as ZIP drives, tape drives and scanners?




This document explains how to:

  • Attach an Amiga disk drive to a Windows PC to create an HDF disk image that can be used both as a backup and in Amiga Forever
  • Attach any SCSI or IDE device to a Windows PC and use that directly in Amiga Forever

The two approaches are complementary: if you create a disk image, which is the recommended method for using Amiga disk data on the PC, you do not need to follow the lower-level SCSI access instructions.

Alternatively, if you need to transfer data from the Amiga to a Windows PC and you prefer not to attach the disk drive itself to the PC, you can consider using Amiga Explorer.

Important: Because Amiga SCSI devices and media are generally quite old, we recommend that you copy your Amiga data to new storage media as soon as you are able to access it. If possible, prepare the required interface and software first, and then switch on your legacy hardware only once, and immediately proceed with the transfer.

These instructions were written for Amiga Forever 2012. Special thanks to Toni Wilen for assisting in the preparation of this document. Thanks also to Microsoft for their assistance in implementing low-level SCSI passthrough functionality, which is a feature that is rarely seen even in high-end emulation environments.

Recommended Approach: Using Disk Images

Windows software like SelfImage (free) or WinImage (free trial) can be used to create an HDF image file of an Amiga disk connected to the PC. To run these applications it may be necessary to right-click and manually select Run as administrator.

Benefits of this procedure:

  • Aging hardware needs to be read only once (lowest possible risk of loss)
  • Supports different types of media (hard disks, magneto-optical disks, SyQuest cartridges, Iomega ZIP drives, etc.)
  • The host operating system (Windows) does not need to have an Amiga file system
  • The resulting disk image can be mounted in Amiga Forever

To create the disk image:

  • Install the imaging software (e.g. SelfImage or WinImage) and test the entire procedure on some non-important disks if possible
  • Connect the disk to the PC (follow the device-specific instructions, switching off the PC if necessary)
  • Do NOT mount the Amiga disk assigning it a Windows drive letter or expect it to appear under the Computer folder, but rather make sure that the disk is listed in Disk Management (select Computer Management from the Windows Start menu, then expand the Storage folder on the left, and click on Disk Management)
  • If using SelfImage, configure the Input to come from a drive and the Output go to go a file, with no Processing (compression) options. Select the desired drive (use the "entire disk" option) as the Input Location. Select any file name you wish as the Output. After imaging is complete you can rename the resulting .img file "amiga.hdf" or any other name ending in ".hdf".
  • If using WinImage: select "Creating Virtual Hard Disk image from physical drive" from the Disk menu (you may have to tick "[x] Include non removable hard disk(s)"), then "Create Fixed Size Virtual Hard Disk", then "OK", then in the Save As dialog select "Save as type: Image File (*.ima)" instead of the default (*.vhd). You can name the file "amiga.hdf" or any other name ending in ".hdf".
  • Make a backup copy of the disk image and archive it in a safe place

Additional steps for a more rigorous, semi-forensic approach:

  • Create the disk image using a USB write blocker, a disk controller with a read-only mode, or similar solution to prevent writes to the media being imaged
  • Immediately calculate a secure hash of the disk image file (e.g. SHA-256 or better)
  • Timestamp and/or publish the hash (e.g. on Twitter)
  • Video-record and/or have witnesses for the entire procedure

To mount the disk image in Amiga Forever:

  • Decide where to save the .hdf file. For example, you can select Open/Amiga Files from the File menu in Amiga Forever, then in the resulting Explorer window select the "hdf" folder inside "Shared". (This will be "C:\Users\Public\Documents\Amiga Files\Shared\hdf" or similar depending on the configuration.)
  • Right-click the configuration to which you would like to add the disk image and select Edit...
  • In the Media tab of the RP9 Editor, click the Add... button
  • Select Type: File and click "..." to select the .hdf file created in the previous step
  • Select Location: Absolute (or Data)

For additional information:

SCSI Devices and IDs (Units)

When the SCSI & IDE option is enabled (in the Configuration tab of the Amiga Forever RP9 Editor) you can use one of two devices inside the emulation environment:

  • uaehf.device (for hardfiles, "real" hard disks and other block-type devices);
  • uaescsi.device (optimized both for SCSI and for CD-ROM-like hardware, e.g. CD-ROM and DVD devices, ZIP drives, tape drives, SCSI pass-through, etc.)

uaehf.device uses IOCTL functionality (see below), and does not require SPTI or ASPI. It provides limited emulation of SCSI commands, e.g. for HDToolBox and similar system tools, for mounting devices and for booting from them, and to support file systems and partitions, in a way similar to the boot ROMs that are included with Amiga SCSI controllers.

uaescsi.device uses either SPTI (Windows 2000, Windows XP and higher) or ASPI functionality (Windows 98 and Windows Me), depending on the version of Windows and the installed software (see below).

Because the emulation needs to merge and support units from different access interfaces, SCSI ID (unit) numbers inside the Amiga environment have no relationship with "real" device ID or unit numbers. In particular, uaescsi.device unit numbers 0 and 1 are reserved (and automatically remapped, if necessary) to the first two CD-ROM/DVD type devices.

Additionally, a "uae.device" may be used for mounted directories. This is generally not referenced in any applications, since it provides no useful functionality.

Other Amiga SCSI Devices

With the Amiga 3000, Commodore introduced a real SCSI disk system and "scsi.device" support file. When the Amiga 4000 was released (with IDE only, no SCSI), Commodore opted to keep the "scsi.device" name for the support file, and modify the functionality, to allow booting from IDE media and keep using the same tools (such as HDToolBox) that already had "scsi.device" in their ToolTypes and other settings. Also, the IDE variant of Commodore's scsi.device included limited SCSI emulation, which was enough for some programs to work (in a way similar to uaehf.device), and to extend the capacity of IDE support to about 8 GB (if the file system had direct SCSI support, such as SPS and SFS) at times when a 4 GB limit was common. This can be confusing because Commodore had two different device files, both named "scsi.device", but one being a full SCSI implementation, and the other an IDE variant.

Amiga Forever SCSI & IDE Settings (Windows Side)

If you determine that you need to use uaescsi.device, make sure that the SCSI & IDE option is selected in the Amiga Forever configuration (right-click the title, select Edit, then check SCSI & IDE in the Devices group of the Configuration tab).

As a general rule, in order to avoid accidental access and corruption of non-Amiga data, the emulation will only mount disks that are recognized as either being empty or having Amiga-formatted content. This means that by default it is not possible to mount PC-formatted disks, or disks formatted under custom Amiga partition schemes, such as those developed before the release of the Amiga Rigid Disk Block specification, or RDB/RDSK.

Amiga SCSI Settings (Amiga Side)

All Amiga programs that support SCSI peripherals have one ore more configuration parameters (ToolType, command line option, etc.) that need to be set to the proper device name and unit number. So be sure to set the correct device name ("uaehf.device" or "uaescsi.device") and unit number.

Within the Workbench 3.X environment of Amiga Forever you can use the "FindDevice" tool (in "Work:Software/IDEfix97") to verify that a device has been recognized, and to obtain the unit number as it has been mapped within the emulation environment. The WinUAE log file, if enabled, also lists the unit numbers that have been assigned to recognized devices.

Windows IOCTL Support

The virtual uaehf.device device which is part of the Amiga emulation uses the Windows IOCTL (I/O Control Code) software interface to provide access to devices. IOCTL is supported on Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows 7 and later versions of Windows. It only supports block-type devices like hard disks, including USB storage media, flash memory disks, etc.

As a rule of thumb, if Windows detects such a device and allows you to configure it in Disk Management (found under Storage, in Computer Management), WinUAE can use it via uaehf.device.

This functionality requires administrator privileges.

Windows SPTI and ASPI Support

The virtual uaescsi.device device which is part of the Amiga emulation uses either the Windows SPTI (SCSI Pass Through Interface) or the Windows ASPI (Advanced SCSI Programming Interface) software interface to provide access to devices. ASPI is included by Microsoft in Windows 95, Windows 98, and Windows Me. ASPI is not directly supported by Microsoft on Windows NT and newer versions of Windows, where it has been replaced by the newer SPTI. In order to maintain compatibility with different versions of Windows the Amiga emulation software can use either SPTI or ASPI.

While it should not be required on newer versions of Windows (since they include SPTI), it is possible to install a third-party ASPI component. This software is made available (often for free download, or as part of evaluation versions of their software) by companies like Nero and Adaptec. If you have a recordable CD or DVD writer mounted in your system then you most likely already have such software installed. It has been reported that the software by Nero is more compatible than the one by Adaptec when used with CD-like devices and hard drives. Apparently however the Nero software may not support certain other devices, such as scanners.

In WinUAE 1.0 and higher, the ASPI software is detected automatically. In previous versions of WinUAE you may need to copy the ASPI DLL file (e.g. "wnaspi.dll") to the WinUAE program directory. SPTI is supported by WinUAE 1.1.1 and higher.

Limited Functionality on Older Versions of Windows

The procedures described here are fully supported only on Windows XP, Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008, Windows 8, Windows Server 2012 and Windows 10, using WinUAE 1.1.1 and higher. Support for Windows 2000 is limited in some cases, reflecting system API limitations. SCSI and the other low-level device access interfaces and procedures described here are not supported in WinFellow.

Under Windows 2000 WinUAE has limited access to the exact hard disk configuration. In particular, it can only get generic information about the hard drive geometry, which is usually not enough to calculate the total disk size up to the exact end of the disk. This means that when reading Amiga disk partitions formatted using the FFS or OFS file systems some errors may occur when reading or writing the last few blocks. Similarly, partitions formatted using the SFS file system cannot be mounted at all, because SFS places crucial information in the last block of a partition.

Beginning with version 0.9.92 WinUAE started supporting the new IOCTL_DISK_GET_LENGTH_INFO functionality first introduced in Windows XP, and also available in Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008, Windows 8, Windows Server 2012 and Windows 10, which makes it possible to obtain the exact disk size, overcoming the above limitations.

Additional Notes on Disk Images

We have seen cases of Amiga partitions where the high and low bytes were swapped (e.g. the "RDSK" header had become "DRKS"). This can be corrected with a good hex editor, after which the partitions can be mounted within the Amiga emulation.

Related Links


Article Information
Article ID:15-113
Products:Amiga Forever
Additional Keywords:None
Last Update:2016-02-03
Your feedback is always appreciated. It is safe to link to this page.