Module trace

Module trace 

Source
Expand description

The lockstep gate’s side of this crate: how a traced CD machine is built from a command line, and a frame’s line.

Not a module of the reference: its counterpart is scripts/pcecd_trace.py, which builds the reference’s PcEngineCd from the same arguments. A line is the base gate’s (pcengine_rust::trace::frame_line: the CPU bus log, the picture, the mixed audio and the CPU state, digested) plus cmd=N:SHA1, the drive’s command log of the frame. roundtrip and runahead are the base crate’s save-state checks over this machine (theirs build a plain board).

Structs§

Setup
The command line shared by pcecd-trace, pcecd-state-roundtrip, pcecd-bench and scripts/pcecd_trace.py.

Functions§

frame_line
The line of the frame that just ran: the base gate’s, then the drive’s commands.
roundtrip
Save states, proven complete (the base crate’s trace::roundtrip, the reference’s scripts/cd_state.py): power on, run to frame at plus extra instructions, save, then build a second machine the same way (it opens the disc itself), load the state into it, and run both to frame to. Every frame after the save must be the same on both, by the gate’s own lines. A third run loads the state into a machine that has run elsewhere first; and the loaded machine, saved at once, must give the same bytes back.
run_frames
Run frames frames with the setup’s presses and resets; a line a frame.
runahead
The snapshot pair in a run-ahead pass (the base crate’s trace::runahead): every frame is run, a snapshot taken, ahead more frames run with other buttons held, and the snapshot put back. Each frame’s line, and the state at the end, must equal a plain run’s.
set_switch
One named switch by the reference’s spelling, WHERE.NAME=VALUE (scsi.SEEK_SCALE=2.0).