jmce.altair
Class SIMH
java.lang.Object
jmce.sim.AbstractHardware
jmce.sim.AbstractPeripheral
jmce.altair.SIMH
- All Implemented Interfaces:
- SIMHConstants, Hardware, MemoryReadListener, MemoryWriteListener, Peripheral
public class SIMH
- extends AbstractPeripheral
- implements MemoryReadListener, MemoryWriteListener, SIMHConstants
Implementation the SIMH I/O port.
This class implements partially the
SIMH extension peripheral for Altar8800.
Implement the following SIMH commands :
- Version:
- 1.00
- Author:
- Mario Viara
Fields inherited from interface jmce.altair.SIMHConstants |
CMD_GET_BANK, CMD_HAS_BANKED_MEMORY, CMD_MMU_COMMON, CMD_NONE, CMD_PRINT_TIME, CMD_SET_BANK, CMD_SIMH_RESET, CMD_SLEEP, CMD_START_TIMER, CMD_STOP_TIMER, CMD_VERSION, SIMH_PORT, SIMH_VERSION |
Constructor Summary |
SIMH()
|
Method Summary |
int |
readMemory(Memory mm,
int address,
int value)
Called when the memory is readed. |
void |
registerCPU(CPU cpu)
Register a parent CPU for future reference. |
void |
resetSimh()
|
java.lang.String |
toString()
|
void |
writeMemory(Memory mm,
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 |
SIMH
public SIMH()
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
readMemory
public int readMemory(Memory mm,
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:
mm
- - 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 mm,
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:
mm
- - Memory involved in the write operation.address
- - Address written.value
- - Value written.oldValue
- - Old value of this memory location.
- Throws:
SIMException
resetSimh
public void resetSimh()
toString
public java.lang.String toString()
- Overrides:
toString
in class AbstractHardware