Trait Part
pub trait Part {
// Required methods
fn frame(&self) -> &Frame;
fn frame_mut(&mut self) -> &mut Frame;
fn status(&self) -> u8;
fn accept_reset(&mut self) -> u32;
fn halted_cycle(&mut self) -> u32;
fn enter_interrupt(&mut self, kind: u8) -> u32;
fn execute(&mut self) -> u32;
// Provided methods
fn boundary_interrupt(&mut self) -> u8 { ... }
fn step(&mut self) -> u32 { ... }
}Expand description
A 65xx-family part on the frame: its four sequences, and the step that
chooses between them (CPUFrame.step).
Required Methods§
fn frame(&self) -> &Frame
fn frame_mut(&mut self) -> &mut Frame
fn accept_reset(&mut self) -> u32
fn halted_cycle(&mut self) -> u32
fn enter_interrupt(&mut self, kind: u8) -> u32
fn execute(&mut self) -> u32
Provided Methods§
fn boundary_interrupt(&mut self) -> u8
fn boundary_interrupt(&mut self) -> u8
The interrupt this boundary takes; a part with another input (ABORT) overrides it.
fn step(&mut self) -> u32
fn step(&mut self) -> u32
Execute one instruction, interrupt entry or reset; return its cycle count.
At an instruction boundary: a pending reset runs the start sequence; a halted CPU does what its part does while stopped; an NMI the last instruction’s poll saw is taken; so is an IRQ it saw, if the I flag that poll saw is clear; otherwise one instruction runs.
The poll sees the requests as they stood at the end of the instruction’s second-to-last cycle, so one a bus callback makes during the last cycle waits for the next instruction’s poll. One the host makes between steps is taken at the next boundary. BRK, interrupt entries and reset do not poll: one instruction runs after them before anything requested since is taken.