jmce.z80pack
Class Memory
java.lang.Object
jmce.sim.AbstractHardware
jmce.sim.AbstractPeripheral
jmce.sim.memory.AbstractMemory
jmce.sim.memory.PlainMemory
jmce.sim.memory.BankedMemory
jmce.z80pack.Memory
- All Implemented Interfaces:
- Hardware, Memory, MemoryReadListener, MemoryWriteListener, Peripheral, Z80PackConstants
public class Memory
- extends BankedMemory
- implements Z80PackConstants, MemoryReadListener, MemoryWriteListener
Z80Pack memory manager implementation.
According to documentation 16
bank of 64 KB are installed and the shared memory can be change in
block of 256 bytes. The default value is to have 16KB of shared
memory starting at 48 KB.
- Version:
- 1.00
- Author:
- Mario Viara
Fields inherited from interface jmce.z80pack.Z80PackConstants |
CONDAT, CONSTA, DELAY_CTRL, FDC_CMD, FDC_CMD_READ, FDC_CMD_WRITE, FDC_DMA_HI, FDC_DMA_LOW, FDC_DRIVE, FDC_SECTOR, FDC_SECTOR_HI, FDC_STATUS, FDC_STATUS_ERROR, FDC_STATUS_SUCCESS, FDC_TRACK, MMU_BANK, MMU_INIT, MMU_SEGMENT, NETWORK_CLIENT_BASE_1, NETWORK_SERVER_BASE_1, NETWORK_SERVER_BASE_2, NETWORK_SERVER_BASE_3, NETWORK_SERVER_BASE_4, PRTDAT, PRTSTA, TERMINATE, TIMER_CTRL |
Constructor Summary |
Memory()
Default constructor. |
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. |
void |
writeMemory(Memory m,
int address,
int value,
int oldValue)
Called when a memory write event occours. |
Methods inherited from class jmce.sim.memory.BankedMemory |
get, getBank, getNumBank, getNumPage, getPageMap, getPageSize, getSharedSize, getSharedStart, initMmu, isMmuInitialized, reset, set, setBank, setNumBank, setNumPage, setPageMap, setPageSize, setSharedSize, setSharedStart, showMemory, toString |
Methods inherited from class jmce.sim.memory.AbstractMemory |
addHardwareMemory, addMemory, addMemoryReadListener, addMemoryReadListener, addMemoryWriteListener, addMemoryWriteListener, clrBit, getMemory, getMemoryAt, getMemoryCount, getMemoryName, getMemoryReadListenerAt, getMemoryReadListenerAt, getMemoryReadListenerCount, getMemoryReadListenerCount, getMemoryWriteListenerAt, getMemoryWriteListenerAt, getMemoryWriteListenerCount, getMemoryWriteListenerCount, getReadOnly, getSize, isBit, mapAddress, mapMemory, removeMemoryReadListener, removeMemoryReadListener, removeMemoryWriteListener, removeMemoryWriteListener, setBit, setMemory, setMemoryName, setReadOnly, setReadOnly, setReadOnly |
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, 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, setHardware, setHardware, setName |
Memory
public Memory()
- Default constructor.
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 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