pub struct Pins {
pub frame: Frame,
pub high_speed: bool,
/* private fields */
}Expand description
What a bus callback can see and change of the CPU while it runs: the frame’s requests (reset, NMI), the three maskable inputs and their disable register, the clock switch, the cycle’s kind and the opcode.
Between steps a board reaches the same things as cpu.pins, or through
the methods of HuC6280 that forward here.
Fields§
§frame: Frame6502-rust’s frame: reset, the NMI latch, and IRQ_LINE, which here
means “an enabled maskable source is asserted” and is kept by
Pins::set_irq_lines and Pins::set_irq_disable: a board does
not call the frame’s request_maskable_interrupt itself.
high_speed: boolThe clock switch: false at 1.79 MHz (12 master clocks a cycle),
true at 7.16 MHz (3). Reset selects low (U10).
Implementations§
Source§impl Pins
impl Pins
Sourcepub fn set_irq_lines(&mut self, irq1: bool, irq2: bool, tiq: bool)
pub fn set_irq_lines(&mut self, irq1: bool, irq2: bool, tiq: bool)
Set the three maskable inputs (levels: they stay until the device lets go).
IRQ1 is the VDC’s, IRQ2 the HuCard connector’s and the CD-ROM’s, TIQ
the timer’s (pcetech 2.1). A source masked by irq_disable is
remembered, not taken.
Sourcepub fn irq_disable(&self) -> u8
pub fn irq_disable(&self) -> u8
The interrupt disable register’s bits 2-0 (IRQ2, IRQ1, TIQ; 1 =
masked), as $1402.
Sourcepub fn set_irq_disable(&mut self, value: u8)
pub fn set_irq_disable(&mut self, value: u8)
Write the interrupt disable register (bits 2-0 are kept).
Source§impl Pins
impl Pins
Sourcepub fn opcode(&self) -> u8
pub fn opcode(&self) -> u8
The opcode of the instruction being executed.
It is set once the fetch cycle’s read has returned, so every later callback of the instruction (operand reads, the write of an ST0/ST1/ST2) sees it; the fetch callback itself still sees the previous instruction’s. An interrupt entry leaves it unchanged.