diff --git a/harness/badapple/README.md b/harness/badapple/README.md index c890a77..4bcdc43 100644 --- a/harness/badapple/README.md +++ b/harness/badapple/README.md @@ -208,6 +208,8 @@ path; for a live run the screen is the evidence. | symptom | cause | |---|---| | `demo.sh: ... did not answer within 180s` | the terminal is not on the tap, or `run.sh net` was started without the LANCE interface selected in its cfg | +| `demo.sh: ... has no dictionary.bin` | `--tiles` wants a **cache** directory, not the frames directory `clip_from_video.py` wrote; the message names the `make_tiles.py --clip … --out …` command that builds it | +| payload already jumped, need to send again | the script refuses a bad cache path *before* the jump for this reason, but if it happens: rerun with `--no-load` — the payload is still running and waiting, and `vidsend` brings the dictionary with it | | poke reads back a mismatch | the image is being loaded over a stale link, or the payload was built for a different load address | | `DICT_BYTES` stuck below 32768 | datagrams lost before the payload saw them — check the tap and the sender's interface | | picture sheared in MAME | `VT1200_MONITOR=VR150` is selected (the old derived 1024-px layout); leave the default VR319 | diff --git a/harness/badapple/demo.sh b/harness/badapple/demo.sh index 9c25216..bfe795c 100755 --- a/harness/badapple/demo.sh +++ b/harness/badapple/demo.sh @@ -42,6 +42,25 @@ while [ $# -gt 0 ]; do esac done +# --- the cache, checked BEFORE anything irreversible ------------------------ +# The jump hands the payload the remote-debug process and it never returns, so +# a bad --tiles path discovered afterwards leaves the machine needing a restart +# to try again. Refuse it here instead. +if [ "$SEND" = 1 ]; then + for f in dictionary.bin stream.bin; do + if [ ! -f "$TILES/$f" ]; then + echo "demo.sh: $TILES has no $f -- that is not a tile cache" >&2 + if ls "$TILES"/[0-9]*.bin > /dev/null 2>&1; then + echo " it looks like a FRAMES directory (raw 1-bpp frames)." >&2 + echo " build the cache from it first:" >&2 + echo " python3 harness/udpstream/make_tiles.py --clip $TILES --out $TILES-tiles" >&2 + fi + echo " the committed 30-frame cache is harness/udpstream/tiles" >&2 + exit 2 + fi + done +fi + # --- readiness: an ICMP reply from the terminal's own stack ----------------- start=$(date +%s) while ! ping -c1 -W1 "$HOST" > /dev/null 2>&1; do