Record every pad, not the one that happened to be first

The first recording ever made with this came back 1,766 frames of nothing.
It recorded pad NOUGHT and the controller was somewhere else - which pad
one lands on is an accident of the host, the same accident that made Lunar
Porter read all four in the first place - and a flight flown for the
purpose was lost to it.

So every pad is or-ed into the byte. A demo is a record of what somebody
DID, and on a machine one person is playing the number it arrived on is
not part of that. It plays back on pad nought, where --pad puts the first
file given, and any program that reads more than one pad reads them or-ed
anyway for exactly the same reason.

--record-pad takes one file now rather than filling pads in turn, because
there is nothing left for the second one to mean.

The check for it plays a recording on pad ONE with nought holding nothing
and requires the bytes back. That is the case that was missing: the round
trip was tested and passed, on pad nought, which is the only pad it could
not have gone wrong on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
This commit is contained in:
Anachronaut
2026-09-03 14:27:58 -04:00
co-authored by Claude Opus 5
parent eb695a3f3b
commit de1857f5f7
9 changed files with 61 additions and 25 deletions
+20
View File
@@ -65,6 +65,26 @@ print('yes' if again[:len(first)] == first else 'no')
&& result ok "a recording of a playback is the playback" "byte for byte, in and out" \
|| result no "a recording of a playback is the playback" "the bytes differ"
# ---- And it does not matter which controller it was ----
#
# The first recording ever made with this came back 1,766 frames of nothing. It recorded pad
# NOUGHT and the controller was somewhere else - which pad one lands on is an accident of the
# host, and the flight had to be flown again for nothing.
#
# So every pad is or-ed into the byte. Here the same recording is played on pad ONE, with
# nought holding nothing, and what comes out has to be what went in.
python3 -c "open('$BUILD/idle.pad','wb').write(b'\x00' * 64)"
"$EMU" --fast --pad "$BUILD/idle.pad" --pad "$ROOT/Tests/input/padTest.pad" \
--record-pad "$BUILD/padone.pad" "$BUILD/padTest.bin" > "$BUILD/padone.out" 2>&1
ELSEWHERE="$(python3 -c "
first = open('$ROOT/Tests/input/padTest.pad', 'rb').read()
again = open('$BUILD/padone.pad', 'rb').read()
print('yes' if again[:len(first)] == first else 'no')
" 2>/dev/null || echo error)"
[ "$ELSEWHERE" = "yes" ] \
&& result ok "a controller on any pad is recorded" "flown on pad one, written all the same" \
|| result no "a controller on any pad is recorded" "the bytes differ"
# ---- One byte a frame, and the frame is the machine's ----
#
# A recording is a TIMELINE. If it were a byte a read, a program that polled twice in one