Modifier and Type | Field and Description |
---|---|
static int |
DIR_TRACK_1541
Track containing the directory.
|
protected static int |
EXT_TRACKS_1541
Maximum tracks of a D64 disk, that can be written.
|
protected IExtendImageListener |
extendImageListener
40 tracks disk image extension policy.
|
protected RandomAccessFile |
fd
Recently attached file handle.
|
protected String |
fileName
Recently attached file name.
|
protected GCR |
gcr
Group Code Recording support.
|
static int |
MAX_OVERALL_SECTORS
Nr of tracks * max sectors per track.
|
protected static int |
MAX_TRACKS_1541
Maximum tracks of a disk, that can be accessed.
|
static int |
MIN_TRACKS_1541
Minimum tracks of a disk.
|
protected static int[] |
RAW_TRACK_SIZE
Standard settings: Number of bytes per track in the speedzones 0-3.
|
protected boolean |
readOnly
Attach mode read-only.
|
protected static int[] |
SPEED_MAP_1541
Standard settings: Track (1-42) to speedzone (0-3) map.
|
protected int |
tracks
Track count of this image.
|
protected int[] |
trackSize
Size of the GCR data of each track.
|
Modifier | Constructor and Description |
---|---|
protected |
DiskImage(GCR gcr,
String fileName,
RandomAccessFile fd,
boolean readOnly) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
attach()
Attach disk image to drive.
|
static DiskImage |
attach(GCR gcr,
File file)
Attach an disk image file to drive.
|
void |
detach()
Detach disk image from drive.
|
abstract void |
gcrDataWriteback(int track)
Write back unsaved disk image data.
|
boolean |
getDiskSector(int track,
int sector,
byte[] currSector) |
boolean |
isReadOnly()
Is the disk image mounted read-only?
|
boolean |
save(File file,
byte startTrack,
byte startSector) |
void |
setExtendImagePolicy(IExtendImageListener listener)
Set policy how to deal with disks up to 40 tracks.
|
public static final int DIR_TRACK_1541
public static final int MIN_TRACKS_1541
protected static final int EXT_TRACKS_1541
protected static final int MAX_TRACKS_1541
protected static final int[] RAW_TRACK_SIZE
protected static final int[] SPEED_MAP_1541
protected int[] trackSize
protected RandomAccessFile fd
protected String fileName
protected boolean readOnly
protected int tracks
protected GCR gcr
protected IExtendImageListener extendImageListener
public static final int MAX_OVERALL_SECTORS
protected DiskImage(GCR gcr, String fileName, RandomAccessFile fd, boolean readOnly)
public static final DiskImage attach(GCR gcr, File file) throws IOException
gcr
- group code recording supportfile
- file of the imageIOException
- disk image file could not be attachedprotected abstract void attach() throws IOException
IOException
- error reading disk imagepublic final void detach() throws IOException
IOException
- disk image file write errorpublic final void setExtendImagePolicy(IExtendImageListener listener)
listener
- listener to ask about the policypublic abstract void gcrDataWriteback(int track) throws IOException
track
- dirty trackIOException
public final boolean isReadOnly()
public boolean getDiskSector(int track, int sector, byte[] currSector)
public final boolean save(File file, byte startTrack, byte startSector) throws IOException
IOException
Copyright © 2018 Ken Händel. All rights reserved.