-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
split bmbgfx data
Showing
16 changed files
with
1,648 additions
and
72 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.section .data | ||
|
||
.global gUnk_08DBAD14 | ||
gUnk_08DBAD14: @ 0x08DBAD14 | ||
.incbin "FireEmblem7J.base.gba", 0xDBAD14, 0xDC0390 - 0xDBAD14 | ||
|
||
.global gUnk_08DC0390 | ||
gUnk_08DC0390: @ 0x08DC0390 | ||
.incbin "FireEmblem7J.base.gba", 0xDC0390, 0xE00008 - 0xDC0390 | ||
|
||
.global gUnk_08E00008 | ||
gUnk_08E00008: @ 0x08E00008 | ||
.incbin "FireEmblem7J.base.gba", 0xE00008, 0xFC0008 - 0xE00008 | ||
|
||
.global gUnk_08FC0008 | ||
gUnk_08FC0008: @ 0x08FC0008 | ||
.incbin "FireEmblem7J.base.gba", 0xFC0008, 0xFD8008 - 0xFC0008 | ||
|
||
.global gUnk_08FD8008 | ||
gUnk_08FD8008: @ 0x08FD8008 | ||
.incbin "FireEmblem7J.base.gba", 0xFD8008, 0x1000000 - 0xFD8008 |
This file contains 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
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/usr/bin/python3 | ||
# -*- coding: UTF-8 -*- | ||
|
||
# split data | ||
|
||
import os, sys, subprocess | ||
|
||
def generate_unsymboled_const_data(): | ||
list = {} | ||
|
||
_identifier = " 0x08" | ||
start_offse = 29 | ||
|
||
for line in sys.stdin.readlines(): | ||
if _identifier in line: | ||
ptr = eval(line[start_offse:start_offse+10]) | ||
|
||
list[ptr] = f"gUnk_{ptr:08X}" | ||
|
||
return sorted(list.values()) | ||
|
||
def write_data(fs, fh, symbol, start, end): | ||
# fh.write(f'// ??? {symbol}\n') | ||
fh.write(f'extern u8 {symbol}[];\n') | ||
|
||
fs.write(f'\n\t.global {symbol}\n') | ||
fs.write(f'{symbol}:\t@ 0x{symbol[5:5+8]}\n') | ||
fs.write(f'\t.incbin "FireEmblem7J.base.gba", 0x{start:06X}, 0x{end:06X} - 0x{start:06X}\n') | ||
|
||
def main(args): | ||
try: | ||
out_s = args[1] | ||
out_h = args[2] | ||
except IndexError: | ||
sys.exit(f"Usage: {args[0]} OUT_FILE_S OUT_FILE_H") | ||
|
||
symbols = generate_unsymboled_const_data() | ||
|
||
with open(out_s, 'w') as fs, open(out_h, 'w') as fh: | ||
for i in range(len(symbols)): | ||
symbol = symbols[i] | ||
off1 = eval(f'0x{symbol[7:7+6]}') | ||
|
||
if i == (len(symbols) - 1): | ||
off2 = 0 | ||
else: | ||
symbol2 = symbols[i + 1] | ||
off2 = eval(f'0x{symbol2[7:7+6]}') | ||
|
||
print(symbol) | ||
|
||
write_data(fs, fh, symbol, off1, off2) | ||
|
||
if __name__ == '__main__': | ||
main(sys.argv) |
This file contains 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