|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.razvan.jzx.BaseComponent org.razvan.jzx.Z80
public class Z80
The Z80 CPU component of the Spectrum emulator.
BaseSpectrum
Field Summary | |
---|---|
protected boolean |
m_pause
Indicates that the emulate() method should pause. |
protected boolean |
m_stop
Indicates that the emulate() method should end. |
Fields inherited from class org.razvan.jzx.BaseComponent |
---|
m_logger, m_spectrum |
Constructor Summary | |
---|---|
Z80()
|
Method Summary | |
---|---|
void |
addTStates(int val)
Add a number to the current value of T-States. |
void |
decodeXX(int op8)
Decode the index register operations. |
void |
emulate()
Decode one instruction: call mone8() to retrieve the opcode, decode it and execute it. |
int |
getTStates()
Trivial accessor for the T-States value. |
void |
init(BaseSpectrum spectrum,
ILogger logger)
Cache references to the memory and I/O objects. |
void |
interrupt()
Interrupt the CPU. |
void |
load(BaseLoader loader)
Load the CPU contents from the loader object. |
void |
nmi()
Generates a non-maskable interrupt (NMI.) |
void |
pause()
Pause the emulation (asynchronous). |
void |
reset()
Set the PC, I, R, IM and IFF* registers to 0. |
void |
setTStates(int tstates)
Trivial mutator for the T-States value. |
void |
stop()
Stop the emulation (asynchronous.) |
void |
terminate()
Does nothing. |
java.lang.String |
toString()
Return a string representation of the CPU state, which is useful for debugging purposes. |
void |
unpause()
Unpause the emulation (asynchronous). |
Methods inherited from class org.razvan.jzx.BaseComponent |
---|
getSpectrum |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected volatile boolean m_stop
protected volatile boolean m_pause
Constructor Detail |
---|
public Z80()
Method Detail |
---|
public void init(BaseSpectrum spectrum, ILogger logger)
init
in class BaseComponent
public void reset()
reset
in class BaseComponent
public void terminate()
terminate
in class BaseComponent
public void interrupt()
If IFF1a is not zero, set both IFF flags to 0 and push the value of PC on the stack. If the IM is 2, jump to the address (I, 0xFF), otherwise jump to 0x38.
public void nmi()
Set IFF1b = IFF1a, and set IFF1a to 0 (disable regular interrupts.) Push the PC on the stack, then jump to address 0x66.
public int getTStates()
public void setTStates(int tstates)
public void addTStates(int val)
public void stop()
public void pause()
public void unpause()
public void emulate()
public void decodeXX(int op8)
This method only operates on the m_xx16 variable, following that the caller of this method will assign m_xx16 to the appropriate index register (m_ix16 or m_iy16).
public java.lang.String toString()
toString
in class java.lang.Object
public void load(BaseLoader loader)
load
in class BaseComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |