This commit is contained in:
Denis Molony 2018-08-17 21:46:47 +10:00
parent 60eb17c12d
commit db9f0edb52
7 changed files with 36 additions and 5 deletions

View File

@ -29,7 +29,7 @@ public abstract class HiResImage extends AbstractFile
// $08 FOT <$4000 Apple II Graphics File - ???
// $08 FOT $4000 Packed Hi-Res file - ???
// $08 FOT $4001 Packed Double Hi-Res file - ???
// $08 FOT $8066 Fadden Hi-res
// $08 FOT $8066 Fadden Hi-res - FaddenHiResImage
// * $C0 PNT $0000 Paintworks Packed Super Hi-Res - SHRPictureFile2
// * $C0 PNT $0001 Packed IIGS Super Hi-Res Image - SHRPictureFile2
@ -488,6 +488,8 @@ public abstract class HiResImage extends AbstractFile
public static boolean isAPP (byte[] buffer)
{
if (buffer.length < 4)
return false;
return buffer[0] == (byte) 0xC1 && buffer[1] == (byte) 0xD0
&& buffer[2] == (byte) 0xD0 && buffer[3] == 0;
}

View File

@ -1,5 +1,6 @@
package com.bytezone.diskbrowser.disk;
import java.util.ArrayList;
import java.util.List;
import com.bytezone.diskbrowser.gui.DataSource;
@ -35,7 +36,7 @@ public class DataDisk extends AbstractFormattedDisk
@Override
public List<DiskAddress> getFileSectors (int fileNo)
{
return null;
return new ArrayList<> ();
}
// no files on data disks

View File

@ -0,0 +1,20 @@
package com.bytezone.diskbrowser.disk;
import java.util.ArrayList;
import java.util.List;
public class UnknownDisk extends AbstractFormattedDisk
{
// could arrange for the blocks to appear as a question mark
public UnknownDisk (AppleDisk disk)
{
super (disk);
}
@Override
public List<DiskAddress> getFileSectors (int fileNo)
{
return new ArrayList<> ();
}
}

View File

@ -231,6 +231,7 @@ abstract class AbstractCatalogEntry implements AppleFileSource
byte[] buf = new byte[exactBuffer.length - 4];
System.arraycopy (exactBuffer, 4, buf, 0, buf.length);
appleFile = new BasicProgram (name, buf);
System.out.printf ("Possible basic binary: %s%n", name);
}
else
{

View File

@ -14,6 +14,10 @@ class DiskAddressField
track = decode4and4 (buffer, 2);
sector = decode4and4 (buffer, 4);
checksum = decode4and4 (buffer, 6);
// if (track == 0)
// for (int i = 0; i < 8; i++)
// System.out.printf ("%02X ", buffer[i]);
}
// ---------------------------------------------------------------------------------//

View File

@ -3,8 +3,6 @@ package com.bytezone.diskbrowser.nib;
import java.util.ArrayList;
import java.util.List;
import com.bytezone.diskbrowser.disk.*;
class MC3470
{
private static final int MAX_DATA = 999;
@ -148,6 +146,9 @@ class MC3470
if (dataPtr < 3) // not enough bytes to test
return;
// System.out.printf ("checking %02X %02X %02X%n", dataBuffer[dataPtr - 3],
// dataBuffer[dataPtr - 2], dataBuffer[dataPtr - 1]);
if (match (address16prologue) || match (address16prologueX))
{
diskReader = diskReader16Sector;

View File

@ -356,10 +356,12 @@ class FileEntry extends CatalogEntry implements ProdosConstants
case FILE_TYPE_FOT:
if (auxType == 0x8066) // Fadden
// file = new DefaultAppleFile (name, exactBuffer);
file = new FaddenHiResImage (name, exactBuffer, fileType, auxType, endOfFile);
else
{
System.out.println ("Unwritten FOT: " + name);
file = new DefaultAppleFile (name, exactBuffer);
}
break;
case FILE_TYPE_FONT: