mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2025-01-05 11:29:43 +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)
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -55,15 +55,16 @@ class DosVTOCSector extends AbstractSector
|
||||
addTextAndDecimal (text, buffer, 53, 1, "Maximum sectors");
|
||||
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;
|
||||
if (i <= 64)
|
||||
extra = "(DOS)";
|
||||
String extra = "";
|
||||
if (i == 56 && bootSectorEmpty)
|
||||
extra = "(unusable)";
|
||||
else if (i <= 64 && !bootSectorEmpty)
|
||||
extra = "(reserved for DOS)";
|
||||
else if (i == 124)
|
||||
extra = "(VTOC and Catalog)";
|
||||
else
|
||||
extra = "";
|
||||
addText (text, buffer, i, 4, String.format ("Track %02X %s %s", (i - 56) / 4,
|
||||
getBitmap (buffer[i], buffer[i + 1]), extra));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user