mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2025-02-07 11:30:39 +00:00
more DOS 4.1 testing
This commit is contained in:
parent
1b5f3f95a9
commit
99bbd69878
@ -40,7 +40,11 @@ public class AppleDiskAddress implements DiskAddress
|
||||
@Override
|
||||
public boolean matches (DiskAddress that)
|
||||
{
|
||||
return that != null && this.block == that.getBlock ();
|
||||
if (that == null)
|
||||
return false;
|
||||
// if (zeroFlag != ((AppleDiskAddress) that).zeroFlag)
|
||||
// return false;
|
||||
return this.block == that.getBlock ();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -471,6 +471,7 @@ public class DiskFactory
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace ();
|
||||
}
|
||||
if (debug)
|
||||
System.out.println (" not a DOS disk");
|
||||
|
@ -64,7 +64,9 @@ abstract class AbstractCatalogEntry implements AppleFileSource
|
||||
System.out.println ("Unknown file type : " + type);
|
||||
|
||||
name = getName ("", entryBuffer);
|
||||
lastModified = Utility.getDateTime (entryBuffer, 0x1B);
|
||||
if (dosDisk.getVersion () >= 0x41)
|
||||
lastModified = Utility.getDateTime (entryBuffer, 0x1B);
|
||||
|
||||
// CATALOG command only formats the LO byte - see Beneath Apple DOS pp4-6
|
||||
String base = String.format ("%s%s %03d ", (locked) ? "*" : " ", getFileType (),
|
||||
(entryBuffer[33] & 0xFF));
|
||||
|
@ -86,7 +86,8 @@ class CatalogEntry extends AbstractCatalogEntry
|
||||
break;
|
||||
}
|
||||
|
||||
if (thisDA.matches (da))
|
||||
if (thisDA.matches (da) && ((AppleDiskAddress) thisDA)
|
||||
.zeroFlag () == ((AppleDiskAddress) da).zeroFlag ())
|
||||
{
|
||||
System.out.printf ("Next T/S list in sector %s points to itself%n", thisDA);
|
||||
break;
|
||||
@ -133,10 +134,10 @@ class CatalogEntry extends AbstractCatalogEntry
|
||||
String lengthText = length == 0 ? "" : String.format ("$%4X %,6d", length, length);
|
||||
String message = "";
|
||||
String lockedFlag = (locked) ? "*" : " ";
|
||||
|
||||
if (dosDisk.dosVTOCSector.dosVersion >= 0x41)
|
||||
{
|
||||
message = lastModified.toString ().replace ('T', ' ');
|
||||
}
|
||||
|
||||
if (reportedSize != actualSize)
|
||||
message += "Bad size (" + reportedSize + ") ";
|
||||
if (dataSectors.size () == 0)
|
||||
@ -148,6 +149,7 @@ class CatalogEntry extends AbstractCatalogEntry
|
||||
tsSectors.size (), (dataSectors.size () - textFileGaps), message.trim ());
|
||||
if (actualSize == 0)
|
||||
text = text.substring (0, 50);
|
||||
|
||||
return text;
|
||||
}
|
||||
}
|
@ -72,7 +72,7 @@ public class Utility
|
||||
LocalDateTime.of (val[3] + 2000, val[5], val[4], val[2], val[1], val[0]);
|
||||
return date;
|
||||
}
|
||||
catch (DateTimeException e)
|
||||
catch (DateTimeException | NumberFormatException e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user