sovereignx/asmdiff.sh
Bassoonian 9f7a83fd6a
Pret merge (20th of June) (#4845)
* Don't assume bash is at /bin/bash

* Add NixOS install instructions

* Add support for LF line endings to gbagfx

---------

Co-authored-by: leo60228 <leo@60228.dev>
Co-authored-by: Martin Griffin <martinrgriffin@gmail.com>
Co-authored-by: Alex Nash <contact@alexnash.dev>
2024-06-21 12:21:29 +02:00

19 lines
560 B
Bash
Executable file

#!/usr/bin/env bash
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"
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