Crate rz80 [] [src]

rz80 is a Z80 chip family emulation library written in Rust which can be used as basis for writing a full Z80-based computer emulator.

Overview

The rz80 library provides chip emulators for the Z80 CPU, PIO (parallel in/out), CTC (counter/timer channels) and a Bus trait which defines how the chips are wired together in a specific emulated system.

Writing a home computer emulator usually involves the following steps

Very simple 8-bit home computer systems (similar to the ZX81) don't require any additional code, more complex home computers will require additional custom chips emulations that are not part of the rz80 library.

Check out the two included example emulators:

> cargo run --release --example z1013
> cargo run --release --example kc87

Structs

CPU

Z80 CPU emulation

CTC

Z80 CTC emulation

Daisychain

interrupt controller daisychain

Memory

memory access

PIO

Z80 PIO emulation

Registers

CPU register access

Constants

CF

CPU carry flag

CTC_0

CTC channel 0

CTC_1

CTC channel 1

CTC_2

CTC channel 2

CTC_3

CTC channel 3

HF

CPU half carry flag

NF

CPU add/subtract flag

PF

CPU parity flag (same as overflow)

PIO_A

PIO channel A

PIO_B

PIO channel B

SF

CPU sign flag

VF

CPU overflow flag (same as parity)

XF

CPU undocumented 'X' flag

YF

CPU undocumented 'Y' flag

ZF

CPU zero flag

Traits

Bus

system bus trait

Type Definitions

RegT

generic integer type for 8- and 16-bit values