summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorsurskitty <surskitty@gmail.com>2018-01-23 00:02:56 -0500
committersurskitty <surskitty@gmail.com>2018-01-23 00:02:56 -0500
commitfbc6fe4722f3faa69f4126ea3d2fe3a41fcba16d (patch)
tree98c4ff39e6cb5a310c8184ba7634ef5eb7cfd19e /tools
parent4162705db909da94a62f30b5e2caee048b3bc107 (diff)
parentc60f1331fef22b886adf3472d2b4f348832cfaf7 (diff)
Merge branch 'master' of github.com:pret/pokecrystal
Diffstat (limited to 'tools')
-rwxr-xr-xtools/sort_symfile.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/sort_symfile.sh b/tools/sort_symfile.sh
new file mode 100755
index 000000000..d53150faa
--- /dev/null
+++ b/tools/sort_symfile.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+sed $1 \
+ -e "s/^..:[0-3]/0_ROM0@&/g" \
+ -e "s/^..:[4-7]/1_ROMX@&/g" \
+ -e "s/^..:[8-9]/2_VRAM@&/g" \
+ -e "s/^..:[A-B]/3_SRAM@&/g" \
+ -e "s/^00:[C-D]/4_WRAM0@&/g" \
+ -e "s/^..:[D-D]/5_WRAMX@&/g" \
+| sort -o $1
+sed -i $1 -e "s/^\w*@//g"