9f7a83fd6a
* 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>
19 lines
560 B
Bash
Executable file
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
|