summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2020-12-11 21:33:29 -0500
committerGitHub <noreply@github.com>2020-12-11 21:33:29 -0500
commit52b7576a5e636c4bfe6e5c212515d17bdc4bcac0 (patch)
tree41535f6e0d45f4b3cea589cee41bc1fc01fd6387
parent25282fbaa85f45dca79e38cc512b09549e2fed90 (diff)
parent54acea6083da645dd509a226cb1156be01236b80 (diff)
Merge pull request #1266 from Kurausukun/asmdiff
improve asmdiff.sh
-rwxr-xr-xasmdiff.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/asmdiff.sh b/asmdiff.sh
index 9e8749acf..6ea588131 100755
--- a/asmdiff.sh
+++ b/asmdiff.sh
@@ -1,7 +1,11 @@
#!/bin/bash
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 pokeemerald.gba > pokeemerald.dump
diff -u baserom.dump pokeemerald.dump