From 54acea6083da645dd509a226cb1156be01236b80 Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Fri, 11 Dec 2020 00:32:12 -0500 Subject: [PATCH] improve asmdiff.sh --- asmdiff.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/asmdiff.sh b/asmdiff.sh index 9e8749acff..6ea588131d 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