[−][src]Trait iz80::Machine
Abstraction of the device hosting the Z80 CPU
The device hosting the CPU has to provide implementations of the memory and port access. A simple implementation is provided with PlainMachine
Required methods
fn peek(&self, address: u16) -> u8
Returns the memory contents in [address]
fn poke(&mut self, address: u16, value: u8)
Sets the memory content to [value] in [address]
fn port_in(&mut self, address: u16) -> u8
Port in, from the device to the CPU. Returns the port value in the hosting device.
fn port_out(&mut self, address: u16, value: u8)
Port out, from the CPU to the device. Sets a port value on the hosting device.
Provided methods
fn peek16(&self, address: u16) -> u16
Returns the memory contents in [address] as word
fn poke16(&mut self, address: u16, value: u16)
Sets the memory content to the word [value] in [address]