Skip to contents

The Amiga file system is structured around 512 byte blocks. A double density floppy disk consists of 1760 blocks of 512 bytes. read_adf_block and write_adf_block can be used to transform raw data from and to virtual devices (created with create_adf_device() or connect_adf()). Note that writing raw data to a disk could corrupt the file system on the device. So it is generally not advised unless you know what you are doing.

Usage

read_adf_block(dev, sector, ...)

# S3 method for class 'adf_device'
read_adf_block(dev, sector, ...)

write_adf_block(dev, sector, data, ...)

# S3 method for class 'adf_device'
write_adf_block(dev, sector, data, ...)

# S3 method for class 'raw'
write_adf_block.adf_device(dev, sector, data, ...)

# S3 method for class 'adf_block'
write_adf_block.adf_device(dev, sector, data, ...)

# Default S3 method
write_adf_block.adf_device(dev, sector, data, ...)

as_adf_block(data, ...)

new_adf_block()

Arguments

dev

The virtual adf device for which information needs to be obtained. It should be of class adf_device which can be created with create_adf_device() or connect_adf().

sector

Sector ID of the block you wish to read/write. It is an integer value. For double density disks, the ID ranges from 0 to 1759.

...

Ignored

data

Block data (raw vector of length 512) you wish to write to a virtual device

Value

In case of write_adf_block NULL is returned invisibly. In case of read_adf_block the raw data is returned as a adf_block class object.

Author

Pepijn de Vries