Created
September 25, 2021 13:23
-
-
Save ISSOtm/e4e8e4c0816f1547874eabf87e4ba2e2 to your computer and use it in GitHub Desktop.
Awk script for generating a Game Boy SYM file from a RGBDS map file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
/^[^ \t]+[ \t]bank #([0-9]+):$/ { | |
bank = substr($3, 2) | |
sub(/:/, "", bank) | |
} | |
/^[ \t]*\$[0-9A-Fa-f]{4}[ \t]+=[ \t]+/ { | |
printf "%02x:%s %s\n", bank, substr($1, 2), $3 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment