jmce.yaze
Class FDC
java.lang.Object
jmce.sim.AbstractHardware
jmce.sim.AbstractPeripheral
jmce.sim.disk.AbstractDiskController
jmce.yaze.FDC
- All Implemented Interfaces:
- DiskController, Hardware, MemoryReadListener, MemoryWriteListener, Peripheral, YazeConstants
public class FDC
- extends AbstractDiskController
- implements YazeConstants, MemoryReadListener, MemoryWriteListener
Yaze Disk controller.
The interface to the FDC is very simple the register file must be
filled with the desired sector number and
the dma with the desired memory address
then a command can be written in the register FDC_CMD> the
status of the operation now is available in the FDC_STATUS.
The status will be 0 if the operation is performed correctly or
contains the error number.
With the current BIOS the following disk are supported :
- 0 - IBM 3740
- 1 - IBM 3740
- 2 - Yaze HD 2 Mb
- 3 - Yaze HD 2 Mb
- Version:
- 1.01
- Author:
- Mario Viara
- See Also:
YazeConstants
Fields inherited from interface jmce.yaze.YazeConstants |
BDOS_LENGTH, CCP_LENGTH, CONDAT, CONSTA, CPM_LENGTH, FDC_CMD, FDC_CMD_READ, FDC_CMD_WRITE, FDC_DMA_HI, FDC_DMA_LOW, FDC_DRIVE, FDC_SECTOR, FDC_STATUS, FDC_STATUS_ERROR, FDC_STATUS_SUCCESS, FDC_TRACK_HI, FDC_TRACK_LOW, MMU_PAGE_FRAME, MMU_PAGE_HI, MMU_PAGE_LOW, TERMINATE |
Constructor Summary |
FDC()
|
Method Summary |
int |
readMemory(Memory m,
int address,
int value)
Called when the memory is readed. |
void |
registerCPU(CPU cpu)
Register a parent CPU for future reference. |
protected void |
setDma(int dma)
|
java.lang.String |
toString()
|
void |
writeMemory(Memory m,
int address,
int value,
int oldValue)
Called when a memory write event occours. |
Methods inherited from class jmce.sim.AbstractHardware |
addHardware, createFrame, destroy, getHardware, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareForName, getHardwareInstances, getHardwareTree, getName, getParent, init, 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.Hardware |
addHardware, destroy, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareInstances, getHardwareTree, getName, getParent, init, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName |
commandResult
protected int commandResult
FDC
public FDC()
registerCPU
public void registerCPU(CPU cpu)
throws SIMException
- Description copied from interface:
Peripheral
- Register a parent CPU for future reference.
- Specified by:
registerCPU
in interface Peripheral
- Overrides:
registerCPU
in class AbstractPeripheral
- Throws:
SIMException
setDma
protected void setDma(int dma)
readMemory
public int readMemory(Memory m,
int address,
int value)
throws SIMException
- Description copied from interface:
MemoryReadListener
- Called when the memory is readed.
This is method is called to notify a read at the specified
memory loction.
- Specified by:
readMemory
in interface MemoryReadListener
- Parameters:
m
- - Memory readed.address
- - Address where the operation occours.value
- - Value readed from the phisical memory or
from previus installed listener.
- Returns:
- Value readed from the memory.
- Throws:
SIMException
writeMemory
public void writeMemory(Memory m,
int address,
int value,
int oldValue)
throws SIMException
- Description copied from interface:
MemoryWriteListener
- Called when a memory write event occours.
This method is called when a memory write operation occours
in the specified memory.
- Specified by:
writeMemory
in interface MemoryWriteListener
- Parameters:
m
- - Memory involved in the write operation.address
- - Address written.value
- - Value written.oldValue
- - Old value of this memory location.
- Throws:
SIMException
toString
public java.lang.String toString()
- Overrides:
toString
in class AbstractHardware