This commit is contained in:
Denis Molony 2019-06-02 20:46:51 +10:00
parent 76125f9a4e
commit ff8b66e0fb
4 changed files with 46 additions and 36 deletions

View File

@ -39,6 +39,8 @@ public class OriginalHiResImage extends HiResImage
// https://github.com/Michaelangel007/apple2_hgr_font_tutorial // https://github.com/Michaelangel007/apple2_hgr_font_tutorial
// hgr[ y ] = 0x2000 + (y/64)*0x28 + (y%8)*0x400 + ((y/8)&7)*0x80; // hgr[ y ] = 0x2000 + (y/64)*0x28 + (y%8)*0x400 + ((y/8)&7)*0x80;
// or... Y = aabbbccc
// address = BASE + aa * 0x28 + bb * 0x80 + ccc * 0x0400 + X
@Override @Override
protected void createMonochromeImage () protected void createMonochromeImage ()

View File

@ -93,9 +93,10 @@ public class InfocomDisk extends AbstractFormattedDisk
sectorTypes[48] = headerSector; sectorTypes[48] = headerSector;
setSectorTypes (header.abbreviationsTable, header.objectTableOffset, abbreviationsSector, setSectorTypes (header.abbreviationsTable, header.objectTableOffset,
abbreviationsNode); abbreviationsSector, abbreviationsNode);
setSectorTypes (header.objectTableOffset, header.globalsOffset, objectsSector, objectNode); setSectorTypes (header.objectTableOffset, header.globalsOffset, objectsSector,
objectNode);
setSectorTypes (header.globalsOffset, header.staticMemory, globalsSector, setSectorTypes (header.globalsOffset, header.staticMemory, globalsSector,
globalsNode); globalsNode);
setSectorTypes (header.staticMemory, header.dictionaryOffset, grammarSector, setSectorTypes (header.staticMemory, header.dictionaryOffset, grammarSector,
@ -232,7 +233,7 @@ public class InfocomDisk extends AbstractFormattedDisk
int abbreviationsTable = HexFormatter.intValue (buffer[25], buffer[24]); int abbreviationsTable = HexFormatter.intValue (buffer[25], buffer[24]);
int fileLength = HexFormatter.intValue (buffer[27], buffer[26]); int fileLength = HexFormatter.intValue (buffer[27], buffer[26]);
if (false) if (true)
{ {
System.out.printf ("Version %,6d%n", version); System.out.printf ("Version %,6d%n", version);
System.out.printf ("Abbreviations %,6d%n", abbreviationsTable); System.out.printf ("Abbreviations %,6d%n", abbreviationsTable);
@ -247,8 +248,8 @@ public class InfocomDisk extends AbstractFormattedDisk
if (abbreviationsTable >= objectTable) if (abbreviationsTable >= objectTable)
return false; return false;
if (objectTable >= globals) // if (objectTable >= globals)
return false; // return false;
if (globals >= staticMemory) if (globals >= staticMemory)
return false; return false;
if (staticMemory >= dictionary) if (staticMemory >= dictionary)

View File

@ -361,6 +361,10 @@ class FileEntry extends CatalogEntry implements ProdosConstants
} }
break; break;
case FILE_TYPE_FNT:
file = new FontFile (name, exactBuffer);
break;
case FILE_TYPE_FONT: case FILE_TYPE_FONT:
file = new QuickDrawFont (name, exactBuffer, fileType, auxType); file = new QuickDrawFont (name, exactBuffer, fileType, auxType);
break; break;
@ -423,7 +427,7 @@ class FileEntry extends CatalogEntry implements ProdosConstants
private DataSource getRandomAccessTextFile () private DataSource getRandomAccessTextFile ()
{ {
// Text files with aux (reclen) > 0 are random access, possibly with // Text files with aux (reclen) > 0 are random access, possibly with
// non-contiguous records, so they need to be handled differently // non-contiguous records, so they need to be handled differently
switch (storageType) switch (storageType)

View File

@ -2,8 +2,11 @@ package com.bytezone.diskbrowser.prodos;
public interface ProdosConstants public interface ProdosConstants
{ {
int FILE_TYPE_PCD = 0x02;
int FILE_TYPE_TEXT = 0x04; int FILE_TYPE_TEXT = 0x04;
int FILE_TYPE_PDA = 0x05;
int FILE_TYPE_BINARY = 0x06; int FILE_TYPE_BINARY = 0x06;
int FILE_TYPE_FNT = 0x07;
int FILE_TYPE_FOT = 0x08; // was Apple /// FotoFile int FILE_TYPE_FOT = 0x08; // was Apple /// FotoFile
int FILE_TYPE_DIRECTORY = 0x0F; int FILE_TYPE_DIRECTORY = 0x0F;
int FILE_TYPE_ADB = 0x19; int FILE_TYPE_ADB = 0x19;
@ -87,7 +90,7 @@ public interface ProdosConstants
} }
/* http://www.kreativekorp.com/miscpages/a2info/filetypes.shtml /* http://www.kreativekorp.com/miscpages/a2info/filetypes.shtml
* *
* $00 UNK Unknown * $00 UNK Unknown
* $01 BAD Bad Block File * $01 BAD Bad Block File
* $02 PCD Pascal Code * $02 PCD Pascal Code
@ -217,33 +220,33 @@ public interface ProdosConstants
/* /*
* https://groups.google.com/forum/#!topic/comp.sys.apple2/waoYCIbkJKs * https://groups.google.com/forum/#!topic/comp.sys.apple2/waoYCIbkJKs
* *
* There are a number of disk utilities available that store images of disks that * There are a number of disk utilities available that store images of disks that
* utilize file systems that are not ProDOS, at the end of a ProDOS volume. * utilize file systems that are not ProDOS, at the end of a ProDOS volume.
* There's DOS Master, by Glen Bredon, that stores images of DOS 3.3 disks at the * There's DOS Master, by Glen Bredon, that stores images of DOS 3.3 disks at the
* end of a ProDOS volume. Similarly, Pro/Part, by Steven Hirsch, stores images * end of a ProDOS volume. Similarly, Pro/Part, by Steven Hirsch, stores images
* of CP/M volumes. Also, there's Pascal Partition Manager (PPM) that stores * of CP/M volumes. Also, there's Pascal Partition Manager (PPM) that stores
* images of UCSD Pascal volumes. I've decided to refer to the area used to store * images of UCSD Pascal volumes. I've decided to refer to the area used to store
* volume images, by all three of these systems, as a Foreign Volume Area or FVA. * volume images, by all three of these systems, as a Foreign Volume Area or FVA.
* All three of these systems modify the Block Allocation Map of a ProDOS volume * All three of these systems modify the Block Allocation Map of a ProDOS volume
* to keep ProDOS from assigning blocks used by FVAs for use by files being * to keep ProDOS from assigning blocks used by FVAs for use by files being
* written by ProDOS. Pascal Partition Manager is different from the other two * written by ProDOS. Pascal Partition Manager is different from the other two
* in that it has a file type ($EF) and file kind (4) assigned to it by Apple. * in that it has a file type ($EF) and file kind (4) assigned to it by Apple.
* A directory listing of a ProODS volume containing an FVA managed by PPM will * A directory listing of a ProODS volume containing an FVA managed by PPM will
* show a file name of "PASCAL.AREA". A directory listing of a ProDOS volume * show a file name of "PASCAL.AREA". A directory listing of a ProDOS volume
* containing an FVA managed by DOS Master or Pro/Part will show absolutely nothing. * containing an FVA managed by DOS Master or Pro/Part will show absolutely nothing.
* Running a popular utility named "MR.FIXIT", also by Glen Bredon, against a * Running a popular utility named "MR.FIXIT", also by Glen Bredon, against a
* ProDOS volume containing an FVA will report an error. Specifically, "MR.FIXIT" * ProDOS volume containing an FVA will report an error. Specifically, "MR.FIXIT"
* will complain that all the blocks used by an FVA as allocated but not in use. * will complain that all the blocks used by an FVA as allocated but not in use.
* To solve this problem for Pro/Part I wrote a Foreign Volume Area utility * To solve this problem for Pro/Part I wrote a Foreign Volume Area utility
* program that generates a directory entry for the Pro/Part area. That entry has * program that generates a directory entry for the Pro/Part area. That entry has
* file kind 4, file type $EF, file name "PROPART.AREA" and an auxiliary file * file kind 4, file type $EF, file name "PROPART.AREA" and an auxiliary file
* type $4853 (Steven Hirsch's initials). Today I realized that it's likely that * type $4853 (Steven Hirsch's initials). Today I realized that it's likely that
* the same thing could be done for DOS Master. Study of the source code for * the same thing could be done for DOS Master. Study of the source code for
* DOS Master will reveal it that's true. If it is, I propose that "DOS33.AREA" * DOS Master will reveal it that's true. If it is, I propose that "DOS33.AREA"
* be used as the file name and $4247 as the auxiliary type (Glen Bredon's initials). * be used as the file name and $4247 as the auxiliary type (Glen Bredon's initials).
* As I compose the text of this message I realize that another solution is to * As I compose the text of this message I realize that another solution is to
* modify "MR.FIXIT" to be aware of FVAs. But doing that would not allow someone * modify "MR.FIXIT" to be aware of FVAs. But doing that would not allow someone
* doing a directory listing of a ProDOS volume containing an FVA to be aware * doing a directory listing of a ProDOS volume containing an FVA to be aware
* that the FVA exists. * that the FVA exists.
*/ */