All Packages Class Hierarchy This Package Previous Next Index
Class uk.co.demon.seasip.libdsk.LibDsk
java.lang.Object
|
+----uk.co.demon.seasip.libdsk.LibDsk
- public class LibDsk
- extends Object
-
LibDsk()
-
-
create(String, String)
- Create a new DSK file, POSIX image, etc.
-
getPsh(int)
- Convert sector size to a physical sector shift as used by the controller.
-
open(String, String)
- Open a DSK file, POSIX image, drive or whatever.
LibDsk
public LibDsk()
getPsh
public static native byte getPsh(int sectorSize)
- Convert sector size to a physical sector shift as used by the controller.
To go the other way, size = 128 << psh
- Parameters:
- sectorSize - Sector size in bytes: 128, 256, 512, ...
- Returns:
- The corresponding sector shift.
open
public static native Drive open(String filename,
String type) throws DskException
- Open a DSK file, POSIX image, drive or whatever.
- Parameters:
- filename - The file specification to open.
- type - The LibDsk driver to use. Can be null to autodetect.
- Throws: DskException
- If the drive could not be opened.
Supported drivers are:
- null
- Autodetect file type from name or magic number
- "dsk"
- CPCEMU DSK or EDSK format
- "raw"
- Raw dd if=foo of=bar file
- "floppy"
- Host system's floppy drive
- "myz80"
- MYZ80 image file
- "cfi"
- CFI image file
create
public static native Drive create(String filename,
String type) throws DskException
- Create a new DSK file, POSIX image, etc.
As for "open", but creates a new image file. On a floppy drive
this will act exactly as "open"; for an image this will attempt to
create the file new or truncate it.
Note that "type" cannot be NULL.
- Parameters:
- filename - The file specification to open.
- type - The LibDsk driver to use. Must not be null.
- Throws: DskException
- If the drive could not be created.
All Packages Class Hierarchy This Package Previous Next Index