public class MemDriver extends WinDriver implements DeviceDriver
No speed enhancement are to be expected compared with normal QXL.WIN drives operation, since this emulates such a drive in memory. The purpose of this is to have a drive that can be loaded over the Internet (e.g. in an embedded applet).
If SMSQmulator is run locally, the drive can be written back to the disk later.
As usual for SMSQE, the device can have up to 8 drives BUT : each drive is limited to a max of 500 MiB! Bigger drives will be refused.
Constructor and Description |
---|
MemDriver(MC68000Cpu cpu,
Warnings warn)
Creates the driver object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
formatMedium(java.lang.String formatName,
inifile.IniFile inifile)
Formats a medium.
|
boolean |
setNames(java.lang.String[] names,
inifile.IniFile inifile,
boolean forceRemoval,
boolean suppressWarnings)
Sets the names for the native files containing the drives and creates the drive objects.
|
void |
writeBack(int driveNbr)
Writes the drive back to a native file
|
closeAllFiles, closeFile, deleteFile, getDeviceID, getName, getNames, getUsage, openFile, setCpu, setFilenameChange, setUsage, trap3OK
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
closeAllFiles, closeFile, deleteFile, getDeviceID, getName, getNames, getUsage, openFile, setCpu, setFilenameChange, setUsage, trap3OK
public MemDriver(MC68000Cpu cpu, Warnings warn)
cpu
- the cpu to use.warn
- object with warning flags.public boolean formatMedium(java.lang.String formatName, inifile.IniFile inifile)
formatMedium
in interface DeviceDriver
formatMedium
in class WinDriver
formatName
- the name to give to the formatted drive.inifile
- the ".ini" file with initialized values.true
if deviceID corresponded to this device, false
if not.
A format for this device always fails,this drive CANNOT be formatted : error Types.ERR_FMTF
..
public boolean setNames(java.lang.String[] names, inifile.IniFile inifile, boolean forceRemoval, boolean suppressWarnings)
setNames
in interface DeviceDriver
setNames
in class WinDriver
names
- an 8 element string array containing the native names of the container files for the drives.inifile
- the initialization object.forceRemoval
- true if files/drives should removed before being remounted.suppressWarnings
- = true if warnings about absent etc. devices should be suppressed (e.g. in case of reset).true
if this was the device concerned.public void writeBack(int driveNbr)
writeBack
in interface DeviceDriver
writeBack
in class WinDriver
driveNbr
- the drive number (1...8)