summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2018-06-03 11:04:06 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2018-06-03 11:04:06 -0400
commit634df276352ea64c6eff423bb706cfae8a39a67b (patch)
tree190253502a1f5055a5e9ea5c1f3d33a5c274d3e7 /tools
parent898c863bd46ebc4fdca5329f1ebe64212b079630 (diff)
parent20ac549a91c5e9249b1b04c16e65df2aefac1aae (diff)
Merge branch 'master' into build_more_roms
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 0000000..d53150f
--- /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"