This commit is contained in:
Denis Molony 2019-11-17 20:04:30 +10:00
parent ad8af22186
commit 5c95dfe168
5 changed files with 20 additions and 16 deletions

View File

@ -201,20 +201,6 @@ public class DiskFactory
return disk;
}
if (file.length () == 819200) // 800K 3.5"
{
if (debug)
System.out.println ("UniDos ?");
// 2 x 400k disk images
AppleDisk appleDisk1 = new AppleDisk (file, 50, 32);
AppleDisk appleDisk2 = new AppleDisk (file, 50, 32, 409600);
disk = checkUnidos (appleDisk1, 1);
disk2 = checkUnidos (appleDisk2, 2);
assert disk != disk2;
if (disk != null && disk2 != null)
return new DualDosDisk (disk, disk2);
}
if (debug)
System.out.println (" Checking po or dsk hard drive: " + file.length ());
@ -226,6 +212,19 @@ public class DiskFactory
return disk;
}
if (file.length () == 819200) // 800K 3.5"
{
if (debug)
System.out.println ("UniDos ?");
// 2 x 400k disk images
AppleDisk appleDisk1 = new AppleDisk (file, 50, 32);
AppleDisk appleDisk2 = new AppleDisk (file, 50, 32, (int) (file.length () / 2));
disk = checkUnidos (appleDisk1, 1);
disk2 = checkUnidos (appleDisk2, 2);
if (disk != null && disk2 != null)
return new DualDosDisk (disk, disk2);
}
if (debug)
System.out.println (" Creating a data disk from bad length");

View File

@ -136,6 +136,8 @@ public class DualDosDisk implements FormattedDisk
currentDisk = 0;
else if (disks[1] == fd)
currentDisk = 1;
else
System.out.println ("Disk not found: " + fd);
}
// ---------------------------------------------------------------------------------//

View File

@ -128,7 +128,7 @@ class AppleDiskTab extends AbstractTab
{
DefaultMutableTreeNode rootNode = getRootNode ();
// check for multi-volume disk
// check for multi-volume disk (only search the current branch)
FormattedDisk fd = ((AppleFileSource) rootNode.getUserObject ()).getFormattedDisk ();
if (fd instanceof DualDosDisk)
{

View File

@ -250,7 +250,7 @@ class DataPanel extends JTabbedPane
switch (getSelectedIndex ())
{
case 0: // Formated/Image
case 0: // Formatted/Image
try
{
setText (formattedText, dataSource.getText ());

View File

@ -208,6 +208,8 @@ public class TreeBuilder
File[] files = file.listFiles ();
if (files != null)
{
Arrays.sort (files, fileComparator);
for (File f : files)
{
if (f.isHidden ())
@ -222,6 +224,7 @@ public class TreeBuilder
f.isDirectory () ? "D" : " ", name, sdf.format (d).replace (".", ""), size,
type));
}
}
if (text.length () > 0)
text.deleteCharAt (text.length () - 1);