This commit is contained in:
Denis Molony 2019-03-25 14:35:37 +11:00
parent 973a1fab96
commit af9786fb42
2 changed files with 16 additions and 5 deletions

View File

@ -147,6 +147,8 @@ public class AppleDisk implements Disk
{
System.out.println ("Not a 2mg file");
this.blocks = (int) file.length () / 4096 * 8; // reduce blocks to a multiple of 8
tracks = blocks / 8; // change parameter!
sectors = 8; // change parameter!
this.sectorSize = 512;
this.trackSize = sectors * sectorSize;
}
@ -180,7 +182,16 @@ public class AppleDisk implements Disk
this.tracks = tracks;
this.sectors = sectors;
diskBuffer = new byte[tracks * sectors * sectorSize];
if (debug)
{
System.out.printf ("Track size : %d%n", trackSize);
System.out.printf ("Sector size : %d%n", sectorSize);
System.out.printf ("Tracks : %d%n", tracks);
System.out.printf ("Sectors : %d%n", sectors);
System.out.printf ("Blocks : %d%n", blocks);
}
diskBuffer = new byte[blocks * sectorSize];
hasData = new boolean[blocks];
if (debug)

View File

@ -129,10 +129,10 @@ class DosVTOCSector extends AbstractSector
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 if (i <= 64 && !bootSectorEmpty)
// extra = "(reserved for DOS)";
// else if (i == 124)
// extra = "(VTOC and Catalog)";
addText (text, buffer, i, 4, String.format ("Track %02X %s %s", (i - 56) / 4,
getBitmap (buffer[i], buffer[i + 1]), extra));
}