This commit is contained in:
Denis Molony 2016-02-26 14:51:15 +11:00
parent 465be7c41f
commit b5c3beda84
2 changed files with 10 additions and 0 deletions

View File

@ -21,13 +21,19 @@ public class CPMCatalogSector extends AbstractSector
{
if (buffer[i] == (byte) 0xE5)
break;
addText (text, buffer, i, 1, "User number");
addText (text, buffer, i + 1, 4, "File name : " + new String (buffer, i + 1, 8));
addText (text, buffer, i + 5, 4, "");
addText (text, buffer, i + 9, 3, "File type : " + new String (buffer, i + 9, 3));
addText (text, buffer, i + 12, 1, "Extent counter LO");
addText (text, buffer, i + 13, 1, "Reserved");
addText (text, buffer, i + 14, 1, "Extent counter HI");
addText (text, buffer, i + 15, 1, "Record count");
for (int j = 0; j < 4; j++)
addText (text, buffer, i + 16 + j * 4, 4, "");
text.append ("\n");
}

View File

@ -98,11 +98,15 @@ public class DirectoryEntry implements AppleFileSource
int blocks = ((rc & 0xF0) >> 3) + (((rc & 0x0F) + 7) / 8);
String bytes = HexFormatter.getHexString (blockList, 0, 16);
bytes = bytes.replaceAll ("00", " ");
String text = String.format ("%3d %-8s %-3s %02X %02X %02X %02X %s",
userNumber, name, type, ex, s2, s1, rc, bytes);
for (DirectoryEntry entry : entries)
text = text + "\n" + entry.line ();
if (ex != 0)
text = " " + text.substring (20);
return text;
}