Here is a completly untested script that can help people
to write romrc driver for unsuported dump or new game.
The script take the zip in param and write to stdout a
possible driver that may or may not work, but can be a
good start.


-----------------------
#!/bin/sh

if [ $# -ne 1 ] ; then
        echo "Usage:"
        echo `basename $0` " rom.zip"
        exit 1
fi

echo game `basename $1 .zip` MVS '"Please fill me"'
unzip -l $1 | sort -k4,4 >/tmp/mkromrc.$$

for section in SM1 SFIX CPU SOUND1 GFX ; do
        case $section in
        SM1) ftype="_m";;
        SFIX) ftype="_s";;
        CPU) ftype="_p";;
        SOUND1) ftype="_v";;
        GFX) ftype="_c";;
        esac

        cat /tmp/mkromrc.$$ | grep "$ftype.\." |
        awk '{size+=$1} END {printf("%s 0x%x\n",section,size)}' section
=$section
        if [ $section = GFX ] ; then
                cat /tmp/mkromrc.$$ |
                grep "$ftype.\." |
                awk '{
                        printf("%s 0x%x 0x%x ALTERNATE\n",$4,offset,$1);
                        if (a%2) {
                                offset+=$1-1;
                        } else {
                                offset+=1;
                        }
                        a++;
                }'
        else
                cat /tmp/mkromrc.$$ |
                grep "$ftype.\." |
                awk '{
                        printf("%s 0x%x 0x%x NORM\n",$4,offset,$1);
                        offset+=$1;
                }'
        fi
        echo END
done
echo END
rm /tmp/mkromrc.$$



Gngeo mailing list 
To unsubscribe : mailto:[EMAIL PROTECTED]

        

Reply via email to