mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-06-13 06:29:31 +00:00
method header lines
This commit is contained in:
parent
04557bab39
commit
add2b8f946
|
@ -28,7 +28,9 @@ import com.bytezone.diskbrowser.gui.DataSource;
|
|||
import com.bytezone.diskbrowser.utilities.HexFormatter;
|
||||
import com.bytezone.diskbrowser.utilities.Utility;
|
||||
|
||||
// -----------------------------------------------------------------------------------//
|
||||
abstract class AbstractCatalogEntry implements AppleFileSource
|
||||
// -----------------------------------------------------------------------------------//
|
||||
{
|
||||
protected Disk disk;
|
||||
protected DosDisk dosDisk;
|
||||
|
@ -47,8 +49,9 @@ abstract class AbstractCatalogEntry implements AppleFileSource
|
|||
|
||||
private CatalogEntry link;
|
||||
|
||||
public AbstractCatalogEntry (DosDisk dosDisk, DiskAddress catalogSector,
|
||||
byte[] entryBuffer)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
AbstractCatalogEntry (DosDisk dosDisk, DiskAddress catalogSector, byte[] entryBuffer)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
this.dosDisk = dosDisk;
|
||||
this.disk = dosDisk.getDisk ();
|
||||
|
@ -88,7 +91,9 @@ abstract class AbstractCatalogEntry implements AppleFileSource
|
|||
catalogName = getName (base, entryBuffer).replace ("^", "");
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private String getName (String base, byte[] buffer)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
StringBuilder text = new StringBuilder (base);
|
||||
int max = buffer[0] == (byte) 0xFF ? 32 : 33;
|
||||
|
@ -115,7 +120,9 @@ abstract class AbstractCatalogEntry implements AppleFileSource
|
|||
return text.toString ();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
protected String getFileType ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
switch (fileType)
|
||||
{
|
||||
|
@ -143,15 +150,19 @@ abstract class AbstractCatalogEntry implements AppleFileSource
|
|||
|
||||
// maybe this should be in the FormattedDisk
|
||||
// maybe DiskAddress should have a 'valid' flag
|
||||
// ---------------------------------------------------------------------------------//
|
||||
protected DiskAddress getValidAddress (byte[] buffer, int offset)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
if (disk.isValidAddress (buffer[offset], buffer[offset + 1]))
|
||||
return disk.getDiskAddress (buffer[offset], buffer[offset + 1]);
|
||||
return null;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public DataSource getDataSource ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
if (appleFile != null)
|
||||
return appleFile;
|
||||
|
@ -297,7 +308,9 @@ abstract class AbstractCatalogEntry implements AppleFileSource
|
|||
return appleFile;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private byte[] getExactBuffer (byte[] buffer)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
byte[] exactBuffer;
|
||||
|
||||
|
@ -319,14 +332,18 @@ abstract class AbstractCatalogEntry implements AppleFileSource
|
|||
return exactBuffer;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private boolean isRunCommand (byte[] buffer)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
// see Stargate - Disk 1, Side A.woz
|
||||
return buffer[0] == 0x4C && buffer[1] == (byte) 0xFC && buffer[2] == (byte) 0xA4
|
||||
&& buffer[3] == 0x00;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private boolean isScrunched (int reportedLength)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
if ((name.equals ("FLY LOGO") || name.equals ("FLY LOGO SCRUNCHED"))
|
||||
&& reportedLength == 0x14FA)
|
||||
|
@ -338,8 +355,10 @@ abstract class AbstractCatalogEntry implements AppleFileSource
|
|||
return false;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public boolean contains (DiskAddress da)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
for (DiskAddress sector : tsSectors)
|
||||
if (sector.matches (da))
|
||||
|
@ -354,21 +373,27 @@ abstract class AbstractCatalogEntry implements AppleFileSource
|
|||
return false;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public String getUniqueName ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
// this might not be unique if the file has been deleted
|
||||
return name;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public FormattedDisk getFormattedDisk ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
return dosDisk;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public List<DiskAddress> getSectors ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
List<DiskAddress> sectors = new ArrayList<> ();
|
||||
sectors.add (catalogSectorDA);
|
||||
|
@ -377,13 +402,17 @@ abstract class AbstractCatalogEntry implements AppleFileSource
|
|||
return sectors;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
void link (CatalogEntry catalogEntry)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
this.link = catalogEntry;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public String toString ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
return catalogName;
|
||||
}
|
||||
|
|
|
@ -5,13 +5,17 @@ import com.bytezone.diskbrowser.disk.DiskAddress;
|
|||
import com.bytezone.diskbrowser.dos.DosDisk.FileType;
|
||||
import com.bytezone.diskbrowser.utilities.HexFormatter;
|
||||
|
||||
// -----------------------------------------------------------------------------------//
|
||||
class CatalogEntry extends AbstractCatalogEntry
|
||||
// -----------------------------------------------------------------------------------//
|
||||
{
|
||||
private int textFileGaps;
|
||||
private int length;
|
||||
private int address;
|
||||
|
||||
public CatalogEntry (DosDisk dosDisk, DiskAddress catalogSector, byte[] entryBuffer)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
CatalogEntry (DosDisk dosDisk, DiskAddress catalogSector, byte[] entryBuffer)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
super (dosDisk, catalogSector, entryBuffer); // build lists of ts and data sectors
|
||||
|
||||
|
@ -127,7 +131,9 @@ class CatalogEntry extends AbstractCatalogEntry
|
|||
}
|
||||
}
|
||||
|
||||
public String getDetails ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
String getDetails ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
int actualSize = dataSectors.size () + tsSectors.size () - textFileGaps;
|
||||
String addressText = address == 0 ? "" : String.format ("$%4X", address);
|
||||
|
|
|
@ -5,13 +5,17 @@ import com.bytezone.diskbrowser.disk.AppleDiskAddress;
|
|||
import com.bytezone.diskbrowser.disk.DiskAddress;
|
||||
import com.bytezone.diskbrowser.gui.DataSource;
|
||||
|
||||
// -----------------------------------------------------------------------------------//
|
||||
class DeletedCatalogEntry extends AbstractCatalogEntry
|
||||
// -----------------------------------------------------------------------------------//
|
||||
{
|
||||
boolean allSectorsAvailable = true;
|
||||
boolean debug = false;
|
||||
|
||||
public DeletedCatalogEntry (DosDisk dosDisk, DiskAddress catalogSector,
|
||||
byte[] entryBuffer, int dosVersion)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
DeletedCatalogEntry (DosDisk dosDisk, DiskAddress catalogSector, byte[] entryBuffer,
|
||||
int dosVersion)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
super (dosDisk, catalogSector, entryBuffer);
|
||||
|
||||
|
@ -93,15 +97,19 @@ class DeletedCatalogEntry extends AbstractCatalogEntry
|
|||
allSectorsAvailable = false;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public String getUniqueName ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
// name might not be unique if the file has been deleted
|
||||
return "!" + name;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public DataSource getDataSource ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
if (!allSectorsAvailable && appleFile == null)
|
||||
{
|
||||
|
@ -112,7 +120,9 @@ class DeletedCatalogEntry extends AbstractCatalogEntry
|
|||
return super.getDataSource ();
|
||||
}
|
||||
|
||||
public String getDetails ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
String getDetails ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
return String.format ("%-30s %s", name,
|
||||
allSectorsAvailable ? "Recoverable" : "Not recoverable");
|
||||
|
|
|
@ -6,7 +6,9 @@ import com.bytezone.diskbrowser.disk.DiskAddress;
|
|||
import com.bytezone.diskbrowser.utilities.HexFormatter;
|
||||
import com.bytezone.diskbrowser.utilities.Utility;
|
||||
|
||||
// -----------------------------------------------------------------------------------//
|
||||
class DosCatalogSector extends AbstractSector
|
||||
// -----------------------------------------------------------------------------------//
|
||||
{
|
||||
private static final String[] fileTypes =
|
||||
{ "Text file", "Integer Basic program", "Applesoft Basic program", "Binary file",
|
||||
|
@ -15,15 +17,18 @@ class DosCatalogSector extends AbstractSector
|
|||
|
||||
private final DosDisk dosDisk;
|
||||
|
||||
public DosCatalogSector (DosDisk dosDisk, Disk disk, byte[] buffer,
|
||||
DiskAddress diskAddress)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
DosCatalogSector (DosDisk dosDisk, Disk disk, byte[] buffer, DiskAddress diskAddress)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
super (disk, buffer, diskAddress);
|
||||
this.dosDisk = dosDisk;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public String createText ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
StringBuilder text =
|
||||
getHeader ("DOS " + dosDisk.getVersionText () + " Catalog Sector");
|
||||
|
@ -47,7 +52,9 @@ class DosCatalogSector extends AbstractSector
|
|||
return text.toString ();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private void createDos4Text (StringBuilder text, int i)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
int track = buffer[i] & 0x3F;
|
||||
int sector = buffer[i + 1] & 0x1F;
|
||||
|
@ -82,7 +89,9 @@ class DosCatalogSector extends AbstractSector
|
|||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private void createDos3Text (StringBuilder text, int i)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
if (buffer[i] == (byte) 0xFF) // file is deleted
|
||||
{
|
||||
|
@ -119,7 +128,9 @@ class DosCatalogSector extends AbstractSector
|
|||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private String getName (byte[] buffer, int offset, int length)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
StringBuilder text = new StringBuilder ();
|
||||
// int max = buffer[offset] == (byte) 0xFF ? 32 : 33;
|
||||
|
@ -142,7 +153,9 @@ class DosCatalogSector extends AbstractSector
|
|||
return text.toString ();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private String getType (byte value)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
int type = value & 0x7F;
|
||||
boolean locked = (value & 0x80) > 0;
|
||||
|
|
|
@ -18,7 +18,9 @@ import com.bytezone.diskbrowser.disk.DiskAddress;
|
|||
import com.bytezone.diskbrowser.disk.SectorType;
|
||||
import com.bytezone.diskbrowser.gui.DataSource;
|
||||
|
||||
// -----------------------------------------------------------------------------------//
|
||||
public class DosDisk extends AbstractFormattedDisk
|
||||
// -----------------------------------------------------------------------------------//
|
||||
{
|
||||
private static final int ENTRY_SIZE = 35;
|
||||
private static final int CATALOG_TRACK = 17;
|
||||
|
@ -45,12 +47,16 @@ public class DosDisk extends AbstractFormattedDisk
|
|||
Text, ApplesoftBasic, IntegerBasic, Binary, Relocatable, SS, AA, BB
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
public DosDisk (Disk disk)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
this (disk, 0);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
public DosDisk (Disk disk, int volumeNo)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
super (disk);
|
||||
|
||||
|
@ -237,13 +243,17 @@ public class DosDisk extends AbstractFormattedDisk
|
|||
makeNodeVisible (volumeNode.getFirstLeaf ());
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
public int getVolumeNo ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
return volumeNo;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public void setOriginalPath (Path path)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
super.setOriginalPath (path);
|
||||
|
||||
|
@ -253,7 +263,9 @@ public class DosDisk extends AbstractFormattedDisk
|
|||
|
||||
// Beagle Bros FRAMEUP disk only has one catalog block
|
||||
// ARCBOOT.DSK has a catalog which starts at sector 0C
|
||||
// ---------------------------------------------------------------------------------//
|
||||
public static boolean isCorrectFormat (AppleDisk disk)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
disk.setInterleave (0);
|
||||
int catalogBlocks = checkFormat (disk);
|
||||
|
@ -288,7 +300,9 @@ public class DosDisk extends AbstractFormattedDisk
|
|||
return false;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
public String getVersionText ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
switch (getVersion ())
|
||||
{
|
||||
|
@ -309,12 +323,16 @@ public class DosDisk extends AbstractFormattedDisk
|
|||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
public int getVersion ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
return dosVTOCSector.dosVersion;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private static int checkFormat (AppleDisk disk)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
byte[] buffer = disk.readSector (0x11, 0x00);
|
||||
|
||||
|
@ -344,7 +362,9 @@ public class DosDisk extends AbstractFormattedDisk
|
|||
return countCatalogBlocks (disk, buffer);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private static int countCatalogBlocks (AppleDisk disk, byte[] buffer)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
DiskAddress catalogStart = disk.getDiskAddress (buffer[1], buffer[2]);
|
||||
DiskAddress da = disk.getDiskAddress (catalogStart.getBlock ());
|
||||
|
@ -374,8 +394,10 @@ public class DosDisk extends AbstractFormattedDisk
|
|||
return catalogAddresses.size ();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public String toString ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
// StringBuffer text = new StringBuffer (dosVTOCSector.toString ());
|
||||
// return text.toString ();
|
||||
|
@ -390,8 +412,10 @@ public class DosDisk extends AbstractFormattedDisk
|
|||
return text.toString ();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public DataSource getFormattedSector (DiskAddress da)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
SectorType type = sectorTypes[da.getBlock ()];
|
||||
if (type == vtocSector)
|
||||
|
@ -414,16 +438,20 @@ public class DosDisk extends AbstractFormattedDisk
|
|||
return super.getFormattedSector (da);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public List<DiskAddress> getFileSectors (int fileNo)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
if (fileEntries.size () > 0 && fileEntries.size () > fileNo)
|
||||
return fileEntries.get (fileNo).getSectors ();
|
||||
return null;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public AppleFileSource getCatalog ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
String newLine = String.format ("%n");
|
||||
String line = "- --- --- ------------------------------ ----- -------------"
|
||||
|
@ -453,7 +481,9 @@ public class DosDisk extends AbstractFormattedDisk
|
|||
text.toString (), this);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private AppleFileSource getDeletedList ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
StringBuilder text =
|
||||
new StringBuilder ("List of files that were deleted from this disk\n");
|
||||
|
|
|
@ -5,17 +5,23 @@ import com.bytezone.diskbrowser.disk.Disk;
|
|||
import com.bytezone.diskbrowser.disk.DiskAddress;
|
||||
import com.bytezone.diskbrowser.utilities.HexFormatter;
|
||||
|
||||
// -----------------------------------------------------------------------------------//
|
||||
class DosTSListSector extends AbstractSector
|
||||
// -----------------------------------------------------------------------------------//
|
||||
{
|
||||
private final String name;
|
||||
|
||||
public DosTSListSector (String name, Disk disk, byte[] buffer, DiskAddress diskAddress)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
DosTSListSector (String name, Disk disk, byte[] buffer, DiskAddress diskAddress)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
super (disk, buffer, diskAddress);
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
public boolean isValid (DosDisk dosDisk)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
// what is the count of blocks? does it match? this sector can't tell, there
|
||||
// might be more than one TS list
|
||||
|
@ -40,15 +46,19 @@ class DosTSListSector extends AbstractSector
|
|||
}
|
||||
|
||||
// this is in too many places
|
||||
// ---------------------------------------------------------------------------------//
|
||||
protected DiskAddress getValidAddress (byte[] buffer, int offset)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
if (disk.isValidAddress (buffer[offset], buffer[offset + 1]))
|
||||
return disk.getDiskAddress (buffer[offset], buffer[offset + 1]);
|
||||
return null;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public String createText ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
DiskAddress da = disk.getDiskAddress (buffer[1], buffer[2]);
|
||||
String msg = da.matches (diskAddress) ? " (circular reference)" : "";
|
||||
|
|
|
@ -6,7 +6,9 @@ import com.bytezone.diskbrowser.disk.DiskAddress;
|
|||
import com.bytezone.diskbrowser.utilities.HexFormatter;
|
||||
import com.bytezone.diskbrowser.utilities.Utility;
|
||||
|
||||
// -----------------------------------------------------------------------------------//
|
||||
class DosVTOCSector extends AbstractSector
|
||||
// -----------------------------------------------------------------------------------//
|
||||
{
|
||||
DosDisk parentDisk;
|
||||
int volume;
|
||||
|
@ -20,8 +22,9 @@ class DosVTOCSector extends AbstractSector
|
|||
int maxSectors;
|
||||
int maxTracks;
|
||||
|
||||
public DosVTOCSector (DosDisk parentDisk, Disk disk, byte[] buffer,
|
||||
DiskAddress diskAddress)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
DosVTOCSector (DosDisk parentDisk, Disk disk, byte[] buffer, DiskAddress diskAddress)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
super (disk, buffer, diskAddress);
|
||||
|
||||
|
@ -37,13 +40,17 @@ class DosVTOCSector extends AbstractSector
|
|||
flagSectors2 ();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public String createText ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
return dosVersion <= 3 ? createDosText () : createDos4Text ();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private String createDos4Text ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
StringBuilder text = getHeader ("DOS 4 VTOC Sector");
|
||||
addText (text, buffer, 0, 1, "Not used");
|
||||
|
@ -99,7 +106,9 @@ class DosVTOCSector extends AbstractSector
|
|||
return text.toString ();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private String createDosText ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
StringBuilder text = getHeader ("VTOC Sector");
|
||||
addText (text, buffer, 0, 1, "Not used");
|
||||
|
@ -172,7 +181,9 @@ class DosVTOCSector extends AbstractSector
|
|||
// return text.toString ();
|
||||
// }
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private String getBitmap (byte[] buffer, int offset)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
StringBuilder text = new StringBuilder ();
|
||||
int value = HexFormatter.getLongBigEndian (buffer, offset);
|
||||
|
@ -187,7 +198,9 @@ class DosVTOCSector extends AbstractSector
|
|||
return text.reverse ().toString ();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private void flagSectors2 ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
int firstSector = 0x38;
|
||||
int max = maxTracks * 4 + firstSector;
|
||||
|
@ -252,7 +265,9 @@ class DosVTOCSector extends AbstractSector
|
|||
// }
|
||||
|
||||
// duplicate of DosCatalogSector.getName()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private String getName (byte[] buffer, int offset)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
StringBuilder text = new StringBuilder ();
|
||||
int max = 24;
|
||||
|
@ -275,8 +290,10 @@ class DosVTOCSector extends AbstractSector
|
|||
return text.toString ();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public String toString ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
StringBuffer text = new StringBuffer ();
|
||||
text.append ("DOS version : 3." + dosVersion);
|
||||
|
|
Loading…
Reference in New Issue
Block a user