From: astoria-d Date: Wed, 4 Sep 2013 02:57:01 +0000 (+0900) Subject: nes image data extracter updated. X-Git-Tag: motonesfpga-gate-0.2.0~176 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f9bbb771dd81059e8a6c76b95103d14a5ed60ae1;p=motonesfpga%2Fmotonesfpga.git nes image data extracter updated. --- diff --git a/tools/test-image/dd-img.sh b/tools/test-image/dd-img.sh index 72dd1aa..5413687 100755 --- a/tools/test-image/dd-img.sh +++ b/tools/test-image/dd-img.sh @@ -1,4 +1,16 @@ -#!/bin/bash -x +#!/bin/bash -dd if=sample1.nes of=sample1.hex bs=16 skip=1 count=2048 +if [ "$1" == "" ] ; then + echo "$0 -in_filename (w/o .nex )" + exit -1 +fi + +in_name=$1 + +in_file=$in_name.nes +out_file1=$in_name-prg.bin +out_file2=$in_name-chr.bin + +dd if=$in_file of=$out_file1 bs=16 skip=1 count=2048 +dd if=$in_file of=$out_file2 bs=16 skip=2049