Home  /  Autodocs

trackfile.device

FUNCTIONS

CMD_CLEAR TD_CHANGENUM TD_GETNUMTRACKS TD_SEEK TFInsertMediaTagList
CMD_READ TD_CHANGESTATE TD_MOTOR TFChangeUnitTagList TFStartUnitTagList
CMD_UPDATE TD_EJECT TD_PROTSTATUS TFEjectMediaTagList TFStopUnitTagList
CMD_WRITE TD_FORMAT TD_RAWREAD TFExamineFileSize
NSCMD_DEVICEQUERY TD_GETDRIVETYPE TD_REMCHANGEINT TFFreeUnitData
TD_ADDCHANGEINT TD_GETGEOMETRY TD_REMOVE TFGetUnitData

FUNCTION

The trackfile device is a "virtual" trackdisk.device which provides access (read-only and read-write) to disk image files (ADF). Its chief goal is to emulate the behaviour and the functionality of trackdisk.device as well as possible for maximum compatibility.

This emulation includes the behaviour of commands such as TD_ADDCHANGEINT and TD_REMCHANGEINT and their respective idiosyncrasies. Software which fails to use these correctly with trackfile.device will also fail to work correctly with trackdisk.device or scsi.device, for example.

That said, trackdisk.device performs additional sanity checks and validation on the commands it processes which trackdisk.device or scsi.device do not. If such commands are rejected (with error) by trackfile.device then chances are that trackdisk.device or scsi.device may exhibit undefined behaviour under the same circumstances. For example, the trackdisk.device command TD_RAWREAD is documented to require that the destination buffer has to reside in chip memory but trackdisk.device never checks if this requirement is satisfied.

UNITS

Whereas trackdisk.device was limited to up to 4 units in operation, as set at power-up time, virtual drives can be added to the trackfile device as needed. Other than the available memory, there is no limit to how many units can be in use at a time.

A unit supports ADF disk image files corresponding to an Amiga floppy disk with 880 KBytes of storage space (3.5", double density) or 1760 KBytes of storage space (3.5", high density). 40 track floppy disks (5.25") are not currently supported. The disk format itself is fixed to the Amiga 1.0 format and other formats, such as the IBM 720 KByte or 1440 KByte formats, are unsupported.

LIBRARY

In addition to the normal device calls, the trackfile device also supports several direct, library like calls. These are used for loading, ejecting and managing the ADF image files, for example.

In order to use the library calls, trackfile.device must be opened with unit TFUNIT_CONTROL.