gen.sh 255 B

12345678
  1. #!/bin/sh
  2. if [ $# -ne 3 ]; then
  3. echo "Usage: ./gen.sh input.rom input.logo output.rom"
  4. exit 1
  5. fi
  6. xxd -ps -c 1000000 "$1" | sed "s/010f3f7eff.*7c7c0000000000/$(./frob.sh < "$2" | paste -sd' ' | ./transpose.sh | tr -d ' \n')/g" | xxd -ps -r > "$3"