Trait rz80::Bus [] [src]

pub trait Bus {
    fn cpu_inp(&self, port: RegT) -> RegT { ... }
    fn cpu_outp(&self, port: RegT, val: RegT) { ... }
    fn irq(&self, ctrl_id: usize, vec: u8) { ... }
    fn irq_cpu(&self) { ... }
    fn irq_ack(&self) -> RegT { ... }
    fn irq_reti(&self) { ... }
    fn pio_outp(&self, pio: usize, chn: usize, data: RegT) { ... }
    fn pio_inp(&self, pio: usize, chn: usize) -> RegT { ... }
    fn pio_rdy(&self, pio: usize, chn: usize, rdy: bool) { ... }
    fn pio_irq(&self, pio: usize, chn: usize, int_vector: RegT) { ... }
    fn ctc_write(&self, chn: usize, ctc: &CTC) { ... }
    fn ctc_zero(&self, chn: usize, ctc: &CTC) { ... }
    fn ctc_irq(&self, ctc: usize, chn: usize, int_vector: RegT) { ... }
}

system bus trait

The system bus must be implemented by the higher level parts of an emulator and is used as central callback facility for the various Z80 chips. If anything happens in the chips that need to be communicated to other chips or the higher-level parts of the emulator (such as port I/O), one of the trait functions will be called.

Provided Methods

CPU reads from I/O port

CPU writes to I/O port

request an interrupt, called by a device to generate interrupt

forward an interrupt-request to CPU, called by daisychain

interrupt request acknowledge (called by CPU), return interrupt vector

notify interrupt daisy chain that CPU executed a RETI

PIO output callback

PIO input callback

PIO channel rdy line has changed

interrupt request from PIO

CTC write callback

CTC counter/timer reached zero

interrupt request from CTC

Implementors