This commit is contained in:
Denis Molony 2018-07-22 21:31:07 +10:00
parent 3523d70733
commit d9950b4f60
2 changed files with 20 additions and 16 deletions

View File

@ -227,15 +227,27 @@ public class DiskFactory
}
}
if (suffix.equals ("woz"))
{
WozDisk wozDisk = new WozDisk (file);
AppleDisk appleDisk256 = new AppleDisk (wozDisk, 35, 16);
disk = checkDos (appleDisk256);
if (disk == null)
disk = checkProdos (new AppleDisk (wozDisk, 35, 8));
if (disk == null)
disk = new DataDisk (appleDisk256);
return disk;
}
if (suffix.equals ("v2d"))
{
if (debug)
System.out.println (" ** v2d **");
V2dDisk v2dDisk = new V2dDisk (file);
disk = checkDos (new AppleDisk (v2dDisk, 35, 16));
AppleDisk appleDisk256 = new AppleDisk (v2dDisk, 35, 16);
disk = checkDos (appleDisk256);
if (disk == null)
disk = checkProdos (new AppleDisk (v2dDisk, 35, 8));
if (disk == null)
disk = new DataDisk (appleDisk256);
return disk;
}
@ -250,18 +262,6 @@ public class DiskFactory
return null;
}
if (suffix.equals ("woz"))
{
WozDisk wozDisk = new WozDisk (file);
AppleDisk appleDisk256 = new AppleDisk (wozDisk, 35, 16);
disk = checkDos (appleDisk256);
if (disk == null)
disk = checkProdos (new AppleDisk (wozDisk, 35, 8));
if (disk == null)
disk = new DataDisk (appleDisk256);
return disk;
}
long length = file.length ();
if (length == 116480) // 13 sector disk

View File

@ -58,6 +58,7 @@ public class ProdosDisk extends AbstractFormattedDisk
DefaultMutableTreeNode root = getCatalogTreeRoot ();
DefaultMutableTreeNode volumeNode = new DefaultMutableTreeNode ("empty volume node");
root.add (volumeNode);
processDirectoryBlock (2, null, volumeNode);
makeNodeVisible (volumeNode.getFirstLeaf ());
@ -93,6 +94,8 @@ public class ProdosDisk extends AbstractFormattedDisk
if (storageType == 0) // deleted or unused
continue;
System.out.println ("here");
byte[] entry = new byte[ProdosConstants.ENTRY_SIZE];
System.arraycopy (sectorBuffer, ptr, entry, 0, ProdosConstants.ENTRY_SIZE);
@ -191,6 +194,7 @@ public class ProdosDisk extends AbstractFormattedDisk
// check entry length and entries per block
if (buffer[0x23] != 0x27 || buffer[0x24] != 0x0D)
return false;
int bitMapBlock = HexFormatter.intValue (buffer[0x27], buffer[0x28]);
if (bitMapBlock != 6)
return false;