Skip to content

tools

Host scripts: busdrv.py (bus-tester client), alias_min.py, ROM capture/compare, inventory.py, the migration and audit tools, the PDF generators, and the KiCad conversion:

  • eagle_to_kicad_all.py — converts EVERY Eagle design under hardware/ into <item>/kicad/<rev>/ KiCad 10 projects and writes hardware/KICAD.md; per design it runs the three tools in kicad/ (eagle_sch_to_kicad.py schematic converter, finish_board.py board finisher on KiCad's Eagle board import, compare_netlists.py schematic-vs-board proof), then ERC, DRC, a schematic PDF and board renders into reports/. kicad/project-template.kicad_pro carries the OSH Park rules.
  • kicad/sch_overlaps.py — readability check for any .kicad_sch (or a folder of them): text over text, text over a symbol body, text crossed by a wire/pin/graphic line, and anything off the drawing frame or on the title block, with the worst offenders per sheet (--summary, --detail N, --pairs N, --json; --calibrate SVG checks its text boxes against a kicad-cli sch export svg render). eagle_to_kicad_all.py puts its counts in each README and in hardware/KICAD.md.
  • render_populated.py — pictures of a board as if built (2026-10-11): copies a .kicad_pcb, gives every footprint without a 3D model (the Eagle-converted parts) KiCad's standard model - DIP chips by pin count and row width, resistors, caps, LED, crystal, pin headers, SIP networks, the DIN 41612 bus connector, the DB9 - placed on its pad 1 and turned to match the pads, and renders top, bottom and a three-quarter view with kicad-cli pcb render --quality high. The board file is never changed. Chips are plain (KiCad draws no markings). Used for the video v1.1 and memory v2.0 pictures in docs/cards/images/.
  • verify_fab_vs_brd.py — proves an Eagle .brd is the design a fab house received: every hole against the Excellon drill file, every Top/Bottom track against the copper gerbers, inner-layer planes, part list and pick-and-place, optionally byte-compares two gerber sets. Takes a gerber zip or a whole order archive (nested zips are searched). First used 2026-09-24 on the memory card (hardware/cards/memory/eagle/v1.3/README.md).
  • verify_processing.py — builds the Processing command sender with the Processing 4 CLI and re-compiles it with warnings on.
  • gen_y1_optab.py — generates the instruction tables of the native assemblers from software/assembler/yacc1.def: os/asm_optab.c for /bin/asmc (asm.c, 2026-09-25) and os/commands-asm/asmtab.inc for /bin/asm (asm.asm, 2026-09-26) (os/Makefile runs it, --check fails when either is stale: tests/asm/run.py). It compiles each .def construction line with a copy of RC/asm's Translate().
  • y1term.py — a terminal for the console that can also type a text file into BASIC (2026-10-08): the plain terminal (python3 tools/y1term.py, Ctrl-] for the menu: s send a file, n NEW first, q quit), or --send PROG.BAS [--new] [--run] [--stay] from the command line. Each line is typed at the machine's pace (--delay, 5 ms a character) and the next one waits for BASIC's >>; lines answered with SYNTAX ERROR or UNKNOWN COMMAND are reported with their line number in the file. Blank lines and # lines are skipped, tabs become spaces, lines over 200 characters are refused (BASIC's input line is unchecked). At the monitor's > it starts BASIC with I first. --log FILE keeps everything the machine sends. Finds the console FTDI as monload.py does. Tested by tests/y1term/run.py against the microcode emulator through a pty.
  • y1kermit.py — a small standard Kermit for the Mac side of the console line (2026-09-26): send FILE... to /bin/kermit's kermit -r (or its -x server), receive [DIR] from kermit -s, get NAME... [DIR], finish / bye for the server, term (a plain terminal, Ctrl-] quits). The same protocol subset as /bin/kermit: short packets, window 1, block checks 1-3 (--check, 3 by default), control prefixing, repeat counts (--norpt), 8th-bit prefixing only when asked (--ebq asks), attribute packets (--noattr), text mode (--text: LF as CR LF). --port (default: the one USB serial port that is not the sequencer's FTDI; the port is opened with monload.py's Link, pyserial), --baud 38400, --maxl (94), --time (the timeout it asks the other side to use, 10 s), --timeout (its own, 20 s), -q. Fault injection for the tests: --corrupt N, --drop N, --nak N, --mute N (the Nth packet of the run damaged, not sent, NAKed, not answered). It prints what it sent and received and a summary (packets, retries, NAKs, timeouts, repeats); exit 1 on failure. The fallback when C-Kermit is not at hand, and what tests/kermit/run.py drives both emulators with; docs/procedures/KERMIT.md is the how-to.
  • speed.py — where the machine's time goes: a shell line under Y1/OS on the fast emulator (default make in /src/os/commands), reported in clocks by program, by program/OS/ROM, by function and by opcode (docs/system/SPEED.md, 2026-11-05).
  • y1.ksc — C-Kermit's settings for the same line (kermit tools/y1.ksc opens /dev/cu.usbserial-AB0MVHSQ at 38400, no flow control, carrier-watch off, binary, prefixing all, autodownload, and connects; docs/procedures/KERMIT.md explains each).

Contents migrated 2026-09-19; MIGRATION.md at the repo root says which copy each item came from.

Already here (written during the 2026-09 bring-up session; they existed nowhere else)

  • author_headers.py + authors.tsv — the authorship header at the top of every source file (2026-10-02): authors.tsv = each file's author category (Ken / Ken + Claude's logged changes / Claude / Claude's P8X ports / RC/asm with Ken's port / third-party and generated: no header) and why; --check (in make check) fails on a missing or stale header or a source file not in the table, --apply writes them, --classify adds new files to the table.
  • setup_check.py — is this Mac set up for YACC1-D? Reports the tools each kind of work needs (core build/tests, board design, Arduino sketches, the machine's USB-serial ports, C-Kermit) and how to get what is missing; installs nothing (2026-09-27, for the second Mac; see ../CLAUDE.md "Two Macs")
  • busdrv.py — Python client for the Bus Test Card (19200 baud, CMD:OPERAND#); readmem/writemem/dump helpers
  • alias_min.py — minimal reproduction of the video card block-0/9 write-through fault
  • inventory.py — hashes every file under YACCS and reports what is unique where (used to build MIGRATION.md)

../firmware/rom/eprom-captured-2026-09-18.{bin,hex} is the 8K image read out of the memory card's 28C64 through the bus tester; it is byte-identical to Software-vs/Assembler/rom (git ff7d85a).

Last updated 5 November 2026