mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-15 04:14:34 +00:00
Add "disasm sym_info.py" script (#2054)
* Add "disasm sym_info.py" script for investigating the expected memory layout * review * add friendly error if context.csv is missing * rom as hexadecimal * require spimdisasm 1.28.1 (technically not *required* but may as well) * some fixups on symbol lookup logic
This commit is contained in:
parent
d191e8714e
commit
ebbc820ef6
3 changed files with 239 additions and 2 deletions
|
@ -85,6 +85,11 @@ def main():
|
|||
|
||||
args = parser.parse_args()
|
||||
|
||||
if spimdisasm.__version_info__ < (1, 28, 1):
|
||||
print(f"Error: spimdisasm>=1.28.1 is required (you have {spimdisasm.__version__})")
|
||||
print("Hint: run `make setup` to update the venv.")
|
||||
exit(1)
|
||||
|
||||
context = spimdisasm.common.Context()
|
||||
context.parseArgs(args)
|
||||
context.changeGlobalSegmentRanges(0x00000000, 0x01000000, 0x8000000, 0x81000000)
|
||||
|
@ -117,9 +122,12 @@ def main():
|
|||
print()
|
||||
print("Analyzing done.")
|
||||
|
||||
print("Writing disassembled sections...")
|
||||
output_dir: Path = args.output_dir
|
||||
output_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
context.saveContextToFile(output_dir / "context.csv")
|
||||
|
||||
print("Writing disassembled sections...")
|
||||
for i, file_splits in enumerate(all_file_splits):
|
||||
f = i / len(all_file_splits)
|
||||
spimdisasm.common.Utils.printQuietless(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue