From 5e9b2e9c57374203a6ecb2033644f71b2c013a8b Mon Sep 17 00:00:00 2001 From: "opencode.energia.arti.ee" Date: Fri, 30 Oct 2026 23:50:35 +0000 Subject: [PATCH] spec+plan: header-only frame CRC (the body is covered by the Ethernet FCS) --- ...-10-30-vt1200-stream-transport-and-row-strips.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/superpowers/plans/2026-10-30-vt1200-stream-transport-and-row-strips.md b/docs/superpowers/plans/2026-10-30-vt1200-stream-transport-and-row-strips.md index 13b1206..aab6a4f 100644 --- a/docs/superpowers/plans/2026-10-30-vt1200-stream-transport-and-row-strips.md +++ b/docs/superpowers/plans/2026-10-30-vt1200-stream-transport-and-row-strips.md @@ -286,7 +286,18 @@ git commit -m "feat(stream): frame parser shared by host tests and payload" - Modify: `harness/udpstream/vidstream.c`, `harness/mame/vidstream.lua` **Interfaces:** -- Produces: `vram_blit_b_(src_bitaddr, daddr_xy, dydx)` — `PIXBLT B,XY`, `SPTCH=0`, `PSIZE=1`, `CONVSP/CONVDP=0x14`, `CONTROL` raster op 0; reloads `B2`/`B7` per call. +- Produces: `blit_row(src_bitaddr, daddr_xy, dydx)` — the C wrapper for `PIXBLT B,XY`, `SPTCH=0`, + `PSIZE=1`, `CONVSP/CONVDP=0x14`, `CONTROL` raster op 0, `B8=0`/`B9=0xFFFF` for the binary source; + reloads `B0/B1/B2/B3/B4/B7/B8/B9` per call. +- **Ruling R13 (implemented):** the asm symbol takes **no arguments** — the 1987 compiler's frame + layout is undocumented here, so values are published in `.bss` words and the asm reloads them. + `blit_row()` is the only entry point; Tasks 6/7 call the wrapper, never the symbol. + +**Ruling R14 (CRC scope):** the frame CRC covers the **header only** (bytes 0..11). The body's +integrity is the Ethernet FCS the LANCE already validates per packet, and truncation is caught by +`payload_len` + descriptor count. Measured evidence: a payload-wide CRC costs ~139 instructions per +byte and alone capped the frame rate (~1 fps), violating the design's no-per-byte-CPU rule. +`frame.py`, `frame_parse.c` and `fp_parse` must all agree on header-only. - [ ] **Step 1: Write the failing test**