|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.michab.simulator.mos6502.Extension
This is an extension a.k.a. a patch. An instance of this class can be
installed in memory just like a Chip (which it implements
actually.) If execution hits the memory address, the
extensionCalled() template method is activated and an RTS
opcode is returned.
| Constructor Summary | |
Extension(Memory m)
Create an instance. |
|
| Method Summary | |
protected abstract void |
extensionCalled(Memory m)
This is the template method called on hit of the Extension in
memory. |
abstract int |
getBaseAddress()
Returns this Extension's base address. |
Memory |
getMemory()
Returns the memory this extension is installed in. |
Port[] |
getPorts()
Get an array of the chip's ports. |
byte |
read(int port)
Default read implementation. |
void |
reset()
An empty implementation of the reset method. |
void |
write(int port,
byte value)
Default implementation of write for an extension. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Extension(Memory m)
m - The emulation's memory.| Method Detail |
public void write(int port,
byte value)
write in interface Addressableport - The target address.value - The value to be written.Addressable.write(int, byte)public byte read(int port)
extensionCalled()
template method and returns an RTS opcode.
read in interface Addressableport - The source address.
Addressable.read(int)public Memory getMemory()
public Port[] getPorts()
Chipnull if this
chip does not support ports.
getPorts in interface Chippublic void reset()
reset in interface ChipChip.reset()protected abstract void extensionCalled(Memory m)
Extension in
memory. The passed Memory is the same that would be
returned by getMemory().
m - A reference to the memory the extension is installed in.getMemory()public abstract int getBaseAddress()
Extension's base address.
Extension's base address.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||