mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2025-02-08 17:30:40 +00:00
Device Driver
This commit is contained in:
parent
66f0602e23
commit
ec58b667f3
35
src/com/bytezone/diskbrowser/applefile/DeviceDriver.java
Normal file
35
src/com/bytezone/diskbrowser/applefile/DeviceDriver.java
Normal file
@ -0,0 +1,35 @@
|
||||
package com.bytezone.diskbrowser.applefile;
|
||||
|
||||
public class DeviceDriver extends AbstractFile
|
||||
{
|
||||
private final int auxType;
|
||||
private final int classifications;
|
||||
private final int driverClass;
|
||||
private final boolean inactive;
|
||||
|
||||
public DeviceDriver (String name, byte[] buffer, int auxType)
|
||||
{
|
||||
super (name, buffer);
|
||||
this.auxType = auxType;
|
||||
|
||||
classifications = auxType & 0xFF;
|
||||
driverClass = (auxType & 0x7F00) >>> 8;
|
||||
inactive = (auxType & 0x8000) != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText ()
|
||||
{
|
||||
StringBuilder text = new StringBuilder ("Name : " + name + "\n\n");
|
||||
|
||||
text.append ("Apple IIGS Device Driver File\n\n");
|
||||
|
||||
text.append (String.format ("Classifications ... %02X%n", classifications));
|
||||
text.append (String.format ("Driver Class ...... %02X%n", driverClass));
|
||||
text.append (String.format ("Inactive .......... %s%n", inactive ? "True" : "False"));
|
||||
|
||||
text.deleteCharAt (text.length () - 1);
|
||||
|
||||
return text.toString ();
|
||||
}
|
||||
}
|
@ -347,6 +347,9 @@ class FileEntry extends CatalogEntry implements ProdosConstants
|
||||
// new DefaultAppleFile (name, buffer, "S16 Apple IIgs Application Program");
|
||||
file = new AssemblerProgram (name, buffer, auxType);
|
||||
break;
|
||||
case FILE_TYPE_IIGS_DEVICE_DRIVER:
|
||||
file = new DeviceDriver (name, exactBuffer, auxType);
|
||||
break;
|
||||
case FILE_TYPE_ICN:
|
||||
file = new IconFile (name, exactBuffer);
|
||||
break;
|
||||
|
@ -15,6 +15,7 @@ public interface ProdosConstants
|
||||
int FILE_TYPE_IIGS_OBJECT = 0xB1;
|
||||
// int FILE_TYPE_FORKED_FILE = 0xB3; // S16
|
||||
int FILE_TYPE_IIGS_APPLICATION = 0xB3;
|
||||
int FILE_TYPE_IIGS_DEVICE_DRIVER = 0xBB;
|
||||
int FILE_TYPE_GSOS_FILE_SYSTEM_TRANSLATOR = 0xBD;
|
||||
int FILE_TYPE_PNT = 0xC0;
|
||||
int FILE_TYPE_PIC = 0xC1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user