View Single Post
Old 20 November 2020, 12:34   #708
Jope
-
 
Jope's Avatar
 
Join Date: Jul 2003
Location: Helsinki / Finland
Age: 43
Posts: 9,879
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
Jope is offline  
 
Page generated in 0.04509 seconds with 11 queries