|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmce.sim.AbstractHardware
jmce.sim.AbstractPeripheral
jmce.sim.disk.AbstractDisk
jmce.sim.disk.MemoryDisk
jmce.sim.disk.DirDiskCPM
public class DirDiskCPM
Directory disk in CP/M format.
This class implements a special disk mapped to one directory and created in memory on the fly.
Files on the root directory are mapped to user 0 other users 1 ... 15 are mapped in sub directories name with the user name. For example if the root directory is disks the file WS.COM for the user 0 will be read/write from disks/WS.COM and for the user 1 disks/1/WS.COM
When the simulator is stopped if the property @see #setRO is set to false the file are written back in the directory.
If a special file name BOOTLOADER.BIN is present in the directory it will be written in the reserved track.
File attribute.
File attribute (ReadOnly,Global and Archive) are stored in the local file system in a file name .NAME and contain the letter R for read only, G for global and A for archive. So if the file WS.COM must be read only in the local file system must exist a file named .WS.COM with the LETTER R in the first line.
Field Summary |
---|
Fields inherited from class jmce.sim.disk.AbstractDisk |
---|
buffer, head, mounted, numHead, numSector, numTrack, readOnly, sector, sectorSize, track |
Fields inherited from class jmce.sim.AbstractPeripheral |
---|
cpu |
Fields inherited from interface jmce.sim.Disk |
---|
ERROR, ERROR_SEEK, ERROR_WRITE_PROTECT |
Constructor Summary | |
---|---|
DirDiskCPM()
|
Method Summary | |
---|---|
void |
destroy()
Destroy the device. |
java.lang.String |
getDirectory()
|
DPB |
getDPB()
Return the current DPB. |
boolean |
getVolatile()
|
void |
init(Hardware parent)
During the init process the disk must be mounted because the mount use disk access and the automatic mount occours when the emulated operating system acces the disk and this can cause race condition. |
boolean |
mount()
Mount the disk. |
void |
mountDir(java.lang.String s,
int u)
Mount one single directory |
void |
setDirectory(java.lang.String s)
|
void |
setDPB(DPB dpb)
Set the DPB |
void |
setVolatile(boolean mode)
|
java.lang.String |
toString()
|
Methods inherited from class jmce.sim.disk.MemoryDisk |
---|
read, write |
Methods inherited from class jmce.sim.disk.AbstractDisk |
---|
dismount, format, getBuffer, getDiskSize, getDiskSizeString, getHead, getNumHead, getNumSector, getNumTrack, getReadOnly, getSector, getSectorSize, getTrack, isMounted, read, read, setHead, setMounted, setNumHead, setNumSector, setNumTrack, setReadOnly, setSector, setSectorSize, setTrack, write, write |
Methods inherited from class jmce.sim.AbstractPeripheral |
---|
idle, registerCPU, setIdle, setLive |
Methods inherited from class jmce.sim.AbstractHardware |
---|
addHardware, createFrame, getHardware, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareForName, getHardwareInstances, getHardwareTree, getName, getParent, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jmce.sim.Disk |
---|
dismount, format, getBuffer, getHead, getNumHead, getNumSector, getNumTrack, getReadOnly, getSector, getSectorSize, getTrack, isMounted, read, setHead, setNumHead, setNumSector, setNumTrack, setReadOnly, setSector, setSectorSize, setTrack, write |
Methods inherited from interface jmce.sim.Peripheral |
---|
idle, registerCPU |
Methods inherited from interface jmce.sim.Hardware |
---|
addHardware, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareInstances, getHardwareTree, getName, getParent, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName |
Constructor Detail |
---|
public DirDiskCPM()
Method Detail |
---|
public void setDPB(DPB dpb)
DiskCPM
setDPB
in interface DiskCPM
dpb
- - New dpb for this disk.DPB
public void setDirectory(java.lang.String s)
public DPB getDPB()
DiskCPM
getDPB
in interface DiskCPM
DPB
public java.lang.String getDirectory()
public boolean getVolatile()
public void setVolatile(boolean mode)
public void init(Hardware parent) throws SIMException
init
in interface Hardware
init
in class AbstractHardware
parent
- Parent of this hardware.
SIMException
public void destroy() throws SIMException
Hardware
destroy
in interface Hardware
destroy
in class AbstractHardware
SIMException
public void mountDir(java.lang.String s, int u) throws java.lang.Exception
java.lang.Exception
public boolean mount() throws SIMException
Disk
mount
in interface Disk
mount
in class MemoryDisk
SIMException
public java.lang.String toString()
toString
in class MemoryDisk
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |