diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2019-12-18 16:43:24 -0500 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2019-12-18 16:43:24 -0500 |
commit | ae881a3623eae7cf61702e73ead7c2343af0bda3 (patch) | |
tree | 9344e79fcc6db84ac12d65adfd119f1a6375b80d /asmdiff.sh | |
parent | 7984a91c0892e0bd96ace89405d565ec0b43e084 (diff) |
Start implementing LG and 1.1
Diffstat (limited to 'asmdiff.sh')
-rwxr-xr-x | asmdiff.sh | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/asmdiff.sh b/asmdiff.sh index d4627c007..9e2bef55b 100755 --- a/asmdiff.sh +++ b/asmdiff.sh @@ -1,7 +1,27 @@ #!/bin/bash +if [ "$1" == "firered" ] || [ "$1" == "leafgreen" ] || [ "$1" == "firered_rev1" ] || [ "$1" == "leafgreen_rev1" ]; then + buildname="$1" + shift +else + buildname=firered +fi + +if [ "$buildname" == "firered" ]; then + baserom=baserom +elif [ "$buildname" == "leafgreen" ]; then + baserom=baserom_lg +elif [ "$buildname" == "firered_rev1" ]; then + baserom=baserom_fr_rev1 +elif [ "$buildname" == "leafgreen_rev1" ]; then + baserom=baserom_lg_rev1 +else + echo unknown buildname $buildname + exit 1 +fi + OBJDUMP="$DEVKITARM/bin/arm-none-eabi-objdump -D -bbinary -marmv4t -Mforce-thumb" OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))" -$OBJDUMP $OPTIONS baserom.gba > baserom.dump -$OBJDUMP $OPTIONS pokefirered.gba > pokefirered.dump -diff -u baserom.dump pokefirered.dump +$OBJDUMP $OPTIONS ${baserom}.gba > ${baserom}.dump || exit 1 +$OBJDUMP $OPTIONS poke${buildname}.gba > poke${buildname}.dump +diff -u ${baserom}.dump poke${buildname}.dump |