All Packages Class Hierarchy This Package Previous Next Index
Class uk.co.demon.seasip.libdsk.Geometry
java.lang.Object
|
+----uk.co.demon.seasip.libdsk.Geometry
- public class Geometry
- extends Object
The Geometry class holds information used to convert physical to/from logical
sectors and to access the disc.
-
cylinders
- Number of cylinders in this disc.
-
datarate
- Data rate.
-
fm
- True if this disc Uses FM recording mode.
-
fmtgap
- Format gap length
-
heads
- Number of heads (sides) on this disc.
-
nomulti
- True to disable multitrack operation.
-
RATE_DD
- Data rate for 360k 5.25" in 1.2Mb drive
-
RATE_ED
- Data rate for 2.8Mb 3.5" in 3.5" drive
-
RATE_HD
- Data rate for 1.4Mb 3.5" in 3.5" drive
-
RATE_SD
- Data rate for 720k 3.5" in 3.5" drive
-
rwgap
- Read/write gap length
-
secbase
- First physical sector number.
-
secsize
- Sector size in bytes.
-
sectors
- Sectors per track.
-
sidedness
- How to handle discs with 2 or more heads.
-
SIDES_ALT
- Track n is cylinder (n/heads) head (n%heads)
-
SIDES_OUTBACK
- Tracks go out and back.
-
SIDES_OUTOUT
- Tracks cover all side 0, then all side 1.
-
Geometry()
-
-
cpm86Geometry(byte[])
- Initialise this class from a CP/M-86 boot sector.
-
dg_lt2pt(int, int[])
- Convert logical track to physical cylinder/head.
-
dosGeometry(byte[])
- Initialise this class from a DOS boot sector.
-
ls2ps(int, int[])
- Convert logical sector to physical cylinder / head /sector.
-
pcwGeometry(byte[])
- Initialise this class from a PCW boot sector.
-
ps2ls(int, int, int)
- Convert physical cylinder/head/sector to logical sector.
-
pt2lt(int, int)
- Convert physical cylinder/head to logical track.
SIDES_ALT
public static final int SIDES_ALT
- Track n is cylinder (n/heads) head (n%heads)
SIDES_OUTBACK
public static final int SIDES_OUTBACK
- Tracks go out and back. Like this:
(head 0) 0,1,2,3,...37,38,39, then
(head 1) 39,38,37,...,2,1,0
SIDES_OUTOUT
public static final int SIDES_OUTOUT
- Tracks cover all side 0, then all side 1. Like this:
(head 0) 0,1,2,3,...37,38,39, then
(head 1) 0,1,2,3....37,38,39
RATE_HD
public static final int RATE_HD
- Data rate for 1.4Mb 3.5" in 3.5" drive
RATE_DD
public static final int RATE_DD
- Data rate for 360k 5.25" in 1.2Mb drive
RATE_SD
public static final int RATE_SD
- Data rate for 720k 3.5" in 3.5" drive
RATE_ED
public static final int RATE_ED
- Data rate for 2.8Mb 3.5" in 3.5" drive
sidedness
public int sidedness
- How to handle discs with 2 or more heads.
- See Also:
- SIDES_ALT, SIDES_OUTBACK, SIDES_OUTOUT
cylinders
public int cylinders
- Number of cylinders in this disc.
heads
public int heads
- Number of heads (sides) on this disc.
sectors
public int sectors
- Sectors per track.
secbase
public int secbase
- First physical sector number.
secsize
public int secsize
- Sector size in bytes.
datarate
public int datarate
- Data rate.
- See Also:
- RATE_DD, RATE_HD, RATE_SD, RATE_ED
rwgap
public byte rwgap
- Read/write gap length
fmtgap
public byte fmtgap
- Format gap length
fm
public boolean fm
- True if this disc Uses FM recording mode.
The only disc I know of that are recorded in FM mode are BBC
Micro DFS floppies.
nomulti
public boolean nomulti
- True to disable multitrack operation.
Geometry
public Geometry()
ps2ls
public native int ps2ls(int cyl,
int head,
int sect) throws DskException
- Convert physical cylinder/head/sector to logical sector.
- Parameters:
- cyl - Physical cylinder.
- head - Physical head.
- sect - Physical sector.
- Returns:
- The corresponding logical sector number.
- Throws: DskException
- Thrown if the cylinder, head or sector are out of range.
ls2ps
public native void ls2ps(int logical,
int chs[]) throws DskException
- Convert logical sector to physical cylinder / head /sector.
- Parameters:
- logical - The logical sector number to convert.
- chs - An array of three integers which will receive cylinder, head and sector.
- Throws: DskException
- Thrown if the logical sector is out of range.
pt2lt
public native int pt2lt(int cyl,
int head) throws DskException
- Convert physical cylinder/head to logical track.
- Parameters:
- cyl - Physical cylinder.
- head - Physical head.
- Returns:
- The corresponding logical track number.
- Throws: DskException
- Thrown if the cylinder or head are out of range.
dg_lt2pt
public native void dg_lt2pt(int logical,
int ch[]) throws DskException
- Convert logical track to physical cylinder/head.
- Parameters:
- logical - The logical track number to convert.
- ch - An array of two integers which will receive cylinder and head.
- Throws: DskException
- Thrown if the track is out of range.
dosGeometry
public native void dosGeometry(byte bootsect[]) throws DskException
- Initialise this class from a DOS boot sector.
- Parameters:
- bootsect - The boot sector to read the disc geometry from
- Throws: DskException
- Thrown if the boot sector is not a valid
DOS boot sector.
pcwGeometry
public native void pcwGeometry(byte bootsect[]) throws DskException
- Initialise this class from a PCW boot sector.
- Parameters:
- bootsect - The boot sector to read the disc geometry from
- Throws: DskException
- Thrown if the boot sector is not a valid
PCW boot sector.
cpm86Geometry
public native void cpm86Geometry(byte bootsect[]) throws DskException
- Initialise this class from a CP/M-86 boot sector.
- Parameters:
- bootsect - The boot sector to read the disc geometry from
- Throws: DskException
- Thrown if the boot sector is not a valid
CP/M-86 boot sector.
All Packages Class Hierarchy This Package Previous Next Index