Files
brad ArantandClaude Opus 5.5 dc7c7c22c5 BASIC graphics: 320x240 16-colour layer, manual and demo
- z80_system: dual-clock graphics RAM behind ports 30h-34h (X/Y, plot
  with auto-increment, read-back, hardware fill); text_display overlays it
  under the text, colour 0 transparent.
- BASIC: CLS COLOR PLOT LINE RECT FILL CIRCLE POINT, LOCATE and INK;
  faster keyword tokenizing.
- docs/basic-manual.md (+ PDF via docs/build-manual.sh).
- basic/examples/graphics-demo.bas and tools/send-bas.py to load programs
  over the serial port.
- Simulation checks drawing and saves a frame; the emulator models the
  graphics and timer ports and can stop when BASIC waits for input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 21:09:43 -08:00

30 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
# Turn docs/basic-manual.md into docs/basic-manual.pdf (needs python3-markdown and Chrome).
set -e
cd "$(dirname "$0")"
python3 - <<'PY'
import markdown
body = markdown.markdown(open("basic-manual.md").read(), extensions=["tables", "fenced_code"])
css = """
@page { size: A4; margin: 18mm 16mm; }
body { font-family: "DejaVu Serif", Georgia, serif; font-size: 10.5pt; line-height: 1.45; color: #111; }
h1 { font-size: 24pt; margin: 0 0 4pt; }
h1 + p { font-size: 12pt; color: #444; margin-bottom: 18pt; }
h2 { font-size: 15pt; border-bottom: 1px solid #999; padding-bottom: 2pt; margin-top: 22pt;
page-break-after: avoid; }
h3 { font-size: 12pt; margin-top: 14pt; page-break-after: avoid; }
code, pre { font-family: "DejaVu Sans Mono", monospace; font-size: 9pt; }
pre { background: #f2f2f2; border-left: 3px solid #4a7; padding: 6pt 8pt; page-break-inside: avoid; }
table { border-collapse: collapse; margin: 6pt 0; page-break-inside: avoid; }
th, td { border: 1px solid #bbb; padding: 3pt 6pt; vertical-align: top; text-align: left; }
th { background: #e8e8e8; }
"""
open("basic-manual.html", "w").write(
"<!doctype html><html><head><meta charset='utf-8'><title>Basys 3 Z-80 BASIC</title>"
"<style>%s</style></head><body>%s</body></html>" % (css, body))
PY
google-chrome --headless --disable-gpu --no-pdf-header-footer \
--print-to-pdf="$PWD/basic-manual.pdf" "file://$PWD/basic-manual.html" 2>/dev/null
rm basic-manual.html
echo "wrote docs/basic-manual.pdf"