This commit is contained in:
Denis Molony 2020-05-22 16:13:45 +10:00
parent 9f9580f4ca
commit 475716433d
2 changed files with 12 additions and 11 deletions

View File

@ -248,11 +248,11 @@ public class DosDisk extends AbstractFormattedDisk
}
// ---------------------------------------------------------------------------------//
public int getVolumeNo ()
// ---------------------------------------------------------------------------------//
{
return volumeNo;
}
// private int getVolumeNo ()
// // ---------------------------------------------------------------------------------//
// {
// return volumeNo;
// }
// ---------------------------------------------------------------------------------//
@Override
@ -514,7 +514,9 @@ public class DosDisk extends AbstractFormattedDisk
String newLine = String.format ("%n");
String line = "- --- --- ------------------------------ ----- -------------"
+ " -- ---- -------------------" + newLine;
StringBuilder text = new StringBuilder ();
text.append (String.format ("Disk : %s%n%n", getDisplayPath ()));
text.append ("L Typ Len Name Addr"
+ " Length TS Data Comment" + newLine);
@ -535,7 +537,8 @@ public class DosDisk extends AbstractFormattedDisk
freeSectors, usedSectors, (usedSectors + freeSectors)));
String volumeText = volumeNo == 0 ? "" : "Side " + volumeNo + " ";
return new DefaultAppleFileSource (volumeText + "Volume " + dosVTOCSector.volume,
return new DefaultAppleFileSource (volumeText + "DOS Volume " + dosVTOCSector.volume,
text.toString (), this);
}

View File

@ -38,7 +38,7 @@ class DosVTOCSector extends AbstractSector
maxSectors = buffer[53] & 0xFF;
sectorSize = HexFormatter.intValue (buffer[54], buffer[55]);
flagSectors2 ();
flagSectors ();
}
// ---------------------------------------------------------------------------------//
@ -168,7 +168,6 @@ class DosVTOCSector extends AbstractSector
private String getBitmap (byte[] buffer, int offset)
// ---------------------------------------------------------------------------------//
{
StringBuilder text = new StringBuilder ();
int value = HexFormatter.getLongBigEndian (buffer, offset);
String bits = "0000000000000000000000000000000" + Integer.toBinaryString (value);
@ -176,13 +175,12 @@ class DosVTOCSector extends AbstractSector
bits = bits.substring (0, maxSectors);
bits = bits.replace ('0', 'X');
bits = bits.replace ('1', '.');
text.append (bits);
return text.reverse ().toString ();
return new StringBuilder (bits).reverse ().toString ();
}
// ---------------------------------------------------------------------------------//
private void flagSectors2 ()
private void flagSectors ()
// ---------------------------------------------------------------------------------//
{
int firstSector = 0x38;