diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-26 11:12:04 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-26 11:12:04 -0300 |
| commit | adb23572bc2d7aae09cf8605825f6d48ca23ba4a (patch) | |
| tree | 1afa309350d0d730342ccacbbd19ca1f5af9b4df /src/hal/ledc.zig | |
| parent | 55743cc5d564f6ef6d6f8a0eb1a614a74b021d3a (diff) | |
| download | esp32p4-adb23572bc2d7aae09cf8605825f6d48ca23ba4a.tar.gz esp32p4-adb23572bc2d7aae09cf8605825f6d48ca23ba4a.zip | |
Set the grid from the firmware build, and check Poke against Peek on the die
## -Dcols / -Drows
The geometry is baked into pardes's object, and that object is built by the other
repository - so changing the grid was two commands in two directories, and the second one
silently linked whatever the first had left behind. That is the shape of mistake that ends
with a firmware whose grid is not the grid you think you flashed.
`-Dcols` and `-Drows` now drive the editor's own build before linking it. A nested
`zig build`, not a package dependency: the seam between these repositories stays a file,
for the reasons the comment above it has always given. This only reaches across to ask for
the file to be made a particular way, and it stands aside entirely when `-Dpardes-obj`
names an object explicitly, because then the caller has already said which one they want.
Verified by the segment table: `-Dcols=80 -Drows=24` takes the loaded segment from 20,408
to 49,944 bytes, which is the shadow grid going from 784 cells to 1,920.
## Poke and Peek, checked against each other
Two more checks in `p4-bench --check`, and they are checked against each other because
that is the only way to check either one without a second debugger: a Peek alone cannot
tell a correct read from a stuck one, and a Poke alone cannot tell a write from a no-op.
Both oracles were wrong before they were right, and both failures are worth recording.
The Escape check asked whether an `x` came back on the wire. That was true until the boot
buffer gained a line beginning "x selects a line", at which point a passing check began
failing for a reason that had nothing to do with Escape. It now reads the CURSOR COLUMN
after `0`, which the document cannot spell: 8 in normal mode, three further right if the
`0` had been inserted instead.
The Poke and Peek checks searched the raw byte stream for `deadbeef` and could not find it -
because this renderer emits only the cells that CHANGED, jumping between runs with absolute
cursor positioning, so a word on screen is frequently not a word on the wire. `stripAnsi`
removes the escapes first. The Poke assertion then had to be loosened from one phrase to
three facts, because the message row is 49 columns here and a wrapped line puts a row
boundary inside whichever phrase straddles it.
Four checks, all passing on the die:
lone Escape still leaves insert mode ok (cursor col 8)
a click split byte-by-byte lands at 18 ok (cursor 3,18)
Poke writes a word and reads it back ok
and a later Peek still finds it ok
Diffstat (limited to 'src/hal/ledc.zig')
0 files changed, 0 insertions, 0 deletions
