Expand description
This module contains traits that should be implemented by the builder of the host computer.
To complete the emulation of the Z80-based computer the following trait interfaces need to be implemented:
- Clock - to determine how the CPU cycles are being counted and when certain events take place.
- Io - to establish a communication with the I/O devices.
- Memory - to build a bridge between the CPU and the host’s memory.
When the Cpu is executing instructions, it calls Clock’s methods to increase the cycle counter, only hinting which cycle the currently executed instruction is at. It is however up to the Clock implementation to actually increase the counter. Some of the Clock’s methods return timestamps which in turn are being used when accessing peripherals or memory to mark certain actions on the time axis.
Please see crate::host::cycles module for the description of each emulated cycle. !
Modules
Structs
Enums
An enum representing the execution break cause returned by various methods of the Cpu
trait.
Traits
This trait defines an interface for handling data provided to
IN
or from OUT
instruction
families and maskable interrupts.This trait defines an interface for accessing the host’s memory.