Or from a posix shell (linux, mac, wsl) after you have installed srecord
This splits the file:
srec_cat source.rom -Binary -split 4 0 2 -byte-swap -o hi.rom -Binary
srec_cat source.rom -Binary -split 4 2 2 -byte-swap -o lo.rom -Binary
Then double it to fill a 27c400:
cat hi.rom hi.rom > hi.bin
cat lo.rom lo.rom > lo.bin
Make a little shell script so you can just call it once against your rom file.. (this is for my own future benefit because I always have to look at the manpage for srec_cat because I do these so seldom ;-)
#!/bin/bash
[ ! -f $1 ] && echo "File not found: $1" && exit 1
srec_cat "$1" -Binary -split 4 0 2 -byte-swap -o /tmp/"$1"hi -Binary
srec_cat "$1" -Binary -split 4 2 2 -byte-swap -o /tmp/"$1"lo -Binary
cat /tmp/"$1"hi /tmp/"$1"hi > "$1"-hi.bin
cat /tmp/"$1"lo /tmp/"$1"lo > "$1"-lo.bin
rm /tmp/"$1"hi /tmp/"$1"lo
|