Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get.blockID

Get the block ID from the physical location on the disk


Description

Get the block identifier based on the physical location on a disk (side, cylinder and sector) and the disk type.

Usage

## S4 method for signature 'character,numeric,numeric,numeric'
get.blockID(disktype, sector,
  side, cylinder)

Arguments

disktype

A character string indicating the type of disk: DD for double density disks. HD for high density disks.

sector

numeric identifier for the sector on the disk, ranging from 0 up to 10 (DD disks) or 21 (HD disks).

side

numeric identifier for the side of the disk (0 or 1).

cylinder

numeric identifier for the cylinder on the disk, ranging from 0 up to 79.

Details

Data on Amiga floppy disks are stored as 512 byte blocks. These blocks are physically stored on a specific cylinder and side at a specific sector. This method returns the block identifier based on the physical location on the disk. The inverse of this function is achieved with the get.diskLocation method.

Note that all identifiers (or indices) have a base at zero, for consitency with Amiga specifications and documentation, opposed to the base of one used in R.

Value

Returns the numeric identifier for the corresponding block.

Author(s)

Pepijn de Vries

See Also

Other block.operations: amigaBlock-method, get.diskLocation

Examples

## Get the block identifier for sectors 0 up to 3 combined with
## cylinders 0 up to 3 on side 0 of the disk:
get.blockID(disktype = "DD",
            sector   = 0:3,
            side     = 0,
            cylinder = 0:3)

adfExplorer

Import from and Export to Amiga Disk Files

v0.1.4
GPL-3
Authors
Pepijn de Vries [aut, cre, dtc]
Initial release
2018-03-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.