#!/bin/sh -e cat "$1" | grep -a '^:20' | cut -c10- | rev | cut -c4- | rev | xxd -r -p > app.bin wf=$((16384-`wc -c < app.bin`)) (cat app.bin; dd if=/dev/zero bs=$wf count=1 2>/dev/null) > appv.bin rm -f app.bin cd to8xv ./make.sh cd .. to8xv/to8xv appv.bin "$1.8xv" APP rm -f appv.bin