|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webcodepro.applecommander.storage.physical.ImageOrder
com.webcodepro.applecommander.storage.physical.DosOrder
com.webcodepro.applecommander.storage.physical.NibbleOrder
public class NibbleOrder
Supports disk images stored in nibbilized DOS physical order.
Field Summary | |
---|---|
int[] |
readTranslateTable
The read translation table. |
Constructor Summary | |
---|---|
NibbleOrder(ByteArrayImageLayout diskImageManager)
Construct a NibbleOrder. |
Method Summary | |
---|---|
protected int |
decodeOddEven(byte[] buffer,
int offset)
Decode odd-even bytes as stored on disk. |
protected void |
encodeOddEven(byte[] buffer,
int offset,
int value)
Encode odd-even bytes to be stored on disk. |
void |
format()
Format the media. |
int |
getBlocksOnDevice()
Answer with the number of blocks on this device. |
int |
getSectorsPerTrack()
Answer with the number of sectors per track on this device. |
int |
getTracksPerDisk()
Answer with the number of tracks on this device. |
protected int |
locateField(int byte1,
int byte2,
int byte3,
byte[] trackData,
byte[] fieldData,
int startingOffset)
Locate a field on the track. |
byte[] |
readSector(int track,
int dosSector)
Retrieve the specified sector. |
protected byte[] |
readTrackData(int track)
Read nibbilized track data. |
void |
writeSector(int track,
int dosSector,
byte[] sectorData)
Write the specified sector. |
protected void |
writeTrackData(int track,
byte[] trackData)
Write nibbilized track data. |
Methods inherited from class com.webcodepro.applecommander.storage.physical.DosOrder |
---|
getOffset, isBlockDevice, isTrackAndSectorDevice, readBlock, writeBlock |
Methods inherited from class com.webcodepro.applecommander.storage.physical.ImageOrder |
---|
getDiskImageManager, getPhysicalSize, getSectorsPerDisk, isSizeApprox, readBytes, setDiskImageManager, writeBytes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int[] readTranslateTable
Constructor Detail |
---|
public NibbleOrder(ByteArrayImageLayout diskImageManager)
Method Detail |
---|
protected byte[] readTrackData(int track)
protected void writeTrackData(int track, byte[] trackData)
public byte[] readSector(int track, int dosSector) throws java.lang.IllegalArgumentException
readSector
in class DosOrder
java.lang.IllegalArgumentException
protected int locateField(int byte1, int byte2, int byte3, byte[] trackData, byte[] fieldData, int startingOffset)
This methid fills fieldData as well as returning the last position referenced in the track buffer.
protected int decodeOddEven(byte[] buffer, int offset)
XX = 1d1d1d1d (odd data bits) YY = 1d1d1d1d (even data bits)XX is then shifted by a bit and ANDed with YY to get the databyte. See page 3-12 in Beneath Apple DOS for more information.
protected void encodeOddEven(byte[] buffer, int offset, int value)
decodeOddEven(byte[], int)
public void writeSector(int track, int dosSector, byte[] sectorData) throws java.lang.IllegalArgumentException
writeSector
in class DosOrder
java.lang.IllegalArgumentException
public int getTracksPerDisk()
getTracksPerDisk
in class ImageOrder
public int getSectorsPerTrack()
getSectorsPerTrack
in class ImageOrder
public int getBlocksOnDevice()
getBlocksOnDevice
in class ImageOrder
public void format()
format
in class ImageOrder
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |