Z80 class
The Zilog Z80 emulator.
Constructors
- Z80(MemoryBase _memory, {int startAddress = 0, PortReadCallback onPortRead = _defaultPortReadFunction, PortWriteCallback onPortWrite = _defaultPortWriteFunction})
- Initializes the Z80 emulator.
Properties
- a ↔ int
-
getter/setter pair
- a_ ↔ int
-
getter/setter pair
- af ↔ int
-
getter/setter pair
- af_ ↔ int
-
The AF' register.
getter/setter pair
- b ↔ int
-
getter/setter pair
- b_ ↔ int
-
getter/setter pair
- bc ↔ int
-
getter/setter pair
- bc_ ↔ int
-
The BC' register
getter/setter pair
- c ↔ int
-
getter/setter pair
- c_ ↔ int
-
getter/setter pair
- d ↔ int
-
getter/setter pair
- d_ ↔ int
-
getter/setter pair
- de ↔ int
-
getter/setter pair
- de_ ↔ int
-
The DE' register
getter/setter pair
- e ↔ int
-
getter/setter pair
- e_ ↔ int
-
getter/setter pair
- f ↔ int
-
getter/setter pair
- f3 ↔ bool
-
The undocumented (X) flag.
getter/setter pair
- f5 ↔ bool
-
The undocumented (Y) flag.
getter/setter pair
- f_ ↔ int
-
getter/setter pair
- fC ↔ bool
-
The carry (C) flag.
getter/setter pair
- fH ↔ bool
-
The half-carry (H) flag.
getter/setter pair
-
flags
→ Map<
String, int> -
final
- fN ↔ bool
-
The add/subtract (N) flag.
getter/setter pair
- fPV ↔ bool
-
The parity / overflow (P/V) flag.
getter/setter pair
- fS ↔ bool
-
The signed (S) flag.
getter/setter pair
- fZ ↔ bool
-
The zero (Z) flag.
getter/setter pair
- h ↔ int
-
getter/setter pair
- h_ ↔ int
-
getter/setter pair
- halt ↔ bool
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hl ↔ int
-
getter/setter pair
- hl_ ↔ int
-
The HL' register
getter/setter pair
- i ↔ int
-
Interrupt Page Address register (I).
getter/setter pair
- iff1 ↔ bool
-
Interrupt Flip-Flop (IFF1).
getter/setter pair
- iff2 ↔ bool
-
Interrupt Flip-Flop (IFF2).
getter/setter pair
- im ↔ int
-
Interrupt Mode (IM).
getter/setter pair
- ix ↔ int
-
getter/setter pair
- ixh ↔ int
-
getter/setter pair
- ixl ↔ int
-
getter/setter pair
- iy ↔ int
-
getter/setter pair
- iyh ↔ int
-
getter/setter pair
- iyl ↔ int
-
getter/setter pair
- l ↔ int
-
getter/setter pair
- l_ ↔ int
-
getter/setter pair
- onPortRead → PortReadCallback
-
Callback for a port read (IN instruction).
final
- onPortWrite → PortWriteCallback
-
Callback for a port write (OUT instruction).
final
- pc ↔ int
-
Program Counter (PC).
getter/setter pair
- r ↔ int
-
Memory Refresh register (R).
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sp ↔ int
-
Stack Pointer (SP).
getter/setter pair
- tStates ↔ int
-
Number of clock cycles that have occurred since the last clock reset.
getter/setter pair
Methods
-
ADC16(
int xx, int yy) → int - Add with Carry (16-bit)
-
ADC8(
int x, int y) → int - Add with Carry (8-bit)
-
ADD16(
int xx, int yy, {bool withCarry = false}) → int - Add (16-bit)
-
ADD8(
int x, int y, {bool withCarry = false}) → int - Add (8-bit)
-
AND(
int a, int reg) → int -
BIT(
int bitToTest, int reg) → void -
CALL(
) → void - Call
-
CCF(
) → void - Clear Carry Flag
-
CP(
int x) → void - Compare
-
CPD(
) → void - Compare and Decrement
-
CPDR(
) → void - Compare and Decrement Repeated
-
CPI(
) → void -
CPIR(
) → void -
CPL(
) → void - Complement
-
DAA(
) → void - Decimal Adjust Accumulator
-
DEC(
int reg) → int - Decrement
-
DecodeCBOpcode(
) → void -
DecodeDDCBOpCode(
) → void -
DecodeDDOpcode(
) → void -
DecodeEDOpcode(
) → void -
DecodeFDCBOpCode(
) → void -
DecodeFDOpcode(
) → void -
displacedIX(
) → int -
displacedIY(
) → int -
DJNZ(
int jump) → void - Decrement and Jump if Not Zero
-
EX_AFAFPrime(
) → void -
executeNextInstruction(
) → bool -
getNextByte(
) → int -
getNextWord(
) → int -
INA(
int operandByte) → void -
INC(
int reg) → int - Increment
-
IND(
) → void - Input and Decrement
-
INDR(
) → void - Input, Decrement and Repeat
-
INI(
) → void - Input and Increment
-
INIR(
) → void - Input, Increment and Repeat
-
JR(
int jump) → void - Jump Relative
-
LDD(
) → void - Load and Decrement
-
LDDR(
) → void - Load, Decrement and Repeat
-
LDI(
) → void - Load and Increment
-
LDIR(
) → void - Load, Increment and Repeat
-
maskableInterrupt(
) → void - Generate an interrupt.
-
NEG(
int a) → int -
nonMaskableInterrupt(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
OR(
int a, int reg) → int -
OTDR(
) → void - Output, Decrement and Repeat
-
OTIR(
) → void - Output, Increment and Repeat
-
OUT(
int portNumber, int value) → void -
OUTA(
int portNumber, int value) → void -
OUTD(
) → void - Output and Decrement
-
OUTI(
) → void - Output and Increment
-
POP(
) → int -
previewByte(
int displ) → int -
previewWord(
int displ) → int -
PUSH(
int val) → void -
RES(
int bitToReset, int reg) → void -
reset(
) → void - Reset the Z80 to an initial power-on configuration.
-
RETN(
) → void - Return from Non-Maskable Interrupt
-
RL(
int reg) → int - Rotate Left
-
RLA(
) → void - Rotate Left Accumulator
-
RLC(
int reg) → int - Rotate Left Circular
-
RLCA(
) → void - Rotate Left Circular Accumulator
-
RLD(
) → void - Rotate Left BCD Digit
-
rot(
int operation, int register) → void -
RR(
int reg) → int - Rotate Right
-
RRA(
) → void - Rotate Right Accumulator
-
RRC(
int reg) → int - Rotate Right Circular
-
RRCA(
) → void - Rotate Right Circular Accumulator
-
RRD(
) → void - Rotate Right BCD Digit
-
RST(
int addr) → void -
SBC16(
int xx, int yy) → int - Subtract with Carry (16-bit)
-
SBC8(
int x, int y) → int - Subtract with Carry (8-bit)
-
SCF(
) → void - Set Carry Flag
-
SET(
int bitToSet, int reg) → void -
SLA(
int reg) → int - Shift Left Arithmetic
-
SLL(
int reg) → int - Shift Left Logical
-
SRA(
int reg) → int - Shift Right Arithmetic
-
SRL(
int reg) → int - Shift Right Logical
-
SUB8(
int x, int y, {bool withCarry = false}) → int - Subtract (8-bit)
-
toString(
) → String -
A string representation of this object.
inherited
-
XOR(
int a, int reg) → int
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited