Skip to content

Z80NStepEmulator Class

Definition

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

public sealed class Z80NStepEmulator

View source

Constructors

Name Description
Z80NStepEmulator() Initializes a new Z80NStepEmulator 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 Z80N flags.
Interrupts Gets the Z80N 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 Z80N registers.

Methods

Name Description
Deserialize(ReadOnlySpan<Byte>) Deserializes a Z80N CPU state.
Deserialize(Stream) Deserializes a Z80N 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 Z80N CPU state.
Restore(ReadOnlySpan<Byte>) Restores this emulator from a serialized Z80N CPU state.
Restore(Stream) Restores this emulator from a serialized Z80N CPU state.
Serialize(Span<Byte>) Serializes this emulator's Z80N CPU state.
Serialize(Stream) Serializes this emulator's Z80N CPU state.
Step() Executes one Z80N T-state.