Skip to content

Z80StepEmulator Class

Definition

Represents a cycle-accurate Z80 emulator that executes one T-state at a time.

public sealed class Z80StepEmulator

View source

Constructors

Name Description
Z80StepEmulator() Initializes a new Z80StepEmulator instance.

Fields

Name Description
SerializedSize The number of bytes required to serialize the emulator state.

Properties

Name Description
Address Gets the address for the current external bus action.
Data Gets or sets the data value for the current external bus action.
Flags Gets the Z80 flags.
Interrupts Gets the Z80 interrupt state.
IsAtInstructionBoundary Gets a value indicating whether the emulator is at the start of an instruction or interrupt sequence.
Pins Gets the pins asserted during the T-state completed by the most recent call to Step, sampled at the rising edge of the T-state's clock. None after a reset, and undefined after a restore, until the next call to Step.
Registers Gets the Z80 registers.

Methods

Name Description
Deserialize(ReadOnlySpan<Byte>) Deserializes a Z80 CPU state.
Deserialize(Stream) Deserializes a Z80 CPU state.
ExecuteInstruction(Action<ActionRequired>, Action) Executes a single instruction; used for testing. Assumes the processor is at the start of an instruction.
Reset() Resets the Z80 CPU state.
Restore(ReadOnlySpan<Byte>) Restores this emulator from a serialized Z80 CPU state.
Restore(Stream) Restores this emulator from a serialized Z80 CPU state.
Serialize(Span<Byte>) Serializes this emulator's Z80 CPU state.
Serialize(Stream) Serializes this emulator's Z80 CPU state.
Step() Executes one Z80 T-state.