Package drivers.nxfa
Class SfaDriver
java.lang.Object
drivers.nxfa.XfaDriver
drivers.nxfa.SfaDriver
- All Implemented Interfaces:
DeviceDriver
The SMSQE File Access device driver class that allows SMSQE access to SMSQE type files (with header) on a native drive.
It implements 8 "drives" (SFA1_ to SFA8_) which point to native dirs.
The driver maintains header files for SMSQE files, which are saved with the files.
The driver opens XFAFiles,one for each SMSQE file. Each XfaFile gets a unique number (integer 0 - 0xffff) which gets put into the SMSQE channel definition block (offset 0x1E). For each drive, the driver maintains a HashMap ‹Integer,NfaFile› so that it can find the NfaFile with the integer.
- See Also:
-
Field Summary
Fields inherited from class drivers.nxfa.XfaDriver
cpu, deviceID, filenameChange, fileNumber, nativeDir, tempHeader, usage, useXTcc
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]
Gets the names of the native qxl.win type files.static int
readHeaderOK
(File f, MC68000Cpu cpu, ByteBuffer tempHeader) Tries to get a header for an SFA file and possibly copy it somewhere to memory.Methods inherited from class drivers.nxfa.XfaDriver
closeAllFiles, closeFile, convertFilename, convertFilename2, deleteFile, deviceIsDir, formatMedium, getDeviceID, getName, getNames, getUsage, makeName, openFile, setCpu, setDirname, setFilenameChange, setNames, setUsage, trap3OK, writeBack
-
Constructor Details
-
SfaDriver
public SfaDriver(boolean useXTcc) Creates the device driver.- Parameters:
useXTcc
- if True, executable files are saved as XTcc files
-
-
Method Details
-
readHeaderOK
Tries to get a header for an SFA file and possibly copy it somewhere to memory.- Parameters:
f
- the file in question.cpu
- the smsqmulator.cpu.MC68000Cpu used.tempHeader
- a ByteBuffer to read the header to from the file. If this isnull
or of insufficent size, one will be created on the fly.- Returns:
- an
int
which can have the following values:- 0 = this file is not an SFA file
- 1 = this file is an SFA file
- -1 = this file is a directory
-
getNativeNames
Gets the names of the native qxl.win type files.- Returns:
-