display load address

This commit is contained in:
Denis Molony 2017-11-26 17:16:56 +11:00
parent 99805f41d7
commit fd3eab8f08
2 changed files with 7 additions and 3 deletions

View File

@ -19,11 +19,12 @@ public class MerlinSource extends AbstractFile
}
// Source : Dos binary file
public MerlinSource (String name, byte[] buffer)
public MerlinSource (String name, byte[] buffer, int loadAddress)
{
super (name, buffer);
this.eof = 0;
this.recordLength = 0;
this.loadAddress = loadAddress;
}
@Override
@ -38,7 +39,10 @@ public class MerlinSource extends AbstractFile
text.append (String.format ("EOF (aux) : %,8d%n", eof));
}
else
text.append (String.format ("Buffer size : %,8d%n", buffer.length));
{
text.append (String.format ("Buffer size : %04X %<,8d%n", buffer.length));
text.append (String.format ("Load address : %04X %<,8d%n", loadAddress));
}
text.append ("\n");
ptr = 0;

View File

@ -201,7 +201,7 @@ abstract class AbstractCatalogEntry implements AppleFileSource
else if (ShapeTable.isShapeTable (exactBuffer))
appleFile = new ShapeTable (name, exactBuffer);
else if (name.endsWith (".S"))
appleFile = new MerlinSource (name, exactBuffer);
appleFile = new MerlinSource (name, exactBuffer, loadAddress);
else if (HiResImage.isGif (exactBuffer)) // buffer?
appleFile = new OriginalHiResImage (name, exactBuffer, loadAddress);
else if (HiResImage.isPng (exactBuffer)) // buffer?