Expand description
The board: one timeline in master clocks, the page table, and the devices around the CPU
(board.py).
The CPU core (huc6280-rust) calls read, write and idle once per CPU cycle with a
21-bit physical address. The board prices the cycle: 12 master clocks at low speed, 3 at high
speed (pins.high_speed), plus the VDC/VCE stretch and any hold, all inside the callback; it
never adds step()’s return on top (the reference’s docs/handoff-brief.md, the bus contract).
Where inside a cycle a device sees the access is U21 (provisional): the base cycle elapses, then the access happens at that instant, then the stretch cycle for a VDC or VCE address elapses.
Differences forced by Rust:
- The CPU owns the board (
cpu.bus), so the board cannot hold the CPU. What the reference’s board does to its CPU (set_irq_lines,irq_disable, readinghigh_speed) goes through thePinseach bus callback is handed, at the same points of the cycle and in the same order;attach_cpuisSystem::new’s. With no CPU (advancecalled on a bare board, as the reference’s tests do) the lines are tracked and nothing is delivered. - The decode is here:
page_readandpage_writeturn the page table’sHandlernames into calls (pagetable.rs). - The constructor’s keyword arguments are the fields of
BoardOptions, which also carries the switches the reference keeps as class attributes (Psg’s,Timer’s). - The pixel path is the board’s field (
pixel_path); the capture is handed the mixed row. The mixer is handed the sources in the reference’s order: the PSG, the port device’s own, thenaudio_sources. - The VDC’s wait (issue 0004): the reference’s VDC calls the board’s
_serve_vramfrom inside the access; here the access stops at that point and the board serves the chip and makes the decode again (page_read,page_write,sockets::VdcAccess, vdc/chip.rs). bus_logis the tap the reference’s scripts make by wrapping the three callables (scripts/state_roundtrip.py,observe): when it isSome, every cycle appends the same words.
Structs§
- Board
- Board
Options - The reference’s
Board(...)arguments, with its defaults.