#!/bin/sh
# Ch408: D6 scene plus authentic capacity-safe PSMT4 overlay.  The board
# already has all D6 assets, so upload only the reference-input merged table
# and the 18 new E1 epochs rather than duplicating 434 texture files.
set -eu
DEST="${1:-terasic@192.168.50.161:~}"
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
DATA="$ROOT/sim/data/top_psmct32_raster_demo"
FILES="$ROOT/tools/ps2_sh3_sched.c $DATA/sh3_zsrt139e3_epochs.txt"
k=0
while [ "$k" -lt 18 ]; do
    FILES="$FILES $DATA/sh3_zsrt139e1${k}_tex_lpddr.mem $DATA/feeder_sh3_zsrt139e1${k}.mem $DATA/sh3_zsrt139e1${k}_pal.mem"
    k=$((k + 1))
done
for f in $FILES; do [ -f "$f" ] || { echo "MISSING: $f" >&2; exit 1; }; done
exec scp $FILES "$DEST"
