mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2025-02-27 03:29:26 +00:00
tidying
This commit is contained in:
parent
3523d70733
commit
d9950b4f60
@ -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 (suffix.equals ("v2d"))
|
||||||
{
|
{
|
||||||
if (debug)
|
|
||||||
System.out.println (" ** v2d **");
|
|
||||||
|
|
||||||
V2dDisk v2dDisk = new V2dDisk (file);
|
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)
|
if (disk == null)
|
||||||
disk = checkProdos (new AppleDisk (v2dDisk, 35, 8));
|
disk = checkProdos (new AppleDisk (v2dDisk, 35, 8));
|
||||||
|
if (disk == null)
|
||||||
|
disk = new DataDisk (appleDisk256);
|
||||||
return disk;
|
return disk;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,18 +262,6 @@ public class DiskFactory
|
|||||||
return null;
|
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 ();
|
long length = file.length ();
|
||||||
|
|
||||||
if (length == 116480) // 13 sector disk
|
if (length == 116480) // 13 sector disk
|
||||||
|
@ -58,6 +58,7 @@ public class ProdosDisk extends AbstractFormattedDisk
|
|||||||
DefaultMutableTreeNode root = getCatalogTreeRoot ();
|
DefaultMutableTreeNode root = getCatalogTreeRoot ();
|
||||||
DefaultMutableTreeNode volumeNode = new DefaultMutableTreeNode ("empty volume node");
|
DefaultMutableTreeNode volumeNode = new DefaultMutableTreeNode ("empty volume node");
|
||||||
root.add (volumeNode);
|
root.add (volumeNode);
|
||||||
|
|
||||||
processDirectoryBlock (2, null, volumeNode);
|
processDirectoryBlock (2, null, volumeNode);
|
||||||
makeNodeVisible (volumeNode.getFirstLeaf ());
|
makeNodeVisible (volumeNode.getFirstLeaf ());
|
||||||
|
|
||||||
@ -93,6 +94,8 @@ public class ProdosDisk extends AbstractFormattedDisk
|
|||||||
if (storageType == 0) // deleted or unused
|
if (storageType == 0) // deleted or unused
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
System.out.println ("here");
|
||||||
|
|
||||||
byte[] entry = new byte[ProdosConstants.ENTRY_SIZE];
|
byte[] entry = new byte[ProdosConstants.ENTRY_SIZE];
|
||||||
System.arraycopy (sectorBuffer, ptr, entry, 0, 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
|
// check entry length and entries per block
|
||||||
if (buffer[0x23] != 0x27 || buffer[0x24] != 0x0D)
|
if (buffer[0x23] != 0x27 || buffer[0x24] != 0x0D)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int bitMapBlock = HexFormatter.intValue (buffer[0x27], buffer[0x28]);
|
int bitMapBlock = HexFormatter.intValue (buffer[0x27], buffer[0x28]);
|
||||||
if (bitMapBlock != 6)
|
if (bitMapBlock != 6)
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user