Skip to content

v3.2.1

Choose a tag to compare

@acwright acwright released this 18 Sep 03:27
· 24 commits to main since this release

Warning

Use 3.2.2 instead.
The fix below was delivered by cutting wait.for's output at the match, which removed data from
a field callers already read: a harness that concatenates what each call returns loses whatever
followed the match in the same chunk — the very loss this release set out to fix. Two 6502-DOCS
samples broke on it, deterministically.

3.2.2 returns output whole and reports the match position as an additive matchEnd. The cursor
and --since described below are unchanged and are still the point.

A patch release: one protocol fix, and one new flag.

6502 dbg send --wait and 6502 dbg wait --serial were quietly losing output.
Nothing else in 3.2.0 changes.


wait.for cut its transcript wherever the host happened to flush

The serial listener appended a whole delivered chunk and then tested the
pattern against it, returning immediately after. So what came back was cut at a
byte boundary nobody chose: a pattern that matches mid-line while the machine is
still printing returned a different amount of that line every run. Worse,
everything between that cut and the next serial.write was returned to nobody at
all — wait.for gave back no cursor, so a one-shot client had no position to read
on from.

It found us through 6502-DOCS, whose basic/keys sample waits on (OK|PRESS);
PRESS matches inside the YOU PRESSED of a line BASIC is still writing, and CI
caught 1 YOU PRESSED A (CODE 6 where a local run saw (C. That moving cut is
what made it look like load-dependent flakiness.

This is not a 3.2.0 regression. Measured across 64 runs each under identical
load: 8 failures on 3.1.1, 14 on 3.2.0. git log v3.1.1..v3.2.0 touches nothing
in that path. The release only changed the odds.

What it does now

  • output ends at the match. The transcript is a function of the machine's
    output and your pattern, and nothing else — the same bytes every run. A wait
    that ends for any other reason still returns everything that arrived.
  • wait.for returns a cursor, exactly as serial.write already does: the
    stream position at the end of output. Hand it to the next call as since, or
    to serial.read, and what the machine printed after the match is neither lost
    nor seen twice. Chain the calls and their transcripts concatenate into the
    console stream byte for byte.
  • 6502 dbg send --since <n> is the new flag, so a one-shot client can pick
    up from a cursor it already holds instead of from its own write. 6502 dbg wait
    already had it, and both now accept --since 0 — the start of the stream, which
    a machine that has printed nothing hands out.

Existing callers are unaffected: the field and the flag are additions, and no
correct caller could have depended on the bytes that arrived alongside a match.


Tests: 2,220 across 66 files, all passing. No golden frame and no trace
moved. The macOS app is signed and notarized.

Downloads

  • macOS (Apple Silicon): ac6502-emulator-3.2.1-mac-arm64.dmg
  • Windows (x64): ac6502-emulator-3.2.1-win-x64.exe
  • Linux (AppImage): ac6502-emulator-3.2.1-linux-x86_64.AppImage
  • Linux (deb): ac6502-emulator_3.2.1_amd64.deb

Live at https://acwright.github.io/6502-EMULATOR/. The /v2/ build (2.7.0) is
unchanged.