mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-09-29 07:55:13 +00:00
tidying
This commit is contained in:
parent
918af9a110
commit
5a7383183a
@ -294,7 +294,9 @@ public abstract class AbstractFormattedDisk implements FormattedDisk
|
|||||||
{
|
{
|
||||||
if (block >= sectorTypes.length)
|
if (block >= sectorTypes.length)
|
||||||
System.out.println ("Invalid block number: " + block);
|
System.out.println ("Invalid block number: " + block);
|
||||||
else if (sectorTypes[block] != emptySector)
|
else if (sectorTypes[block] == emptySector)
|
||||||
|
System.out.printf ("Tried to assign %s to empty block %d%n", type.name, block);
|
||||||
|
else
|
||||||
sectorTypes[block] = type;
|
sectorTypes[block] = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,15 +55,16 @@ class DosVTOCSector extends AbstractSector
|
|||||||
addTextAndDecimal (text, buffer, 53, 1, "Maximum sectors");
|
addTextAndDecimal (text, buffer, 53, 1, "Maximum sectors");
|
||||||
addTextAndDecimal (text, buffer, 54, 2, "Bytes per sector");
|
addTextAndDecimal (text, buffer, 54, 2, "Bytes per sector");
|
||||||
|
|
||||||
for (int i = 56; i <= 0xc3; i += 4)
|
boolean bootSectorEmpty = parentDisk.getDisk ().isSectorEmpty (0);
|
||||||
|
for (int i = 56; i <= 0xC3; i += 4)
|
||||||
{
|
{
|
||||||
String extra;
|
String extra = "";
|
||||||
if (i <= 64)
|
if (i == 56 && bootSectorEmpty)
|
||||||
extra = "(DOS)";
|
extra = "(unusable)";
|
||||||
|
else if (i <= 64 && !bootSectorEmpty)
|
||||||
|
extra = "(reserved for DOS)";
|
||||||
else if (i == 124)
|
else if (i == 124)
|
||||||
extra = "(VTOC and Catalog)";
|
extra = "(VTOC and Catalog)";
|
||||||
else
|
|
||||||
extra = "";
|
|
||||||
addText (text, buffer, i, 4, String.format ("Track %02X %s %s", (i - 56) / 4,
|
addText (text, buffer, i, 4, String.format ("Track %02X %s %s", (i - 56) / 4,
|
||||||
getBitmap (buffer[i], buffer[i + 1]), extra));
|
getBitmap (buffer[i], buffer[i + 1]), extra));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user