improve asmdiff.sh

This commit is contained in:
Kurausukun 2020-12-11 00:32:12 -05:00
parent 8d29f65c6c
commit 54acea6083
1 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,11 @@
#!/bin/bash #!/bin/bash
OBJDUMP="$DEVKITARM/bin/arm-none-eabi-objdump -D -bbinary -marmv4t -Mforce-thumb" OBJDUMP="$DEVKITARM/bin/arm-none-eabi-objdump -D -bbinary -marmv4t -Mforce-thumb"
OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))" if [ $(($1)) -ge $((0x8000000)) ]; then
OPTIONS="--adjust-vma=0x8000000 --start-address=$(($1)) --stop-address=$(($1 + $2))"
else
OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))"
fi
$OBJDUMP $OPTIONS baserom.gba > baserom.dump $OBJDUMP $OPTIONS baserom.gba > baserom.dump
$OBJDUMP $OPTIONS pokeemerald.gba > pokeemerald.dump $OBJDUMP $OPTIONS pokeemerald.gba > pokeemerald.dump
diff -u baserom.dump pokeemerald.dump diff -u baserom.dump pokeemerald.dump