mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-11-29 11:49:29 +00:00
bad 2mg
This commit is contained in:
parent
973a1fab96
commit
af9786fb42
@ -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)
|
||||
|
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user