2017-10-01 22:05:00 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-12-17 03:24:44 +01:00
|
|
|
if [[ -d "$DEVKITARM/bin/" ]]; then
|
|
|
|
OBJDUMP_BIN="$DEVKITARM/bin/arm-none-eabi-objdump"
|
|
|
|
else
|
|
|
|
OBJDUMP_BIN="arm-none-eabi-objdump"
|
|
|
|
fi
|
|
|
|
|
|
|
|
OBJDUMP="$OBJDUMP_BIN -D -bbinary -marmv4t -Mforce-thumb"
|
|
|
|
|
2020-12-11 06:32:12 +01:00
|
|
|
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
|
2020-12-17 03:24:44 +01:00
|
|
|
|
2017-10-01 22:05:00 +02:00
|
|
|
$OBJDUMP $OPTIONS baserom.gba > baserom.dump
|
|
|
|
$OBJDUMP $OPTIONS pokeemerald.gba > pokeemerald.dump
|
2019-03-24 22:32:59 +01:00
|
|
|
diff -u baserom.dump pokeemerald.dump
|