Class SkewedTrackSectorDevice
java.lang.Object
org.applecommander.device.SkewedTrackSectorDevice
- All Implemented Interfaces:
CapabilityProvider, Device, TrackSectorDevice, HintProvider, Container, InformationProvider
This is an overlay on a TrackSectorDevice to give the proper sector skew to the device.
From Beneath Apple DOS (2020).
-------- SECTOR ORDERING --------
Physical* DOS 3.3 Pascal* CP/M
0 0 0 0
1 D 2 3
2 B 4 6
3 9 6 9
4 7 8 C
5 5 A F
6 3 C 2
7 1 E 5
8 E 1 8
9 C 3 B
A A 5 E
B 8 7 1
C 6 9 4
D 4 B 7
E 2 D A
F F F D
- Notes:
- Physical = RDOS and DOS 3.2 sector ordering
- Pascal = ProDOS sector ordering
-
Nested Class Summary
Nested classes/interfaces inherited from interface TrackSectorDevice
TrackSectorDevice.Geometry -
Field Summary
Fields inherited from interface TrackSectorDevice
SECTOR_SIZE -
Method Summary
Modifier and TypeMethodDescriptionbooleancan(Capability capability) Helps identify capabilities of the existing component.static TrackSectorDevicedosToCpmSkew(TrackSectorDevice device) static TrackSectorDevicedosToPascalSkew(TrackSectorDevice device) static TrackSectorDevicedosToPhysicalSkew(TrackSectorDevice device) voidformat()Format a disk.<T> Optional<T> Get information that describes the disk geometry.booleanstatic TrackSectorDevicepascalToCpmSkew(TrackSectorDevice device) static TrackSectorDevicestatic TrackSectorDevicephysicalToDosSkew(TrackSectorDevice device) static TrackSectorDevicereadSector(int track, int sector) Read a single sector from the disk.static TrackSectorDevicevoidwriteSector(int track, int sector, DataBuffer data) Write a single sector to the disk.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface HintProvider
isAnyMethods inherited from interface TrackSectorDevice
calculateRequiredSectors, performRange, readRange, writeRange
-
Method Details
-
physicalToDosSkew
-
physicalToPascalSkew
-
pascalToPhysicalSkew
-
dosToPhysicalSkew
-
dosToPascalSkew
-
dosToCpmSkew
-
pascalToCpmSkew
-
truncate16sectorTo13
-
get
-
is
- Specified by:
isin interfaceHintProvider
-
can
Description copied from interface:CapabilityProviderHelps identify capabilities of the existing component.- Specified by:
canin interfaceCapabilityProvider
-
getGeometry
Description copied from interface:TrackSectorDeviceGet information that describes the disk geometry.- Specified by:
getGeometryin interfaceTrackSectorDevice
-
readSector
Description copied from interface:TrackSectorDeviceRead a single sector from the disk.- Specified by:
readSectorin interfaceTrackSectorDevice
-
writeSector
Description copied from interface:TrackSectorDeviceWrite a single sector to the disk.- Specified by:
writeSectorin interfaceTrackSectorDevice
-
format
public void format()Description copied from interface:TrackSectorDeviceFormat a disk. For most disks, this is simply a wipe to all zeros. If this disk has extended format (such as nibble formats), this is the opportunity to write out that format.
NOTE: Adapter type devices have to be cautious about what device is responsible about formatting. For example, a UniDOS disk is 2x400K volumes on an 800K block device -- if they defer formatting to the 800K block device, a format on one volume also wipes out the other (in this case, do not defer to the "parent"). However, if the block adapter contains a nibble-based
TrackSectorDevice, the actual formatting needs to get to the nibble device so it can lay down sector markers and the rest of the track structure.- Specified by:
formatin interfaceTrackSectorDevice
-
information
- Specified by:
informationin interfaceInformationProvider
-