Expand description
The interrupt controller ($1400-$17FF, mirrored every 4 bytes) (cpu_io/irq_ctl.py).
[hw: pcetech 2.1] $1402: bits 2-0 are disable bits, 1 = disabled (bit 2 timer, bit 1 IRQ1, bit 0
IRQ2), readable and writable, bits 7-3 return the I/O buffer. $1403: reads the line state
in bits 2-0 even when masked, upper five bits the buffer; any write acknowledges the timer.
$1400/$1401: writes do nothing, reads return the buffer. The mask only stops the CPU from
taking the interrupt; the core gets the raw lines and the mask (irq_disable) and decides.
Differences forced by Rust: the reference’s two callables (acknowledge the timer, tell the
CPU the mask changed) are write’s return value and the mask_changed flag.