repo2/atari_chips/pokeyv2/makeflash
1439 | markw | FPGASIZE=$1
|
|
1249 | markw | rm version
|
|
1424 | markw | cat UFMboth_post.bin CFMboth_post.bin > $3
|
|
echo $2 > version
|
|||
dd conv=notrunc if=version bs=1 count=8 of=$3
|
|||
1439 | markw | ||
if [[ FPGASIZE -gt 15 ]]
|
|||
then
|
|||
EXPECTED=16#66000 #10M16
|
|||
elif [[ FPGASIZE -gt 7 ]]
|
|||
then
|
|||
EXPECTED=16#39800 #10M08
|
|||
elif [[ FPGASIZE -gt 3 ]]
|
|||
then
|
|||
1465 | markw | EXPECTED=16#35800 #10M04
|
|
1439 | markw | fi
|
|
PADSIZE=$((EXPECTED - `stat -c %s $3`))
|
|||
if [[ PADSIZE -gt 0 ]]
|
|||
then
|
|||
perl -e "print chr(255)x$PADSIZE" >> $3
|
|||
fi
|