Struct rz80::CPU [] [src]

pub struct CPU {
    pub reg: Registers,
    pub halt: bool,
    pub iff1: bool,
    pub iff2: bool,
    pub invalid_op: bool,
    pub mem: Memory,
    // some fields omitted
}

Z80 CPU emulation

Fields

Methods

impl CPU
[src]

initialize a new Z80 CPU object

initialize a new CPU object with 64K RAM (for testing)

reset the cpu

decode and execute one instruction

execute a single 'main-instruction'

This function may be called recursively for prefixed instructions

  • 'm' - index of 16-bit register (may be HL, IX or IY)
  • 'd' - the d in (IX+d), (IY+d), 0 if m is HL

returns number of cycles the instruction takes